/* HKRBC Disclosure Database — Webb-site homage retro CSS */

/* ── Global ─────────────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  color: #000000;
  background: #FFFFFF;
  max-width: auto;
  margin: 20px 0 20px 20px; /*上 右 下 左*/
  padding: 0 30px 0 5px;
  line-height: 1.5;
}

/* ── Lists ──────────────────────────────────────────────── */

ul, ol {
  padding-left: 40px;
  margin: 4px 0;
}

li {
  margin-bottom: 2px;
}

/* ── Headings ──────────────────────────────────────────── */

.header {
  background: #722F37;
  color: #FFFFFF;
  padding: 6px 10px;
}

h1 {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 4px 0;
  padding: 0;
  color: #FFFFFF;
}

h2 {
  font-size: 16px;
  font-weight: bold;
  margin: 12px 0 4px;
}

h3 {
  font-size: 14px;
  font-weight: bold;
  margin: 10px 0 2px;
}

/* ── Links ─────────────────────────────────────────────── */

a:link, a:visited {
  color: #0000EE;
}
a:visited {
  color: #551A8B;
}
a:hover {
  color: #0000EE;
}

/* ── Navigation ────────────────────────────────────────── */

.nav {
  font-size: 13px;
  margin: 0;
  padding: 0;
}

.nav a, .nav a:link, .nav a:visited {
  font-weight: bold;
  color: #FFFFFF;
}

.nav a:hover {
  color: #FFD700;
}

/* ── Horizontal Rule ───────────────────────────────────── */

hr {
  border: none;
  border-top: 1px solid #999999;
  margin: 6px 0;
}

/* ── Nav Dropdown ───────────────────────────────────────── */

.nav-dropdown {
  cursor: default;
  font-weight: bold;
  position: relative;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #FFFFFF;
  border: 1px solid #999999;
  padding: 4px 0;
  z-index: 999;
  white-space: nowrap;
}

.nav-dropdown-content a, .nav-dropdown-content a:link, .nav-dropdown-content a:visited {
  display: block;
  padding: 2px 8px;
  font-weight: normal;
  text-decoration: none;
  color: #0000EE;
}

.nav-dropdown-content a:hover {
  background: #EEEEEE;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

/* ── Details / Summary ──────────────────────────────────── */

details {
  margin: 8px 0;
}

summary {
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 4px;
}

.checkbox-actions {
  margin: 2px 0 4px;
  font-size: 12px;
}

/* ── Tables ────────────────────────────────────────────── */

table {
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
}

table th, table td {
  border: 1px solid #999999;
  padding: 2px 6px;
  text-align: left;
  vertical-align: top;
}

table th {
  background: #EEEEEE;
  font-weight: bold;
  cursor: pointer;
}

table th:hover {
  background: #DDDDDD;
}

table.sortable th.asc::after {
  content: " \25B2";  /* up triangle */
}
table.sortable th.desc::after {
  content: " \25BC";  /* down triangle */
}

/* ── Forms (native only) ───────────────────────────────── */

input[type="text"],
input[type="checkbox"],
select,
button {
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  margin: 2px;
  padding: 1px 4px;
}

input[type="checkbox"] {
  margin-right: 2px;
}

select {
  padding: 1px 2px;
}

/* ── Chart containers ──────────────────────────────────── */

.chart {
  width: 100%;
  margin: 8px 0;
}

/* ── Utility ───────────────────────────────────────────── */

.text-link {
  cursor: pointer;
  color: #0000EE;
  text-decoration: underline;
}

.text-link:hover {
  color: #0000EE;
}

.active {
  font-weight: bold;
  color: #000000;
}

.sort-links a {
  margin: 0 4px;
}

.checkbox-list {
  columns: 3;
  font-size: 12px;
  margin: 4px 0;
  padding: 4px;
  border: 1px solid #999999;
  max-height: 200px;
  overflow-y: auto;
}

.checkbox-list label {
  display: block;
  white-space: nowrap;
}

/* ── Compare page ──────────────────────────────────────── */

.compare-picker {
  display: flex;
  gap: 20px;
  margin: 8px 0;
  align-items: flex-end;
}

.compare-picker select {
  min-width: 250px;
}

.compare-table {
  width: 100%;
  margin: 12px 0;
}
.compare-table td {
  padding: 3px 6px;
  font-size: 13px;
}
.compare-table .label-col {
  text-align: center;
  font-weight: bold;
  width: 35%;
  white-space: nowrap;
}
.compare-table .bar-a {
  text-align: right;
  padding-right: 4px;
  white-space: nowrap;
  width: 32.5%;
}
.compare-table .bar-b {
  text-align: left;
  padding-left: 4px;
  white-space: nowrap;
  width: 32.5%;
}
.bar-a.highlight { background: #FFE0E0; font-weight: bold; }
.bar-b.highlight { background: #E0FFE0; font-weight: bold; }

/* ── Footer ────────────────────────────────────────────── */

.footer {
  font-size: 11px;
  color: #666666;
  margin-top: 8px;
}

/* ── Fun fact ──────────────────────────────────────────── */

.fun-fact {
  font-size: 13px;
  margin: 6px 0;
  font-style: italic;
}
