/* network.news — the national front and the state "coming soon" pages.
   Tokens follow utah.news (UtahNewsWeb/site.css): dark paper by default, light paper under prefers-color-scheme.
   Tile colors are validated with the dataviz palette checker (both modes pass lightness band, chroma floor, CVD
   separation and 3:1 against the surface); tile label contrast is >= 4.5:1 in both modes. */

@font-face {
  font-family: "Archivo Black";
  src: url("/assets/fonts/ArchivoBlack-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --paper: #10141B;
  --paper-raised: #161B24;
  --ink: #F2F4F8;
  --ink-dim: #A8B0BD;
  --ink-faint: #8A93A1;
  --hairline: rgba(168, 176, 189, 0.16);
  --hairline-strong: rgba(168, 176, 189, 0.32);
  --gold-text: #E8B64C;
  --purple: #9B6FE8;
  --button: #E8B64C;
  --button-ink: #14181F;
  --tile-soon: #1E2430;
  --tile-soon-ink: #A8B0BD;
  --tile-soon-edge: rgba(168, 176, 189, 0.22);
  --tile-live: #B8892B;
  --tile-live-ink: #14181F;
  --tile-here: #9B6FE8;
  --tile-here-ink: #14181F;
  --display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --serif: ui-serif, "Iowan Old Style", Charter, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 1120px;
}

@media (prefers-color-scheme: light) {
  :root {
    --paper: #FAF9F5;
    --paper-raised: #F1EFE9;
    --ink: #14181F;
    --ink-dim: #4A5261;
    --ink-faint: #6B7381;
    --hairline: rgba(20, 24, 31, 0.14);
    --hairline-strong: rgba(20, 24, 31, 0.30);
    --gold-text: #8A6414;
    --purple: #5C2C8C;
    --button: #14181F;
    --button-ink: #FAF9F5;
    --tile-soon: #E6E2D8;
    --tile-soon-ink: #4A5261;
    --tile-soon-edge: rgba(20, 24, 31, 0.10);
    --tile-live: #9A6F12;
    --tile-live-ink: #FFFFFF;
    --tile-here: #6B3A9E;
    --tile-here-ink: #FFFFFF;
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 4px; }
ul, ol { list-style: none; }

.shell { max-width: var(--measure); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { .shell { padding-left: 16px; padding-right: 16px; } }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 10;
  background: var(--paper-raised); color: var(--ink); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { left: 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Masthead */
.masthead { border-bottom: 1px solid var(--hairline); }
.masthead-row { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.wordmark {
  font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--purple); }
.edition {
  font: 700 0.74rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-text); border-left: 1px solid var(--hairline-strong); padding-left: 14px;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.masthead-link {
  margin-left: auto; padding: 10px 0; white-space: nowrap;
  font-size: 0.92rem; font-weight: 600; color: var(--ink-dim); text-decoration: none;
}
.masthead-link:hover { color: var(--ink); }
@media (max-width: 480px) {
  .masthead-row { gap: 10px; }
  .wordmark { font-size: 1.08rem; }
  .masthead-link { font-size: 0.84rem; }
}
/* The state's name is the page's h1 directly below; on a phone the masthead keeps only the brand and the way out. */
@media (max-width: 520px) { .edition { display: none; } }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 400; }
h1 { font-size: clamp(2.4rem, 7.4vw, 5.6rem); line-height: 1.02; letter-spacing: -0.01em; max-width: 13ch; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.1; text-wrap: balance; }
h3 { font-size: 1.25rem; line-height: 1.2; }
.kicker {
  font: 700 0.78rem/1.2 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-text); margin-bottom: 18px;
}
.lede {
  font-family: var(--serif); font-size: clamp(1.12rem, 2.1vw, 1.36rem); line-height: 1.55;
  color: var(--ink-dim); max-width: 60ch; margin-top: 24px;
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--hairline-strong); border-radius: 999px;
  font-weight: 600; text-decoration: none; color: var(--ink);
}
.button:hover { border-color: var(--ink-dim); }
.button--primary { background: var(--button); color: var(--button-ink); border-color: transparent; }
.button--primary:hover { border-color: transparent; filter: brightness(1.06); }

/* Sections */
.hero { padding-top: 72px; padding-bottom: 56px; }
.band { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--hairline); }
.section-note { color: var(--ink-dim); margin-top: 10px; font-size: 1.05rem; }
@media (max-width: 600px) {
  .hero { padding-top: 44px; padding-bottom: 40px; }
  .band { padding-top: 40px; padding-bottom: 40px; }
}

/* Tile map: one equal square per state; placement comes from data-r / data-c. */
.tilemap {
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 5px; max-width: 760px; margin-top: 32px;
}
.tilemap--mini { gap: 3px; max-width: 380px; margin-top: 0; }
.tile { aspect-ratio: 1; }
.tile > * {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 7px; text-decoration: none;
  font: 700 clamp(0.6rem, 1.45vw, 0.86rem)/1 var(--sans); letter-spacing: 0.03em;
}
.tilemap--mini .tile > * { border-radius: 4px; font-size: clamp(0.5rem, 1.6vw, 0.62rem); }
.tile--soon > * { background: var(--tile-soon); color: var(--tile-soon-ink); box-shadow: inset 0 0 0 1px var(--tile-soon-edge); }
.tile--live > * { background: var(--tile-live); color: var(--tile-live-ink); }
.tile--here > * { background: var(--tile-here); color: var(--tile-here-ink); }
a.tile-link:hover { box-shadow: inset 0 0 0 2px var(--purple); }
.tile--live a.tile-link:hover, .tile--here a.tile-link:hover { box-shadow: inset 0 0 0 2px var(--ink); }
@media (max-width: 480px) {
  .tilemap { gap: 3px; }
  .tile > * { border-radius: 4px; }
}
[data-r="0"] { grid-row: 1; } [data-r="1"] { grid-row: 2; } [data-r="2"] { grid-row: 3; } [data-r="3"] { grid-row: 4; }
[data-r="4"] { grid-row: 5; } [data-r="5"] { grid-row: 6; } [data-r="6"] { grid-row: 7; } [data-r="7"] { grid-row: 8; }
[data-c="0"] { grid-column: 1; } [data-c="1"] { grid-column: 2; } [data-c="2"] { grid-column: 3; } [data-c="3"] { grid-column: 4; }
[data-c="4"] { grid-column: 5; } [data-c="5"] { grid-column: 6; } [data-c="6"] { grid-column: 7; } [data-c="7"] { grid-column: 8; }
[data-c="8"] { grid-column: 9; } [data-c="9"] { grid-column: 10; } [data-c="10"] { grid-column: 11; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 0.92rem; color: var(--ink-dim); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.swatch--live { background: var(--tile-live); }
.swatch--here { background: var(--tile-here); }
.swatch--soon { background: var(--tile-soon); box-shadow: inset 0 0 0 1px var(--hairline-strong); }

.where { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: 40px; align-items: end; }
@media (max-width: 960px) { .where { grid-template-columns: 1fr; gap: 28px; } }
.live-card {
  padding: 28px; border-radius: 20px;
  background: var(--paper-raised); border: 1px solid var(--hairline);
}
.live-card .kicker { margin-bottom: 12px; }
.live-card h3 { font-size: 1.6rem; }
.live-card p:not(.kicker) { margin-top: 10px; font-family: var(--serif); font-size: 1.06rem; color: var(--ink-dim); }
.live-card .actions { margin-top: 22px; }

/* State index: the table view of the map, and the keyboard / screen-reader route to every state. */
.state-index { columns: 4 8rem; column-gap: 24px; margin-top: 40px; }
@media (max-width: 360px) { .state-index { font-size: 0.94rem; column-gap: 16px; } }
.state-index li { break-inside: avoid; border-bottom: 1px solid var(--hairline); }
.state-index a {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 500; text-decoration: none;
}
.state-index a:hover { color: var(--purple); }
.badge {
  font: 700 0.62rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; background: var(--tile-live); color: var(--tile-live-ink);
}

/* Scale */
.scale-number { display: block; font-size: clamp(3.4rem, 12vw, 8rem); line-height: 1; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.scale-label { display: block; font: 600 clamp(1.08rem, 2.4vw, 1.45rem)/1.3 var(--sans); margin-top: 12px; }
.scale-copy { font-family: var(--serif); font-size: 1.16rem; color: var(--ink-dim); max-width: 58ch; margin-top: 18px; }
.scale-copy + .fine { color: var(--ink-faint); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 28px; counter-reset: step; }
.steps li {
  counter-increment: step; padding: 24px;
  background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 16px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px;
  font: 700 0.78rem/1 var(--sans); letter-spacing: 0.14em; color: var(--gold-text);
}
.steps p { margin-top: 10px; font-family: var(--serif); font-size: 1.06rem; color: var(--ink-dim); }

/* State page */
.status-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 7px 12px;
  font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-text); border: 1px solid currentColor; border-radius: 999px;
}
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state-name { max-width: none; line-height: 0.98; text-wrap: balance; }
/* Sized by the longest word (fitBucket in src/pages.mjs) so no state name breaks mid-word on a 320px phone; the
   longest name in each bucket is screenshotted at 320px by scripts/screenshots.mjs. */
.state-name[data-fit="s"] { font-size: clamp(3.2rem, 17vw, 9.5rem); }
.state-name[data-fit="m"] { font-size: clamp(2.6rem, 12vw, 7.5rem); }
.state-name[data-fit="l"] { font-size: clamp(2rem, 9.2vw, 6.4rem); }
.state-promise { font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1.15; margin-top: 20px; max-width: 22ch; }

.glance { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 820px) { .glance { grid-template-columns: 1fr; } }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden;
}
.fact { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; background: var(--paper-raised); }
.fact dt { order: 2; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.fact dd { order: 1; font-family: var(--display); font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1.08; }
@media (max-width: 400px) { .facts { grid-template-columns: 1fr; } }
.fact--wide { grid-column: 1 / -1; }
.fact--wide dd { font-family: var(--sans); font-size: 1.12rem; font-weight: 600; line-height: 1.5; }
.mini-map figcaption { margin-top: 4px; }

.coverage { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 28px; margin-top: 20px; }
.coverage li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hairline); font-weight: 500; }
.coverage li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tile-live); flex: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding-top: 40px; padding-bottom: 56px; color: var(--ink-dim); font-size: 0.94rem; }
.site-footer a { color: var(--ink); text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; color: var(--ink); }
.wordmark--small { font-size: 1rem; }
.fine { margin-top: 14px; max-width: 72ch; font-size: 0.86rem; line-height: 1.6; }

/* 404 */
.notfound { padding-top: 88px; padding-bottom: 96px; }

/* Windows high contrast and other forced-color modes: keep the live / here / soon distinction visible. */
@media (forced-colors: active) {
  .tile > * { border: 1px solid CanvasText; }
  .tile--live > *, .swatch--live { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .tile--here > * { border: 3px double CanvasText; }
  .swatch { border: 1px solid CanvasText; }
  .badge { border: 1px solid CanvasText; }
}
