:root {
  color-scheme: light;
  --ink: #1d2735;
  --muted: #627083;
  --line: #dce3e9;
  --paper: #f5f7f8;
  --white: #fff;
  --blue: #195b72;
  --blue-dark: #123d50;
  --mint: #e3f0ed;
  --amber: #f2e7cb;
  --serif: Georgia, "Times New Roman", serif;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-dark); }
code { padding: 0.08em 0.32em; border-radius: 4px; background: #eaf0f2; font-size: 0.92em; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-row { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--ink); display: inline-flex; flex-direction: column; font-size: 0.9rem; font-weight: 800; letter-spacing: 0.09em; line-height: 1.2; text-decoration: none; }
.brand span { margin-top: 5px; color: var(--muted); font-size: 0.65rem; font-weight: 650; letter-spacing: 0.13em; }
header nav { display: flex; flex-wrap: wrap; gap: 22px; }
header nav a { color: var(--muted); font-size: 0.9rem; font-weight: 650; text-decoration: none; }
header nav a[aria-current="page"], header nav a:hover { color: var(--blue); }

.mission-banner { background: var(--mint); border-bottom: 1px solid var(--line); color: var(--blue-dark); }
.mission-banner p { font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; line-height: 1.5; margin: 0; padding-block: 20px; }

.hero { padding: 76px 0 62px; max-width: 760px; }
.hero-compact { padding: 58px 0 36px; }
.eyebrow { color: var(--blue); font-size: 0.73rem; font-weight: 750; letter-spacing: 0.14em; margin: 0 0 10px; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; letter-spacing: -0.035em; margin: 0 0 20px; }
.hero p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; margin: 0; max-width: 690px; }
.section-heading { align-items: end; display: flex; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
.section-heading h2, .reference-toolbar h2 { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; margin: 0; }
.text-link { font-weight: 650; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.topic-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); min-height: 210px; padding: 25px 27px; text-decoration: none; transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease; }
.topic-card:hover { border-color: #9fb8c1; box-shadow: 0 8px 26px #1d27350d; color: var(--ink); transform: translateY(-2px); }
.topic-number { color: var(--blue); font-size: 0.73rem; font-weight: 800; letter-spacing: 0.12em; }
.topic-card h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; margin: 18px 0 7px; }
.topic-card p { color: var(--muted); margin: 0 0 20px; max-width: 420px; }
.card-arrow { color: var(--blue); font-size: 0.9rem; font-weight: 700; }
.notice { background: var(--mint); border-radius: 8px; margin: 32px 0 72px; padding: 19px 22px; }
.notice p { margin: 5px 0 0; }
.site-methodology, .community-collection { background: var(--white); border: 1px solid var(--line); border-radius: 10px; margin: 28px auto 42px; padding: clamp(20px, 3vw, 30px); }
.site-methodology h2, .community-collection h2 { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; margin: 0 0 12px; }
.site-methodology p, .community-collection p { margin: 0 0 10px; }
.site-methodology p:last-child, .community-collection p:last-child { margin-bottom: 0; }
.community-collection { background: var(--mint); margin-top: 0; }

.topic-layout { align-items: start; display: grid; gap: 52px; grid-template-columns: 220px minmax(0, 1fr); padding-bottom: 64px; padding-top: 40px; }
.topic-sidebar { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 18px; position: sticky; top: 20px; }
.topic-sidebar nav { display: grid; gap: 4px; }
.topic-sidebar nav a { border-radius: 5px; color: var(--muted); font-size: 0.9rem; line-height: 1.4; padding: 9px 10px; text-decoration: none; }
.topic-sidebar nav a:hover, .topic-sidebar nav a[aria-current="page"] { background: var(--mint); color: var(--blue-dark); }
.prose { background: var(--white); border: 1px solid var(--line); border-radius: 10px; min-width: 0; padding: clamp(24px, 4vw, 48px); }
.prose h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 26px; }
.prose h2 { border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.75rem; font-weight: 500; margin: 44px 0 16px; padding-top: 24px; }
.prose h3 { font-size: 1.13rem; margin: 30px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 1.4rem; }
.prose li { margin: 0 0 8px; padding-left: 0.18rem; }
.prose blockquote { border-left: 3px solid var(--blue); color: var(--muted); margin: 18px 0; padding: 3px 0 3px 18px; }
.prose table { border-collapse: collapse; display: block; margin: 18px 0 24px; max-width: 100%; overflow-x: auto; width: max-content; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.prose th { background: #eef3f4; font-weight: 700; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose a { overflow-wrap: anywhere; }
.muted { color: var(--muted); }

.comments-section { margin-bottom: 56px; }
.comments-section h2 { border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 1.75rem; font-weight: 500; margin: 0 0 20px; padding-bottom: 14px; }

.reference-panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 72px; padding: clamp(20px, 4vw, 36px); }
.reference-document { padding-block: 36px 64px; }
.reference-document .prose { margin-top: 16px; }
.reference-download { margin: 18px 0 0; }
.reference-toolbar { align-items: end; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; margin-bottom: 18px; }
.reference-toolbar p { margin: 4px 0 0; }
.search-label { color: var(--muted); display: grid; font-size: 0.82rem; font-weight: 700; gap: 5px; width: min(100%, 300px); }
.search-label input { border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font: inherit; padding: 10px 12px; }
.search-label input:focus { border-color: var(--blue); outline: 2px solid #195b7226; }
.reference-list { list-style: none; margin: 0; padding: 0; }
.reference-item { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 15px; justify-content: space-between; padding: 15px 2px; }
.reference-item a { font-weight: 680; overflow-wrap: anywhere; }
.file-meta { align-items: center; color: var(--muted); display: flex; flex-shrink: 0; font-size: 0.78rem; gap: 10px; }
.file-type { background: var(--amber); border-radius: 999px; color: #604d21; font-size: 0.69rem; font-weight: 800; letter-spacing: 0.06em; padding: 3px 8px; text-transform: uppercase; }
.error-message { background: #fff0ef; border-radius: 6px; color: #852d25; padding: 12px; }
.site-footer { background: var(--white); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.footer-row { align-items: center; display: flex; flex-wrap: wrap; gap: 15px; justify-content: space-between; min-height: 70px; padding-block: 12px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 640px); }
  .header-row { align-items: flex-start; flex-direction: column; gap: 14px; padding-block: 16px; }
  header nav { gap: 16px; }
  .hero { padding: 50px 0 42px; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .topic-layout { display: block; padding-top: 20px; }
  .topic-sidebar { margin-bottom: 16px; position: static; }
  .topic-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose { padding: 22px 18px; }
  .reference-item { align-items: flex-start; flex-direction: column; gap: 7px; }
}
