/* XLX159 site — the only stylesheet. Sections: tokens, base, backdrop, header,
   shared parts, live page, changes page, footer, what's-new note, small screens. */

@font-face {
  font-family: "Inter";
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #070b14;
  --panel: rgba(10, 16, 28, .62);
  --panel-solid: #0c1320;
  --line: rgba(148, 178, 214, .16);
  --line-strong: rgba(148, 178, 214, .3);
  --text: #eef3fa;
  --muted: #a3b1c6;
  --accent: #38bdf8;
  --accent-ink: #04121c;
  --online: #4ade80;
  --offline: #f87171;
  --unavailable: #94a3b8;
  --bypassed: #c084fc;
  --onair: #ff5d5d;
  --amber: #fbbf24;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  /* one colour per module, used for the letter badge and its accents */
  --mod-A: #60a5fa; --mod-B: #4ade80; --mod-C: #c084fc; --mod-D: #fb923c;
  --mod-E: #f87171; --mod-F: #2dd4bf; --mod-G: #f472b6; --mod-H: #facc15;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1240px, 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--panel-solid); padding: .5rem .75rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* ---- backdrop: the tower photo, drifting slowly, with signal rings from the mast */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.backdrop-scene {
  /* a 16:9 box that always covers the screen, so ring positions track the photo */
  position: absolute; left: 50%; top: 50%;
  width: max(100vw, 177.78vh); height: max(100vh, 56.25vw);
  translate: -50% -50%;
  background: url("hero.png") center / cover;
  animation: drift 70s ease-in-out infinite alternate;
}
.backdrop::after {   /* darkens the photo so text stays readable, lighter near the horizon */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 70% 55%, rgba(7, 11, 20, 0), rgba(7, 11, 20, .45) 75%),
    linear-gradient(180deg, rgba(7, 11, 20, .48) 0%, rgba(7, 11, 20, .2) 45%, rgba(7, 11, 20, .66) 100%);
}
.ring {
  position: absolute; left: 31.5%; top: 21%;
  width: 6%; aspect-ratio: 1; translate: -50% -50%;
  border: 1.5px solid rgba(125, 211, 252, .55); border-radius: 50%;
  opacity: 0; animation: ring 9s linear infinite;
}
.ring:nth-child(2) { animation-delay: 3s; }
.ring:nth-child(3) { animation-delay: 6s; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
@keyframes ring { 0% { transform: scale(.3); opacity: 0; } 12% { opacity: .7; } 100% { transform: scale(9); opacity: 0; } }

/* ---- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 20, .78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1.25rem; min-height: 62px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-size: 1.02rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand strong { font-weight: 700; letter-spacing: .01em; }
.brand span { color: var(--muted); }
/* every pill in the header (clock and buttons) shares one size and one typeface */
.clock, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  height: 2.25rem; padding: 0 .95rem; border-radius: 999px;
  font: 600 .88rem/1 "Inter", system-ui, sans-serif; white-space: nowrap;
}
.clock { background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.nav-actions { display: flex; align-items: center; gap: .45rem; margin-left: .6rem; }
.site-nav { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.site-nav > a:not(.btn) {
  color: var(--muted); font-weight: 500; font-size: .94rem;
  padding: .45rem .7rem; border-radius: 8px;
}
.site-nav > a:not(.btn):hover { color: var(--text); background: rgba(148, 178, 214, .1); text-decoration: none; }
.site-nav > a[aria-current="page"] { color: var(--text); background: rgba(56, 189, 248, .14); }
.nav-toggle { display: none; }
.btn { border: 1px solid var(--line-strong); color: var(--text); background: none; cursor: pointer; }
.btn[aria-current="page"] { border-color: var(--accent); background: rgba(56, 189, 248, .14); }
.btn-primary[aria-current="page"] { background: var(--accent); box-shadow: 0 0 0 2px rgba(125, 211, 252, .5); }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #7dd3fc; }
.btn-support { color: var(--amber); border-color: rgba(251, 191, 36, .4); }
.btn-support:hover { border-color: var(--amber); }

/* ---- shared parts */
.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--unavailable); vertical-align: middle; }
.dot[data-state="online"] { background: var(--online); box-shadow: 0 0 8px rgba(74, 222, 128, .7); }
.dot[data-state="offline"] { background: var(--offline); box-shadow: 0 0 8px rgba(248, 113, 113, .7); }
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .74rem/1 inherit; letter-spacing: .04em; text-transform: uppercase;
  padding: .34rem .6rem; border-radius: 999px;
  border: 1px solid currentColor; color: var(--unavailable); white-space: nowrap;
}
.pill::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; }
.pill[data-state="online"], .pill[data-state="active"] { color: var(--online); }
.pill[data-state="offline"] { color: var(--offline); }
.pill[data-state="bypassed"] { color: var(--bypassed); }
.pill[data-state="onair"] { color: var(--onair); }
.pill[data-state="onair"]::before { animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px) saturate(130%);
}
.section { padding-block: 1.6rem; }
.section.tight { padding-block: 1rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.section-head h2 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: .88rem; }
.count { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.mod-badge {
  --c: var(--muted);
  display: inline-grid; place-items: center; flex: none;
  width: 1.7rem; height: 1.7rem; border-radius: 8px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  color: var(--c); font: 700 .82rem/1 var(--mono);
}
.notice {   /* honest state when a feed is late or missing */
  display: flex; gap: .6rem; align-items: center;
  margin-top: 1rem; padding: .7rem 1rem; border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .1);
  color: #fde68a; font-size: .9rem;
}
.empty { color: var(--muted); padding: 1rem 1.1rem; font-size: .92rem; }

/* ---- live page: hero */
.hero { padding-block: 1.1rem .2rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 750; text-wrap: balance; }
.hero-lede { margin-top: .4rem; color: #d3dceb; font-size: .95rem; max-width: 60ch; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: .6rem 1rem; border-left: 1px solid var(--line); min-width: 0; }
.stat { display: flex; flex-direction: column; justify-content: space-between; }
.stat:first-child { border-left: 0; }
.stat dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.stat dd { margin-top: .2rem; font-size: 1.15rem; font-weight: 650; white-space: nowrap; }
.stat dd small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat dd .pill { font-size: .8rem; }

.onair {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  margin-top: .8rem; padding: .6rem 1.1rem;
}
.onair-label { font: 700 .74rem/1 inherit; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.onair-who { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; }
.onair-who .call { font: 700 1.05rem/1 var(--mono); }
.onair-who .via { color: var(--muted); font-size: .88rem; }
.onair[data-live="true"] { border-color: rgba(255, 93, 93, .6); box-shadow: 0 0 0 1px rgba(255, 93, 93, .25), 0 0 28px rgba(255, 93, 93, .16); }
.onair[data-live="true"] .onair-label { color: var(--onair); }
.onair-quiet { color: var(--muted); font-size: .94rem; }

/* ---- live page: modules */
.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.module {
  --c: var(--muted);
  display: flex; flex-direction: column; gap: .6rem;
  padding: .9rem 1rem; border-left: 3px solid color-mix(in srgb, var(--c) 30%, transparent);
  transition: border-color .3s, box-shadow .3s;
}
.module[data-status="active"] { border-left-color: var(--c); }
.module[data-onair="true"] { border-color: var(--onair); box-shadow: 0 0 24px rgba(255, 93, 93, .2); }
.module-top { display: flex; align-items: center; gap: .6rem; }
.module-top .mod-badge { width: 2rem; height: 2rem; font-size: .95rem; }
.module-name { font-weight: 620; font-size: .98rem; line-height: 1.25; min-width: 0; }
.module-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.chip {
  font: 500 .74rem/1 var(--mono); color: #cfd9e8;
  padding: .28rem .45rem; border-radius: 6px;
  background: rgba(148, 178, 214, .1); border: 1px solid var(--line);
}
.chip b { color: var(--muted); font-weight: 500; }
.module-stations { color: var(--muted); font: 400 .8rem/1.5 var(--mono); min-height: 1.2rem; }
.module-stations strong { color: var(--text); font-weight: 600; }

/* ---- live page: tables */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.table-panel { overflow: hidden; }
.table-panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem .7rem; }
.table-panel > header h2 { font-size: 1.05rem; font-weight: 650; }
.table-scroll { max-height: 26rem; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th {
  position: sticky; top: 0; background: var(--panel-solid);
  text-align: left; font: 600 .7rem/1 inherit; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: .55rem .6rem;
}
td { padding: .5rem .6rem; border-top: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 1.1rem; }
th:last-child, td:last-child { padding-right: 1.1rem; }
td.call { font: 600 .9rem/1.3 var(--mono); white-space: nowrap; }
td.call a { color: var(--text); }
td.call a:hover { color: var(--accent); }
td.dim { color: var(--muted); }
tr[data-onair="true"] td { background: rgba(255, 93, 93, .1); }
.kind { color: var(--muted); font-size: .76rem; margin-left: .4rem; }

/* ---- live page: AllStar tree */
.tree li { display: grid; grid-template-columns: 8.5rem minmax(5rem, 9rem) minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .5rem 1.1rem; border-top: 1px solid var(--line); font-size: .88rem; }
.tree li[data-depth="0"] { background: rgba(56, 189, 248, .06); }
.tree .node { font-family: var(--mono); padding-left: calc(var(--depth) * .8rem); white-space: nowrap; }
.tree .node::before { content: "└ "; color: var(--line-strong); }
.tree li[data-depth="0"] .node::before { content: ""; }
.tree .desc { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-note { color: var(--muted); font-size: .8rem; padding: .7rem 1.1rem; border-top: 1px solid var(--line); }

/* ---- changes page */
.page-head { padding-block: 2.4rem 1rem; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.02em; }
.page-head p { color: #d3dceb; margin-top: .6rem; max-width: 60ch; }
.releases { display: grid; gap: 1rem; max-width: 820px; padding-bottom: 2rem; }
.release { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; backdrop-filter: blur(12px); }
.release header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.release h2 { font-size: 1.15rem; }
.release-date { color: var(--muted); font-size: .86rem; }
.release-title { margin-top: .3rem; color: #d3dceb; }
.changes { margin-top: .9rem; display: grid; gap: .55rem; }
.changes li { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: .7rem; align-items: baseline; font-size: .94rem; }
.tag { font: 600 .68rem/1 inherit; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .4rem; border-radius: 6px; text-align: center; border: 1px solid currentColor; }
.tag-new { color: var(--online); }
.tag-improved { color: var(--accent); }
.tag-fixed { color: var(--amber); }

/* ---- flags and callsign cells */
.flag { display: inline-block; flex: none; width: 1.25rem; height: .94rem; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
span.flag { box-shadow: none; }
.call-row { display: inline-flex; align-items: center; gap: .55rem; }
.badges, .chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.table-wide { overflow-x: auto; }

/* ---- status page */
.status-summary { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.1rem; }
.status-checked { color: var(--muted); font-size: .88rem; margin-left: .4rem; }
.status-list li { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.status-label { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.status-label small { color: var(--muted); font-size: .8rem; }
.dot[data-state="bypassed"] { background: var(--bypassed); }
.status-key { color: var(--muted); font-size: .86rem; display: grid; gap: .3rem; padding: 1rem 1.1rem; }
.status-key b { color: var(--text); font-weight: 600; }

/* ---- repeaters page */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .9rem; }
.card h3 { font-size: 1.05rem; }
.card p, .card li { color: #d3dceb; font-size: .93rem; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-head h3 { font: 700 1.5rem/1 var(--mono); letter-spacing: .02em; }
.card-head .freq { font: 600 1.1rem/1 var(--mono); color: var(--accent); }
.where { color: var(--muted); font-size: .88rem; }
.lines-3 { min-height: calc(3 * 1.55em); }
.spec { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.2rem; font-size: .9rem; }
.spec dt { color: var(--muted); }
.spec dd { font-family: var(--mono); }
.prog { display: grid; gap: .5rem; }
.prog div { display: grid; grid-template-columns: 4.2rem 7.5rem minmax(0, 1fr); gap: .7rem; align-items: baseline; font-size: .88rem; }
.prog dt { color: var(--muted); font-family: var(--mono); }
.prog dd { font: 600 .95rem/1.2 var(--mono); color: var(--accent); white-space: pre; }
.prog dd + dd { font: 400 .86rem/1.4 inherit; color: var(--muted); white-space: normal; }
.ticks li, .crosses li { position: relative; padding-left: 1.5rem; margin-bottom: .55rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--online); font-weight: 700; }
.crosses li::before { content: "✕"; position: absolute; left: 0; color: var(--offline); font-weight: 700; }
.map { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 10px; filter: saturate(.8) brightness(.9); }
.linklist { display: flex; flex-wrap: wrap; gap: .5rem; }
code { font: .9em var(--mono); background: rgba(148, 178, 214, .12); padding: .1em .35em; border-radius: 4px; }

/* ---- guide page */
.guide-body { display: grid; gap: 1.8rem; min-width: 0; padding-bottom: 2rem; }
.guide-body section { scroll-margin-top: 5rem; }
.guide-body h2 { font-size: 1.4rem; letter-spacing: -.01em; margin-bottom: .4rem; }
.guide-body h2 + p { color: #d3dceb; margin-bottom: 1.1rem; max-width: 66ch; }
.guide-body h3 { font-size: 1rem; margin: 1.4rem 0 .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.mode-grid .card { padding: 1rem 1.1rem; gap: .4rem; }
.linkrow { font-size: .9rem; }
.linkrow span { font-family: var(--mono); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.2rem 1.4rem; border-color: rgba(56, 189, 248, .45); }
.cta div { flex: 1; min-width: 16rem; }
.cta h2 { margin-bottom: .3rem; }
.cta p { color: #d3dceb; font-size: .95rem; max-width: 70ch; }
.rules { counter-reset: rule; display: grid; gap: .8rem; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .2rem .9rem; padding: 1rem 1.1rem; }
.rules li::before { content: counter(rule); grid-row: span 2; font: 700 1.3rem/1.2 var(--mono); color: var(--accent); }
.rules strong { font-size: 1rem; }
.rules span { color: #d3dceb; font-size: .93rem; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: .85rem .2rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::after { content: "+"; color: var(--accent); font: 400 1.2rem/1 var(--mono); }
details[open] summary::after { content: "−"; }
summary::-webkit-details-marker { display: none; }
.answer { padding: 0 .2rem 1rem; color: #d3dceb; font-size: .95rem; display: grid; gap: .6rem; max-width: 70ch; }
.answer ul { list-style: disc; padding-left: 1.2rem; display: grid; gap: .35rem; }
.faq { padding: .3rem 1.1rem; }

.status-rows { display: grid; gap: .6rem; }
.status-row { display: grid; grid-template-columns: 12rem minmax(0, 1fr); align-items: center; gap: 1rem; padding: .55rem 1.1rem; }
.status-row h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.status-row ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem 2.5rem; }
.status-row li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; min-width: 0; }
.status-row .status-label { flex-direction: row; align-items: baseline; gap: .45rem; margin-right: auto; flex-wrap: wrap; }

/* ---- repeater cards: both cards share one set of rows, so each part lines up across them */
.cards-aligned { grid-template-rows: repeat(8, auto); row-gap: 0; }
.cards-aligned .card { display: grid; grid-template-rows: subgrid; grid-row: span 8; row-gap: .9rem; }

/* ---- compact lists: Status page and the AllStar list on the Live page */
.compact .pill { font-size: .64rem; padding: .22rem .45rem; gap: .3rem; }
.compact .pill::before { width: .34rem; height: .34rem; }
.status-list.compact li { padding: .42rem 1.1rem; font-size: .9rem; }
.status-list.compact .status-label { flex-direction: row; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.status-key.compact { padding: .7rem 1.1rem; font-size: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.5rem; }
.page-head.tight { padding-block: 1.4rem .9rem; }
.page-head.tight .status-summary { margin-top: .7rem; }
.tree.compact { columns: 2; column-gap: 0; }
.tree.compact li { break-inside: avoid; padding: .3rem 1.1rem; font-size: .82rem; gap: .6rem; grid-template-columns: 7.5rem 4.6rem minmax(0, 1fr) auto; }
.tree.compact li:nth-child(odd) { border-right: 0; }

/* ---- footer */
.site-footer { margin-top: 2.5rem; background: rgba(7, 11, 20, .86); border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-block: 2rem 1.4rem; }
.site-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: .6rem; }
.site-footer li { margin-bottom: .3rem; }
.ports { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; }
.ports dd { font-family: var(--mono); color: var(--text); }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1rem; border-top: 1px solid var(--line); font-size: .84rem; }

/* ---- contact card */
.contact { width: min(36rem, 100% - 2rem); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel-solid); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.contact::backdrop { background: rgba(4, 7, 13, .7); backdrop-filter: blur(3px); }
.contact form { display: grid; gap: 1rem; padding: 1.3rem 1.4rem; }
.contact header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.contact h2 { font-size: 1.2rem; }
.contact-lede { color: var(--muted); font-size: .88rem; margin-top: .35rem; }
.contact-close { background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.contact-close:hover { color: var(--text); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.contact label { display: block; font-size: .84rem; font-weight: 600; }
.contact label.wide { grid-column: 1 / -1; }
.contact-optional { color: var(--muted); font-weight: 400; font-size: .76rem; margin-left: .3rem; }
.contact label small { display: block; color: var(--muted); font-weight: 400; font-size: .76rem; margin-top: .3rem; }
.contact input, .contact select, .contact textarea {
  display: block; width: 100%; margin-top: .3rem;
  font: 400 .95rem/1.4 inherit; color: var(--text); background: rgba(148, 178, 214, .08);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: .55rem .7rem;
}
.contact ::placeholder { color: #6b7a90; }
.contact select option { background: var(--panel-solid); }
.contact-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.contact-note { color: var(--muted); font-size: .78rem; flex: 1; min-width: 12rem; }
.contact-result { font-size: .88rem; color: #fde68a; }
.contact-result[data-ok="true"] { color: var(--online); }
.contact-trap { position: absolute; left: -9999px; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---- what's-new note: a corner card, not a pop-up that blocks the page */
.whatsnew {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30; width: min(22rem, 100% - 2rem);
  background: var(--panel-solid); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: .95rem 1.1rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); font-size: .92rem;
}
.whatsnew-label { font: 700 .72rem/1 inherit; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .4rem; }
.whatsnew-actions { display: flex; justify-content: space-between; margin-top: .7rem; }
.whatsnew-actions button { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; }
.whatsnew-actions button:hover { color: var(--text); }

/* ---- small screens */
@media (max-width: 1240px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock { margin-left: auto; }
  .nav-toggle {
    display: inline-flex; background: none; color: var(--text);
    border: 1px solid var(--line-strong); border-radius: 8px; padding: .45rem .8rem; font: 600 .9rem/1 inherit;
  }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .3rem; padding: .8rem 1rem 1rem;
    background: var(--panel-solid); border-bottom: 1px solid var(--line);
  }
  .site-nav[data-open="true"] { display: flex; }
  .nav-actions { flex-direction: column; align-items: stretch; margin-left: 0; }
}
@media (max-width: 760px) {
  .two-col, .footer-grid, .cards, .contact-grid { grid-template-columns: 1fr; }
  .cards-aligned .card { grid-row: auto; display: flex; }
  .tree { columns: 1; }
  .status-row, .status-row ul { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .prog div { grid-template-columns: 4.2rem minmax(0, 1fr); }
  .prog dd + dd { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tree li { grid-template-columns: 8rem minmax(0, 1fr) auto; }
  .tree .desc { display: none; }
}
@media (max-width: 520px) {
  .modules { grid-template-columns: 1fr; }
  .brand span { display: none; }
  .hide-narrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .backdrop-scene, .ring, .pill[data-state="onair"]::before { animation: none; }
  html { scroll-behavior: auto; }
}
td.dim { white-space: nowrap; }
