/*
 * Public new-hams pages (SEO Phase 2). Standalone on purpose: theme.css sets
 * html/body overflow:hidden for the app shell and the CRA build hashes its CSS
 * URL (design-spec-new-hams.md §1.1). Shared rules below are copies of the app's
 * header / .btn / .eyebrow / FAQ / footer so the pages look the same.
 */

/* KEEP IN SYNC with client/src/styles/theme.css :root */
:root {
  /* Core palette */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-elevated: #1a2332;
  --bg-surface: #1e293b;

  /* Borders */
  --border-subtle: #1e293b;
  --border-medium: #2d3a4d;
  --border-strong: #3d4f66;

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  /* Signal colors — muted, professional */
  --color-tech: #4cc9f0;
  --color-general: #80ed99;
  --color-extra: #39ff14;
  --color-advanced: #ffb627;
  --color-other: #8899aa;

  /* Functional */
  --color-positive: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #38bdf8;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 13px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;

  /* Radius — minimal, corporate */
  --radius-sm: 2px;
  --radius-md: 3px;
}

/* ---- Base (no overflow:hidden / height:100%: these are scrolling documents) ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-primary); color: var(--text-primary); font: 14px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
a { color: var(--text-accent); }
table { border-collapse: collapse; }
code { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nh-num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 2px; }

/* ---- Copied shared rules: header, sign-in, buttons, eyebrow ---- */
.app-header { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 var(--space-lg); background: var(--bg-secondary); border-bottom: 1px solid var(--border-subtle); }
.app-header__brand { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; color: inherit; }
.app-header__logo { width: 26px; height: 26px; display: block; flex-shrink: 0; }
.app-header__brand:hover .app-header__title { color: var(--text-accent); }
.app-header__title { font-size: var(--font-size-md); font-weight: 600; letter-spacing: -0.3px; color: var(--text-primary); }
.app-header__subtitle { font-size: var(--font-size-xs); color: var(--text-secondary); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.8px; }
.app-header__nav { display: flex; }
.app-header__nav-link { display: flex; align-items: center; height: 44px; padding: 0 var(--space-md); font-size: var(--font-size-sm); font-weight: 500; color: var(--text-secondary); text-decoration: none; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; letter-spacing: 0.2px; text-transform: uppercase; }
.app-header__nav-link:hover { color: var(--text-primary); }
.app-header__nav-link--active { color: var(--text-accent); border-bottom-color: var(--text-accent); }
.app-header__meta { display: flex; align-items: center; }
.user-menu__signin { display: flex; align-items: center; padding: 4px 12px; font-size: var(--font-size-xs); font-weight: 500; color: var(--text-accent); text-decoration: none; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.4px; transition: color 0.15s; }
.user-menu__signin:hover { color: var(--text-primary); }

.btn { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 5px 12px; font-family: var(--font-sans); font-size: var(--font-size-sm); font-weight: 500; border: 1px solid var(--border-medium); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); cursor: pointer; transition: background 0.15s, border-color 0.15s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg-elevated); border-color: var(--border-strong); }
.btn--primary { background: var(--text-accent); color: var(--bg-primary); border-color: var(--text-accent); }
.btn--primary:hover { background: #2da6e0; border-color: #2da6e0; }
.nh-btn-lg { padding: 10px 18px; font-size: 14px; min-height: 40px; }

.eyebrow { font-family: var(--font-mono); font-size: var(--font-size-xs); font-weight: 400; text-transform: uppercase; letter-spacing: 1.4px; color: var(--text-secondary); }

/* ---- Copied shared rules: FAQ + footer ---- */
.landing-faq__list { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.landing-faq__item { border: 1px solid var(--border-medium); border-radius: var(--radius-md); background: var(--bg-elevated); }
.landing-faq__summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; }
.landing-faq__summary::-webkit-details-marker { display: none; }
.landing-faq__summary::after { content: "+"; font-family: var(--font-mono); font-size: 18px; line-height: 1; color: var(--text-accent); flex-shrink: 0; }
.landing-faq__item[open] > .landing-faq__summary::after { content: "\2212"; }
.landing-faq__question { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--text-primary); }
.landing-faq__answer { font-size: 14px; line-height: 1.6; color: var(--text-secondary); max-width: 72ch; padding: 0 20px 18px; }

.landing-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: var(--font-size-xs); color: var(--text-secondary); letter-spacing: 0.4px; text-transform: uppercase; }
.landing-footer__copy { display: flex; align-items: center; gap: 10px; }
.landing-footer__logo { width: 18px; height: 18px; display: block; flex-shrink: 0; }
.landing-footer__links { display: flex; flex-wrap: wrap; gap: 12px 20px; letter-spacing: 1.1px; }
.landing-footer__links a { color: var(--text-secondary); text-decoration: none; }
.landing-footer__links a:hover { color: var(--text-primary); }

/* ---- Layout ---- */
.nh-skip { position: absolute; left: -9999px; top: 8px; z-index: 10; }
.nh-skip:focus { left: 8px; }
.nh-wrap { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.nh-section { padding: 40px 0; border-top: 1px solid var(--border-subtle); }
.nh-cta + .nh-section, .nh-note + .nh-section { margin-top: 40px; }
.nh-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.nh-grid-2 > * { min-width: 0; }
.nh-h2 { font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.2px; margin: 0 0 16px; }
.nh-p { font-size: 14px; line-height: 1.6; color: var(--text-secondary); max-width: 72ch; }
.nh-intro { margin-bottom: 12px; }
.nh-crumbs { padding: 20px 0 0; }
.nh-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.nh-crumbs a { display: inline-block; padding: 4px 0; text-decoration: none; }
.nh-crumbs a:hover { text-decoration: underline; }
.nh-crumbs [aria-current] { display: inline-block; padding: 4px 0; color: var(--text-secondary); }
.nh-crumbs__sep { color: var(--text-muted); margin: 0 8px; }

/* ---- Hero + tiles ---- */
.nh-h1 { font-size: 36px; font-weight: 600; line-height: 1.15; letter-spacing: -0.4px; margin: 16px 0 12px; max-width: 900px; overflow-wrap: anywhere; }
.nh-lede { font-size: 16px; line-height: 1.6; color: var(--text-secondary); max-width: 64ch; overflow-wrap: anywhere; }
.nh-glance { padding: 24px 0 0; }
.nh-tiles { display: grid; gap: 12px; margin: 12px 0 0; }
.nh-tiles--primary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nh-tiles--secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nh-tile { display: flex; flex-direction: column; background: var(--bg-secondary); border: 1px solid var(--border-medium); border-radius: var(--radius-md); padding: 20px 22px; min-width: 0; }
.nh-tile--sm { padding: 14px 16px; }
.nh-tile__n { order: -1; font: 500 40px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-primary); }
.nh-tile--sm .nh-tile__n { font-size: 26px; }
.nh-tile__n--accent { color: var(--text-accent); }
.nh-tile__lbl { margin-top: 12px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-secondary); }
.nh-tile--sm .nh-tile__lbl { margin-top: 8px; }
.nh-tile__delta { margin-top: 8px; font: 500 12px var(--font-mono); }
.nh-tile__delta span { color: var(--text-secondary); font-weight: 400; }
.nh-tile__delta--up, .nh-delta--up { color: var(--color-positive); }
.nh-tile__delta--down, .nh-delta--down { color: var(--color-danger); }
.nh-tile__delta--flat, .nh-delta--flat { color: var(--text-secondary); }
.nh-tile__help { margin-top: 4px; font: 12px/1.4 var(--font-sans); color: var(--text-secondary); }

/* ---- CTAs ---- */
.nh-cta { margin-top: 16px; background: var(--bg-secondary); border: 1px solid var(--border-medium); border-left: 3px solid var(--text-accent); border-radius: var(--radius-md); padding: 22px 24px; }
.nh-cta__title { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 6px 0; overflow-wrap: anywhere; }
.nh-cta__body { font-size: 14px; line-height: 1.6; color: var(--text-secondary); max-width: 72ch; margin-bottom: 16px; }
.nh-cta__actions, .nh-404__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.nh-404__actions { margin: 24px 0 32px; }
.nh-cta__secondary { font-size: 13px; }
.nh-cta__alt { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-medium); font-size: 13px; }
.nh-cta--inline { margin-top: 24px; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.nh-cta--inline__text { font-size: 15px; font-weight: 500; }
.nh-cta-band { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); }
.nh-cta-band__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.nh-cta-band__title { font-size: 18px; font-weight: 600; }
.nh-cta-band__sub { font-size: 13px; color: var(--text-secondary); }
.nh-note { margin-top: 16px; background: var(--bg-secondary); border: 1px solid var(--border-medium); border-left: 3px solid var(--border-strong); border-radius: var(--radius-md); padding: 14px 16px; font-size: 14px; color: var(--text-secondary); }

/* ---- Narrative, chart, details ---- */
.nh-narrative { font-size: 16px; line-height: 1.65; max-width: 68ch; }
.nh-chart { margin: 0; }
.nh-chart__svg { display: block; overflow: visible; }
.nh-chart__bar { fill: var(--text-accent); }
.nh-chart__axis { stroke: var(--border-strong); stroke-width: 1; }
.nh-chart__val, .nh-chart__lbl, .nh-chart__yr { font-family: var(--font-mono); font-size: 11px; }
.nh-chart__val { fill: var(--text-primary); }
.nh-chart__lbl, .nh-chart__yr { fill: var(--text-secondary); }
.nh-chart__note { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.nh-details { margin-top: 8px; }
.nh-details__summary { display: inline-block; padding: 8px 0; font-size: 13px; font-weight: 500; color: var(--text-accent); cursor: pointer; list-style: none; }
.nh-details__summary::-webkit-details-marker { display: none; }
.nh-details__summary::before { content: "+"; font-family: var(--font-mono); margin-right: 8px; }
.nh-details[open] > .nh-details__summary::before { content: "\2212"; }
.nh-details > .nh-table-scroll { margin-top: 8px; }
.nh-empty { border: 1px dashed var(--border-medium); border-radius: var(--radius-md); padding: 24px; text-align: center; font: 13px/1.5 var(--font-mono); color: var(--text-secondary); }

/* ---- Tables ---- */
.nh-table-scroll { overflow-x: auto; border: 1px solid var(--border-medium); border-radius: var(--radius-md); background: var(--bg-secondary); }
.nh-table-scroll--narrow { max-width: 360px; }
.nh-table { width: 100%; font-size: 13px; }
.nh-table--wide { min-width: 560px; }
.nh-table thead th { font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); background: var(--bg-elevated); padding: 10px 12px; text-align: left; }
.nh-table thead th.nh-num { text-align: right; }
.nh-table tbody th, .nh-table tbody td, .nh-table tfoot th, .nh-table tfoot td { padding: 9px 12px; border-bottom: 1px solid var(--border-subtle); }
.nh-table tbody th { font-weight: 500; text-align: left; color: var(--text-primary); }
.nh-table tbody tr:last-child > * { border-bottom: 0; }
.nh-table tfoot th, .nh-table tfoot td { font-weight: 600; text-align: left; border-top: 1px solid var(--border-medium); border-bottom: 0; }
.nh-table tfoot td.nh-num { text-align: right; }
.nh-table a { text-decoration: none; }
.nh-table a:hover { text-decoration: underline; }
.nh-num--strong { color: var(--text-primary); font-weight: 600; }
.nh-scroll-hint { display: none; margin-bottom: 8px; font-size: 12px; color: var(--text-secondary); }

/* ---- Class mix, compare ---- */
.nh-classmix--wide { max-width: 720px; }
.nh-classmix__name { min-width: 160px; width: 100%; }
.nh-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
.nh-swatch--tech, .nh-bar__fill--tech { background: var(--color-tech); fill: var(--color-tech); }
.nh-swatch--general, .nh-bar__fill--general { background: var(--color-general); fill: var(--color-general); }
.nh-swatch--extra, .nh-bar__fill--extra { background: var(--color-extra); fill: var(--color-extra); }
.nh-swatch--advanced, .nh-bar__fill--advanced { background: var(--color-advanced); fill: var(--color-advanced); }
.nh-swatch--other, .nh-bar__fill--other { background: var(--color-other); fill: var(--color-other); }
.nh-bar { display: block; margin-top: 6px; }
.nh-bar__track { fill: var(--bg-elevated); }
.nh-bar__marker { fill: var(--text-primary); }
.nh-legend { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.nh-callout { margin-top: 12px; font-size: 14px; }
.nh-rank { margin: 0 0 16px; font-size: 14px; color: var(--text-secondary); }
.nh-rank__n { font: 500 28px var(--font-mono); color: var(--text-accent); }
.nh-datanote { font-size: 12px; line-height: 1.6; color: var(--text-secondary); max-width: 90ch; margin-top: 8px; }

/* ---- Cards, nearby, A to Z, inline links ---- */
.nh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.nh-card, .nh-nearby__card { background: var(--bg-secondary); border: 1px solid var(--border-medium); border-radius: var(--radius-md); }
.nh-card { padding: 20px 22px; }
.nh-card__title { font-size: 16px; font-weight: 600; line-height: 1.35; margin: 6px 0 12px; overflow-wrap: anywhere; }
.nh-card a { font-size: 13px; }
.nh-nearby { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nh-nearby__card { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; height: 100%; transition: background 0.15s, border-color 0.15s; }
.nh-nearby__card:hover { background: var(--bg-elevated); border-color: var(--border-strong); }
.nh-nearby__card--state { background: var(--bg-elevated); justify-content: center; }
.nh-nearby__name { font-size: 15px; font-weight: 600; color: var(--text-accent); overflow-wrap: anywhere; }
.nh-nearby__meta { font: 12px var(--font-mono); color: var(--text-secondary); }
.nh-az { columns: 3 240px; column-gap: 32px; list-style: none; margin: 0; padding: 0; }
.nh-az li { break-inside: avoid; min-height: 32px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: space-between; gap: 12px; }
.nh-az a { font-size: 14px; text-decoration: none; }
.nh-az a:hover { text-decoration: underline; }
.nh-az__n { font: 13px var(--font-mono); color: var(--text-secondary); }
.nh-inline-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nh-territories { margin-top: 12px; }

/* ---- Share ---- */
.nh-share__panel { background: var(--bg-secondary); border: 1px solid var(--border-medium); border-radius: var(--radius-md); padding: 20px 22px; display: grid; gap: 10px; max-width: 760px; }
.nh-share__blurb, .nh-share__input { width: 100%; background: var(--bg-primary); border: 1px solid var(--border-medium); border-radius: var(--radius-sm); color: var(--text-primary); font: 13px/1.5 var(--font-mono); padding: 10px 12px; }
.nh-share__blurb { resize: vertical; }
.nh-share__row { display: flex; gap: 8px; }
.nh-share__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nh-share__status { font: 12px var(--font-mono); color: var(--color-positive); min-height: 18px; }
.nh-share__hint, .nh-share__license { font-size: 12px; color: var(--text-secondary); }

/* ---- Up-links, data note, 404 ---- */
.nh-uplinks { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 24px 0; border-top: 1px solid var(--border-subtle); font-size: 14px; font-weight: 500; }
.nh-uplinks a { text-decoration: none; }
.nh-datanote.nh-section { margin-top: 0; }
.nh-datanote__h3 { font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 12px 0 4px; }
.nh-datanote ul { padding-left: 18px; }
.nh-datanote h2 { margin-bottom: 8px; }
.nh-datanote p + p { margin-top: 8px; }
.nh-404__path { color: var(--text-primary); overflow-wrap: anywhere; }
.nh-az--plain { margin-bottom: 40px; }

/* ---- Responsive (breakpoints follow theme.css: 1100 / 768 / 480) ---- */
@media (max-width: 1100px) {
  .nh-grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .nh-wrap { padding: 0 24px; }
  .nh-section { padding: 32px 0; }
  .nh-h1 { font-size: 30px; }
  .nh-h2 { font-size: 20px; }
  .nh-tile__n { font-size: 34px; }
  .nh-tile--sm .nh-tile__n { font-size: 24px; }
  .nh-tiles--primary, .nh-tiles--secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nh-tile--wide-sm { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 12px; }
  .nh-tile--wide-sm .nh-tile__lbl { margin-top: 0; }
  .nh-tile--sm { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 12px 14px; }
  .nh-tile--sm .nh-tile__lbl { margin-top: 0; }
  .nh-tile__help { display: none; }
  .nh-nearby { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nh-scroll-hint { display: block; }
  .nh-cta-band__inner { flex-direction: column; align-items: stretch; }
  .nh-cta-band__inner .btn { justify-content: center; }
}

@media (max-width: 480px) {
  .app-header { padding: 0 16px; }
  .app-header__subtitle { display: none; }
  .app-header__nav-link { padding: 0 8px; }
  .nh-wrap { padding: 0 16px; }
  .nh-section { padding: 28px 0; }
  .nh-h1 { font-size: 26px; }
  .nh-lede, .nh-narrative { font-size: 15px; }
  .nh-tile__n { font-size: 30px; }
  .nh-tile--sm .nh-tile__n { font-size: 22px; }
  .nh-cta { padding: 18px 16px; }
  .nh-cta__body { display: none; }
  .nh-cta__actions .btn, .nh-cta--inline .btn { width: 100%; justify-content: center; }
  .nh-cta--inline { flex-direction: column; align-items: stretch; }
  .nh-chart__val { display: none; }
  .nh-chart__val--key { display: inline; }
  .nh-nearby { grid-template-columns: minmax(0, 1fr); }
  .nh-share__row { flex-direction: column; }
  .landing-footer { flex-direction: column; align-items: flex-start; }
}
