/* forecast.graphics — Forecast Network highway signage.
 *
 * The same design system as weather.city and forecasteagle.com: MUTCD
 * guide-sign green, motorist-services blue, a warm paper ground, and
 * Overpass — the open metric-compatible cut of FHWA Highway Gothic, which
 * is the face on the real signs. Tokens below are forecasteagle.css's,
 * unchanged, on purpose: this store sells the Interstate theme, and the
 * page selling it should be built out of the same parts.
 *
 * The graphics on sale need a dark ground (Meridian) or a light one
 * (Broadsheet, Interstate), so every preview sits in a framed plate
 * rather than bleeding into the page — the way the sites frame model
 * imagery.
 */

/* Overpass, self-hosted. No off-server request sits in front of first
 * paint; one variable file per family instead of eight pinned faces. */
@font-face {
  font-family: 'Overpass';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/Overpass-var.woff2') format('woff2-variations'),
       url('/assets/fonts/Overpass-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Overpass Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/OverpassMono-var.woff2') format('woff2-variations'),
       url('/assets/fonts/OverpassMono-var.woff2') format('woff2');
}

:root {
  --paper: #e6e2da;
  --card: #ffffff;
  --ink: #161616;
  --ink2: #4a463e;
  --sign: #04663d;
  --sign-dk: #013d26;
  --sign-tx: #ffffff;
  --sign-sub: #bdebcf;
  --blue: #0a5ca8;
  --navy: #103e7e;
  --blue-sub: #cfe2f6;
  --line: #c9c5bc;
  --line2: #e4e1d9;
  --mut: #8a867c;
  --shield-red: #c0331a;
  --amber: #f2ac14;

  /* Dark inset for graphics that carry their own ground. */
  --figure: #0a0e14;
  --figure-line: #223142;

  --font: 'Overpass', Helvetica, Arial, sans-serif;
  --mono-font: 'Overpass Mono', ui-monospace, monospace;
  --maxw: 1080px;
  --maxw-wide: 1360px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { max-width: 100%; display: block; }

.mono { font-family: var(--mono-font); font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.wrap-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 18px; }

/* ── thin utility bar ─────────────────────────────────── */
.util {
  background: var(--ink); color: #cfccc4; border-bottom: 3px solid var(--sign);
  position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 8px rgba(0, 0, 0, .22);
}
.util .bar {
  max-width: var(--maxw-wide); margin: 0 auto; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 34px; flex-wrap: wrap;
}
.util .mono { font-size: 11px; letter-spacing: .06em; }
.util .lnks { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.util a { color: #e9e7e0; font-weight: 700; font-size: 11px; letter-spacing: .06em; }
.util a:hover { color: var(--sign-sub); text-decoration: none; }
.util a[aria-current="page"] { color: var(--sign-sub); }

/* ── guide sign panel ─────────────────────────────────── */
.sign {
  background: var(--sign); border-radius: 10px; color: var(--sign-tx);
  padding: 26px 24px 24px; position: relative; margin-top: 22px;
  box-shadow: inset 0 0 0 4px var(--sign), inset 0 0 0 6px rgba(255, 255, 255, .9),
              0 10px 30px rgba(0, 0, 0, .16);
}
.sign a { color: #fff; }
.sign .word { color: var(--sign-tx); }
.signhead { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.signhead .grow { flex: 1 1 340px; min-width: 0; }
.word {
  font-weight: 900; font-size: clamp(28px, 5.4vw, 50px); line-height: .92;
  letter-spacing: -.02em; margin: 0;
}
.word .yl { color: var(--sign-sub); }
.tag {
  margin: 10px 0 0; font-weight: 700; font-size: clamp(13px, 2.2vw, 16px);
  color: var(--sign-sub); letter-spacing: .01em; max-width: 60ch;
}

/* Route shield marker, as used on real guide signs */
.shield {
  border: 2.5px solid #fff; border-radius: 6px; padding: 5px 10px 6px;
  text-align: center; line-height: 1; flex: none; display: inline-block;
}
.shield .a { font-size: 8px; font-weight: 700; letter-spacing: .16em; color: var(--sign-sub); }
.shield .b { font-size: 20px; font-weight: 900; letter-spacing: .04em; display: block; }
.shield .c { font-size: 8px; font-weight: 700; letter-spacing: .12em; color: var(--sign-sub); }

/* Exit-style chips */
.exits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.exits .lbl { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--sign-sub); }
.mm {
  background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .55);
  border-radius: 5px; padding: 6px 12px; font-family: inherit; font-weight: 700;
  font-size: 12px; letter-spacing: .03em; cursor: pointer; color: #fff;
  display: inline-block;
}
.mm:hover { background: #fff; color: var(--sign); text-decoration: none; }

/* ── live strip under the sign ────────────────────────── */
.livebar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--ink2);
}
.livebar .flag {
  background: var(--sign); color: #fff; border-radius: 3px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; padding: 4px 8px;
}

/* ── section rule header ──────────────────────────────── */
section { padding: 26px 0 4px; }
.rule { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rule .ln {
  height: 3px; flex: 1;
  background: repeating-linear-gradient(90deg, var(--sign) 0 18px, transparent 18px 34px);
}
.rule h2 {
  margin: 0; color: var(--sign); font-size: 15px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .12em; white-space: nowrap;
}
.rule .sub { color: var(--mut); font-size: 11px; font-weight: 700; letter-spacing: .06em; }

/* ── cards ────────────────────────────────────────────── */
.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid.wide { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 0; overflow: hidden; display: block; color: inherit;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
}
.card .chead {
  background: var(--sign); color: #fff; padding: 9px 14px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.card .chead.blue { background: var(--blue); }
.card .chead .k {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--sign-sub);
  text-transform: uppercase;
}
.card .chead.blue .k { color: var(--blue-sub); }
.card .cbody { padding: 14px; }
.card h3 { margin: 0 0 5px; font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.card p { margin: 0 0 8px; color: var(--ink2); font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.card p:last-child { margin-bottom: 0; }
.card .fact { font-size: 12.5px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.card .fact::before { content: "▸ "; color: var(--sign); }
.card .src {
  font: 700 10.5px var(--mono-font); color: var(--mut);
  letter-spacing: .02em; margin: 10px 0 0; line-height: 1.5;
}

/* The graphic itself, framed. A Meridian preview is dark and a Broadsheet
   one is paper; both need a border so neither dissolves into the page. */
.plate-img {
  display: block; aspect-ratio: 16 / 9; background: var(--figure);
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.plate-img img { width: 100%; height: 100%; object-fit: cover; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
}
.panel h3 { margin: 0 0 6px; font-size: 15px; font-weight: 900; color: var(--sign); }
.panel p { margin: 0; color: var(--ink2); font-size: 13px; font-weight: 600; line-height: 1.55; }

/* Coloured info plate — a service sign */
.plate {
  display: block; background: var(--sign); color: #fff; border-radius: 6px;
  padding: 11px 13px;
}
.plate.blue { background: var(--blue); }
.plate.ink { background: var(--ink); }
/* Kicker over name, not beside it: as inline spans they ran together
   into "LOCALRight Now". */
.plate .k { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .14em;
            color: var(--sign-sub); margin-bottom: 3px; }
.plate .v { display: block; }
.plate.blue .k { color: var(--blue-sub); }
.plate .v { font-size: 19px; font-weight: 900; letter-spacing: -.01em; }

/* ── prose ────────────────────────────────────────────── */
.lede {
  font-size: 15.5px; font-weight: 600; color: var(--ink2);
  line-height: 1.6; max-width: 66ch; margin: 0 0 14px;
}
p { max-width: 68ch; line-height: 1.6; font-size: 14px; font-weight: 600; color: var(--ink2); }
h1, h2, h3 { color: var(--ink); }
.h-lg { font-size: clamp(22px, 3.6vw, 30px); font-weight: 900; letter-spacing: -.02em; margin: 0 0 10px; }
.h-md { font-size: 17px; font-weight: 900; margin: 22px 0 8px; }
.small { font-size: 12.5px; }
.dim { color: var(--mut); }

/* ── controls ─────────────────────────────────────────── */
.btn {
  cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink2);
  border-radius: 3px; font-family: var(--font); font-weight: 700; font-size: 11.5px;
  letter-spacing: .02em; padding: 7px 12px; line-height: 1.3; display: inline-block;
}
.btn:hover { border-color: var(--sign); color: var(--ink); text-decoration: none; }
.btn.on, .btn[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: #08488a; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-go {
  background: var(--blue); color: #fff; border-color: #08488a;
  font-weight: 900; letter-spacing: .06em; padding: 9px 16px; font-size: 12px;
}
.btn-go:hover { background: #0b6bc4; color: #fff; border-color: #08488a; }

select, input[type="text"], input[type="email"], input[type="search"], textarea {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  border-radius: 3px; padding: 6px 9px; font-family: var(--font);
  font-weight: 700; font-size: 12px; width: 100%;
}
textarea { font-weight: 600; line-height: 1.5; }
select:focus, input:focus, textarea:focus, .btn:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 1px;
}
input[type="color"] {
  width: 100%; height: 32px; padding: 2px; border: 1px solid var(--line);
  border-radius: 3px; background: #fff; cursor: pointer;
}
input[type="range"] { width: 100%; accent-color: var(--sign); }
input[type="file"] { font: 700 11.5px var(--font); color: var(--ink2); width: 100%; }
input[type="checkbox"] { accent-color: var(--sign); width: 15px; height: 15px; }

label {
  display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mut); margin-bottom: 4px;
}
.field { margin-bottom: 11px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 130px; min-width: 0; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.check label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend {
  padding: 0; font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sign); margin-bottom: 9px;
}

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 3px;
  font: 700 10px var(--mono-font); letter-spacing: .06em;
  background: var(--line2); color: var(--ink2); border: 1px solid var(--line);
  text-transform: uppercase;
}
.badge.on { background: var(--sign); color: #fff; border-color: var(--sign-dk); }
.badge.blue { background: var(--blue); color: #fff; border-color: #08488a; }

/* ── studio ───────────────────────────────────────────── */
.studio { display: grid; gap: 16px; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }
.studio .stage { position: sticky; top: 52px; }
.studio .stage .plate-img {
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
  /* The stage frame stays 16:9 but the shape selector offers 1:1 and
     9:16 as well, so the graphic is fitted inside rather than cropped to
     fill — a preview that clips the board is not a preview. */
  display: grid; place-items: center;
}
.studio .stage .plate-img img { object-fit: contain; }
.status { font-size: 12px; font-weight: 700; color: var(--ink2); min-height: 1.4em; margin: 8px 0 0; }
.status.bad { color: var(--shield-red); }
.status.good { color: var(--sign); }

/* ── tables ───────────────────────────────────────────── */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 13px; background: var(--card); }
th, td { text-align: left; padding: 8px 11px; border-bottom: 1px solid var(--line2); font-weight: 600; color: var(--ink2); }
thead th {
  background: var(--sign); color: #fff; font: 700 10px var(--font);
  letter-spacing: .1em; text-transform: uppercase; border-bottom: 0;
}
tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--sign); font-weight: 800; }
td.no { color: var(--mut); }
.tablewrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 6px 22px rgba(0, 0, 0, .08); }

/* ── notes and code ───────────────────────────────────── */
.note {
  border-left: 5px solid var(--amber); background: #fdf6e3;
  border-top: 1px solid var(--line2); border-right: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
  padding: 12px 14px; border-radius: 0 6px 6px 0; font-size: 13px;
  font-weight: 600; color: var(--ink2); margin: 16px 0; max-width: 68ch;
}
.note strong { color: var(--ink); }

code { font: 700 12.5px var(--mono-font); background: var(--line2); border-radius: 3px; padding: .1em .35em; }
pre {
  font: 600 12px/1.6 var(--mono-font); background: var(--ink); color: #e9e7e0;
  border-radius: 8px; padding: 14px 16px; overflow-x: auto;
  border-left: 5px solid var(--sign);
}
pre code { background: none; padding: 0; color: inherit; font-weight: 600; }

/* ── footer ───────────────────────────────────────────── */
footer.site {
  margin-top: 46px; background: var(--ink); color: #b8b4ab;
  border-top: 3px solid var(--sign); padding: 24px 0 30px;
}
footer.site .bar {
  max-width: var(--maxw-wide); margin: 0 auto; padding: 0 18px;
  display: flex; gap: 26px; flex-wrap: wrap; justify-content: space-between;
  font-size: 11.5px; font-weight: 700; line-height: 1.7;
}
footer.site a { color: #e9e7e0; }
footer.site strong { color: #fff; }

.stage img[hidden] { display: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Durable render jobs: calm stage feedback and retained output records. */
.render-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.render-actions select { max-width:240px; }
.render-actions [hidden] { display:none; }
.render-record { padding:16px 0; border-top:1px solid var(--line, #ccc8bd); }
.render-record strong { display:block; }
.render-record p { margin:6px 0 12px; }

/* Timed program authoring */
#rundown { scroll-margin-top:60px; }
.rundown-settings { display:grid; grid-template-columns:2fr 1fr 1fr; gap:16px; margin-top:24px; }
.rundown-scenes { list-style:none; padding:0; margin:16px 0; }
.rundown-scene { display:grid; grid-template-columns:65px minmax(140px, 2fr) minmax(140px, 1.5fr) 80px auto; gap:16px; align-items:center; border-top:1px solid var(--line); padding:16px 0; }
.rundown-scene .field { margin:0; }
.rundown-narration { grid-column:2 / -1; }
.rundown-narration textarea { width:100%; resize:vertical; padding:10px; border:1px solid var(--line); background:#fff; color:var(--ink); font:inherit; }
.rundown-settings .field > span, .rundown-scene .field > span { display:block; margin-bottom:5px; }
.rundown-scene input[type="number"] { width:100%; padding:8px; border:1px solid var(--line); border-radius:3px; background:#fff; font:inherit; color:var(--ink); }
.rundown-cue { font-size:24px; }
.rundown-cue small { display:block; font-size:12px; white-space:nowrap; }
.rundown-review { margin:20px 0; }
.rundown-review img, .rundown-review video { display:block; max-width:100%; max-height:75vh; margin:12px auto; background:#101d2c; }
@media(max-width:800px) {
  .rundown-settings { grid-template-columns:1fr; gap:4px; }
  .rundown-scene { grid-template-columns:48px minmax(0, 1fr) 80px; gap:12px; }
  .rundown-scene .field:nth-child(3) { grid-column:2; }
  .rundown-scene .field:nth-child(4) { grid-column:3; grid-row:1 / 3; }
  .rundown-scene .render-actions { grid-column:2 / 4; }
}
.production-jobs { margin-top:24px; }
.production-jobs h3 { margin-top:24px; }
/* Hurricane examples are dated plates, separate from current Studio renders. */
.hurricane-gallery { padding-top: 28px; }
.hurricane-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hurricane-examples img { display: block; width: 100%; height: auto; border-radius: 4px; }
.hurricane-examples h2 { margin-top: 18px; }
.hurricane-portraits { display: flex; gap: 24px; justify-content: center; }
.hurricane-portraits img { display: block; width: min(42%, 360px); height: auto; object-fit: contain; }
@media (max-width: 760px) { .hurricane-examples { grid-template-columns: 1fr; } }

/* Channel production: narration, publishing and clean program output. */
.scene-recording { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; margin: .75rem 0; }
.scene-recording audio, .scene-recording textarea, .scene-recording label, .scene-recording .src { grid-column: 1 / -1; }
.scene-recording audio { width: 100%; max-width: 32rem; }
.scene-recording input[type=file] { min-width: 0; max-width: 100%; }
.timed-captions { font-family: var(--mono, monospace); font-size: .85rem; }
.short-pick { display: flex; align-items: center; gap: .65rem; }
.short-pick input { width: auto; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1rem; }
.channel-card { padding: 1.5rem; border: 1px solid var(--line, #c1c9ca); background: var(--paper, #faf9f5); }
.channel-card h2 { font-size: 1.4rem; }
.channel-card .eyebrow { font: 600 .75rem var(--mono, monospace); letter-spacing: .05em; }
.publication-form { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.publication-form input { flex: 1 1 16rem; min-width: 0; }
.live-monitors { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1rem 0; }
.live-monitors canvas { width: 100%; height: auto; display: block; background: #0d1c2c; }
.live-output-only { margin: 0; background: #000; overflow: hidden; }
.live-output-only .live-controls { display: none; }
.live-output-only > canvas { display: block; width: 100vw; height: 100vh; object-fit: contain; }
[data-channel] table { width: 100%; font-size: .85rem; border-collapse: collapse; }
[data-channel] th, [data-channel] td { padding: .5rem; border-bottom: 1px solid #ccd2d5; text-align: left; }
@media(max-width: 700px) { .live-monitors { grid-template-columns: 1fr; } .scene-recording { grid-template-columns: 1fr; } [data-channel] .channel-card { overflow-x: auto; } }
