:root {
  --ink: #172b27;
  --forest: #23473e;
  --forest-deep: #15332d;
  --moss: #567566;
  --sage: #dbe5d9;
  --paper: #fffdf7;
  --cream: #f4f0e5;
  --sand: #e9dec5;
  --amber: #8b3d0f;
  --amber-soft: #fff0dc;
  --red: #9c2f26;
  --red-soft: #fff0ed;
  --blue: #2e6472;
  --blue-soft: #e8f3f5;
  --line: #cbd4ca;
  --muted: #52645d;
  --shadow: 0 18px 50px rgb(23 43 39 / 9%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  z-index: 100;
  inset: .75rem auto auto .75rem;
  padding: .75rem 1rem;
  color: white;
  background: var(--forest-deep);
  border-radius: .4rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.safety-banner {
  padding: .72rem max(1rem, calc((100% - 76rem) / 2));
  color: #481713;
  background: var(--red-soft);
  border-bottom: 2px solid #d7a49f;
  font-size: .88rem;
  font-weight: 720;
}
.safety-banner strong { color: var(--red); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.6rem;
  padding: .7rem max(1rem, calc((100% - 76rem) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.75rem;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.02em;
}
.brand-mark {
  display: grid;
  width: 2.6rem;
  aspect-ratio: 1;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 48% 48% 42% 42%;
  font-family: Georgia, serif;
}
.brand span span { display: block; color: var(--moss); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav a {
  min-height: 2.75rem;
  padding: .68rem .78rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--forest-deep); background: var(--sage); }

main { width: min(76rem, calc(100% - 2rem)); margin-inline: auto; padding: 2.3rem 0 5rem; }
.hero { display: grid; gap: 1.4rem; padding: 1rem 0 2.2rem; }
.hero-copy { max-width: 49rem; }
.eyebrow {
  margin: 0 0 .7rem;
  color: var(--amber);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.08; }
h1 { margin: 0; max-width: 52rem; font: 650 clamp(2.45rem, 9vw, 5.3rem)/.95 Georgia, serif; letter-spacing: -.045em; }
h2 { margin: 0; font: 650 clamp(1.7rem, 5vw, 2.5rem)/1.05 Georgia, serif; }
h3 { margin: 0; font-size: 1rem; }
.lede { max-width: 44rem; margin: 1.3rem 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.pilot-note {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .48rem .7rem;
  color: var(--forest-deep);
  background: var(--sage);
  border: 1px solid #bacaba;
  border-radius: 999px;
  font-size: .77rem;
  font-weight: 800;
}
.pilot-note::before { width: .55rem; height: .55rem; content: ""; background: var(--forest); border-radius: 50%; }
.offline-status { margin: .75rem 0 0; color: var(--muted); font-size: .78rem; font-weight: 700; }

.action-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.6rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1.05rem;
  border: 1px solid var(--forest);
  border-radius: .55rem;
  color: white;
  background: var(--forest);
  font-weight: 800;
  text-decoration: none;
}
.button:hover { background: var(--forest-deep); }
.button.secondary { color: var(--forest-deep); background: transparent; }
.button.secondary:hover { background: var(--sage); }
.button.warning { color: #611f19; background: var(--red-soft); border-color: #bd7770; }
.button[disabled] { color: #6d6860; background: #e4e0d8; border-color: #c7c1b7; cursor: not-allowed; }

.feed-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  color: white;
  background: var(--forest-deep);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}
.feed-card::after {
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: 10rem;
  aspect-ratio: 1;
  content: "";
  background: repeating-linear-gradient(45deg, transparent 0 12px, rgb(255 255 255 / 8%) 12px 24px);
  border: 1px solid rgb(255 255 255 / 15%);
  transform: rotate(12deg);
}
.feed-card p { max-width: 32rem; color: #d8e5df; }
.feed-card strong { display: block; margin-top: .6rem; color: #f3c58e; }

.section { margin-top: 2.6rem; }
.section-head { display: grid; gap: .7rem; margin-bottom: 1.1rem; }
.section-head p { max-width: 44rem; margin: 0; color: var(--muted); }
.cards { display: grid; gap: 1rem; }
.card {
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .9rem;
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); }
.card .button { width: 100%; margin-top: .6rem; }
.card-number { display: block; margin-bottom: 1rem; color: var(--amber); font: 650 2.2rem Georgia, serif; }

.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.metric {
  min-height: 7.4rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .75rem;
}
.metric strong { display: block; font: 650 2rem Georgia, serif; }
.metric span { color: var(--muted); font-size: .78rem; }
.metric small { display: block; margin-top: .6rem; color: var(--blue); font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.boundary {
  display: grid;
  gap: .5rem;
  padding: 1rem 1.1rem;
  background: var(--amber-soft);
  border: 1px solid #e0b98d;
  border-left: .38rem solid var(--amber);
  border-radius: .55rem;
}
.boundary p { margin: 0; color: #624329; font-size: .9rem; }
.boundary.danger { background: var(--red-soft); border-color: #d7a49f; border-left-color: var(--red); }
.boundary.danger p { color: #5e2924; }

.form-shell { display: grid; gap: 1rem; }
.form-card { padding: 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: .9rem; }
.form-card fieldset { margin: 0; padding: 0; border: 0; }
.form-card fieldset.section { margin-top: 2.25rem; }
.form-card legend { margin-bottom: .4rem; font: 650 1.28rem Georgia, serif; }
.field-grid { display: grid; gap: 1rem; margin-top: 1rem; }
label, .label { display: block; color: var(--forest-deep); font-size: .87rem; font-weight: 780; }
label small, .label small { display: block; margin-top: .18rem; color: var(--muted); font-weight: 500; }
select, input[type="number"] {
  width: 100%;
  min-height: 3rem;
  margin-top: .4rem;
  padding: .65rem .75rem;
  color: var(--ink);
  background: white;
  border: 1px solid #98aaa1;
  border-radius: .45rem;
}
.choices { display: grid; gap: .65rem; margin-top: .65rem; }
.choice {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  gap: .55rem;
  align-items: start;
  padding: .75rem;
  background: #f8f6ef;
  border: 1px solid var(--line);
  border-radius: .5rem;
  font-weight: 650;
}
.choice input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--forest); }
.form-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1.1rem; }
.form-status { min-height: 1.5rem; margin: 0; color: var(--blue); font-weight: 760; }

.status-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  color: var(--forest-deep);
  background: var(--sage);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status.pending { color: #6d421d; background: var(--amber-soft); }
.status.blocked { color: #70241e; background: var(--red-soft); }
.status.info { color: #214d57; background: var(--blue-soft); }

.operator-layout { display: grid; gap: 1rem; }
.operator-bar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem;
  color: white;
  background: var(--forest-deep);
  border-radius: .8rem;
}
.operator-bar p { margin: .35rem 0 0; color: #d3e1db; font-size: .85rem; }
.operator-bar .status { flex: 0 0 auto; }
.queue { display: grid; gap: .7rem; }
.queue-item { padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: .7rem; }
.queue-item header { display: flex; justify-content: space-between; gap: .7rem; align-items: start; }
.queue-item p { margin: .5rem 0; color: var(--muted); font-size: .86rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: .8rem 0 0; }
.fact { padding: .6rem; background: #f5f3eb; border-radius: .4rem; }
.fact dt { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fact dd { margin: .12rem 0 0; font-weight: 760; }

.gate-list { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: gate; }
.gate-list li { position: relative; min-height: 3.2rem; padding: 0 0 1rem 2.5rem; counter-increment: gate; }
.gate-list li::before { position: absolute; left: 0; top: -.1rem; display: grid; width: 1.8rem; aspect-ratio: 1; place-items: center; content: counter(gate); color: white; background: var(--forest); border-radius: 50%; font-size: .75rem; font-weight: 850; }
.gate-list li.blocked::before { background: var(--red); }
.gate-list strong { display: block; }
.gate-list span { color: var(--muted); font-size: .82rem; }

.prep-list { display: grid; gap: .8rem; padding: 0; list-style: none; counter-reset: prep; }
.prep-list li { position: relative; padding: 1rem 1rem 1rem 3.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: .65rem; counter-increment: prep; }
.prep-list li::before { position: absolute; left: 1rem; top: 1rem; content: counter(prep, decimal-leading-zero); color: var(--amber); font-weight: 900; }
.prep-list strong { display: block; margin-bottom: .25rem; }
.prep-list span { color: var(--muted); }

.footer { padding: 2.2rem max(1rem, calc((100% - 76rem) / 2)); color: #d7e5df; background: var(--forest-deep); }
.footer p { max-width: 50rem; margin: .35rem 0; font-size: .8rem; }
.footer a { color: white; }
.screen-only { display: initial; }
.print-only { display: none; }

:focus-visible { outline: 3px solid #5b2a00; outline-offset: 3px; }

@media (min-width: 43rem) {
  .hero { grid-template-columns: minmax(0, 1.45fr) minmax(18rem, .65fr); align-items: end; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(4, 1fr); }
  .field-grid { grid-template-columns: repeat(2, 1fr); }
  .form-shell { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
  .operator-layout { grid-template-columns: minmax(0, 1.5fr) minmax(18rem, .7fr); align-items: start; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 48rem) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .site-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .2rem; }
  .site-nav a { white-space: nowrap; }
  .operator-bar { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .status, .pilot-note, .button { border: 1px solid ButtonText; }
  .pilot-note::before { background: CanvasText; }
}

@media print {
  @page { margin: .6in; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .safety-banner { color: #000; background: #fff; border: 2px solid #000; }
  .site-header, .footer, .screen-only, .button { display: none !important; }
  main { width: 100%; padding: 0; }
  h1 { font-size: 30pt; }
  .print-only { display: block; }
  .card, .prep-list li, .boundary { box-shadow: none; break-inside: avoid; }
}
