:root {
  color-scheme: light;
  --ink: #172334;
  --muted: #5d6a78;
  --line: #d7dee6;
  --soft: #f4f6f8;
  --paper: #ffffff;
  --navy: #173b59;
  --navy-dark: #102e47;
  --accent: #a35f22;
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--soft); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-size: 15px;
  line-height: 1.65;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 8px 12px;
  color: #fff;
  background: var(--navy-dark);
}

.skip-link:focus { top: 12px; }

.site-header {
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: var(--navy-dark);
  border-bottom: 1px solid #31516a;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  font-family: SimSun, serif;
  font-size: 20px;
}

.brand strong,
.brand small { display: block; }

.brand strong { font-size: 17px; letter-spacing: .04em; }
.brand small { margin-top: 1px; color: #c8d5df; font-size: 12px; }

.ledger-link {
  padding: 8px 14px;
  border: 1px solid #fff;
  color: var(--navy-dark);
  background: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.ledger-link:hover,
.ledger-link:focus-visible { color: #fff; background: transparent; }

.portal {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 44px;
}

.intro {
  max-width: 860px;
  margin-bottom: 42px;
}

.intro-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.intro h1 {
  margin: 0;
  font-family: "Microsoft YaHei", sans-serif;
  color: var(--navy-dark);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.16;
  letter-spacing: -.02em;
}

.intro > p:not(.intro-label) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.primary-entry {
  min-height: 46px;
  margin-top: 24px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: var(--navy-dark);
  border: 1px solid var(--navy-dark);
  text-decoration: none;
  font-weight: 700;
}

.primary-entry:hover,
.primary-entry:focus-visible { color: var(--navy-dark); background: #fff; }

.ledger-index {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ledger-index a {
  min-width: 0;
  min-height: 124px;
  padding: 18px 16px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-right: 1px solid var(--line);
  text-decoration: none;
}

.ledger-index a:last-child { border-right: 0; }
.ledger-index a:hover,
.ledger-index a:focus-visible { background: #eef3f6; }
.ledger-index strong { color: var(--navy); font-size: 24px; line-height: 1.2; }
.ledger-index span { color: var(--ink); font-size: 15px; font-weight: 700; }
.ledger-index small { color: var(--muted); font-size: 11px; line-height: 1.45; }

.special-reports {
  margin-top: 42px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.special-reports > summary {
  min-height: 62px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--navy-dark);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
}

.special-reports > summary::marker { color: var(--muted); }
.special-reports > summary small { color: var(--muted); font-size: 12px; font-weight: 400; }
.reports-intro { max-width: 860px; margin: 0; padding: 0 18px 18px; color: var(--muted); }
.catalog { padding: 0 18px 24px; display: grid; gap: 26px; }

.catalog-section {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.section-heading {
  padding: 14px 0 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading span { color: var(--muted); font-size: 13px; white-space: nowrap; }

.result-entry {
  min-height: 82px;
  padding: 13px 0;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.entry-meta { align-self: start; }

.entry-kind,
.entry-finding { display: block; }

.entry-kind {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.entry-finding {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.entry-copy h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.entry-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.entry-actions a {
  padding: 7px 11px;
  border: 1px solid var(--line);
  color: var(--navy-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.entry-actions a:first-child {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.entry-actions a:hover,
.entry-actions a:focus-visible { outline: 2px solid #d69b62; outline-offset: 2px; }

.boundary {
  max-width: 880px;
  margin: 24px 0 0;
  color: #687582;
  font-size: 12px;
}

.load-error {
  padding: 24px;
  color: #7e251e;
  background: #fff;
  border: 1px solid #d9aaa6;
}

@media (max-width: 820px) {
  .portal { width: min(100% - 32px, 700px); padding-top: 38px; }
  .ledger-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ledger-index a:nth-child(3) { border-right: 0; }
  .ledger-index a:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .result-entry { grid-template-columns: 120px minmax(0, 1fr); }
  .entry-actions { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .site-header { min-height: 64px; padding: 0 16px; }
  .brand small { display: none; }
  .brand-mark { width: 32px; height: 32px; font-size: 17px; }
  .ledger-link { padding: 6px 9px; font-size: 13px; }
  .portal { width: calc(100% - 24px); padding: 30px 0; }
  .intro { margin-bottom: 30px; }
  .intro h1 { font-size: 38px; }
  .intro > p:not(.intro-label) { font-size: 14px; }
  .primary-entry { width: 100%; justify-content: center; }
  .ledger-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-index a { min-height: 110px; border-bottom: 1px solid var(--line); }
  .ledger-index a:nth-child(3) { border-right: 1px solid var(--line); }
  .ledger-index a:nth-child(even) { border-right: 0; }
  .ledger-index a:nth-last-child(-n+2) { border-bottom: 0; }
  .special-reports { margin-top: 30px; }
  .special-reports > summary { padding: 13px 14px; }
  .reports-intro { padding: 0 14px 16px; }
  .catalog { padding: 0 14px 20px; gap: 24px; }
  .section-heading { padding: 13px 0; }
  .section-heading h2 { font-size: 18px; }
  .result-entry { padding: 17px 16px; display: block; }
  .entry-finding { display: inline; margin-left: 8px; }
  .entry-kind { display: inline; }
  .entry-copy { margin-top: 8px; }
  .entry-copy h3 { font-size: 16px; }
  .entry-actions { margin-top: 14px; justify-content: flex-start; flex-wrap: wrap; }
}

@media print {
  html, body { background: #fff; }
  .site-header { color: #000; background: #fff; border-color: #000; }
  .brand, .brand small, .ledger-link { color: #000; }
  .brand-mark, .ledger-link { border-color: #000; }
  .portal { width: 100%; padding: 24px 0; }
  .catalog { gap: 22px; }
  .result-entry { break-inside: avoid; }
  .entry-actions a { color: #000 !important; background: #fff !important; border-color: #000 !important; }
  .primary-entry { color: #000; background: #fff; border-color: #000; }
}
