/* KC2RGW — dark station theme
   Palette: charcoal chassis, amber filament, phosphor green accents
   (carried over from the QRZ page so both sites read as one) */

:root {
  --bg: #0b0d10;
  --bg-elev: #14181e;
  --bg-card: #171c23;
  --line: #2a323c;
  --text: #e7ebe6;
  --muted: #9aa39a;
  --amber: #e8a54b;
  --amber-dim: #c4842e;
  --phosphor: #7dff9a;
  --phosphor-dim: #3d9a55;
  --glow: rgba(232, 165, 75, 0.18);
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

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

a {
  color: var(--amber);
  text-decoration: none;
}

a:hover {
  color: #ffd089;
}

:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(1080px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 50;
}

.skip-link:focus {
  left: 0.8rem;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(125, 255, 154, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 255, 154, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top, black 20%, transparent 75%);
}

.bg-glow {
  position: fixed;
  top: -20vh;
  left: 20vw;
  width: 50vw;
  height: 50vh;
  z-index: -1;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 16, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand {
  align-items: center;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  border: 1px solid var(--line);
}

.brand-mark {
  color: var(--phosphor);
  font-size: 0.6rem;
  vertical-align: 0.15em;
  animation: blink 2.4s ease-in-out infinite;
}

.brand-call {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  color: var(--phosphor);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 0.8rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero h1 .call {
  font-family: var(--mono);
  color: var(--amber);
  letter-spacing: 0.02em;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 38rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.pill {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #d7e0d4;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--amber-dim);
  background: var(--amber);
  color: #1a1206;
}

.btn:hover {
  background: #f2b765;
  color: #1a1206;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn.ghost:hover {
  border-color: var(--amber-dim);
  color: var(--text);
}

.hero-mosaic {
  display: grid;
  gap: 0.7rem;
}

.tile {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.tile-main {
  grid-column: 1 / -1;
}

.tile img {
  width: 100%;
  height: auto;
}

.tile figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.5rem 0.8rem;
  border-top: 1px solid var(--line);
}

.tile.placeholder {
  border-style: dashed;
  border-color: #3a4552;
  background:
    repeating-linear-gradient(135deg, rgba(232, 165, 75, 0.04) 0 12px, transparent 12px 24px),
    var(--bg-card);
}

.placeholder-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem 2.6rem;
  font-size: 0.85rem;
}

.placeholder-body span:last-child {
  color: var(--muted);
}

.hero-photo {
  margin: 0;
}

.hero-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.hero-photo figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.55rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 3.2rem 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(20, 24, 30, 0.65), rgba(20, 24, 30, 0.2));
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.8rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.subhead {
  margin: 2rem 0 0.8rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.subhead:first-of-type {
  margin-top: 0;
}

/* Interests ("I like playing with") */

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.interest {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.interest h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.interest p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.interest-code {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--phosphor);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

/* Link cards */

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.2rem;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.link-card:hover {
  border-color: var(--amber-dim);
  transform: translateY(-2px);
  color: var(--text);
}

.link-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--phosphor);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-card span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.contact-qsl {
  width: 220px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.contact-copy {
  flex: 1 1 240px;
}

.contact-band h2 {
  margin: 0 0 0.25rem;
  font-size: 1.3rem;
}

.contact-band p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Article (guide) pages ---------- */

.article-hero {
  padding: 3.4rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.crumbs {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--text);
}

.article-hero h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
  max-width: 48rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 3rem;
  padding: 2.4rem 0 3rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 88px;
  border-left: 1px solid var(--line);
  padding-left: 1.1rem;
  font-size: 0.86rem;
}

.toc.hidden {
  display: none;
}

.toc h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin: 0 0 0.7rem;
  font-weight: 500;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.toc a {
  color: var(--muted);
}

.toc a:hover,
.toc a.active {
  color: var(--amber);
}

.prose {
  max-width: 44rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #d4dad3;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--text);
  margin: 2.6rem 0 0.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.prose h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin: 2rem 0 0.6rem;
}

.prose h4 {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 1.6rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose strong {
  color: var(--text);
}

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(232, 165, 75, 0.4);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose li::marker {
  color: var(--amber);
}

.article-figure {
  margin: 1.6rem 0;
}

.article-figure img {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}

.article-embed {
  margin: 1.6rem 0;
}

.article-embed iframe {
  width: 100%;
  height: 640px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.article-embed figcaption {
  font-size: 0.82rem;
  margin-top: 0.4rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.4rem;
}

.eq-table,
.data-table {
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.9rem;
  min-width: 260px;
}

.eq-table th,
.eq-table td,
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.45rem 1.4rem 0.45rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.eq-table th,
.data-table th {
  color: var(--phosphor);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eq-table td:last-child {
  color: var(--amber);
}

.data-table {
  font-family: var(--font);
  font-size: 0.94rem;
  width: 100%;
}

.data-table td:first-child {
  font-family: var(--mono);
  color: var(--amber);
  white-space: nowrap;
}

.data-table th {
  font-family: var(--mono);
}

.callout {
  margin: 1.4rem 0 1.6rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--phosphor-dim);
  border-radius: 10px;
  background: var(--bg-card);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-title {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 0.5rem;
}

.callout.warn {
  border-left-color: var(--amber);
}

.callout.warn .callout-title {
  color: var(--amber);
}

.article-figure figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.55rem;
}

.mic-verdict {
  display: block;
  color: var(--amber);
  font-weight: 500;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  padding-bottom: 3.2rem;
}

.pager .link-card:last-child {
  text-align: right;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

.signoff {
  font-family: var(--mono);
  color: var(--phosphor);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-mark { animation: none; }
  .link-card { transition: none; }
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    background: var(--bg-card);
  }
}

@media (max-width: 880px) {
  .hero-grid,
  .link-grid,
  .interest-grid,
  .pager {
    grid-template-columns: 1fr;
  }

  .pager .link-card:last-child {
    text-align: left;
  }

  .hero {
    padding-top: 2.4rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7rem 0;
    gap: 0.4rem;
  }

  .brand-sub {
    display: none;
  }

  .nav {
    font-size: 0.85rem;
  }
}

/* ---------- Comparison (Anan vs Sun) ---------- */

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin: 1.4rem 0 0.6rem;
}

.score {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.score-n {
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
}

.score-l {
  color: var(--muted);
  font-size: 0.82rem;
}

.score.anan .score-n { color: var(--amber); }
.score.sun .score-n { color: var(--phosphor); }
.score.tie .score-n { color: var(--muted); }

.table-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.compare-table thead th {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--phosphor);
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--text);
}

.compare-table tbody th a {
  color: var(--text);
  text-decoration: none;
}

.compare-table tbody th a:hover {
  color: var(--amber);
}

.compare-table td.win,
.feature-specs .win {
  background: rgba(125, 255, 154, 0.08);
  box-shadow: inset 3px 0 0 var(--phosphor-dim);
}

.compare-table td.win {
  color: var(--text);
  font-weight: 500;
}

.tie-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  margin-left: 0.3rem;
  white-space: nowrap;
}

.feature {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  margin: 0.6rem 0;
  scroll-margin-top: 84px;
}

.feature > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  list-style: none;
}

.feature > summary::-webkit-details-marker {
  display: none;
}

.feature > summary::before {
  content: "▸";
  color: var(--amber);
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
}

.feature[open] > summary::before {
  transform: rotate(90deg);
}

.feature-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
}

.edge {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.edge-anan { color: var(--amber); border-color: var(--amber-dim); }
.edge-sun { color: var(--phosphor); border-color: var(--phosphor-dim); }
.edge-tie { color: var(--muted); }

.feature > :not(summary) {
  margin-left: 1rem;
  margin-right: 1rem;
}

.feature > :last-child {
  margin-bottom: 1rem;
}

.feature-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
}

.feature-specs > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.feature-specs dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.feature-specs dd {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
}

@media (max-width: 640px) {
  .scoreboard,
  .feature-specs {
    grid-template-columns: 1fr;
  }
}
