/* ANZA DX Net — shared styles */

:root {
  --bg: #070b14;
  --surface: #0f1522;
  --surface-2: #161e2f;
  --border: #243049;
  --text: #e8ecf4;
  --text-2: #aab4c8;
  --text-3: #7d8aa3;
  --gold: #ffb020;
  --gold-soft: #ffcf6e;
  --sky: #6cb4ff;
  --link: #7cc0ff;
  --link-hover: #ffcf6e;

  /* status — always paired with a text label */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  --radius: 12px;
  --radius-sm: 8px;
  --gutter: 16px;
  --max: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 20, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .04em; }
.brand:hover { color: var(--gold-soft); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-soft), var(--gold) 45%, #c4580a 100%);
  box-shadow: 0 0 18px rgba(255, 176, 32, .45);
  flex: none;
}
.brand small { display: block; font-weight: 500; letter-spacing: 0; color: var(--text-3); font-size: .72rem; }

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .94rem; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: #1a1000; background: var(--gold); }

.utc-pill {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .9rem;
  color: var(--gold-soft); background: var(--surface); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}

@media (max-width: 760px) {
  .site-header .wrap { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .nav { margin-left: 0; width: 100%; order: 3; overflow-x: auto; }
  .nav ul { flex-wrap: nowrap; }
  .nav a { padding: 7px 10px; font-size: .9rem; }
  .utc-pill { margin-left: auto; }
}

/* ---------- Sections & cards ---------- */

main { display: block; }
.section { padding: 48px 0; }
.section + .section { padding-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--gold); margin-bottom: 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: .35em; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #1a1000; }
.btn-primary:hover { background: var(--gold-soft); color: #1a1000; }

.chip {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
  font: inherit; font-size: .875rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: #1a1000; }

/* ---------- Status label (icon + text, never colour alone) ---------- */

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.status[hidden] { display: none; }
.status::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-3); flex: none;
}
.status[data-level="good"]::before { background: var(--good); }
.status[data-level="warning"]::before { background: var(--warning); }
.status[data-level="serious"]::before { background: var(--serious); border-radius: 2px; }
.status[data-level="critical"]::before { background: var(--critical); border-radius: 2px; transform: rotate(45deg); }

/* ---------- Home: hero ---------- */

.hero {
  position: relative; isolation: isolate;
  padding: 72px 0 56px;
  background:
    linear-gradient(180deg, rgba(7, 11, 20, .15) 0%, rgba(7, 11, 20, .55) 55%, var(--bg) 100%),
    url("../img/ISS023-E-57948_lrg.jpg") center 35% / cover no-repeat;
}
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-2); max-width: 46ch; }
.hero .since { font-style: italic; color: var(--gold-soft); }

.net-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 32px; }
.net-card {
  background: rgba(15, 21, 34, .82);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.net-card .band { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.net-card .freq { font-family: var(--mono); font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 700; color: var(--text); line-height: 1.1; margin: 4px 0; }
.net-card .freq small { font-size: .45em; color: var(--text-2); font-weight: 500; }
.net-card .when { color: var(--gold-soft); font-weight: 600; }
.net-card .countdown { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .92rem; color: var(--text-2); min-height: 3.2em; }
.net-card .countdown strong { color: var(--text); }
.on-air {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff;
  background: var(--critical); border-radius: 999px; padding: 2px 10px; font-size: .8rem; letter-spacing: .06em;
}
.on-air::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .on-air::before { animation: none; } }

/* ---------- Home: conditions strip ---------- */

.conditions { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }

/* ---------- Stat tiles (shared) ---------- */

.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.tile .label { font-size: .8rem; color: var(--text-2); font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.tile .value { font-size: 2rem; font-weight: 700; line-height: 1.15; margin: 6px 0 4px; color: var(--text); }
.tile .value small { font-size: .45em; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.tile .status { margin-top: 2px; }
.tile .sub { font-size: .78rem; color: var(--text-3); margin-top: 6px; }
.tile.is-loading .value { color: var(--text-3); }

/* ---------- Home: how it works / lookup / roster ---------- */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  content: counter(s); width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: var(--surface-2); color: var(--gold); border: 1px solid var(--border);
}
.callout { border-left: 3px solid var(--gold); background: var(--surface-2); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-top: 16px; }

.lookup { display: flex; flex-wrap: wrap; gap: 8px; }
.lookup input[type="text"] {
  flex: 1 1 160px; min-width: 0;
  font: inherit; font-family: var(--mono); text-transform: uppercase; font-size: 1.05rem;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.lookup input::placeholder { color: var(--text-3); text-transform: none; font-family: var(--font); }
.lookup .db-choices { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.lookup .db-choices label { cursor: pointer; }
.lookup .db-choices input { position: absolute; opacity: 0; pointer-events: none; }
.lookup .db-choices input:checked + span { background: var(--gold); border-color: var(--gold); color: #1a1000; }
.lookup .db-choices input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.roster { width: 100%; border-collapse: separate; border-spacing: 0; }
.roster-wrap { overflow-x: auto; }
.roster th, .roster td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.roster th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }
.roster td a { font-family: var(--mono); font-weight: 700; text-decoration: none; }
.roster td .name { color: var(--text-2); font-size: .9rem; margin-left: 6px; }
.roster tr.is-today td { background: rgba(255, 176, 32, .08); }
.roster tr.is-today td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.today-tag { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1a1000; background: var(--gold); border-radius: 4px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px; }

/* ---------- Heritage ---------- */

.heritage { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.figure a.thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.figure a.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.figure a.thumb:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .figure a.thumb img { transition: none; } }
.figure figcaption { padding: 14px 16px 16px; font-size: .92rem; color: var(--text-2); }
.figure figcaption strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ---------- Propagation: image panels ---------- */

.panel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.panel-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.panel { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.panel .img { background: #fff; display: grid; place-items: center; }
.panel .img.dark { background: #000; }
.panel .img img { width: 100%; height: auto; }
.panel figcaption { padding: 12px 16px 14px; font-size: .88rem; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.panel figcaption strong { color: var(--text); font-size: .98rem; }
.panel figcaption .meta { margin-top: auto; padding-top: 6px; font-size: .78rem; color: var(--text-3); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.alert-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alert-strip a { display: block; background: #fff; border-radius: 6px; padding: 3px; line-height: 0; }
.alert-strip img { height: 40px; width: auto; }

/* ---------- Kp chart ---------- */

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.chart-head h3 { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: 260px; overflow: visible; }
.chart .grid-line { stroke: #222c40; stroke-width: 1; }
.chart .axis-text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .threshold { stroke: var(--text-3); stroke-width: 1; }
.chart .now-line { stroke: var(--gold-soft); stroke-width: 1.5; }
.chart .now-text { fill: var(--gold-soft); font-size: 11px; font-weight: 700; }
.chart .bar.is-dim { opacity: .25; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: #0b101b; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: .82rem; color: var(--text-2); white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  transform: translate(-50%, calc(-100% - 10px));
}
.tooltip strong { color: var(--text); font-size: 1rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th, .data-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
details.table-view { margin-top: 12px; }
details.table-view summary { cursor: pointer; color: var(--link); font-size: .88rem; font-weight: 600; }
details.table-view .scroll { max-height: 320px; overflow: auto; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ---------- Product viewer ---------- */

.viewer { display: grid; gap: 16px; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
@media (max-width: 860px) { .viewer { grid-template-columns: minmax(0, 1fr); } }
.viewer-menu { display: flex; flex-direction: column; gap: 14px; }
.viewer-menu h4 { margin: 0 0 6px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.viewer-menu .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.viewer-stage { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-height: 420px; overflow: hidden; display: flex; flex-direction: column; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .88rem; color: var(--text-2); flex-wrap: wrap; }
.viewer-bar strong { color: var(--text); }
.viewer-body { flex: 1; overflow: auto; max-height: 720px; }
.viewer-body pre { margin: 0; padding: 16px; font-family: var(--mono); font-size: .82rem; line-height: 1.5; color: var(--text); white-space: pre; }
.viewer-body img { margin: 0 auto; background: #fff; }

/* ---------- Link directory ---------- */

.link-dir { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.link-dir section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.link-dir h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.link-dir ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.link-dir a { text-decoration: none; }
.link-dir a:hover { text-decoration: underline; }
.link-dir li span { color: var(--text-3); font-size: .82rem; }

/* ---------- Solar image gallery ---------- */

.sun-feature { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 860px) { .sun-feature { grid-template-columns: minmax(0, 1fr); } }
.sun-feature .disc { border-radius: 50%; overflow: hidden; aspect-ratio: 1; background: #000; max-width: 560px; width: 100%; margin: 0 auto; box-shadow: 0 0 80px rgba(255, 140, 20, .25); }
.sun-feature .disc img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }

.sun-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); }
.sun-tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.sun-tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.sun-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sun-tile { transition: none; } .sun-tile:hover { transform: none; } }
.sun-tile .img { aspect-ratio: 1; background: #000; }
.sun-tile .img img { width: 100%; height: 100%; object-fit: cover; }
.sun-tile .cap { padding: 10px 12px 12px; }
.sun-tile .cap strong { display: block; font-size: .95rem; color: var(--text); }
.sun-tile .cap span { font-size: .8rem; color: var(--text-2); }

dialog.lightbox {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 0;
  background: var(--surface); color: var(--text);
  width: min(96vw, 1100px); max-height: 94vh;
}
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox-inner { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); max-height: 94vh; }
@media (max-width: 760px) { .lightbox-inner { grid-template-columns: minmax(0, 1fr); overflow: auto; } }
.lightbox-inner .img { background: #000; display: grid; place-items: center; }
.lightbox-inner .img img { max-height: 90vh; width: auto; }
.lightbox-inner .info { padding: 24px; overflow: auto; }
.lightbox-close { position: absolute; top: 10px; right: 10px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 32px 0 48px; font-size: .9rem; color: var(--text-2); }
.site-footer .wrap { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.site-footer h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* ---------- News ---------- */

.news-layout { display: grid; gap: 32px; grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .news-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.news-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 860px) {
  .news-side { position: static; }
  .news-side .years { display: none; }
}
.news-side h2 { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .chip .count { opacity: .7; font-weight: 500; margin-left: 4px; }
.years ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.years a { text-decoration: none; font-family: var(--mono); font-size: .9rem; }

.year-group { margin-bottom: 8px; scroll-margin-top: 80px; }
.year-group > h2 {
  font-family: var(--mono); font-size: 1rem; color: var(--gold); letter-spacing: .06em;
  padding: 10px 0; margin: 0; border-bottom: 1px solid var(--border);
}
.year-group[hidden] { display: none; }

.post { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.post[hidden] { display: none; }
@media (max-width: 600px) { .post { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.post time { font-size: .85rem; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 3px; }
.post h3 { font-size: 1.15rem; margin: 4px 0 8px; }
.post p { color: var(--text-2); margin-bottom: .6em; }
.post p:last-child { margin-bottom: 0; }
.post .thanks { font-size: .85rem; color: var(--text-3); font-style: italic; }
.post .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.post .media { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin-top: 14px; max-width: 620px; }
.post .media figure { margin: 0; }
.post .media a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: #fff; }
.post .media figcaption { font-size: .78rem; color: var(--text-3); margin-top: 4px; }
.post audio { width: 100%; max-width: 420px; margin-top: 8px; }

.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.post.is-milestone h3 { color: var(--gold-soft); }
.post.is-sk { background: linear-gradient(90deg, rgba(255, 255, 255, .03), transparent 60%); }
.post.is-sk h3::before { content: "✦ "; color: var(--text-3); }
.empty-note { color: var(--text-3); padding: 24px 0; }

/* ---------- Long-form guide ---------- */

.guide-layout { display: grid; gap: 40px; grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.toc { position: sticky; top: 84px; font-size: .9rem; }
.toc h2 { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; color: var(--text-2); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--gold-soft); border-left-color: var(--gold); }
@media (max-width: 960px) {
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
  .toc ol { border: 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .toc a { padding-left: 0; border: 0; }
}

.prose { max-width: 72ch; }
.prose > section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.prose > section:last-child { border-bottom: 0; }
.prose h2 { margin-top: 0; }
.prose h3 { margin-top: 1.6em; color: var(--text); }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.term { color: var(--gold-soft); font-weight: 600; }
a.term { text-decoration: underline dotted; text-underline-offset: 3px; }
.prose figure { margin: 24px 0; }
.prose figure img { border-radius: var(--radius-sm); border: 1px solid var(--border); margin: 0 auto; }
.prose figcaption { font-size: .85rem; color: var(--text-3); margin-top: 8px; text-align: center; }
.figure-pair { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: start; }
.key-points { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.key-points h3 { margin: 0 0 8px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.key-points ul { margin: 0; }

.ref-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.ref-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.ref-table th, .ref-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); }
.ref-table th { background: var(--surface-2); color: var(--text-3); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.ref-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.ref-table tr:last-child td { border-bottom: 0; }

.glossary { display: grid; gap: 0; margin: 0; }
.glossary div { padding: 14px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.glossary div:target { background: rgba(255, 176, 32, .08); }
.glossary dt { font-weight: 700; color: var(--text); }
.glossary dt small { font-weight: 500; color: var(--text-3); margin-left: 6px; }
.glossary dd { margin: 4px 0 0; color: var(--text-2); }

/* ---------- Operator reference ---------- */

.letter-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); }
.letter {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 4px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color .15s;
}
.letter:hover { border-color: var(--gold); }
.letter:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.letter.is-playing { border-color: var(--gold); background: rgba(255, 176, 32, .08); }
.letter .ch { grid-row: span 2; font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--gold); text-align: center; }
.letter .word { font-weight: 700; color: var(--text); }
.letter .say { font-size: .8rem; color: var(--text-3); }
.letter .say b { color: var(--text-2); font-weight: 700; }
.letter .code { font-family: var(--mono); font-size: 1.15rem; letter-spacing: .12em; color: var(--text); line-height: 1.2; }

.spell { display: grid; gap: 16px; }
.spell-row { display: flex; gap: 8px; flex-wrap: wrap; }
.spell-row input {
  flex: 1 1 200px; min-width: 0; font: inherit; font-family: var(--mono); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .08em;
  padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.spell-out { display: grid; gap: 10px; }
.spell-out .line { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 3em; }
.spell-out .line .lbl { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
.spell-out .phon { font-size: 1.15rem; color: var(--text); font-weight: 600; }
.spell-out .morse { font-family: var(--mono); font-size: 1.2rem; color: var(--gold-soft); letter-spacing: .1em; word-break: break-word; }
.spell-controls { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-size: .9rem; color: var(--text-2); }
.spell-controls input[type="range"] { accent-color: var(--gold); vertical-align: middle; }

.convert { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.convert label { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.convert input {
  width: 7em; font: inherit; font-family: var(--mono); font-size: 1.1rem; padding: 8px 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.morse-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.letter .code { white-space: nowrap; letter-spacing: .18em; color: var(--gold-soft); font-size: 1.05rem; }
.spell-out .morse { letter-spacing: .14em; }

/* ---------- Home: grayline map ---------- */

.cal-btn {
  margin-top: 10px; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--link);
}
.cal-btn:hover { color: var(--link-hover); text-decoration: underline; }

.tile .label .info {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font-size: .7rem; font-weight: 700;
  border: 1px solid var(--border); color: var(--text-3); text-decoration: none;
}
.tile .label .info:hover { color: #1a1000; background: var(--gold); border-color: var(--gold); }

.map-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.map-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
.map-jumps { display: flex; flex-wrap: wrap; gap: 6px; }
.map-time { font-size: .9rem; color: var(--text-2); }
.map-time strong { color: var(--text); font-variant-numeric: tabular-nums; }
.live-tag { font-size: .68rem; font-weight: 800; letter-spacing: .08em; color: #fff; background: var(--critical); border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.map-slider { width: 100%; margin: 14px 0 2px; accent-color: var(--gold); }
.map-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-3); margin-bottom: 10px; }
@media (max-width: 600px) { .map-scale span:nth-child(n+3):nth-child(-n+7) { visibility: hidden; } }

.netmap { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #081226; }
.netmap svg { display: block; width: 100%; height: auto; }
.m-sphere { fill: #0b1a36; }
.m-outline { fill: none; stroke: #2a3a5c; stroke-width: 1; }
.m-graticule { fill: none; stroke: #ffffff; stroke-opacity: .06; stroke-width: .6; }
.m-landfill { fill: #2a3953; }
.m-borders { fill: none; stroke: #0b1a36; stroke-width: .6; stroke-opacity: .8; }
.m-night { fill: #000614; fill-opacity: .36; pointer-events: none; }
.m-grayline { fill: none; stroke: var(--gold); stroke-width: 2; stroke-opacity: .85; pointer-events: none; filter: drop-shadow(0 0 4px rgba(255, 176, 32, .6)); }
.m-sun circle { fill: #ffd24a; }
.m-sun .glow { fill: #ffb020; fill-opacity: .25; }
.m-path { fill: none; stroke: var(--sky); stroke-width: 2.5; stroke-dasharray: 6 5; stroke-linecap: round; }
.m-you circle { fill: var(--sky); stroke: #081226; stroke-width: 2; }
.m-you text { fill: var(--text); font: 700 13px var(--font); paint-order: stroke; stroke: #081226; stroke-width: 3px; }
.m-marker { cursor: pointer; outline: none; }
.m-marker .hit { fill: transparent; }
.m-marker .dot { fill: var(--sky); stroke: #081226; stroke-width: 2; }
.m-marker text { fill: var(--text-2); font: 700 12px var(--font); paint-order: stroke; stroke: #081226; stroke-width: 3px; }
.m-marker.is-active .dot { fill: var(--gold); }
.m-marker.is-active text { fill: var(--gold-soft); }
.m-marker:focus-visible .dot { stroke: #fff; }
.m-marker .pulse { fill: none; stroke: var(--gold); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .m-marker .pulse { animation: none; opacity: .7; } }
.map-tip { transform: translate(-50%, calc(-100% - 14px)); white-space: normal; min-width: 200px; max-width: 260px; }
.map-tip .tt-title { color: var(--gold-soft); font-weight: 700; margin-bottom: 4px; }

.map-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 12px; font-size: .88rem; color: var(--text-2); }
.map-state strong { color: var(--text); }
.map-state .dot-key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); vertical-align: 0; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--text-3); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.map-legend .lg-gray { height: 3px; width: 16px; border-radius: 2px; background: var(--gold); }
.map-legend .lg-night { border-radius: 3px; background: #0a1020; border: 1px solid #2a3a5c; }
.map-legend .lg-sun { background: #ffd24a; }
.map-legend .lg-ncs { background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 176, 32, .3); }
.map-legend .lg-area { background: var(--sky); }

.path-card { margin-top: 16px; }
.path-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 20px; }
.path-form { display: flex; flex-wrap: wrap; gap: 8px; }
.path-form input {
  width: 12em; font: inherit; font-family: var(--mono); font-size: 1rem;
  padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.path-form input::placeholder { font-family: var(--font); color: var(--text-3); }
.path-out { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.path-head { color: var(--text-2); margin-bottom: 10px; }
.path-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.path-stats > div { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.path-stats .k { display: block; font-size: .75rem; color: var(--text-3); font-weight: 600; }
.path-stats .v { display: block; font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.path-stats .s { display: block; font-size: .8rem; color: var(--text-2); }
.netmap.is-compact .m-marker text, .netmap.is-compact .m-you text { font-size: 14px; }

/* ---------- Get licensed ---------- */

.hero-slim { padding: 56px 0 40px; background-position: center 60%; }
.fact-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin-top: 28px; max-width: 820px; }
.fact-strip > div { background: rgba(15, 21, 34, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.fact-strip .v { display: block; font-size: 1.6rem; font-weight: 800; color: var(--gold-soft); line-height: 1.2; }
.fact-strip .k { display: block; font-size: .82rem; color: var(--text-2); }

.why-grid .card p { margin: 0; }
.level-card .power { font-size: 1.8rem; font-weight: 800; color: var(--text); margin: 4px 0 10px; line-height: 1.2; }
.level-card .power small { display: block; font-size: .8rem; font-weight: 500; color: var(--text-2); }
.level-card ul { margin: 0; padding-left: 1.1em; color: var(--text-2); font-size: .92rem; }
.level-card li { margin-bottom: 4px; }
.level-card h3 { margin-top: 8px; font-size: 1.3rem; }
.tag-gold { background: var(--gold); color: #1a1000; border-color: var(--gold); }

.band-card { margin-top: 16px; }
.band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.band-head .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.band-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 118px), 1fr)); }
.band-list li {
  position: relative; border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 8px 10px;
  color: var(--text-3); transition: background .2s, border-color .2s, color .2s;
}
.band-list li b { display: block; font-size: 1rem; }
.band-list li span { font-size: .75rem; }
.band-list li em { display: block; font-style: normal; font-size: .7rem; font-weight: 700; margin-top: 2px; color: var(--text-3); }
.band-list li.is-on { border-style: solid; border-color: rgba(255, 176, 32, .55); background: rgba(255, 176, 32, .1); color: var(--text); }
.band-list li.is-on span { color: var(--text-2); }
.band-list li.anza { box-shadow: inset 0 0 0 1px rgba(108, 180, 255, .5); }
.band-list li.anza em { color: var(--sky); }
.band-list li:not(.is-on) b { text-decoration: line-through; text-decoration-color: rgba(125, 138, 163, .6); }
@media (prefers-reduced-motion: reduce) { .band-list li { transition: none; } }
.band-summary { margin: 14px 0 0; color: var(--text-2); }
.band-summary strong { color: var(--text); }

.path-steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 0; max-width: 820px; }
.path-steps li { counter-increment: st; position: relative; padding: 0 0 24px 56px; }
.path-steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #1a1000; background: var(--gold);
}
.path-steps li::after { content: ""; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; background: var(--border); }
.path-steps li:last-child::after { display: none; }
.path-steps h3 { margin: 6px 0 4px; font-size: 1.1rem; }
.path-steps p { margin: 0; color: var(--text-2); }

.feature-card {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  padding: 24px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, rgba(255, 176, 32, .14), rgba(108, 180, 255, .08) 70%), var(--surface);
  border: 1px solid rgba(255, 176, 32, .45);
}
.feature-card:hover { border-color: var(--gold); color: var(--text); }
.feature-card > div { flex: 1 1 420px; }
.feature-card h3 { font-size: 1.4rem; margin: 8px 0 6px; }
.feature-card p { color: var(--text-2); margin: 0 0 8px; max-width: 65ch; }
.feature-points { margin: 0; padding-left: 1.1em; color: var(--text-2); font-size: .92rem; }
.res-card { display: flex; flex-direction: column; }
.res-card h3 { margin-top: 8px; }
.res-card p { flex: 1; font-size: .92rem; }
.res-card > a { font-weight: 600; text-decoration: none; }

.faq { max-width: 820px; display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--text-2); }
.res-card .tag, .level-card .tag { align-self: flex-start; }
@media (max-width: 760px) {
  .nav { overflow-x: visible; }
  .nav ul { flex-wrap: wrap; gap: 2px 2px; }
  .nav a { padding: 6px 10px; }
}
