:root {
  --ink: #16202c;
  --ink-soft: #4a5866;
  --ink-faint: #6b7a89;
  --line: #dfe5ec;
  --line-soft: #eef2f6;
  --paper: #ffffff;
  --paper-alt: #f6f8fa;
  --brand: #1a3d6d;
  --brand-soft: #eaf0f8;
  --warn: #b3541e;
  --warn-soft: #fdf0e6;
  --stop: #a32020;
  --stop-soft: #fbeaea;
  --go: #1d6b45;
  --go-soft: #e8f3ed;
  --radius: 8px;
  --wrap: 62rem;
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.15rem; }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: #12294a; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: .7rem 1rem; z-index: 200;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- banner */
.disclaimer-bar {
  background: var(--warn-soft);
  border-bottom: 1px solid #f0d4bb;
  color: #6d3712;
  font-size: .85rem;
  line-height: 1.5;
  padding: .55rem 0;
}
.disclaimer-bar strong { color: #55290c; }

/* ---------------------------------------------------------------- header */
.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 100;
}
.masthead-inner {
  display: flex; align-items: center; gap: 1rem;
  justify-content: space-between;
  padding-top: .8rem; padding-bottom: .8rem;
}
.brand {
  font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none; line-height: 1.25;
}
.brand span { display: block; font-weight: 400; font-size: .76rem; color: var(--ink-faint); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 6px; padding: .45rem .7rem; font: inherit; font-size: .85rem;
  cursor: pointer; color: var(--ink);
}

.nav { display: flex; flex-wrap: wrap; gap: .1rem; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-size: .875rem;
  padding: .4rem .58rem; border-radius: 5px; white-space: nowrap;
}
.nav a:hover { background: var(--paper-alt); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; background: var(--brand-soft); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: .4rem 1.15rem .8rem;
    box-shadow: 0 8px 20px rgba(0,0,0,.07);
  }
  .nav.open { display: flex; }
  .nav a { padding: .62rem .5rem; font-size: .95rem; }
  .masthead-inner { position: relative; }
}

/* ---------------------------------------------------------------- layout */
main { padding: 2.2rem 0 1rem; }
.lede { max-width: var(--measure); }

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  line-height: 1.15; letter-spacing: -.021em; margin: 0 0 .7rem;
}
h2 {
  font-size: clamp(1.25rem, 1.05rem + .85vw, 1.55rem);
  line-height: 1.25; letter-spacing: -.014em;
  margin: 2.6rem 0 .8rem; padding-top: .3rem;
}
h3 {
  font-size: 1.06rem; line-height: 1.35; margin: 1.8rem 0 .5rem;
  letter-spacing: -.008em;
}
h4 { font-size: .95rem; margin: 1.3rem 0 .35rem; }

p, li { max-width: var(--measure); }
p { margin: 0 0 1rem; }

.subtitle {
  font-size: 1.1rem; color: var(--ink-soft); max-width: var(--measure);
  margin: 0 0 1.6rem; line-height: 1.6;
}

ul, ol { padding-left: 1.3rem; margin: 0 0 1.15rem; }
li { margin-bottom: .45rem; }
li > ul, li > ol { margin-top: .45rem; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  font-size: .87em; background: var(--paper-alt);
  padding: .12em .35em; border-radius: 4px; border: 1px solid var(--line-soft);
}

strong { font-weight: 650; }

/* ---------------------------------------------------------------- blocks */
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; margin: 1.5rem 0; background: var(--paper);
}
.card > :last-child, .callout > :last-child, .phase > :last-child { margin-bottom: 0; }
.card > :first-child, .callout > :first-child { margin-top: 0; }

.callout {
  border-left: 4px solid var(--brand); background: var(--brand-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem; margin: 1.5rem 0;
}
.callout p, .callout li { max-width: none; }
.callout .label {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; margin-bottom: .4rem; color: var(--brand);
}
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout.warn .label { color: var(--warn); }
.callout.stop { border-left-color: var(--stop); background: var(--stop-soft); }
.callout.stop .label { color: var(--stop); }
.callout.go { border-left-color: var(--go); background: var(--go-soft); }
.callout.go .label { color: var(--go); }

/* ---------------------------------------------------------------- tables */
.table-scroll { overflow-x: auto; margin: 1.4rem 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 32rem; }
caption {
  text-align: left; font-size: .84rem; color: var(--ink-faint);
  padding-bottom: .5rem; font-style: italic;
}
th, td {
  border: 1px solid var(--line); padding: .58rem .7rem;
  text-align: left; vertical-align: top;
}
th { background: var(--paper-alt); font-weight: 650; font-size: .87rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #fafcfe; }

/* ---------------------------------------------------------------- phases */
.phase {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.35rem; margin: 1.4rem 0;
}
.phase-tag {
  display: inline-block; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brand);
  background: var(--brand-soft); padding: .2rem .55rem; border-radius: 20px;
  margin-bottom: .6rem;
}
.phase h2, .phase h3 { margin-top: 0; }

/* ------------------------------------------------------------- timeline */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; }
.timeline li {
  display: grid; grid-template-columns: 5.2rem 1fr; gap: 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--line-soft);
  max-width: none; margin: 0;
}
.timeline li:last-child { border-bottom: 0; }
.timeline .day {
  font-weight: 700; font-size: .84rem; color: var(--brand);
  font-variant-numeric: tabular-nums; padding-top: .12rem;
}
.timeline .what { font-size: .95rem; }
.timeline .what b { display: block; margin-bottom: .12rem; }
.timeline .what span { color: var(--ink-soft); font-size: .89rem; }
@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: .2rem; }
}

/* ------------------------------------------------------------ checklist */
.checklist { list-style: none; padding: 0; }
.checklist li {
  position: relative; padding-left: 1.9rem; margin-bottom: .6rem;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3rem;
  width: 1.05rem; height: 1.05rem; border: 1.5px solid var(--ink-faint);
  border-radius: 3px;
}

/* ------------------------------------------------------------- cardgrid */
.grid {
  display: grid; gap: 1rem; margin: 1.6rem 0;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.grid .card { margin: 0; }
.grid .card h3 { margin-top: 0; font-size: 1rem; }
.grid .card p { font-size: .92rem; color: var(--ink-soft); margin-bottom: .6rem; }
.grid .card p, .grid .card li { max-width: none; }

a.card { text-decoration: none; color: inherit; display: block; transition: border-color .12s, box-shadow .12s; }
a.card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(26,61,109,.09); }
a.card h3 { color: var(--brand); }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 1.05rem; max-width: 24rem; }
.field label { display: block; font-weight: 600; font-size: .89rem; margin-bottom: .3rem; }
.field .hint { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-faint); margin-top: .1rem; }
input[type="date"], input[type="number"], select {
  width: 100%; padding: .55rem .65rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
  color: var(--ink);
}
button.btn {
  font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  padding: .6rem 1.15rem; border-radius: 6px;
}
button.btn:hover { background: #14304f; }
button.btn.secondary { background: var(--paper); color: var(--brand); }
button.btn.secondary:hover { background: var(--brand-soft); }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0; }

.result-empty { color: var(--ink-faint); font-style: italic; }
.pill {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: .15rem .5rem; border-radius: 20px;
}
.pill.past { background: var(--line-soft); color: var(--ink-faint); }
.pill.soon { background: var(--warn-soft); color: var(--warn); }
.pill.next { background: var(--go-soft); color: var(--go); }

/* --------------------------------------------------------------- source */
.src { font-size: .84rem; color: var(--ink-faint); }
.src a { color: var(--ink-soft); }
.cites { font-size: .87rem; }
.cites li { margin-bottom: .5rem; }

.toc {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 1.6rem 0; background: var(--paper-alt);
}
.toc h2 { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase;
          letter-spacing: .09em; color: var(--ink-faint); }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: .93rem; column-gap: 2rem; }
.toc li { margin-bottom: .3rem; max-width: none; }
@media (min-width: 700px) { .toc ol { columns: 2; } }

/* --------------------------------------------------------------- footer */
footer {
  margin-top: 3.5rem; border-top: 1px solid var(--line);
  padding: 1.8rem 0 2.5rem; font-size: .87rem; color: var(--ink-faint);
}
footer p, footer li { max-width: none; }
footer a { color: var(--ink-soft); }
.foot-grid {
  display: grid; gap: 1.4rem; margin-bottom: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.foot-grid h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em;
                margin: 0 0 .5rem; color: var(--ink); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: .3rem; }

/* ---------------------------------------------------------------- print */
@media print {
  .masthead, .nav, .nav-toggle, .btn-row, .skip, .toc { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  .card, .callout, .phase { break-inside: avoid; border: 1px solid #999; }
  .disclaimer-bar { border-bottom: 1px solid #000; }
  h2, h3 { break-after: avoid; }
}
