/* NereusSDR website
 * Palette and component shapes are taken from the app itself
 * (src/gui/StyleConstants.h and STYLEGUIDE.md) so the site reads as the
 * app's home rather than a generic landing page.
 */

:root {
  /* Depth: the page gets darker the further down you scroll. */
  --surface-0: #0b1020;
  --surface-1: #080b16;
  --surface-2: #05070e;

  /* App colours (StyleConstants.h) */
  --app-bg: #0f0f1a;
  --inset: #0a0a18;
  --inset-border: #1e2e3e;
  --border: #205070;
  --border-subtle: #203040;
  --button-bg: #1a2a3a;
  --button-hover: #203040;

  --text: #c8d8e8;
  --text-strong: #eef6ff;
  --text-2: #93a4b8;
  --text-3: #7a8da3;

  --accent: #00b4d8;
  --accent-hi: #52dcf7;
  --accent-soft: rgba(0, 180, 216, 0.14);
  --accent-glow: rgba(0, 180, 216, 0.45);

  --green: #00ff88;
  --green-bg: #006040;
  --green-border: #00a060;
  --blue: #0070c0;
  --blue-border: #0090e0;
  --amber: #ffb800;
  --amber-bg: #604000;
  --amber-border: #906000;
  --red: #ff4444;

  --title-top: #3a4a5a;
  --title-mid: #2a3a4a;
  --title-bot: #1a2a38;
  --title-border: #0a1a28;
  --title-text: #8aa8c0;

  --font-display: "Saira", "Eurostile", "Microgramma", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 5px;

  /* Simulated SpectrumWidget: 40 % spectrum, 60 % waterfall, with the app's
     4 px divider and 28 px frequency strip between them. */
  --spec-h: 200px;
  --wf-h: 300px;

  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--surface-2);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 82% -120px, rgba(0, 180, 216, 0.16), transparent 70%),
    radial-gradient(900px 520px at 8% -80px, rgba(28, 58, 150, 0.30), transparent 70%),
    linear-gradient(180deg, var(--surface-0) 0, var(--surface-1) 38%, var(--surface-2) 100%);
  background-color: var(--surface-2);
  overflow-x: hidden;
}

/* Film grain, very faint, so the dark surfaces do not band. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

a {
  color: var(--accent-hi);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

::selection {
  background: rgba(0, 180, 216, 0.35);
  color: var(--text-strong);
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-strong);
  line-height: 1.08;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #001018;
  font-weight: 700;
  border-radius: var(--radius);
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared pieces ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  font-stretch: 125%;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 2px var(--accent-hi);
}

.led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  vertical-align: 0.05em;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.led--green {
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.55);
}

.led--amber {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 184, 0, 0.5);
}

/* A frequency-scale ruler used as a section divider. */
.ruler {
  height: 14px;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  background:
    repeating-linear-gradient(90deg, rgba(128, 144, 160, 0.55) 0 1px, transparent 1px 120px) bottom / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, rgba(128, 144, 160, 0.22) 0 1px, transparent 1px 12px) bottom / 100% 6px no-repeat;
  border-bottom: 1px solid var(--inset-border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.section {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section__head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.section__head h2 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 400;
  font-stretch: 104%;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}

.section__head h2 strong {
  font-weight: 600;
  color: var(--accent-hi);
}

.section__head p {
  font-size: 1.125rem;
  color: var(--text-2);
  max-width: 40rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--button-bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s, color 0.18s;
}

.btn:hover {
  background: var(--button-hover);
  border-color: var(--blue-border);
  color: var(--text-strong);
}

.btn:active {
  transform: translateY(1px);
}

/* White text keeps at least 4.5:1 on every part of both gradients. */
.btn--primary {
  background: linear-gradient(180deg, #0a78b8, var(--blue));
  border-color: var(--blue-border);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 144, 224, 0.25), 0 10px 30px -10px rgba(0, 150, 230, 0.7);
}

.btn--primary:hover {
  background: linear-gradient(180deg, #0a7ac0, #0074c8);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(82, 220, 247, 0.4), 0 12px 36px -8px rgba(0, 170, 240, 0.85);
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

/* The app's toggle buttons, used here as feature chips. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  background: var(--button-bg);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.25;
}

.chips li.is-green {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}

.chips li.is-blue {
  background: var(--blue);
  border-color: var(--blue-border);
  color: #fff;
}

.chips li.is-amber {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}

.nav.is-scrolled {
  background: rgba(8, 11, 22, 0.82);
  border-bottom-color: var(--inset-border);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-strong);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(82, 220, 247, 0.25), 0 0 18px -4px var(--accent-glow);
}

.brand__word {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 300;
  font-stretch: 112%;
  letter-spacing: 0.02em;
}

.brand__word b {
  font-weight: 600;
  color: var(--accent-hi);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__menu a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 500;
  font-stretch: 110%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.nav__menu a:hover {
  color: var(--text-strong);
  background: rgba(32, 48, 64, 0.55);
}

.nav__menu .nav__gh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.4rem;
  border: 1px solid var(--border);
  background: var(--button-bg);
  color: var(--text);
}

.nav__menu .nav__gh svg {
  width: 16px;
  height: 16px;
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--button-bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

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

.hero {
  position: relative;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden; /* the emblem hangs off the right edge on small screens */
}

.hero__grid {
  position: relative;
  padding-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 52rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.3vw, 4.3rem);
  line-height: 0.98;
  font-weight: 300;
  font-stretch: 106%;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

.hero h1 .line {
  display: block;
}

.hero h1 .line--lit {
  font-weight: 600;
  font-stretch: 104%;
  background: linear-gradient(92deg, #7ff0ff 0%, var(--accent) 48%, #3b8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(0, 180, 216, 0.35));
}

.hero__lede {
  max-width: 36rem;
  font-size: clamp(1.08rem, 1.5vw, 1.24rem);
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 2rem;
}

.hero__lede strong {
  color: var(--text);
  font-weight: 600;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-3);
}

.hero__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero__emblem {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: max(-6vw, -90px);
  width: min(50vw, 680px);
  aspect-ratio: 1;
  margin: 0;
  transform: translateY(-54%);
  pointer-events: none;
}

.hero__emblem::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 230, 0.28), rgba(0, 120, 200, 0.06) 55%, transparent 72%);
  filter: blur(36px);
  animation: breathe 9s ease-in-out infinite;
}

.hero__emblem img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: lighten;
  filter: brightness(0.92) contrast(1.18) saturate(1.1);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, rgba(0, 0, 0, 0.6) 62%, transparent 96%);
  mask-image: radial-gradient(closest-side, #000 30%, rgba(0, 0, 0, 0.6) 62%, transparent 96%);
  animation: fade 1.6s ease-out 0.1s both, drift 14s ease-in-out 1.7s infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.03); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.012); }
}

/* Load choreography for the hero copy */
.hero__copy > * {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__copy > :nth-child(1) { animation-delay: 0.05s; }
.hero__copy > :nth-child(2) { animation-delay: 0.14s; }
.hero__copy > :nth-child(3) { animation-delay: 0.26s; }
.hero__copy > :nth-child(4) { animation-delay: 0.36s; }
.hero__copy > :nth-child(5) { animation-delay: 0.46s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- The program window around the simulated radio ---------- */
/* Values from src/gui/TitleBar.cpp, SpectrumWidget.cpp, SpectrumOverlayPanel.cpp,
 * MainWindow::buildStatusBar(), StatusBadge.cpp and StationBlock.cpp. */

.app {
  --ui: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ui-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  position: relative;
  margin: 0;
  background: #0a0a14;
  border-top: 1px solid #203040;
  font-family: var(--ui);
  animation: fade 1.2s ease-out 0.35s both;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 2px 8px 2px 4px;
  background: #0a0a14;
  border-bottom: 1px solid #203040;
  white-space: nowrap;
  overflow: hidden;
}

.conn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 26px;
  min-width: 200px;
  padding: 0 12px 0 8px;
  background: #0f1420;
  border-radius: 3px;
  font-family: var(--ui-mono);
  font-size: 10px;
  font-weight: 600;
  color: #a0d8a0;
}

.conn__dot {
  width: 10px;
  height: 10px;
  margin-right: -2px;
  border-radius: 50%;
  background: #5fff8a;
  animation: conn-pulse 2.4s ease-in-out infinite;
}

@keyframes conn-pulse {
  50% { background: #3fcf6a; }
}

.conn__rtt { color: #5fff8a; }
.conn__pip { color: #5fa8ff; }

.app-title__fill {
  flex: 1;
}

.app-title__name {
  color: #00b4d8;
  font-size: 14px;
  font-weight: 700;
}

.app-title__utc {
  margin-right: 18px;
  font-family: var(--ui-mono);
  font-size: 11px;
  color: #8aa8c0;
}

.master {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
}

.master__spk {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 14px;
}

.master__slider {
  position: relative;
  width: 100px;
  height: 16px;
}

.master__slider::before,
.master__slider i {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 4px;
  border-radius: 2px;
  background: #1a2a3a;
}

.master__slider i {
  right: 5px;
  background: #00b4d8;
}

.master__slider::after {
  content: "";
  position: absolute;
  right: 0;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #00b4d8;
}

.master__db {
  width: 22px;
  padding: 1px 2px;
  background: #0a0a18;
  border: 1px solid #1e2e3e;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: #8aa8c0;
}

.app-title__bulb {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #1a2a3a;
  border: 1px solid #304050;
}

.app-title__bulb svg {
  width: 16px;
  height: 16px;
}

.pan {
  position: relative;
  background: #0a0a14;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  touch-action: manipulation;
}

.pan__spectrum {
  position: relative;
  height: var(--spec-h);
}

.pan__spectrum canvas,
.pan__waterfall canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pan__divider {
  height: 4px;
  background: #304050;
}

.pan__freq {
  position: relative;
  height: 28px;
  background: #101520;
  overflow: hidden;
}

.pan__freq span {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #ffff00;
  white-space: nowrap;
}

.pan__waterfall {
  position: relative;
  height: var(--wf-h);
  background: #0f0f1a;
}

.pan__waterfall canvas {
  image-rendering: auto;
}

/* RX filter passband: rgba(0,180,216,80) with slice-colour edges at alpha 130,
   on the spectrum and on the waterfall. */
.pan__pass {
  position: absolute;
  left: 0;
  width: 0;
  pointer-events: none;
  background: rgba(0, 180, 216, 0.314);
  border-inline: 1px solid rgba(0, 212, 255, 0.51);
}

.pan__pass--spec {
  top: 0;
  height: var(--spec-h);
}

.pan__pass--wf {
  top: calc(var(--spec-h) + 32px);
  bottom: 0;
}

/* VFO marker: 2 px slice-colour line through spectrum and waterfall */
.pan__vfo-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  pointer-events: none;
  background: rgba(0, 212, 255, 0.863);
}

/* ...and its 12 x 10 triangle, hung below the VFO flag */
.pan__tri {
  position: absolute;
  top: 0;
  left: -6px;
  width: 12px;
  height: 10px;
  pointer-events: none;
  background: #00d4ff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Cursor frequency readout */
.pan__readout {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  padding: 3px 6px;
  background: rgba(16, 21, 32, 0.784);
  font-size: 11px;
  font-weight: 700;
  color: #c8d8e8;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.pan__readout.is-on {
  opacity: 1;
}

/* SpectrumOverlayPanel: 68 x 22 buttons stacked at (4, 4) */
.ovl {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
  cursor: default;
}

.ovl__btn {
  display: grid;
  place-items: center;
  width: 68px;
  height: 22px;
  background: rgba(20, 30, 45, 0.941);
  border: 1px solid rgba(255, 255, 255, 0.157);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #c8d8e8;
}

.ovl__btn--toggle {
  font-size: 13px;
}

.ovl__btn.is-off {
  background: rgba(20, 30, 45, 0.706);
  border-color: rgba(255, 255, 255, 0.059);
  color: #556070;
}

.ovl.is-collapsed .ovl__btn:not(.ovl__btn--toggle) {
  display: none;
}

/* VFO flag. A copy of the app's VfoWidget (src/gui/widgets/VfoWidget.cpp,
 * VfoLevelBar.cpp, VfoStyles.h): 252 px wide, contents margins 6/2/6/0,
 * row spacing 2 px, painted body rgba(10,10,20,230) with a 1 px
 * rgba(255,255,255,30) edge, radius 4, and a 2 px slice-colour line on top.
 * Text uses the platform UI font, as the app does. */
.vfo {
  --slice: #00d4ff;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 252px;
  padding: 1px 5px 0;
  background: rgba(10, 10, 20, 0.902);
  border: 1px solid rgba(255, 255, 255, 0.118);
  border-radius: 4px;
  font-family: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: #c8d8e8;
  cursor: default;
  transform-origin: 0 0;
}

.vfo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1px;
  right: 1px;
  height: 2px;
  background: var(--slice);
}

.vfo:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}

.vfo__hdr {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}

.vfo__ant,
.vfo__bw {
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}

.vfo__ant {
  padding: 0 4px;
}

.vfo__ant--rx { color: #4488ff; }
.vfo__ant--tx { color: #ff4444; }
.vfo__bw { color: #00c8ff; }

.vfo__sp {
  flex: 1;
}

/* TX badge, checked: slice A is the TX slice */
.vfo__txb {
  display: grid;
  place-items: center;
  width: 28px;
  height: 18px;
  background: #6a3030;
  border: 1px solid #ff4444;
  border-radius: 3px;
  color: #ff8080;
  font-size: 10px;
  font-weight: 700;
}

.vfo__slice {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  background: var(--slice);
  border-radius: 3px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.vfo__freq {
  display: block;
  height: 30px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.196);
  border-radius: 3px;
  text-align: right;
  font-family: Consolas, Menlo, monospace;
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  color: #00e5ff;
  white-space: nowrap;
}

/* The S-meter strip is drawn on a canvas by the same routine as VfoLevelBar */
.vfo__level {
  display: block;
  width: 240px;
  height: 26px;
  margin-top: 4px;
}

.vfo__tabs {
  display: flex;
  align-items: stretch;
  height: 24px;
}

.vfo__tabs span {
  flex: 1 1 0;
  display: grid;
  place-items: center;
  padding: 2px 6px;
  color: #6888a0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.vfo__tabs i {
  display: grid;
  place-items: center;
  width: 6px;
  font-style: normal;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.314);
}

/* Floating lock, record and play buttons beside the flag (VfoWidget kFloatingBtn) */
.vfo-fbtns {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  transform-origin: 0 0;
}

.vfo-fbtns span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: rgba(20, 30, 50, 0.902);
  border: 1px solid rgba(80, 100, 130, 0.706);
  border-radius: 10px;
  color: #c8d8e8;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 11px;
  line-height: 1;
}

/* Bottom banner (MainWindow::buildStatusBar, ChromeBarController) */
.banner {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 6px;
  background: #0a0a14;
  border-top: 1px solid #203040;
  border-bottom: 1px solid #203040;
  font-family: var(--ui);
  white-space: nowrap;
  overflow: hidden;
}

.banner__group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.banner__fill {
  flex: 1;
  min-width: 0;
}

.banner__stack,
.banner__pan {
  flex: none;
}

.banner__chain,
.banner__ind,
.station,
.systile {
  display: flex;
  flex-direction: column;
}

.banner__chain b {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  color: #607080;
}

.banner__chain i {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  color: #00ff88;
}

.banner__glyph {
  font-size: 16px;
  font-weight: 700;
  color: #8aa8c0;
}

.banner__dim {
  font-size: 11px;
  font-weight: 700;
  color: #404858;
}

.banner__tnf {
  text-decoration: line-through;
}

.banner__sep {
  font-size: 18px;
  color: #304050;
}

.dash {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--ui-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.badge svg {
  width: 14px;
  height: 14px;
}

.badge--info { color: #5fa8ff; background: rgba(95, 168, 255, 0.102); }
.badge--on { color: #5fff8a; background: rgba(95, 255, 138, 0.102); }
.badge--off { color: #404858; background: rgba(64, 72, 88, 0.18); }

.station {
  align-items: center;
  padding: 2px 10px;
  background: #0a0a14;
  border: 1px solid rgba(0, 180, 216, 0.314);
  border-radius: 3px;
  font-family: var(--ui-mono);
  font-weight: 700;
  line-height: 1.25;
}

.station b {
  font-size: 12px;
  color: #c8d8e8;
}

.station i {
  font-style: normal;
  font-size: 10px;
  color: #607080;
}

.banner__ind {
  align-items: center;
  min-width: 60px;
  font-size: 11px;
  line-height: 1.3;
}

.banner__ind b {
  font-weight: 400;
  color: #607080;
}

.banner__ind i {
  font-style: normal;
  color: #404858;
}

.systile {
  line-height: 1.25;
}

.systile > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.systile b {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #607080;
}

.systile i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #a0b8c8;
}

.safety {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-left: 8px;
  border-left: 1px solid #203040;
}

.slot {
  display: flex;
  justify-content: center;
  width: 60px;
}

.slot--ovl {
  width: 88px;
}

.ovld {
  opacity: 0.14;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffd700;
}

.banner__more {
  display: none;
  padding: 0 6px;
  border-radius: 3px;
  background: rgba(64, 72, 88, 0.18);
  font-size: 14px;
  font-weight: 700;
  color: #8aa8c0;
}

/* The fold ladder: least important items leave first, and the overflow
   chip appears once anything has folded. */
@media (max-width: 1180px) {
  .banner .fold-1 { display: none; }
  .banner__more { display: inline-block; }
}

@media (max-width: 980px) {
  .banner .fold-2 { display: none; }
}

@media (max-width: 820px) {
  .banner .fold-3 { display: none; }
  .master,
  .app-title__name { display: none; }
}

@media (max-width: 560px) {
  .banner .fold-4 { display: none; }
  .app-title__utc { margin-right: 4px; }
}

.app-caption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0.9rem auto 0;
  padding-inline: var(--gutter);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ---------- Signal path ---------- */

.path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.6fr);
  align-items: stretch;
  gap: 0;
  margin-top: 0.5rem;
}

.path__node {
  position: relative;
  padding: 1.35rem 1.4rem 1.4rem;
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
}

.path__node h3 {
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--title-text);
}

.path__node p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.98rem;
}

.path__node--app {
  border-color: var(--border);
  box-shadow: 0 0 0 1px rgba(0, 180, 216, 0.08), 0 20px 50px -30px rgba(0, 180, 216, 0.4);
}

.path__node--app h3 {
  color: var(--accent-hi);
}

.path__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.path__steps li {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--inset);
  border: 1px solid var(--inset-border);
  color: var(--text);
}

.path__link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  text-align: center;
}

.path__wire {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent));
  overflow: hidden;
}

.path__wire::after {
  content: "";
  position: absolute;
  inset: -1px 0;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(160, 240, 255, 0.95) 14px 20px, transparent 20px 34px);
  animation: flow 1.2s linear infinite;
}

.path__wire--back {
  background: linear-gradient(90deg, var(--accent), var(--border));
}

.path__wire--back::after {
  animation-direction: reverse;
  opacity: 0.55;
}

@keyframes flow {
  from { transform: translateX(-34px); }
  to { transform: translateX(0); }
}

.path__label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-2);
}

.path__label b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Radios ---------- */

.radios {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.rack {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.rack:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 180, 216, 0.08);
}

.rack--wide {
  grid-column: span 12;
}

.rack--third {
  grid-column: span 4;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 30px;
  padding: 0.3rem 0.75rem;
  background: linear-gradient(180deg, var(--title-top), var(--title-mid) 50%, var(--title-bot));
  border-bottom: 1px solid var(--title-border);
}

.titlebar h3 {
  font-size: 0.74rem;
  font-weight: 700;
  font-stretch: 116%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* Lighter than the app's title text so it keeps 4.5:1 on the top of the
     title gradient. */
  color: #a8c2d8;
}

.titlebar::before {
  /* grip, like the app's drag handle */
  content: "";
  width: 6px;
  height: 12px;
  flex: none;
  background: radial-gradient(circle, rgba(138, 168, 192, 0.6) 1px, transparent 1.5px) 0 0 / 3px 3px;
}

.titlebar__tags {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
}

.tag {
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.tag--p1 {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.tag--p2 {
  background: var(--blue);
  border: 1px solid var(--blue-border);
  color: #fff;
}

.tag--new {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber);
}

.rack__body {
  flex: 1;
  padding: 1rem 1rem 1.1rem;
}

.rack__body > p {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  color: var(--text-2);
}

.models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.models li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.6rem;
  background: var(--inset);
  border: 1px solid var(--inset-border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text);
}

.models li small {
  font-family: var(--font-body);
  font-size: 0.74rem;
  color: var(--text-3);
}

.radios__note {
  margin-top: 1.5rem;
  color: var(--text-2);
  font-size: 0.98rem;
  max-width: 52rem;
}

/* ---------- Features ---------- */


.applets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.applet {
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.applet:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9);
}

.applet__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  padding: 1.1rem 1.1rem 1.25rem;
}

.applet__body h4 {
  font-size: 1.3rem;
  font-weight: 500;
  font-stretch: 104%;
  line-height: 1.2;
}

.applet__body p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.98rem;
}

.applet__body .chips {
  margin-top: auto;
}

/* ---------- Status and roadmap ---------- */

.status {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.releases {
  position: relative;
  margin: 0;
  padding: 0.25rem 0 0;
  list-style: none;
}

.releases::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--border) 60%, transparent);
}

.releases li {
  position: relative;
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding: 0 0 1.35rem 2rem;
}

.releases li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-1);
  border: 1px solid var(--accent);
}

.releases li.is-latest::before {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.releases .ver {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  font-stretch: 110%;
  color: var(--text-strong);
}

.releases time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
}

.releases p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.97rem;
}

.next {
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  overflow: hidden;
}

.next__body {
  padding: 1.1rem 1.1rem 1.25rem;
}

.next ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: next;
}

.next li {
  counter-increment: next;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.2rem 0.6rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--inset-border);
}

.next li:last-child {
  border-bottom: 0;
  padding-bottom: 0.2rem;
}

.next li::before {
  content: counter(next, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding-top: 0.2rem;
}

.next li b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-strong);
}

.next li span {
  color: var(--text-2);
  font-size: 0.95rem;
}

.alpha-note {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--amber-border);
  background: rgba(96, 64, 0, 0.28);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.95rem;
}

.alpha-note .led {
  margin-top: 0.45rem;
  flex: none;
}

/* ---------- Download ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dl {
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.dl.is-yours {
  border-color: var(--blue-border);
  box-shadow: 0 0 0 1px rgba(0, 144, 224, 0.35), 0 30px 70px -40px rgba(0, 150, 230, 0.8);
}

.dl__yours {
  display: none;
  margin-left: auto;
}

.dl.is-yours .dl__yours {
  display: inline-block;
}

.dl__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.1rem 0.4rem;
}

.dl__glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 6px;
  background: var(--inset);
  border: 1px solid var(--inset-border);
  color: var(--accent-hi);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
}

.dl__glyph svg {
  width: 22px;
  height: 22px;
}

.dl__head h3 {
  font-size: 1.35rem;
  font-weight: 500;
  font-stretch: 106%;
}

.dl__head p {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-3);
}

.dl__files {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0.8rem 1.1rem 0.4rem;
  list-style: none;
}

.dl__files a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.2rem 0.8rem;
  padding: 0.7rem 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--button-bg);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.dl__files a:hover {
  border-color: var(--blue-border);
  background: #0b3a60;
  color: #fff;
}

.dl__files a b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.dl__files a small {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

.dl__files a:hover small {
  color: #b8d8f0;
}

.dl__files a .dl__size {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-2);
}

.dl__note {
  margin: auto 0 0;
  padding: 0.8rem 1.1rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-2);
}

.dl__note .led {
  margin-right: 0.4rem;
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.4rem;
  margin: -1rem 0 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-2);
}

.dl-meta b {
  color: var(--text-strong);
}

.dl-extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.panel {
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  overflow: hidden;
}

.panel__body {
  padding: 1.1rem;
}

.panel__body > p {
  color: var(--text-2);
  font-size: 0.95rem;
}

.panel__body > p.panel__foot {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.panel__body code:not(.fpr) {
  color: var(--text);
}

.fpr {
  display: block;
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  background: var(--inset);
  border: 1px solid var(--inset-border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  word-spacing: 0.15em;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: -1px;
}

.tabs button {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--inset-border);
  border-bottom-color: transparent;
  border-radius: 4px 4px 0 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--inset);
  color: var(--accent-hi);
  border-bottom-color: var(--inset);
}

/* Without the script the tab buttons cannot switch panels, so the row is
   hidden and every panel shows, labelled by its first line. */
html:not(.js) .tabs {
  display: none;
}

.code {
  position: relative;
  margin: 0;
  background: var(--inset);
  border: 1px solid var(--inset-border);
  border-radius: 0 4px 4px 4px;
}

.code--solo {
  border-radius: 4px;
}

.code pre {
  margin: 0;
  padding: 0.95rem 1rem;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #d6e6f5;
}

.code pre .c {
  color: var(--text-3);
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--button-bg);
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0.85;
}

.copy:hover {
  color: var(--text-strong);
  opacity: 1;
}

.copy.is-done {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}

[role="tabpanel"][hidden] {
  display: none;
}

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

.lineage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: gen;
}

.lineage li {
  position: relative;
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
}

.lineage li + li {
  border-left: 0;
}

.lineage li:first-child {
  border-radius: 4px 0 0 4px;
}

.lineage li:last-child {
  border-radius: 0 4px 4px 0;
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(0, 180, 216, 0.08), transparent 70%), var(--app-bg);
}

.lineage li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  z-index: 1;
  width: 16px;
  height: 16px;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transform: translateY(-50%) rotate(45deg);
}

.lineage small {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
}

.lineage b {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  font-stretch: 106%;
  color: var(--text-strong);
}

.lineage li:last-child b {
  color: var(--accent-hi);
}

.lineage p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.pillar {
  padding: 1.1rem 1.2rem;
  border: 1px dashed var(--border-subtle);
  border-radius: 4px;
}

.pillar b {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-strong);
}

.pillar p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-2);
}

.disclaimer {
  margin-top: 1.75rem;
  max-width: 52rem;
  font-size: 0.9rem;
  color: var(--text-3);
}

/* ---------- Get involved ---------- */

.involve {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.involve a {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.35rem 1.35rem 1.4rem;
  background: var(--app-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, background-color 0.2s;
}

.involve a:hover {
  border-color: var(--border);
  background: #111a2a;
  transform: translateY(-2px);
  color: var(--text-2);
}

.involve b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  font-stretch: 106%;
  color: var(--text-strong);
}

.involve span {
  font-size: 0.97rem;
}

.involve i {
  margin-top: auto;
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hi);
}

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

.footer {
  padding: 3.5rem 0 2.5rem;
  border-top: 1px solid var(--inset-border);
  background: rgba(3, 5, 10, 0.6);
  font-size: 0.92rem;
  color: var(--text-3);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer h2 {
  margin-bottom: 0.8rem;
  font-size: 0.74rem;
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--title-text);
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer li + li {
  margin-top: 0.4rem;
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-strong);
  text-decoration: underline;
}

.footer__about p {
  max-width: 24rem;
  margin-top: 0.9rem;
  color: var(--text-3);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--inset-border);
  font-size: 0.85rem;
}

.footer__base p {
  margin: 0;
}

.footer__sig {
  font-family: var(--font-mono);
  color: var(--text-2);
}

/* ---------- Reveal on scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1060px) {
  .applets,
  .dl-grid,
  .involve {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rack--third {
    grid-column: span 6;
  }

  .path {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .path__link {
    padding: 0.9rem 1rem;
  }

  .path__wire {
    width: 2px;
    height: 34px;
    margin-inline: auto;
    background: linear-gradient(180deg, var(--border), var(--accent));
  }

  .path__wire::after {
    inset: 0 -1px;
    background: repeating-linear-gradient(180deg, transparent 0 10px, rgba(160, 240, 255, 0.95) 10px 16px, transparent 16px 26px);
    animation-name: flow-v;
  }

  .path__wire--back {
    display: none;
  }

  .footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer__about {
    grid-column: 1 / -1;
  }
}

@keyframes flow-v {
  from { transform: translateY(-26px); }
  to { transform: translateY(0); }
}

@media (max-width: 860px) {
  :root {
    --spec-h: 150px;
    --wf-h: 225px;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.6rem var(--gutter) 1rem;
    background: rgba(8, 11, 22, 0.97);
    border-bottom: 1px solid var(--inset-border);
  }

  .nav.is-open .nav__menu {
    display: flex;
  }

  .nav.is-open {
    background: rgba(8, 11, 22, 0.97);
  }

  .nav__menu a {
    padding: 0.8rem 0.6rem;
    font-size: 0.95rem;
  }

  .nav__menu .nav__gh {
    margin: 0.4rem 0 0;
    justify-content: center;
  }

  .hero__emblem {
    top: -3rem;
    right: -22vw;
    width: min(92vw, 460px);
    transform: none;
    opacity: 0.3;
  }

  .status,
  .dl-extra {
    grid-template-columns: minmax(0, 1fr);
  }

  .lineage,
  .pillars {
    grid-template-columns: minmax(0, 1fr);
  }

  .lineage li + li {
    border-left: 1px solid var(--inset-border);
    border-top: 0;
  }

  .lineage li:first-child {
    border-radius: 4px 4px 0 0;
  }

  .lineage li:last-child {
    border-radius: 0 0 4px 4px;
    border-top: 1px solid var(--border);
  }

  .lineage li:not(:last-child)::after {
    top: auto;
    bottom: -9px;
    right: auto;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }

}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .applets,
  .dl-grid,
  .involve {
    grid-template-columns: minmax(0, 1fr);
  }

  .rack,
  .rack--third {
    grid-column: span 12;
  }

  .hero__cta .btn {
    flex: 1 1 100%;
  }

  .releases li {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 404 ---------- */

.lost {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 4.25rem);
  padding: 4rem var(--gutter);
  text-align: center;
}

.lost img {
  width: 180px;
  height: 180px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}

.lost h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  font-stretch: 104%;
  margin-bottom: 1rem;
}

.lost p {
  max-width: 30rem;
  margin: 0 auto 2rem;
  color: var(--text-2);
}

.lost .hero__cta {
  justify-content: center;
}
