/* ═══════════════════════════════════════════════════════════════════════
   RadioLabs — style.css
   Fontes: JetBrains Mono (frequências) + Space Grotesk (UI)
   Estética: titânio (metal) + cosmos/éter + dark mode
   ═══════════════════════════════════════════════════════════════════════ */

/* ── VARIÁVEIS ───────────────────────────────────────────────────────── */
:root {
  /* Fundo */
  --bg-void:    #060710;
  --bg-deep:    #09091a;
  --bg-surface: #0d1022;
  --bg-raised:  #111430;
  --bg-glass:   rgba(255, 255, 255, 0.04);

  /* Titânio */
  --ti-100: #e8eaf0;
  --ti-200: #c8ccd8;
  --ti-400: #8892a4;
  --ti-600: #4a5268;
  --ti-700: #2d3348;
  --ti-800: #1a1f35;

  /* Cosmos */
  --cosmos-purple:  #6644cc;
  --cosmos-blue:    #3a7bd5;
  --cosmos-glow:    rgba(102, 68, 204, 0.25);
  --cosmos-glow-sm: rgba(102, 68, 204, 0.12);

  /* Classes COER */
  --cls-a:      #f59e0b;
  --cls-a-dim:  rgba(245, 158, 11, 0.15);
  --cls-a-glow: rgba(245, 158, 11, 0.3);
  --cls-b:      #94a3b8;
  --cls-b-dim:  rgba(148, 163, 184, 0.12);
  --cls-b-glow: rgba(148, 163, 184, 0.25);
  --cls-c:      #34d399;
  --cls-c-dim:  rgba(52, 211, 153, 0.12);
  --cls-c-glow: rgba(52, 211, 153, 0.3);

  /* PX (ciano — distinto de A âmbar, B prata, C esmeralda, cosmos roxo/azul) */
  --px:        #22d3ee;
  --px-dim:    rgba(34, 211, 238, 0.15);
  --px-glow:   rgba(34, 211, 238, 0.30);

  /* Tipografia */
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-ui:   'Space Grotesk', system-ui, sans-serif;

  /* Espaçamento */
  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 40px;
  --gap-2xl: 80px;

  /* Raios */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Transições */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:   150ms var(--ease-out);
  --t-mid:    300ms var(--ease-out);
  --t-slow:   500ms var(--ease-out);

  /* Layout */
  --max-w: 1200px;
  --sticky-h: 60px;
}

/* ── RESET ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--sticky-h);
}

body {
  font-family: var(--font-ui);
  background: var(--bg-void);
  color: var(--ti-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  text-wrap: pretty;
}

a {
  color: var(--cosmos-blue);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--ti-100); }
a:focus-visible {
  outline: 2px solid var(--cosmos-purple);
  outline-offset: 3px;
  border-radius: 3px;
}

button { font-family: inherit; }

/* ── CONTAINERS ──────────────────────────────────────────────────────── */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap-lg);
}

.section-title {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--ti-200);
  letter-spacing: -0.01em;
  margin-bottom: var(--gap-sm);
}

.section-sub {
  font-size: 0.8rem;
  color: var(--ti-600);
  letter-spacing: 0.02em;
  margin-bottom: var(--gap-lg);
}

/* ── HERO ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 60% 40%, #0f1535 0%, var(--bg-void) 65%);
}
/* Edge vignette — keeps the canvas grid/radar reading as instrument-glass
   rather than bleeding into the surrounding page. Sits at z-index 1
   alongside the cosmic glow, below the content layer. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 50%,
      rgba(6, 7, 16, 0) 55%,
      rgba(6, 7, 16, 0.55) 100%);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.78;
}

/* Soft cosmic glow centered behind the title — sits above the canvas
   and below the text, lifting contrast on the title gradient. */
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 38% at 50% 48%,
      rgba(102, 68, 204, 0.22) 0%,
      rgba(102, 68, 204, 0.10) 32%,
      rgba(6, 7, 16, 0) 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--gap-xl) var(--gap-lg);
  max-width: 760px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ti-400);
  margin-bottom: var(--gap-md);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Hairline rules flanking the eyebrow — instrument-label feel. */
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ti-700), transparent);
}
.hero-eyebrow::before {
  background: linear-gradient(90deg, transparent, var(--ti-700));
}
.hero-eyebrow::after {
  background: linear-gradient(90deg, var(--ti-700), transparent);
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--ti-100) 30%, var(--cosmos-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--gap-md);
  text-shadow: 0 0 60px rgba(102, 68, 204, 0.12);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ti-400);
}

.hero-description {
  margin-top: var(--gap-lg);
  font-size: 1rem;
  color: var(--ti-400);
  line-height: 1.7;
}

@media (max-width: 700px) {
  /* On small screens, narrow the central glow and soften the eyebrow rules
     so the visual stays uncluttered behind the title. */
  .hero-glow {
    background:
      radial-gradient(ellipse 80% 45% at 50% 48%,
        rgba(102, 68, 204, 0.20) 0%,
        rgba(102, 68, 204, 0.08) 38%,
        rgba(6, 7, 16, 0) 78%);
  }
  .hero-eyebrow::before,
  .hero-eyebrow::after { width: 14px; }
}

/* ── CLASS BAR (sticky) ──────────────────────────────────────────────── */
.class-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 7, 16, 0.88);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--ti-800);
  height: var(--sticky-h);
  display: flex;
  align-items: center;
}

.class-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap-lg);
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  width: 100%;
}

.class-bar-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ti-600);
  white-space: nowrap;
}

.class-btns {
  display: flex;
  gap: var(--gap-xs);
}

.class-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ti-700);
  background: transparent;
  color: var(--ti-400);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.class-btn:hover {
  border-color: var(--ti-600);
  color: var(--ti-200);
}
.class-btn:focus-visible {
  outline: 2px solid var(--cosmos-purple);
  outline-offset: 2px;
}
.class-btn.active { border-color: transparent; }

.class-btn[data-class="all"].active {
  background: var(--cosmos-glow-sm);
  color: #a89cf0;
  box-shadow: 0 0 0 1px var(--cosmos-purple), 0 0 16px var(--cosmos-glow);
}
.class-btn[data-class="A"].active {
  background: var(--cls-a-dim);
  color: var(--cls-a);
  box-shadow: 0 0 0 1px var(--cls-a), 0 0 16px var(--cls-a-glow);
}
.class-btn[data-class="B"].active {
  background: var(--cls-b-dim);
  color: var(--cls-b);
  box-shadow: 0 0 0 1px var(--cls-b), 0 0 12px var(--cls-b-glow);
}
.class-btn[data-class="C"].active {
  background: var(--cls-c-dim);
  color: var(--cls-c);
  box-shadow: 0 0 0 1px var(--cls-c), 0 0 16px var(--cls-c-glow);
}

.btn-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.btn-dot-a { background: var(--cls-a); }
.btn-dot-b { background: var(--cls-b); }
.btn-dot-c { background: var(--cls-c); }

.class-bar-power {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ti-600);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

@media (max-width: 700px) {
  html { scroll-padding-top: 96px; }
  .class-bar { height: auto; padding: 8px 0; }
  .class-bar-inner { flex-wrap: wrap; row-gap: 6px; column-gap: var(--gap-sm); padding: 0 var(--gap-md); }
  .class-bar-label { display: none; }
  .class-btns { flex-wrap: wrap; }
  .class-btn { padding: 6px 10px; font-size: 0.72rem; }
  .class-bar-power {
    flex-basis: 100%;
    margin-left: 0;
    font-size: 0.6rem;
    color: var(--ti-400);
    letter-spacing: 0.04em;
    text-align: left;
  }
}
@media (max-width: 380px) {
  .class-btn[data-class="A"] .btn-dot,
  .class-btn[data-class="B"] .btn-dot,
  .class-btn[data-class="C"] .btn-dot { display: none; }
}

/* ── ESPECTRO ────────────────────────────────────────────────────────── */
.spectrum-section {
  padding: var(--gap-2xl) 0 var(--gap-xl);
  border-top: 1px solid var(--ti-800);
}

.spectrum-track {
  position: relative;
  height: 64px;
  background:
    linear-gradient(to right,
      rgba(102,68,204,0.05),
      rgba(58,123,213,0.05),
      rgba(52,211,153,0.05));
  border: 1px solid var(--ti-800);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: crosshair;
  margin-bottom: var(--gap-sm);
}

.spectrum-seg {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border-radius: 3px;
  transition: opacity var(--t-mid), box-shadow var(--t-mid), filter var(--t-mid);
  cursor: pointer;
}
.spectrum-seg:hover { z-index: 2; filter: brightness(1.3); }
.spectrum-seg.accessible   { opacity: 1; }
.spectrum-seg.inaccessible { opacity: 0.15; filter: grayscale(0.7); }

.spectrum-seg.seg-px {
  background: var(--px) !important;
  box-shadow: 0 0 8px var(--px-glow) !important;
}

.spectrum-axis {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  position: relative;
}
.spectrum-axis-tick {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ti-600);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .spectrum-axis-tick { font-size: 0.55rem; }
  /* Em mobile, alterna ticks para não sobrepor */
  .spectrum-axis-tick:nth-child(2),
  .spectrum-axis-tick:nth-child(4),
  .spectrum-axis-tick:nth-child(6) { visibility: hidden; }
}

.spectrum-tooltip {
  position: fixed;
  z-index: 200;
  background: rgba(13, 16, 34, 0.96);
  border: 1px solid var(--ti-700);
  border-radius: var(--r-sm);
  padding: var(--gap-sm) var(--gap-md);
  pointer-events: none;
  font-size: 0.75rem;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--t-fast);
  max-width: 240px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.spectrum-tooltip.visible { opacity: 1; }

.tt-band  { font-weight: 600; color: var(--ti-100); margin-bottom: 2px; }
.tt-freq  { font-family: var(--font-mono); color: var(--ti-400); font-size: 0.7rem; }
.tt-power { font-family: var(--font-mono); font-size: 0.65rem; margin-top: 4px; color: var(--ti-200); }
.tt-seg   { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--ti-600); margin-top: 4px; }

/* ── BANDS SECTION ───────────────────────────────────────────────────── */
.bands-section {
  padding: var(--gap-xl) 0 var(--gap-2xl);
  border-top: 1px solid var(--ti-800);
}

.bands-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

/* ── BAND PANEL ──────────────────────────────────────────────────────── */
.band-panel {
  border-radius: var(--r-lg);
  border: 1px solid var(--ti-800);
  background: var(--bg-surface);
  overflow: hidden;
  transition: opacity var(--t-mid), filter var(--t-mid),
              box-shadow var(--t-mid), transform var(--t-slow),
              border-left-color var(--t-mid);
  scroll-margin-top: calc(var(--sticky-h) + 16px);
}

.band-panel.accessible   { opacity: 1; filter: none; }
.band-panel.inaccessible { opacity: 0.28; filter: grayscale(0.8); }

/* Painéis acessíveis (não-PX) seguem a cor da classe ATIVA no filtro,
   via variáveis injetadas em #bands-grid pelo setActiveClass() em main.js.
   PX permanece sempre ciano. */
.band-panel.accessible:not(.band-px) {
  border-left: 3px solid var(--panel-accent, var(--cosmos-purple));
  box-shadow:
    0 0 0 1px var(--panel-accent-shadow, rgba(102, 68, 204, 0.18)),
    0 4px 20px var(--panel-accent-drop, rgba(102, 68, 204, 0.05));
}
.band-panel.accessible.band-px {
  border-left: 3px solid var(--px);
  box-shadow: 0 0 0 1px rgba(34,211,238,0.20), 0 4px 20px rgba(34,211,238,0.06);
}

.band-panel.accessible:hover { transform: translateY(-1px); }

/* HEADER DO PAINEL */
.bp-header {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md) var(--gap-lg);
  cursor: pointer;
  user-select: none;
  transition: background var(--t-fast);
}
.bp-header:hover { background: var(--bg-glass); }
.bp-header:focus-visible { outline: none; background: var(--bg-glass); }

.bp-wave-label {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ti-100);
  line-height: 1;
  min-width: 92px;
  flex-shrink: 0;
}

.bp-meta { flex: 1; min-width: 0; }

.bp-freq {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.4vw, 0.92rem);
  font-weight: 600;
  color: var(--ti-200);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-band-name {
  font-size: 0.72rem;
  color: var(--ti-600);
  margin-top: 3px;
}

.bp-power-current {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-top: 5px;
  color: var(--ti-400);
}

.bp-right {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  flex-shrink: 0;
}

.bp-class-badges {
  display: flex;
  gap: 5px;
}

.class-badge {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1.5px solid;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.class-badge-a        { color: var(--cls-a); border-color: var(--cls-a); background: var(--cls-a-dim); }
.class-badge-b        { color: var(--cls-b); border-color: var(--cls-b); background: var(--cls-b-dim); }
.class-badge-c        { color: var(--cls-c); border-color: var(--cls-c); background: var(--cls-c-dim); }
.class-badge.inactive { color: var(--ti-700); border-color: var(--ti-800); background: transparent; }
.class-badge.active-cls {
  box-shadow: 0 0 0 2px currentColor, 0 0 12px currentColor;
}
button.class-badge {
  cursor: pointer;
  font-family: var(--font-ui);
  padding: 0;
  appearance: none;
  outline: none;
}
button.class-badge:hover:not(.inactive) {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px currentColor, 0 0 14px currentColor;
}
button.class-badge:focus-visible {
  outline: 2px solid var(--cosmos-purple);
  outline-offset: 2px;
}
button.class-badge.inactive { cursor: pointer; opacity: 0.6; }
button.class-badge.inactive:hover { opacity: 1; transform: scale(1.1); }

/* Linhas de subfaixa esmaecidas (classe ativa não opera ali) */
.subband-table tr.sb-inaccessible td {
  opacity: 0.32;
  filter: grayscale(0.5);
}
.subband-table tr.sb-inaccessible:hover td {
  opacity: 0.55;
}

/* Cores específicas por classe na coluna potência */
.td-power .pw-cls-a { color: var(--cls-a); }
.td-power .pw-cls-b { color: var(--cls-b); }
.td-power .pw-cls-c { color: var(--cls-c); }
.td-power .pw-na    { color: var(--ti-700); font-style: italic; font-family: var(--font-ui); }

.ch-uso .ch-note {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--ti-400);
  font-style: italic;
  line-height: 1.4;
}

.bp-segment-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--ti-800);
  color: var(--ti-400);
  text-transform: uppercase;
}

.bp-expand-icon {
  font-size: 1rem;
  color: var(--ti-600);
  transition: transform var(--t-mid);
}
.band-panel.expanded .bp-expand-icon { transform: rotate(180deg); }

.bp-inaccessible-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--px-dim);
  color: var(--px);
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* CORPO DO PAINEL (subfaixas) */
.bp-body {
  display: none;
  border-top: 1px solid var(--ti-800);
  overflow-x: auto;
}
.band-panel.expanded .bp-body { display: block; }

.bp-locked-notice {
  padding: var(--gap-md) var(--gap-lg);
  font-size: 0.8rem;
  color: var(--ti-600);
  font-style: italic;
}
.bp-locked-notice.px-note {
  font-style: normal;
  color: var(--ti-400);
}

.bp-info-line {
  padding: 10px var(--gap-lg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ti-400);
  letter-spacing: 0.05em;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--ti-800);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.4;
}
.bp-info-line > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--ti-800);
  white-space: nowrap;
}
.bp-info-line strong {
  color: var(--ti-600);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.58rem;
}
.bp-info-line a {
  color: var(--cosmos-blue);
  font-weight: 500;
}
.bp-info-line a:hover { color: var(--ti-100); }

/* TABELA DE SUBFAIXAS */
.subband-table, .px-channel-table {
  width: 100%;
  border-collapse: collapse;
}

.subband-table th, .px-channel-table th {
  padding: 10px var(--gap-md);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ti-600);
  border-bottom: 1px solid var(--ti-800);
  background: var(--bg-raised);
}

.subband-table td, .px-channel-table td {
  padding: 11px var(--gap-md);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.subband-table tr:last-child td,
.px-channel-table tr:last-child td { border-bottom: none; }
.subband-table tr:hover td,
.px-channel-table tr:hover td { background: var(--bg-glass); }

.td-freq {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ti-100);
  letter-spacing: 0.02em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.td-modes { white-space: normal; min-width: 130px; }
.td-notes { color: var(--ti-400); font-size: 0.78rem; line-height: 1.55; }
.subband-table .td-notes:empty::after,
.px-channel-table .td-notes:empty::after {
  content: "—";
  color: var(--ti-700);
  font-family: var(--font-mono);
}
.td-power {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ti-400);
  white-space: nowrap;
}

/* MODE TAGS */
.mode-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-right: 3px;
  margin-bottom: 3px;
  letter-spacing: 0.04em;
}
.mode-CW      { background: rgba(167,139,250,0.15); color: #a78bfa; }
.mode-SSB     { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.mode-AM      { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.mode-FM      { background: rgba(74,222,128,0.15);  color: #4ade80; }
.mode-DV      { background: rgba(244,114,182,0.15); color: #f472b6; }
.mode-Digital { background: rgba(251,146,60,0.15);  color: #fb923c; }
.mode-Outros  { background: rgba(107,114,128,0.18); color: #9ca3af; }

/* PX channel table */
.px-channel-table .ch-canal {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ti-200);
  width: 60px;
  font-weight: 600;
}
.px-channel-table .ch-uso { color: var(--ti-400); font-size: 0.78rem; }
.px-special td.ch-canal,
.px-special td.ch-uso { color: var(--px); font-weight: 600; }
.px-special td.ch-canal::after {
  content: ' ★';
  color: var(--px);
}

/* ── NOTAS NORMATIVAS ────────────────────────────────────────────────── */
.normative-notes-section {
  padding: var(--gap-xl) 0;
  border-top: 1px solid var(--ti-800);
}
.normative-notes-body {
  max-width: 920px;
  color: var(--ti-400);
  line-height: 1.75;
  margin: 0 auto;
}
.normative-notes-section .section-title { text-align: center; }
.normative-notes-intro {
  max-width: 760px;
  margin-bottom: var(--gap-lg);
  font-size: 0.96rem;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}
.normative-notes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
}
.normative-note {
  border: 1px solid var(--ti-800);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.025);
  padding: var(--gap-md);
}
.normative-note h3 {
  color: var(--ti-100);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--gap-sm);
}
.normative-note p {
  font-size: 0.86rem;
  color: var(--ti-400);
  text-align: justify;
}
@media (max-width: 860px) {
  .normative-notes-grid { grid-template-columns: 1fr; }
}

/* ── FOOTER ──────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  border-top: 1px solid var(--ti-800);
  padding: 0 0 0;
  background: var(--bg-deep);
  overflow: hidden;
  isolation: isolate;
}
/* Faint instrument-paper grid that fades out toward the bottom. */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg,
      rgba(136, 146, 164, 0.05) 0,
      rgba(136, 146, 164, 0.05) 1px,
      transparent 1px,
      transparent 80px),
    repeating-linear-gradient(0deg,
      rgba(136, 146, 164, 0.035) 0,
      rgba(136, 146, 164, 0.035) 1px,
      transparent 1px,
      transparent 80px);
  -webkit-mask-image: linear-gradient(180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.6) 45%,
    rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.6) 45%,
    rgba(0, 0, 0, 0) 100%);
}
/* Soft cosmos glow at the footer top, mirroring the hero's central glow. */
.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40px;
  height: 320px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 100% at 50% 0%,
      rgba(102, 68, 204, 0.18) 0%,
      rgba(102, 68, 204, 0.06) 35%,
      rgba(6, 7, 16, 0) 75%);
}
.site-footer > * { position: relative; z-index: 1; }

/* ── FOOTER SIGNATURE ────────────────────────────────────────────────── */
.footer-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-lg);
  padding: var(--gap-2xl) var(--gap-lg) var(--gap-xl);
  text-align: center;
  pointer-events: none;
}
.footer-signature .fs-wave {
  width: clamp(80px, 22vw, 220px);
  height: 28px;
  opacity: 0.85;
  flex-shrink: 1;
}
.footer-signature .fs-mark {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.45em;
  padding-left: 0.45em;
  background: linear-gradient(180deg, var(--ti-100) 0%, var(--ti-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 0 24px rgba(102, 68, 204, 0.15);
}
/* Pulsing endpoint dot — keyed off the wave gradient color. */
.footer-signature .fs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cosmos-purple);
  box-shadow: 0 0 12px rgba(102, 68, 204, 0.7);
  flex-shrink: 0;
  animation: rl-pulse 2.4s ease-in-out infinite;
}
.footer-signature .fs-dot.fs-dot-cyan {
  background: var(--px);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.7);
  animation-delay: 1.2s;
}
@keyframes rl-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.45); opacity: 1; }
}

@media (max-width: 600px) {
  .footer-signature { gap: var(--gap-sm); padding: var(--gap-xl) var(--gap-md) var(--gap-lg); }
  .footer-signature .fs-wave { width: clamp(40px, 24vw, 140px); height: 24px; }
  .footer-signature .fs-mark { letter-spacing: 0.32em; padding-left: 0.32em; }
  .footer-signature .fs-dot { width: 5px; height: 5px; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap-xl);
  padding-bottom: var(--gap-xl);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--gap-lg); }
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ti-600);
  margin-bottom: var(--gap-md);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--ti-400);
}
.footer-links a:hover { color: var(--ti-100); }

.footer-power {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  font-size: 0.82rem;
  color: var(--ti-400);
  font-family: var(--font-mono);
}
.footer-power li {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.power-cls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1.5px solid;
  flex-shrink: 0;
}
.power-cls-a { color: var(--cls-a); border-color: var(--cls-a); background: var(--cls-a-dim); }
.power-cls-b { color: var(--cls-b); border-color: var(--cls-b); background: var(--cls-b-dim); }
.power-cls-c { color: var(--cls-c); border-color: var(--cls-c); background: var(--cls-c-dim); }

.footer-note {
  font-size: 0.72rem;
  color: var(--ti-700);
  margin-top: var(--gap-sm);
  font-style: italic;
  font-family: var(--font-ui);
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--ti-400);
  line-height: 1.6;
}
.footer-disclaimer + .footer-disclaimer { margin-top: var(--gap-sm); color: var(--ti-700); font-size: 0.72rem; }

.footer-disclaimer-bar {
  border-top: 1px solid var(--ti-800);
  padding: var(--gap-md) 0;
  background: rgba(245, 158, 11, 0.04);
}
.disclaimer-text {
  font-size: 0.72rem;
  color: var(--ti-600);
  line-height: 1.6;
}

.copyright-note {
  margin-top: var(--gap-xs);
  font-size: 0.64rem;
  color: var(--ti-600);
  opacity: 0.85;
}
.disclaimer-text strong { color: var(--ti-400); }
.disclaimer-text a { color: var(--cosmos-blue); }

/* ── NOSCRIPT ────────────────────────────────────────────────────────── */
.noscript-banner {
  background: var(--bg-surface);
  border: 1px solid var(--ti-700);
  border-radius: var(--r-md);
  padding: var(--gap-lg);
  margin: var(--gap-xl);
  font-size: 0.9rem;
  color: var(--ti-400);
}
.noscript-banner p + p { margin-top: var(--gap-sm); }

/* ── CUSTOM SECTIONS ─────────────────────────────────────────────────── */
.custom-section {
  padding: var(--gap-xl) 0;
  border-top: 1px solid var(--ti-800);
}
.custom-section h2 { font-size: 1.2rem; font-weight: 600; color: var(--ti-200); margin-bottom: var(--gap-md); }
.custom-section p  { font-size: 0.9rem; color: var(--ti-400); line-height: 1.7; }

/* ── RESPONSIVO ──────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* Header do painel */
  .bp-header { flex-wrap: wrap; gap: var(--gap-sm); padding: 12px var(--gap-md); }
  .bp-wave-label { font-size: 1.35rem; min-width: 64px; letter-spacing: -0.025em; }
  .bp-meta { flex: 1 1 60%; }
  .bp-right { width: 100%; justify-content: space-between; gap: var(--gap-sm); }
  .class-btn { min-height: 44px; padding: 10px 12px; }
  .bp-segment-tag { display: none; }
  .bp-freq { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .bp-power-current { font-size: 0.68rem; }

  /* Tabelas viram cards */
  .subband-table,
  .px-channel-table { display: none; }
  .sb-cards { display: block; }

  /* Info-line: ajustes mobile (pills definidos em base) */
  .bp-info-line {
    font-size: 0.62rem;
    gap: 6px;
    padding: 10px var(--gap-md);
  }
  .bp-info-line > span {
    padding: 3px 8px;
    gap: 4px;
  }

  /* Espaçamento horizontal do conteúdo */
  .section-inner { padding: 0 var(--gap-md); }
}

@media (max-width: 480px) {
  .bp-header { gap: 6px; padding: 10px var(--gap-md); }
  .bp-wave-label { font-size: 1.2rem; min-width: 56px; }
  .bp-band-name { font-size: 0.68rem; }
  .bp-power-current { font-size: 0.65rem; line-height: 1.35; }

  .hero-title { letter-spacing: -0.02em; }
  .hero-description { font-size: 0.9rem; }

  .sb-card { padding: 10px 12px 10px 14px; }
  .sb-card-freq { font-size: 0.78rem; }

  .spectrum-section { padding: var(--gap-xl) 0 var(--gap-lg); }
}

/* ── CARDS MOBILE ───────────────────────────────────────────────────── */
.sb-cards {
  display: none;   /* desktop: oculto; touch / mobile: sobrescrito abaixo */
  padding: var(--gap-sm) var(--gap-md) var(--gap-md);
}

.sb-card {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--ti-800);
  border-radius: var(--r-md);
  padding: 10px var(--gap-md) 10px calc(var(--gap-md) + 2px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity var(--t-mid), filter var(--t-mid);
}

/* Acento esquerdo uniforme (cosmos) para todos os cards de radioamador.
   PX recebe acento próprio na cor do serviço (ciano). */
.sb-card::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--cosmos-purple);
  opacity: 0.55;
}
.band-cls-px .sb-card::before,
.band-px    .sb-card::before {
  background: var(--px);
  opacity: 0.85;
}

.sb-card + .sb-card { margin-top: var(--gap-sm); }

/* Inaccessible cards espelham comportamento das linhas de tabela */
.sb-card.sb-inaccessible {
  opacity: 0.32;
  filter: grayscale(0.5);
}

/* Topo do card: frequência sozinha, modos sempre na linha de baixo (consistência visual) */
.sb-card-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.sb-card-freq {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ti-100);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.sb-card-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-start;
}

.sb-card-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ti-600);
  display: block;
  margin-bottom: 2px;
}

.sb-card-power {
  display: flex;
  flex-direction: column;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.sb-card-power-row {
  display: flex;
  align-items: baseline;
  gap: var(--gap-sm);
  flex-wrap: wrap;
}
.sb-card-power-right { margin-left: auto; }

.sb-card-notes {
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}

/* Esconde notes vazias (muitas subfaixas não têm 'Aplicação/observações'). */
.sb-card-notes:has(> .td-notes:empty) { display: none; }
.sb-card-notes > .td-notes:empty { display: none; }

/* ── TOUCH DEVICES ──────────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Class bar: touch targets ≥ 44 pt (iOS HIG) */
  .class-btn {
    padding: 10px 14px;
    min-height: 44px;
  }

  /* Spectrum: touch target mínimo + elimina delay 300 ms iOS */
  .spectrum-seg {
    min-width: 12px;
    touch-action: manipulation;
  }

  /* Tabelas: ocultas em touch, cards visíveis */
  .subband-table    { display: none; }
  .px-channel-table { display: none; }
  .sb-cards         { display: block; }
}

/* ═══════════════════════════════════════════════════════════════════════
   POLISH LAYER — RF observatory atmosphere applied lightly to existing
   content (spectrum, panels, tables, notes, dividers). All CSS-only.
   The global `prefers-reduced-motion` block at the bottom of this file
   neutralizes every animation/transition added below.
   ═══════════════════════════════════════════════════════════════════════ */

/* Section dividers — swap solid 1px borders for centered gradient hairlines
   so transitions between sections feel cohesive with the hero/footer. */
.spectrum-section,
.bands-section,
.normative-notes-section,
.custom-section {
  border-top: none;
  background-image: linear-gradient(90deg,
    transparent 0%,
    rgba(74, 82, 104, 0.55) 25%,
    rgba(136, 146, 164, 0.55) 50%,
    rgba(74, 82, 104, 0.55) 75%,
    transparent 100%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top center;
}

/* — Spectrum: instrument grid behind the track + slow scan highlight — */
.spectrum-track {
  position: relative;
  isolation: isolate;
}
.spectrum-track::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg,
      rgba(136, 146, 164, 0.06) 0,
      rgba(136, 146, 164, 0.06) 1px,
      transparent 1px,
      transparent calc(100% / 6)),
    linear-gradient(180deg,
      rgba(136, 146, 164, 0.04) 0%,
      transparent 40%,
      transparent 60%,
      rgba(136, 146, 164, 0.04) 100%);
}
.spectrum-track::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -20%;
  width: 28%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(102, 68, 204, 0) 0%,
    rgba(102, 68, 204, 0.10) 50%,
    rgba(102, 68, 204, 0) 100%);
  animation: rl-spectrum-scan 9s linear infinite;
}
@keyframes rl-spectrum-scan {
  0%   { transform: translateX(0); }
  100% { transform: translateX(450%); }
}
.spectrum-seg { z-index: 1; }
.spectrum-seg.accessible:hover {
  filter: brightness(1.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 16px rgba(255, 255, 255, 0.10),
    0 0 22px currentColor;
}

/* — Tooltip: refined glass with inner highlight — */
.spectrum-tooltip {
  background: linear-gradient(180deg,
    rgba(17, 20, 48, 0.94) 0%,
    rgba(13, 16, 34, 0.96) 100%);
  border: 1px solid rgba(136, 146, 164, 0.30);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 28px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(102, 68, 204, 0.12);
}

/* — Band panels: RF lock-on focus pulse + softer expanded glow — */
@keyframes rl-lock-on {
  0%   { box-shadow: 0 0 0 0 rgba(102, 68, 204, 0); }
  35%  { box-shadow: 0 0 0 4px rgba(102, 68, 204, 0.35), 0 0 32px rgba(102, 68, 204, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(102, 68, 204, 0); }
}
.band-panel.focus-pulse { animation: rl-lock-on 1.2s var(--ease-out); }

/* Painel expandido — usa as mesmas variáveis do filtro ativo, em
   intensidade maior. PX mantém o tom ciano fixo. */
.band-panel.accessible.expanded:not(.band-px) {
  box-shadow:
    0 0 0 1px var(--panel-accent-shadow-strong, rgba(102, 68, 204, 0.30)),
    0 8px 36px var(--panel-accent-drop-strong, rgba(102, 68, 204, 0.10));
}
.band-panel.accessible.expanded.band-px {
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.32), 0 8px 36px rgba(34, 211, 238, 0.10);
}

/* Gradient signal line replacing the plain top border of the body. */
.bp-body {
  border-top: none;
  position: relative;
}
.bp-body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(102, 68, 204, 0.55) 30%,
    rgba(58, 123, 213, 0.55) 50%,
    rgba(52, 211, 153, 0.55) 70%,
    transparent 100%);
  pointer-events: none;
}
.band-panel.band-px .bp-body::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.65) 50%,
    transparent 100%);
}

/* Faint instrument-paper grid behind the desktop subband table only.
   Mobile cards keep their existing accent — no extra texture there. */
@media (hover: hover) and (min-width: 701px) {
  .bp-body { background-image:
    repeating-linear-gradient(0deg,
      rgba(136, 146, 164, 0.025) 0,
      rgba(136, 146, 164, 0.025) 1px,
      transparent 1px,
      transparent 32px); }
}

/* — Subband table rows: hover left-accent stripe — */
.subband-table tr.sb-accessible td:first-child,
.px-channel-table tr.sb-accessible td:first-child {
  position: relative;
}
.subband-table tr.sb-accessible td:first-child::before,
.px-channel-table tr.sb-accessible td:first-child::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--cosmos-purple);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.subband-table tr.sb-accessible:hover td:first-child::before,
.px-channel-table tr.sb-accessible:hover td:first-child::before { opacity: 0.55; }
.band-panel.band-px .px-channel-table tr.sb-accessible:hover td:first-child::before { background: var(--px); opacity: 0.85; }

/* — Mode tags: tiny inner highlight + hover glow — */
.mode-tag {
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.mode-tag:hover {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    0 0 12px currentColor;
  transform: translateY(-1px);
}

/* — Subband cards (mobile): gentle hover lift — */
.sb-card {
  transition: opacity var(--t-mid), filter var(--t-mid),
              box-shadow var(--t-fast), transform var(--t-fast);
}
.sb-card.sb-accessible:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(102, 68, 204, 0.10);
}

/* — Normative notes: hover lift + faint constellation/grid background — */
.normative-note {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-fast),
              border-color var(--t-fast);
}
.normative-note::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(136, 146, 164, 0.06) 0.5px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(102, 68, 204, 0.10) 0.5px, transparent 1.5px),
    radial-gradient(circle at 90% 20%, rgba(136, 146, 164, 0.06) 0.5px, transparent 1.5px);
  background-size: 80px 80px, 120px 120px, 160px 160px;
}
.normative-note:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 68, 204, 0.35);
  box-shadow: 0 6px 24px rgba(102, 68, 204, 0.10);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation: none !important;
    transition: none !important;
  }
}
