/* ============================================================================
   FCC Explorer — site.css
   Component classes shared across index/stats/six-ghz (the "chrome" pages).
   /map and its own panel system keep page-scoped styles (see map.html) --
   they already have a self-contained component vocabulary that predates
   this file, and reskinning them means retargeting their existing classes
   at these same tokens, not migrating them onto a second one.
   Plain CSS on purpose (IMPLEMENTATION.md: "no build step").
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 32px; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.marginalia { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-3); letter-spacing: .05em; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- global masthead ribbon: canonical geometry lives in ribbon.css (vendored from spectrum-design-system) ---- */

/* ---- per-site masthead ---- */
.masthead { background: var(--canvas); border-bottom: 1px solid var(--hairline); }
.mast-in { max-width: var(--wrap-max); margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 26px; }
.sitemark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); padding: 16px 0; }
.sitemark b { font-family: var(--font-display); font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.sitemark span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-3); }
.mast-in nav { margin-left: auto; display: flex; gap: 22px; }
.mast-in nav a { font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 20px 0 18px; border-bottom: 2px solid transparent; }
.mast-in nav a:hover { color: var(--ink); }
.mast-in nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.theme-toggle { font-size: 12.5px; padding: 6px 12px; }

/* ---- buttons ---- */
.btn {
  display: inline-block; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-dit) var(--ease-sweep), border-color var(--dur-dit) var(--ease-sweep);
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-wash); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: var(--well); }

/* ---- data plate / toolbar / OWID-style table (stats page) ---- */
.pagehead { padding: 36px 0 22px; }
.pagehead .row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.pagehead h1 { font-family: var(--font-display); font-size: var(--text-h1); line-height: var(--leading-h1); font-weight: 650; letter-spacing: -.022em; }
.pagehead p { color: var(--ink-2); max-width: var(--measure); margin-top: 10px; font-size: 15px; }

.plate { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; }
.plate-head { padding: 14px 18px; border-bottom: 1px solid var(--hairline); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plate-head h2 { font-family: var(--font-display); font-size: var(--text-h3); font-weight: 600; letter-spacing: -.015em; }
.plate-body { padding: 16px 18px 18px; }
.toolbar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--well); border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.toolbar .count { margin-left: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: var(--leading-sm); }
table.data th {
  text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); padding: 8px 14px; border-bottom: var(--rule-w) solid var(--hairline-strong);
  position: sticky; top: 0; background: var(--surface);
}
table.data th.r, table.data td.r { text-align: right; }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: var(--accent-wash); }
table.data tr.total td { border-top: var(--rule-w) solid var(--ink); border-bottom: none; font-weight: 600; }
table.data tr.zero td { color: var(--ink-3); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }

/* ---- stat readouts (index hero, DESIGN-SYSTEM.md §8) ---- */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat-card { flex: 1 1 180px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 16px 18px; }
.stat-card .label { margin-bottom: 8px; }
.stat-card .num { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-card .sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

/* ---- index hero (texture PERMITTED here -- marketing band) ---- */
.hero-band { border-bottom: 1px solid var(--hairline); position: relative; }
.hero { padding: 56px 0 48px; position: relative; }
.hero .kicker { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, var(--text-display)); line-height: var(--leading-display); font-weight: 650; letter-spacing: -.028em; max-width: 18ch; margin: 14px 0 16px; }
.hero p { color: var(--ink-2); font-size: var(--text-lede); line-height: var(--leading-lede); max-width: var(--measure); margin-bottom: 26px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.section { padding: 40px 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section h2 { font-family: var(--font-display); font-size: var(--text-h2); font-weight: 600; letter-spacing: -.02em; margin-bottom: 14px; }
.linklist { display: flex; flex-direction: column; gap: 10px; }
.linklist a { font-size: 14.5px; }

/* ---- footer (texture PERMITTED, canvas-deep band) ---- */
.site-footer { background: var(--canvas-deep); border-top: 1px solid var(--hairline); padding: 22px 0; }
.footer-in { display: flex; flex-direction: column; gap: 12px; }
.footer-fam { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.footer-fam-item { display: inline-flex; align-items: center; gap: 6px; }
.footer-fam-item.on { color: var(--ink); font-weight: 600; }
.footer-fam-item .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.footer-fine { letter-spacing: .05em; }

/* ---- texture-trace: permitted only on marketing/chrome bands (hero, footer), never on .plate/.stat-card/tables ---- */
