/*
Theme Name: Ultimate Ham Radio
Theme URI: https://ultimatehamradio.com
Author: GM5SNW
Description: Dark HUD site theme for Ultimate Ham Radio: UHR Decoder, UHR Decoder Lite, UHR Loader, UHR Network Trace and future Ultimate programmes.
Version: 3.15.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ultimate-ham-radio
*/

/* Fonts: Orbitron and Rajdhani (SIL Open Font License), self-hosted, same as the programmes */
@font-face { font-family: Orbitron; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/orbitron-500.woff2) format("woff2"); }
@font-face { font-family: Orbitron; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/orbitron-700.woff2) format("woff2"); }
@font-face { font-family: Rajdhani; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/rajdhani-500.woff2) format("woff2"); }
@font-face { font-family: Rajdhani; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/rajdhani-600.woff2) format("woff2"); }
@font-face { font-family: Rajdhani; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/rajdhani-700.woff2) format("woff2"); }

:root {
  --bg-0: #04070d;
  --bg-1: #08101b;
  --bg-2: #0d1828;
  --bg-3: #14233a;
  --border: #16324a;
  --accent: #2dd4bf;
  --accent-2: #8b5cf6;
  --text-hi: #f1f4fb;
  --text-mid: #8fb0c9;
  --text-dim: #567089;
  --amber: #f5c542;
  --radius: 6px;
  --wrap: 1180px;
  --head: Orbitron, "Segoe UI", system-ui, sans-serif;
  --body: Rajdhani, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-0);
  background-image: radial-gradient(1200px 600px at 50% -10%, rgba(45,212,191,.10), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text-mid);
  font-family: var(--body);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: #7ff0df; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(45,212,191,.3); color: #fff; }

h1, h2, h3 { font-family: var(--head); line-height: 1.18; margin: 0 0 .55em; color: var(--text-hi); font-weight: 700; letter-spacing: .02em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); text-shadow: 0 0 32px rgba(45,212,191,.35); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; max-width: 66ch; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; color: var(--text-hi); }

.eyebrow { font-family: var(--body); font-weight: 700; font-size: .95rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--bg-0); padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 10px; top: 10px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tint { background: var(--bg-1); border-block: 1px solid var(--border); }
.lede { font-size: 1.3rem; color: var(--text-mid); }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--body); font-weight: 700; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 13px 26px; border-radius: var(--radius); text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; text-align: center;
}
.btn-primary { background: var(--accent); color: var(--bg-0); box-shadow: 0 0 24px rgba(45,212,191,.35); }
.btn-primary:hover { background: #7ff0df; color: var(--bg-0); box-shadow: 0 0 34px rgba(45,212,191,.55); }
.btn-ghost { border-color: var(--border); color: var(--text-hi); background: rgba(20,35,58,.5); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(45,212,191,.08); }
.btn-donate { background: var(--accent-2); color: #fff; }
.btn-donate:hover { background: #a283f8; color: #fff; }
.btn.is-off { background: var(--bg-3); color: var(--text-dim); cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.fine { font-size: 1rem; color: var(--text-dim); margin-top: 16px; }
.pill { display: inline-block; font-family: var(--body); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; padding: 1px 10px; border-radius: 99px; border: 1px solid var(--accent); color: var(--accent); margin-left: 10px; vertical-align: middle; }

/* ---------- Header ---------- */
.site-header { background: rgba(4,7,13,.88); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent); opacity: .6; }
.brand { flex: none; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 42px; width: auto; display: block; }
.footer-logo { height: 40px; width: auto; display: block; margin-bottom: 10px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center; }
.site-nav a { color: var(--text-mid); text-decoration: none; font-weight: 700; font-size: .84rem; letter-spacing: .06em; white-space: nowrap; text-transform: uppercase; padding: 8px 7px; border-radius: var(--radius); display: block; }
.site-nav a:hover { color: var(--text-hi); background: var(--bg-3); }
.site-nav .current-menu-item > a { color: var(--accent); background: rgba(45,212,191,.1); }
.site-nav .nav-donate a { background: var(--accent-2); color: #fff; margin-left: 6px; }
.site-nav .nav-donate a:hover { background: #a283f8; color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text-hi); padding: 8px 14px; border-radius: var(--radius); font: inherit; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 92px) 0 0; position: relative; overflow-x: clip; }
.hero-copy { max-width: 820px; }
.hero h1 { max-width: 18ch; }
.hero .lede { max-width: 58ch; }
.hero-stage { position: relative; margin-top: clamp(40px, 6vw, 72px); margin-bottom: calc(-1 * clamp(60px, 9vw, 120px)); z-index: 2; }
.hero-stage::before { content: ""; position: absolute; inset: 4% -4% -6%; background: radial-gradient(60% 65% at 50% 50%, rgba(45,212,191,.22) 0%, rgba(139,92,246,.10) 45%, transparent 72%); z-index: -1; }
.after-hero { padding-top: calc(clamp(60px, 9vw, 120px) + clamp(56px, 8vw, 96px)); }

/* ---------- Programme windows: HUD frame with corner brackets ---------- */
.window {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-1); border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(45,212,191,.12), 0 0 44px -8px rgba(45,212,191,.28), 0 40px 80px -30px rgba(0,0,0,.8);
}
.window::before, .window::after { content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none; z-index: 2; }
.window::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.window::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.window img { width: 100%; }
.window-bar { display: flex; gap: 7px; padding: 11px 14px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-3); }
.window-empty-body { min-height: 260px; display: grid; place-items: center; text-align: center; padding: 28px; color: var(--text-dim); font-size: 1rem; background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(255,255,255,.03) 31px 32px); }
.window-empty-body code { color: var(--text-mid); }

/* ---------- Feature rows ---------- */
.intro-block { max-width: 64ch; margin-bottom: 8px; }
.feature { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 5vw, 80px); align-items: center; padding: clamp(36px, 5vw, 64px) 0; }
.feature + .feature { border-top: 1px solid var(--border); }
.feature.flip .feature-text { order: 2; }
.feature-text p { color: var(--text-mid); }

/* Features without a screenshot: quiet grid, divided by teal rules */
.minor { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 40px; margin-top: 12px; }
.minor > div { border-top: 1px solid var(--accent); padding: 18px 0 14px; }
.minor p { color: var(--text-mid); margin: 0; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: 10px 0 10px 32px; border-bottom: 1px solid var(--border); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }

.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 72px); align-items: center; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 28px; }
.pair > div { padding: 8px clamp(20px, 4vw, 48px) 8px 0; }
.trio { grid-template-columns: repeat(3, 1fr); }
.trio > div { padding-right: clamp(16px, 2.5vw, 32px); }
.trio > div + div { padding-left: clamp(16px, 2.5vw, 32px); }
.pair > div + div { border-left: 1px solid var(--border); padding: 8px 0 8px clamp(20px, 4vw, 48px); }
.pair p { color: var(--text-mid); }
.pair .btn-row { margin-top: 18px; }

/* ---------- Download panel ---------- */
.get { position: relative; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 56px); box-shadow: 0 0 40px -12px rgba(45,212,191,.25); }
.get h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.get dl { margin: 0 0 8px; }
.get dt { color: var(--text-dim); font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; margin-top: 12px; font-weight: 700; }
.get dd { margin: 0; font-weight: 600; color: var(--text-hi); word-break: break-all; }
.get .notes { color: var(--text-mid); margin: 0; }
.get h3 { margin-bottom: .4em; }

/* ---------- Programme page bits ---------- */
.setup { max-width: 66ch; }
.setup li { margin-bottom: .6em; }
.others { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.others a { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 2px; }
.others a:hover { border-color: var(--accent); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-mid); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.support { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: 0 0 40px -12px rgba(139,92,246,.3); position: sticky; top: 92px; }
.support ul { margin: 0 0 18px; padding-left: 20px; color: var(--text-mid); }

/* ---------- Donate band ---------- */
.donate { background: linear-gradient(90deg, rgba(45,212,191,.10), rgba(139,92,246,.14)); border-block: 1px solid var(--border); }
.donate h2 { color: var(--text-hi); }
.donate-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-1); border-top: 1px solid var(--border); color: var(--text-dim); padding: 44px 0; font-size: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer a { color: var(--text-mid); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1420px) {
  .brand img { height: 36px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-0); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav .nav-donate a { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 900px) {
  body { font-size: 19px; }
  .feature, .split, .get, .about-grid, .pair, .trio { grid-template-columns: 1fr; }
  .feature.flip .feature-text { order: 0; }
  .pair > div, .pair > div + div { border-left: 0; padding: 18px 0; }
  .pair > div + div { border-top: 1px solid var(--border); }
  .support { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Why page: numbers, comparison table, FAQ ---------- */
.num { font-family: var(--head); color: var(--accent); font-size: .85em; margin-right: 6px; }
.table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.compare { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.compare thead th { font-family: var(--head); font-size: .85rem; letter-spacing: .08em; color: var(--text-hi); background: var(--bg-2); }
.compare tbody th { font-weight: 500; color: var(--text-mid); }
.compare tr:last-child > * { border-bottom: 0; }
.compare td { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .95rem; }
.compare .yes { color: #3ddc84; }
.compare .no { color: var(--text-dim); }
.faq { max-width: 820px; margin-top: 18px; }
.faq details { border-top: 1px solid var(--border); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 700; font-size: 1.1rem; color: var(--text-hi); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; color: var(--accent); font-size: 1.4rem; line-height: 1; top: 14px; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 14px; }

/* Download section: landing spot for every download button */
#download { scroll-margin-top: 80px; }
.get .notes h4 { font-family: var(--head); font-size: .95rem; color: var(--accent); margin: 1.2em 0 .4em; letter-spacing: .06em; }
.get .notes h4:first-child { margin-top: 0; }
.get .notes ul { margin: 0 0 .6em; padding-left: 1.2em; }
.get .notes li { margin-bottom: .4em; }
.get .notes p { margin: 0 0 .6em; }


/* Support page */
.uhr-support { max-width: 720px; margin-inline: auto; }
.uhr-support [hidden] { display: none !important; }
.sup-panel { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(18px, 4vw, 30px); }
.sup-panel h2 { font-size: 1.4rem; }
.sup-field { display: block; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.sup-field > span, .sup-field legend { display: block; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 6px; padding: 0; }
.uhr-support input[type=text], .uhr-support input[type=email], .uhr-support input[type=password], .uhr-support select, .uhr-support textarea {
  width: 100%; background: var(--bg-0); color: var(--text-hi); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 13px; font: inherit; font-size: 1.05rem; }
.uhr-support textarea { resize: vertical; min-height: 140px; }
.uhr-support input:focus, .uhr-support select:focus, .uhr-support textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(45,212,191,.25); }
.uhr-support input[type=file] { color: var(--text-mid); font: inherit; font-size: 1rem; max-width: 100%; }
.sup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.sup-radios { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.sup-radios legend { width: 100%; }
.sup-radios label { color: var(--text-hi); cursor: pointer; }
.sup-radios input { accent-color: var(--accent); margin-right: 6px; }
.sup-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.sup-msg { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--border); font-size: 1.05rem; color: var(--text-hi); }
.sup-msg.is-err { border-color: var(--amber); background: rgba(245,197,66,.08); }
.sup-msg.is-ok { border-color: var(--accent); background: rgba(45,212,191,.08); }
.sup-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sup-tabs { display: flex; gap: 6px; }
.sup-tab { font: inherit; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; padding: 9px 16px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-mid); border-radius: var(--radius); cursor: pointer; }
.sup-tab.is-on { color: var(--accent); border-color: var(--accent); background: rgba(45,212,191,.08); }
.btn.sup-small { padding: 9px 16px; font-size: .9rem; }
.sup-files, .sup-progress, .sup-tickets { list-style: none; margin: 8px 0 0; padding: 0; }
.sup-files li, .sup-progress li { color: var(--text-mid); font-size: 1rem; padding: 2px 0; }
.sup-link { font: inherit; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }
.sup-tickets li { margin: 0 0 10px; }
.sup-ticket { width: 100%; text-align: left; font: inherit; background: var(--bg-0); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; color: var(--text-mid); }
.sup-ticket:hover { border-color: var(--accent); }
.sup-ticket-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; color: var(--text-hi); }
.sup-ticket-top h2 { margin: 0; }
.sup-ticket-top strong { overflow-wrap: anywhere; }
.sup-meta { font-size: .95rem; color: var(--text-dim); margin-top: 4px; }
.sup-empty { color: var(--text-dim); }
.sup-badge { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.sup-badge.st-submitted { color: #b794ff; border-color: #b794ff; background: rgba(139,92,246,.12); }
.sup-badge.st-reviewed { color: var(--accent); border-color: var(--accent); background: rgba(45,212,191,.1); }
.sup-badge.st-in_progress { color: var(--amber); border-color: var(--amber); background: rgba(245,197,66,.1); }
.sup-badge.st-closed { color: var(--text-dim); border-color: var(--text-dim); }
#sup-detail { margin: 18px 0; }
.sup-note { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-0); }
.sup-note.is-admin { border-color: var(--accent-2); background: rgba(139,92,246,.08); }
.sup-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-hi); margin-top: 4px; }
@media (max-width: 560px) { .sup-row { grid-template-columns: 1fr; } }

.uhr-support #au-tabs { margin-bottom: 14px; }
.uhr-support .sup-hint { display: block; margin-top: 5px; font-size: .95rem; color: var(--text-dim); text-transform: none; letter-spacing: 0; font-weight: 500; }
.uhr-support .sup-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; color: var(--text-hi); cursor: pointer; }
.uhr-support .sup-check input { margin-top: 6px; accent-color: var(--accent); flex: none; }
.uhr-support .sup-code { font-family: var(--head); font-size: 1.6rem; letter-spacing: .5em; text-align: center; max-width: 280px; }
.uhr-support #sup-need-code, .uhr-support #su-signin-instead { margin-left: 10px; }
.uhr-support .sup-panel p strong { color: var(--text-hi); overflow-wrap: anywhere; }
.uhr-support code { background: var(--bg-0); padding: 1px 6px; border-radius: 4px; }

/* Legal pages: unfilled details stand out until completed */
.prose mark.uhr-fill{background:rgba(255,200,60,.18);color:#ffd36a;padding:0 .25em;border-radius:3px}
.prose h3{margin-top:1.8em}
