:root {
  color-scheme: dark;
  --bg: #071017;
  --surface: #0d1a22;
  --surface-2: #11232d;
  --line: #263b48;
  --text: #eff9ff;
  --muted: #9bb0bc;
  --blue: #65d5ff;
  --orange: #ffb74a;
  --good: #65dfa9;
  --fair: #ffd166;
  --poor: #ff7d78;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
body { margin: 0; min-width: 320px; background: radial-gradient(900px 480px at 10% 0, #123448 0, transparent 65%), var(--bg); line-height: 1.5; }
a { color: inherit; }
.skip { position: fixed; z-index: 100; top: -60px; left: 16px; padding: 10px 14px; border-radius: 8px; background: var(--orange); color: #171006; font-weight: 800; }
.skip:focus { top: 12px; }

.site-header { position: sticky; z-index: 20; top: 0; width: min(1180px, calc(100% - 32px)); height: 70px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ffffff18; background: #071017e8; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .12em; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.site-header nav a:hover { color: var(--text); }
.signal { height: 24px; display: flex; align-items: end; gap: 3px; }
.signal i { width: 3px; border-radius: 3px; background: var(--orange); }
.signal i:nth-child(1), .signal i:nth-child(5) { height: 7px; }
.signal i:nth-child(2), .signal i:nth-child(4) { height: 15px; }
.signal i:nth-child(3) { height: 24px; background: var(--blue); }

main, .site-footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.station { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 50px; padding: 70px 0 64px; }
.kicker { margin: 0 0 10px; color: var(--blue); font: 750 .7rem/1.2 ui-monospace, "Cascadia Mono", monospace; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(3.4rem, 8vw, 6.9rem); line-height: .88; letter-spacing: -.065em; }
h1 span { color: var(--orange); }
.lead { margin: 25px 0 0; color: var(--muted); font-size: 1.08rem; }
.station-numbers { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #0b171fdd; }
.station-numbers article { min-height: 110px; padding: 20px; border-right: 1px solid var(--line); }
.station-numbers article:last-child { grid-column: 1 / -1; min-height: auto; border-top: 1px solid var(--line); border-right: 0; }
.station-numbers span, .index-card span, .log-stats span { display: block; color: var(--muted); font-size: .78rem; }
.station-numbers strong { display: block; margin-top: 7px; font-size: 2rem; }
.station-numbers .small-value { font-size: 1rem; }

.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: .95; letter-spacing: -.05em; }
h3 { margin: 0; font-size: 1.25rem; }
.updated { margin: 0; color: var(--muted); font-size: .85rem; }
.updated span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 12px var(--good); }

.reading { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin-bottom: 14px; padding: 24px 26px; border: 1px solid #3f5c6d; border-radius: var(--radius); background: linear-gradient(120deg, #142b37, #0d1b24); }
.reading h3 { font-size: clamp(1.45rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.reading > p { margin: 0; color: #c0d0d9; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.band-card { min-height: 160px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.band-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.band-top strong { font-size: 1.7rem; letter-spacing: -.04em; }
.band-current { padding: 5px 8px; border-radius: 999px; font-size: .66rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.band-current.good { color: var(--good); background: #65dfa91a; }
.band-current.fair { color: var(--fair); background: #ffd16617; }
.band-current.poor { color: var(--poor); background: #ff7d7817; }
.periods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.period { padding-top: 10px; border-top: 1px solid var(--line); }
.period span { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.period strong { font-size: .84rem; }
.period.good strong { color: var(--good); }
.period.fair strong { color: var(--fair); }
.period.poor strong { color: var(--poor); }
.period.current { border-color: var(--blue); }
.conditions-note { margin: 13px 0 30px; color: var(--muted); font-size: .78rem; }

.indices-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.index-card { min-height: 125px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.index-card.accent { border-color: #416173; background: var(--surface-2); }
.index-card strong { display: block; margin: 12px 0 3px; font-size: 2rem; line-height: 1; letter-spacing: -.045em; }
.index-card small { color: var(--muted); }

.prop-secondary { display: grid; grid-template-columns: 1.5fr .5fr; gap: 10px; margin-top: 10px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #0a161ddd; }
.chart-panel, .noaa-panel, .bands-panel { padding: 24px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.panel-head > span { color: var(--muted); font-size: .75rem; }
.kp-chart { height: 135px; display: flex; align-items: end; gap: 5px; margin-top: 24px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 32px, #ffffff09 33px); }
.kp-bar { position: relative; flex: 1; min-width: 5px; height: var(--value); border-radius: 4px 4px 0 0; background: var(--blue); opacity: .78; }
.kp-bar.active { background: var(--fair); }
.kp-bar.storm { background: var(--poor); }
.kp-bar span { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); opacity: 0; font-size: .64rem; }
.kp-bar:hover span { opacity: 1; }
.scale-row { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); }
.scale-row:first-of-type { margin-top: 20px; }
.scale-row strong { color: var(--good); }
.noaa-panel a { display: inline-block; margin-top: 16px; color: var(--blue); font-size: .82rem; font-weight: 750; text-decoration: none; }

.log-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.log-stats article { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.log-stats strong { display: block; margin-top: 5px; font-size: 1.65rem; }
.log-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 10px; }
.distribution { display: grid; gap: 14px; margin-top: 24px; }
.distribution-row { display: grid; grid-template-columns: 40px 1fr 38px; align-items: center; gap: 9px; font-size: .75rem; }
.distribution-row span:last-child { color: var(--muted); text-align: right; }
.distribution-track { height: 7px; overflow: hidden; border-radius: 10px; background: #ffffff0a; }
.distribution-fill { width: var(--width); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--orange)); }
.table-panel { overflow: hidden; }
.table-tools { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 22px; }
.table-tools form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
input, select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #071118; color: var(--text); font: inherit; font-size: .8rem; }
input { width: 125px; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 13px 15px; border-top: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
td { font-size: .82rem; }
td:nth-child(2) { font-weight: 800; letter-spacing: .03em; }
.qsl-badge { display: inline-block; padding: 4px 7px; border-radius: 99px; color: var(--good); background: #65dfa918; font-size: .66rem; font-weight: 800; }
.qsl-badge.pending { color: var(--muted); background: #ffffff09; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.table-footer { min-height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.table-footer button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.site-footer { display: flex; justify-content: space-between; gap: 25px; padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.site-footer strong { color: var(--text); letter-spacing: .08em; }

@media (max-width: 900px) {
  .station { grid-template-columns: 1fr; }
  .station-numbers { max-width: 620px; }
  .band-grid, .indices-grid { grid-template-columns: repeat(2, 1fr); }
  .prop-secondary, .log-layout { grid-template-columns: 1fr; }
  .distribution { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .site-header, main, .site-footer { width: min(100% - 24px, 1180px); }
  .site-header { height: 62px; }
  .site-header nav { gap: 13px; }
  .station { padding: 52px 0 46px; gap: 30px; }
  h1 { font-size: clamp(3rem, 18vw, 5rem); }
  .section { padding: 58px 0; }
  .section-title, .reading, .table-tools { align-items: start; flex-direction: column; }
  .section-title { display: flex; }
  .reading { display: grid; grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr 1fr; }
  .band-card { min-height: 145px; padding: 16px; }
  .indices-grid, .log-stats { grid-template-columns: 1fr 1fr; }
  .index-card { min-height: 110px; padding: 15px; }
  .index-card strong { font-size: 1.6rem; }
  .distribution { grid-template-columns: 1fr; }
  .table-tools form { justify-content: flex-start; width: 100%; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 410px) {
  .band-grid { grid-template-columns: 1fr; }
  .station-numbers, .indices-grid, .log-stats { grid-template-columns: 1fr; }
  .station-numbers article { border-right: 0; border-top: 1px solid var(--line); }
  .station-numbers article:first-child { border-top: 0; }
  .station-numbers article:last-child { grid-column: auto; }
}

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