/* Westside Radar pilot. Same system as platform/site (printed annual, General Sans, 42% axis,
   solid colour chapters); only the region tokens, mark and plate differ. */
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/general-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Region tokens: the only part a new service area replaces. */
  --paper: #eef0ea;   /* cool overcast paper */
  --ink: #14211d;
  --muted: #4a5a60;   /* rain slate, 6.6:1 on paper */
  --fir: #1c3a31;     /* chapter ground */
  --fir-ink: #eef0ea;
  --fir-muted: #b9c7bd;
  --moss: #a7b98a;    /* the one accent, used only on fir */
  --surface: #e1e5dc;
  --line: #5b6b66;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.75rem, 1.4rem + 4.6vw, 6rem);

  --margin: clamp(1.25rem, 4vw, 3.5rem);
  --axis: 42%;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; font: 400 var(--step-body)/1.45 "General Sans", system-ui, sans-serif; }
a { color: inherit; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; max-width: 62ch; }

.wrap { padding-inline: var(--margin); }
.axis { display: grid; grid-template-columns: var(--axis) 1fr; column-gap: clamp(1.5rem, 3vw, 3rem); }
.axis > .side { color: var(--muted); font-size: var(--step-small); }
@media (max-width: 760px) { .axis { grid-template-columns: 1fr; row-gap: 1rem; } .hero .plate { order: 2; } }

/* Masthead and hero: fir chapter. */
.mast { background: var(--fir); color: var(--fir-ink); }
.mast-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.25rem; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }
.wordmark svg { width: 2rem; height: 2rem; color: var(--moss); }
.mast nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: var(--step-small); }
.mast nav a { color: var(--fir-muted); text-decoration: none; white-space: nowrap; }
.mast nav a:hover { color: var(--fir-ink); text-decoration: underline; }

.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 6vw, 5rem); align-items: center; }
.hero h1 { font-size: var(--step-display); line-height: 0.92; max-width: 14ch; }
.hero .lead { font-size: var(--step-lead); line-height: 1.35; color: var(--fir-muted); margin-top: 1.5rem; max-width: 34ch; }

.plate { margin: 0; }
.plate svg { width: 100%; height: auto; display: block; }
.plate figcaption { color: var(--fir-muted); font-size: var(--step-small); margin-top: 0.5rem; }
.plate .town { fill: var(--fir-ink); font: 500 17px "General Sans", sans-serif; }
.plate .route { font: 400 13px "General Sans", sans-serif; fill: var(--fir-muted); }
@media (prefers-reduced-motion: no-preference) {
  .plate .pin-ring { animation: ping 2.8s ease-out 0.4s 2 both; transform-box: fill-box; transform-origin: center; }
  .plate .pin-ring:nth-of-type(2) { animation-delay: 0.9s; }
  @keyframes ping { from { opacity: 0.9; transform: scale(0.4); } to { opacity: 0; transform: scale(2.4); } }
}

/* Goal chooser: the one live thing on the page. Plain links to each goal's row below, so it works without a server. */
.mast .goals { display: block; margin-top: 2rem; max-width: 40rem; font-size: var(--step-body); }
.mast .goals p { font-weight: 500; margin-bottom: 0.75rem; color: var(--fir-ink); }
.goals ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mast .goals a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.55rem 1rem; border-radius: var(--radius);
  background: var(--paper); color: var(--fir); font-weight: 500; text-decoration: none; }
.mast .goals a:hover { background: var(--moss); color: var(--fir); text-decoration: none; }

/* Ask: kept for the platform build; not on the pilot page. */
.ask { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 1.25rem; margin-top: 2rem; max-width: 36rem; }
.ask label { display: block; font-weight: 500; margin-bottom: 0.5rem; }
.ask-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ask input, .ask select { flex: 1 1 14rem; font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); min-height: 48px; }
.button { font: 500 var(--step-body)/1 "General Sans", sans-serif; padding: 0.85rem 1.2rem; min-height: 48px; border-radius: var(--radius); border: 0; background: var(--fir); color: var(--fir-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.ask fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ask fieldset:disabled input, .ask fieldset:disabled .button { opacity: 0.6; cursor: not-allowed; }
.band .opening { margin-top: 1.75rem; color: var(--fir-ink); font-weight: 500; }
.ask .hint { color: var(--muted); font-size: var(--step-small); margin-top: 0.6rem; }

/* Paper chapters. */
.chapter { padding-block: clamp(3rem, 7vw, 6rem); }
.chapter h2 { font-size: var(--step-head); line-height: 0.95; max-width: 16ch; }
.chapter .intro { margin-top: 1rem; color: var(--muted); }

.records { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; }
.record { display: grid; grid-template-columns: 9rem 1fr auto; gap: 0.25rem 1.25rem; padding-block: 1.1rem; border-top: 1px solid var(--line); align-items: baseline; }
.record:last-child { border-bottom: 1px solid var(--line); }
.record .kind { font-weight: 500; }
.record h3 { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; }
.record .meta { color: var(--muted); font-size: var(--step-small); grid-column: 2; }
.record .date { color: var(--muted); font-size: var(--step-small); white-space: nowrap; }
@media (max-width: 760px) { .record { grid-template-columns: 1fr; } .record .meta { grid-column: 1; } }


.band { background: var(--fir); color: var(--fir-ink); }
.band .side { color: var(--fir-muted); }
.band h2 { color: var(--fir-ink); }
.band .intro { color: var(--fir-muted); }
.band .button { background: var(--moss); color: var(--fir); margin-top: 1.75rem; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; }
.steps li::before { content: counter(s); font-weight: 700; color: var(--moss); font-size: var(--step-lead); line-height: 1; }

footer { background: var(--ink); color: var(--fir-muted); padding-block: 2.5rem; font-size: var(--step-small); }
footer .axis { align-items: start; }
footer p + p { margin-top: 0.5rem; }

/* The plate scales with its column; below 760px its 600-unit viewBox renders near 350px, so labels are set larger in
   user units to stay at or above the 13px floor (26 x 0.58 = 15px, 23 x 0.58 = 13.3px). */
@media (max-width: 760px) {
  .plate .town { font-size: 26px; }
  .plate .route { font-size: 23px; }
}

/* Five goals: each row is a goal, why it matters, and what a first step looks like. */
.goal-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.goal { display: grid; grid-template-columns: minmax(10rem, 15rem) 1fr; gap: 0.5rem 2rem; padding-block: 1.4rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.goal:last-child { border-bottom: 1px solid var(--line); }
.goal h3 { font-size: var(--step-lead); line-height: 1.1; }
.goal .why { font-weight: 500; margin-bottom: 0.4rem; }
.goal .status { color: var(--muted); font-size: var(--step-small); margin-top: 0.5rem; }
.goal:target { background: var(--surface); box-shadow: -0.75rem 0 0 var(--surface), 0.75rem 0 0 var(--surface); }
@media (max-width: 760px) { .goal { grid-template-columns: 1fr; } }

.tint { background: var(--surface); max-width: none; }
.tint .steps li::before { color: var(--fir); }
.steps strong { font-weight: 700; }

/* The local count: one sentence, the number set at display size. */
.count .figure-line { font-size: var(--step-lead); line-height: 1.25; font-weight: 500; letter-spacing: 0; max-width: 28ch; }
.count .figure-line span { display: block; font-size: var(--step-display); line-height: 0.9; font-weight: 700; letter-spacing: -0.02em; color: var(--moss); }

.chapter .h-small { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); }
.source-line { color: var(--muted); font-size: var(--step-small); margin-top: 1rem; }
