:root {
  color-scheme: light;
  --navy: #10252f;
  --navy-soft: #29414a;
  --mint: #52d3b2;
  --mint-dark: #147c68;
  --fog: #f3f7f6;
  --paper: #ffffff;
  --muted: #56656c;
  --line: #b8c7c5;
  --amber: #9a6219;
  --max: 75rem;
  --sans: "Segoe UI Variable", "Segoe UI", Aptos, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 { margin-top: 0; letter-spacing: -.035em; line-height: 1.05; }
h1 { max-width: 13ch; margin-bottom: 1.4rem; font-size: clamp(3.3rem, 7vw, 6.6rem); font-weight: 780; }
h2 { max-width: 17ch; margin-bottom: 1rem; font-size: clamp(2.25rem, 4.3vw, 4.15rem); font-weight: 760; }
h3 { margin-bottom: .6rem; font-size: 1.25rem; }
:focus-visible { outline: 3px solid var(--mint-dark); outline-offset: 4px; }

.shell { width: min(calc(100% - 2.5rem), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 5; top: .7rem; left: .7rem; padding: .7rem 1rem; background: var(--navy); color: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--navy); background: var(--paper); }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 4.6rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 780; text-decoration: none; }
.brand img { display: block; width: 2.35rem; height: 2.35rem; object-fit: cover; }
nav { display: flex; justify-content: flex-end; gap: 1.5rem; padding-inline: 2rem; }
nav a, .header-link { color: var(--muted); font-size: .88rem; font-weight: 650; text-decoration: none; }
nav a:hover, .header-link:hover { color: var(--navy); text-decoration: underline; }
.header-link { padding-left: 1.2rem; border-left: 1px solid var(--line); color: var(--mint-dark); }

.hero { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; padding-block: clamp(4.5rem, 9vw, 8rem); }
.context { margin: 0 0 1rem; color: var(--mint-dark); font-weight: 730; }
.lede { max-width: 42rem; margin: 0; color: var(--navy-soft); font-size: clamp(1.08rem, 1.7vw, 1.34rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; align-items: center; margin-top: 2rem; }
.button { display: inline-flex; min-height: 3.3rem; align-items: center; padding: .8rem 1.15rem; border: 1px solid var(--navy); background: var(--navy); color: white; font-weight: 730; text-decoration: none; }
.button:hover { background: var(--navy-soft); }
.text-link { color: var(--mint-dark); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2.8rem 0 0; border-top: 1px solid var(--navy); }
.facts div { padding: .8rem .75rem 0 0; }
.facts div + div { padding-left: .75rem; border-left: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .73rem; }
.facts dd { margin: .1rem 0 0; font-weight: 720; }

.receipt { margin: 0; border: 1px solid var(--navy); border-top: .45rem solid var(--mint); background: var(--paper); box-shadow: .7rem .7rem 0 #dbe6e3; }
.receipt figcaption, .receipt-meta, .receipt-total { display: flex; justify-content: space-between; gap: 1rem; }
.receipt figcaption { padding: 1.2rem 1.25rem .6rem; font-weight: 780; }
.receipt figcaption span:last-child, .receipt-meta, .receipt-row code, .receipt-total strong { font-family: var(--mono); }
.receipt-meta { padding: 0 1.25rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.receipt-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.05rem 1.25rem; border-bottom: 1px solid var(--line); }
.receipt-row strong, .receipt-row code { display: block; }
.receipt-row strong { margin-bottom: .2rem; font-size: .88rem; }
.receipt-row code { color: var(--muted); font-size: .7rem; }
.tag { min-width: 5.2rem; padding: .3rem .45rem; border: 1px solid currentColor; font-size: .67rem; font-weight: 800; text-align: center; }
.observed { background: #e2f7f1; color: var(--mint-dark); }
.inferred { background: #fff1d9; color: var(--amber); }
.unavailable { background: #e9eeed; color: var(--muted); }
.receipt-total { align-items: baseline; padding: 1rem 1.25rem; font-size: .8rem; font-weight: 700; }
.receipt-total strong { color: var(--mint-dark); font-size: 1.2rem; }
.receipt > p { margin: 0; padding: .85rem 1.25rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: .73rem; }

.signal-strip { border-block: 1px solid var(--navy); background: var(--paper); }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip-grid p { margin: 0; padding: 1.25rem 1.5rem 1.25rem 0; font-size: .88rem; }
.strip-grid p + p { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.strip-grid strong { display: block; margin-bottom: .15rem; }

.section { padding-block: clamp(5rem, 9vw, 8rem); }
.section-head { display: grid; grid-template-columns: 7fr 4fr; gap: 2rem; align-items: start; margin-bottom: 3rem; }
.section-head > p { max-width: 43ch; margin: .25rem 0 0 auto; color: var(--muted); }
.output-ledger { border-block: 1px solid var(--navy); }
.output-ledger article { display: grid; grid-template-columns: 2fr 3fr 5fr; gap: 2rem; align-items: start; padding: 1.7rem 0; }
.output-ledger article + article { border-top: 1px solid var(--line); }
.ledger-code { padding-top: .2rem; color: var(--mint-dark); font-family: var(--mono); font-size: .73rem; }
.output-ledger h3, .output-ledger p { margin: 0; }
.output-ledger p { max-width: 58ch; color: var(--muted); }

.process-section { background: var(--navy); color: white; }
.process-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 6rem; }
.section-note { max-width: 38ch; color: #bdcacd; }
.process-grid ol { margin: 0; padding: 0; border-top: 1px solid #60757d; list-style: none; }
.process-grid li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid #60757d; }
.process-grid li > span { color: var(--mint); font-family: var(--mono); font-size: .78rem; }
.process-grid li p { max-width: 45ch; margin: 0; color: #bdcacd; }

.boundary-table { border-top: 1px solid var(--navy); }
.boundary-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.boundary-row span { padding: 1rem 1.25rem 1rem 0; }
.boundary-row span + span { padding-left: 1.25rem; border-left: 1px solid var(--line); color: var(--muted); }
.boundary-header span { color: var(--navy); font-weight: 760; }

.commercial-section { border-top: 1px solid var(--navy); background: var(--paper); }
.commercial-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 5rem; }
.price-panel h2 { max-width: none; font-family: var(--mono); font-size: clamp(3.5rem, 7vw, 6.5rem); }
.price-panel > p:not(.context) { max-width: 30ch; color: var(--muted); }
.price-panel ul { margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.price-panel li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.policies article { padding: 0 0 1.5rem; border-bottom: 1px solid var(--line); }
.policies article + article { padding-top: 1.5rem; }
.policies p { max-width: 65ch; margin: 0; color: var(--muted); }
.policies a { color: var(--mint-dark); }

footer { padding-block: 2rem; border-top: 1px solid var(--navy); background: var(--fog); }
.footer-grid { display: grid; grid-template-columns: 2fr 5fr 3fr; gap: 2rem; align-items: center; }
.footer-grid p { margin: 0; color: var(--muted); font-size: .78rem; }
.footer-grid > a { justify-self: end; color: var(--mint-dark); font-size: .82rem; font-weight: 700; }
.footer-brand img { width: 2rem; height: 2rem; }

@media (max-width: 850px) {
  nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .hero, .section-head, .process-grid, .commercial-grid { grid-template-columns: 1fr; }
  .receipt { margin: 1.5rem .6rem 0 0; }
  .section-head > p { margin-left: 0; }
  .process-grid { gap: 2.5rem; }
  .output-ledger article { grid-template-columns: 1fr 2fr; }
  .output-ledger p { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 2fr; }
  .footer-grid > a { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 600px) {
  .shell { width: min(calc(100% - 1.4rem), var(--max)); }
  .header-link { padding-left: .7rem; }
  h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .hero { padding-top: 3.5rem; }
  .hero-actions, .button { width: 100%; }
  .facts, .strip-grid, .boundary-row, .footer-grid { grid-template-columns: 1fr; }
  .facts div, .facts div + div, .strip-grid p, .strip-grid p + p { padding: .75rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .receipt-row { grid-template-columns: 1fr; }
  .tag { width: fit-content; }
  .output-ledger article { grid-template-columns: 1fr; gap: .65rem; }
  .output-ledger p { grid-column: auto; }
  .boundary-row { padding-block: .4rem; }
  .boundary-row span, .boundary-row span + span { padding: .55rem 0; border-left: 0; }
  .boundary-row span + span { border-top: 1px dashed var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
