/* HamStart Tools — design system. Mobile-first, theme-aware, no dependencies. */

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #16222b;
  --ink-soft: #4a5a66;
  --ink-faint: #6b7a86;
  --line: #d9e1e8;
  --brand: #0b3d5c;
  --brand-2: #0e6ba8;
  --accent: #0e7490;
  --accent-ink: #ffffff;
  --amber: #f0a500;
  --good: #1f9d57;
  --good-bg: #e6f6ec;
  --warn: #b26a00;
  --warn-bg: #fdf1dc;
  --bad: #c0392b;
  --bad-bg: #fdecea;
  --info-bg: #e8f2f8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,34,43,.06), 0 4px 16px rgba(16,34,43,.06);
  --shadow-sm: 0 1px 2px rgba(16,34,43,.08);
  --maxw: 1120px;
  --content: 860px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1620;
    --surface: #16212e;
    --surface-2: #1e2b3a;
    --ink: #e8eef3;
    --ink-soft: #b3c1cd;
    --ink-faint: #8a9aa8;
    --line: #2a3846;
    --brand: #0e2d42;
    --brand-2: #4bb3e6;
    --accent: #38bdf8;
    --accent-ink: #06222f;
    --amber: #ffc94d;
    --good: #4ade80; --good-bg: #10321f;
    --warn: #fcd34d; --warn-bg: #33260a;
    --bad: #f87171; --bad-bg: #35150f;
    --info-bg: #12293a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  }
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.62; font-size: 17px; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.22; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: .4em 0 .5em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }
ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }
code { font-family: var(--mono); background: var(--surface-2); padding: .12em .4em; border-radius: 5px; font-size: .92em; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.text-link { font-weight: 600; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 62px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-mark svg { display: block; }
.bm-l { stroke: var(--brand-2); stroke-width: 2; fill: none; stroke-linecap: round; }
.bm-d { fill: var(--amber); }
.bm-w { stroke: var(--accent); stroke-width: 1.6; fill: none; opacity: .8; }
.brand-name { white-space: nowrap; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .96rem; padding: 8px 11px; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-search { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 12px; }
.site-search input { border: 0; background: transparent; color: var(--ink); font-size: .92rem; width: 130px; outline: none; }
.site-search button { border: 0; background: var(--accent); color: var(--accent-ink); width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.site-search svg { stroke: currentColor; stroke-width: 2; fill: none; }
.nav-burger { display: none; }

@media (max-width: 820px) {
  .header-inner { position: relative; min-height: 52px; gap: 6px; flex-wrap: nowrap; padding-top: 5px; padding-bottom: 5px; }
  .brand { gap: 7px; min-width: 0; font-size: 1rem; }
  .brand-mark svg { width: 24px; height: 24px; }
  .site-nav {
    position: absolute; top: calc(100% + 1px); left: clamp(16px, 4vw, 28px); right: clamp(16px, 4vw, 28px);
    z-index: 1; width: auto; max-height: calc(100dvh - 64px); margin-left: 0; padding: 6px;
    flex-direction: column; display: none; overflow-y: auto; background: var(--surface);
    border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 9px 10px; border-radius: 8px; }
  .nav-burger { order: 3; display: inline-flex; flex-direction: column; gap: 4px; margin-left: 0; padding: 8px; cursor: pointer; }
  .nav-burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
  .site-search { order: 2; min-width: 0; margin-left: auto; padding: 2px 3px 2px 9px; }
  .site-search input { min-width: 0; width: clamp(72px, 18vw, 110px); }
  .site-search button { flex: 0 0 30px; width: 30px; height: 30px; }
}

@media (max-width: 420px) {
  .brand-name { display: none; }
  .site-search input { width: min(42vw, 120px); }
}

/* ---------- Layout ---------- */
main { display: block; padding: 22px 0 40px; }
.layout { display: block; }
.content { width: 100%; min-width: 0; max-width: var(--content); margin: 0 auto; }
.layout.has-sidebar { display: grid; grid-template-columns: minmax(0,1fr); gap: 34px; max-width: var(--maxw); }
@media (min-width: 1000px) {
  .layout.has-sidebar { grid-template-columns: minmax(0, var(--content)) 300px; justify-content: center; }
  .content { margin: 0; }
}
.sidebar { min-width: 0; align-self: start; }
@media (min-width: 1000px) { .sidebar { position: sticky; top: 78px; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .84rem; color: var(--ink-faint); margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs a { color: var(--ink-faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.crumb-sep { opacity: .5; }

/* ---------- Quick answer ---------- */
.quick-answer { background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 20px; }
.quick-answer .qa-badge { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.quick-answer p { margin: 0; font-size: 1.02rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: .96rem; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .04s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); color: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-amazon { background: var(--amber); color: #26200a; border-color: color-mix(in srgb, var(--amber) 70%, #000); }
.btn-amazon:hover { background: color-mix(in srgb, var(--amber) 88%, #000); color: #26200a; }

/* ---------- Callouts ---------- */
.callout { border-radius: var(--radius-sm); padding: 13px 15px; margin: 18px 0; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.callout-head { display: flex; align-items: center; gap: 8px; font-size: .98rem; margin-bottom: 4px; }
.callout-body { color: var(--ink-soft); }
.callout-body :last-child { margin-bottom: 0; }
.callout-safety { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); border-left: 4px solid var(--bad); }
.callout-legal { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); border-left: 4px solid var(--warn); }
.callout-swr { background: var(--warn-bg); border-left: 4px solid var(--amber); }
.callout-buying { background: var(--info-bg); border-left: 4px solid var(--brand-2); }
.callout-tip, .callout-info { background: var(--surface-2); border-left: 4px solid var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); }
caption { text-align: left; padding: 8px 12px; color: var(--ink-faint); font-size: .85rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); position: sticky; top: 0; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
th[scope=row] { font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.cell-best { background: var(--good-bg); font-weight: 700; position: relative; }
.cell-best::after { content: "✓"; color: var(--good); font-weight: 800; margin-left: 6px; }
.vs-table td { text-align: center; }
.vs-table th[scope=row] { text-align: left; }

@media (max-width: 820px) {
  table { display: block; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
  .table-wrap > table { display: table; min-width: 100%; overflow: visible; }
  table th, table td { overflow-wrap: anywhere; }
}

@media (max-width: 640px) {
  table { font-size: .86rem; }
  table th, table td { padding: 8px 9px; }
}

/* ---------- Cards / grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 14px 0 8px; }
.card-grid-lg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.link-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .06s; }
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.lc-icon { font-size: 1.3rem; line-height: 1; }
.lc-title { display: block; font-weight: 700; margin-bottom: 3px; }
.lc-blurb { display: block; font-size: .86rem; color: var(--ink-faint); line-height: 1.45; }

/* ---------- Product cards ---------- */
.picks-note { color: var(--ink-faint); font-size: .9rem; margin-top: -2px; }
.picks-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 14px 0; }
@media (min-width: 620px) { .picks-grid { grid-template-columns: 1fr 1fr; } }
.product-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm); }
.pc-media { flex: 0 0 56px; display: grid; place-items: center; background: var(--surface-2); border-radius: var(--radius-sm); align-self: flex-start; padding: 8px; }
.pc-icon { width: 40px; height: 48px; stroke: var(--brand-2); fill: none; stroke-width: 2; stroke-linejoin: round; }
.pc-body { min-width: 0; flex: 1; }
.pc-badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); background: var(--info-bg); padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.pc-name { margin: 0 0 6px; font-size: 1.05rem; }
.pc-meta { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; color: var(--ink-faint); }
.pc-meta li { margin: 0; }
.pc-reason { font-size: .92rem; color: var(--ink-soft); margin: 0 0 10px; }
.pc-cta { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.cta-note { font-size: .68rem; color: var(--ink-faint); }

/* ---------- Tool forms & results ---------- */
.content.is-tool h1 { margin-bottom: .3em; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 22px; }
.tool-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.tool-form-wide { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tool-form .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tool-form label { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.tool-form input, .tool-form select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font-size: 1rem; font-family: inherit; }
.tool-form input:focus, .tool-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.tool-form .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 560px) { .tool-form .btn { grid-column: auto; } }
.tool-live { margin-top: 14px; padding: 10px 14px; background: var(--info-bg); border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 9px; font-size: .95rem; }
.tool-live .live-tag { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-right: 8px; }
.tool-hint { color: var(--ink-faint); font-size: .92rem; margin: 16px 2px 2px; }
.tool-error { background: var(--bad-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); border-radius: 9px; padding: 11px 14px; margin-top: 16px; font-weight: 600; }
.tool-result { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 18px; }
.result-h { margin-top: 0; font-size: 1.25rem; }
.result-table th[scope=row] { white-space: normal; }
.result-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.fig-tile { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; text-align: center; border: 1px solid var(--line); }
.fig-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand-2); letter-spacing: -.02em; }
.fig-lab { display: block; font-size: .78rem; color: var(--ink-faint); margin-top: 3px; }
.fig-good .fig-num { color: var(--good); }
.fig-warn .fig-num { color: var(--warn); }
.fig-bad .fig-num { color: var(--bad); }
.tool-explain { margin-top: 8px; }

/* ---------- Antenna SVG ---------- */
.viz-figure { margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.viz-figure figcaption { font-size: .84rem; color: var(--ink-faint); text-align: center; margin-top: 6px; }
.antenna-svg { width: 100%; height: auto; }
.antenna-svg .a-wire { stroke: var(--brand-2); stroke-width: 3; stroke-linecap: round; }
.antenna-svg .a-radial { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.antenna-svg .a-node { fill: var(--amber); }
.antenna-svg .a-coax { stroke: var(--ink-faint); stroke-width: 2; fill: none; }
.antenna-svg .a-body { fill: var(--surface-2); stroke: var(--line); }
.antenna-svg .a-label { fill: var(--ink); font-size: 12px; font-weight: 600; }
.antenna-svg .a-sub { fill: var(--ink-faint); font-size: 10px; }
.antenna-svg .a-title { fill: var(--ink-soft); font-size: 12px; font-weight: 700; }

/* ---------- Band plan ---------- */
.bandplan { margin: 14px 0; display: flex; flex-direction: column; gap: 7px; }
.bandplan-legend { font-size: .78rem; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.bp-key { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.bp-key.bp-phone { background: var(--accent); }
.bp-key.bp-cw { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); border: 1px solid var(--accent); }
.bp-key.bp-mark { background: var(--amber); }
.bp-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; }
.bp-name { font-size: .82rem; font-weight: 700; }
.bp-range { display: block; font-size: .68rem; color: var(--ink-faint); font-weight: 400; }
.bp-track { position: relative; height: 22px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bp-zone { position: absolute; top: 0; bottom: 0; }
.bp-zone.bp-phone { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.bp-zone.bp-cw { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 30%, transparent), color-mix(in srgb, var(--accent) 30%, transparent) 5px, transparent 5px, transparent 10px); }
.bp-marker { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--amber); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 60%, #000); }
.bp-marker::after { content: "▲"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); color: var(--amber); font-size: 10px; }

/* ---------- Spec bars & silhouettes ---------- */
.specbar { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; margin: 6px 0; font-size: .85rem; }
.specbar-label { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.specbar-track { background: var(--surface-2); border-radius: 999px; height: 12px; overflow: hidden; border: 1px solid var(--line); }
.specbar-fill { display: block; height: 100%; background: var(--brand-2); border-radius: 999px; }
.specbar-best .specbar-fill { background: var(--good); }
.specbar-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.vs-visuals { display: flex; align-items: flex-end; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 14px 0; }
.vs-fig { text-align: center; margin: 0; }
.vs-fig figcaption { font-size: .8rem; color: var(--ink-faint); margin-top: 4px; }
.vs-bars { flex: 1 1 260px; min-width: 220px; }
.vs-bars h3 { margin: 8px 0 4px; font-size: .9rem; }
.compare-strip { justify-content: flex-start; }
.silhouette { width: 90px; height: 150px; }
.silhouette .sil-body { fill: var(--surface-2); stroke: var(--brand-2); stroke-width: 2; }
.silhouette .sil-ant { fill: var(--accent); }
.silhouette .sil-cap { fill: var(--ink-faint); font-size: 9px; }
.vs-legend { font-size: .82rem; color: var(--ink-faint); }

/* ---------- SWR scale ---------- */
.swr-scale { display: flex; justify-content: space-between; background: linear-gradient(90deg, var(--good) 0%, var(--good) 30%, var(--warn) 55%, var(--bad) 100%); border-radius: 6px; padding: 4px 8px; color: #06222f; font-size: .75rem; font-weight: 700; margin: 10px 0; }

/* ---------- Planner ---------- */
.planner-sub { color: var(--ink-faint); font-size: .9rem; }
.planner-weeks { list-style: none; padding: 0; counter-reset: none; }
.planner-weeks > li { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0; }
.pw-num { font-weight: 800; color: var(--brand-2); display: block; margin-bottom: 4px; }
.planner-weeks ul { margin: 0; }

/* ---------- FAQ ---------- */
.faq { margin-top: 30px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 8px 0; background: var(--surface); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 13px 15px; font-weight: 700; list-style: none; position: relative; padding-right: 40px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 11px; font-size: 1.3rem; color: var(--accent); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-a { padding: 0 15px 14px; color: var(--ink-soft); }
.faq-a :last-child { margin-bottom: 0; }

/* ---------- TOC / sidebar ---------- */
.toc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin: 18px 0; }
.toc h2 { margin: 0 0 6px; font-size: .95rem; }
.toc ul { margin: 0; columns: 2; column-gap: 20px; }
@media (max-width: 560px) { .toc ul { columns: 1; } }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.side-card h2 { margin: 0 0 8px; font-size: .95rem; }
.side-toc, .side-links { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.side-toc li, .side-links li { margin: 5px 0; }
.side-toc a, .side-links a { text-decoration: none; }
.side-toc a:hover, .side-links a:hover { text-decoration: underline; }

/* ---------- Related ---------- */
.related { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 18px; }
.related-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.related-list a { text-decoration: none; font-weight: 600; }
.related-list a:hover { text-decoration: underline; }
.related-list .is-pillar a::before { content: "★ "; color: var(--amber); }

/* ---------- Sources ---------- */
.sources { margin-top: 26px; font-size: .9rem; color: var(--ink-soft); }
.sources h2 { font-size: 1.05rem; }
.verified { font-size: .82rem; color: var(--ink-faint); }

/* ---------- Ads ---------- */
.ad-slot { margin: 22px 0; text-align: center; min-height: 0; }
.ad-slot .ad-label { display: block; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 3px; }
.ad-side { margin: 0 0 16px; }

/* ---------- Home ---------- */
body.home .content { max-width: var(--maxw); }
body.home h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); max-width: 16ch; }
.home-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 28px; }
.home-sec { margin: 30px 0; }
.home-sec > h2 { margin-top: 0; }

/* ---------- Misc content ---------- */
.intro { font-size: 1.05rem; }
.sec { margin: 22px 0; }
.hub-intro { font-size: 1.08rem; color: var(--ink-soft); max-width: 70ch; }
.grid-code { font-family: var(--mono); background: var(--brand); color: #fff; padding: 2px 10px; border-radius: 6px; letter-spacing: .05em; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.contact-email a { font-size: 1.25rem; font-weight: 700; }
.contact-plain code { font-size: 1rem; }
.search-big { grid-template-columns: 1fr auto; }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.search-results a { font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.sr-blurb { display: block; color: var(--ink-faint); font-size: .88rem; margin-top: 2px; }
.search-count { color: var(--ink-faint); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 26px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 26px; }
.footer-col h2 { font-size: .95rem; margin: 0 0 10px; }
.footer-col h2 a { color: var(--ink); text-decoration: none; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.footer-about p { font-size: .9rem; color: var(--ink-faint); }
.footer-legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-faint); }
.footer-legal p { margin: .4em 0; }
.disclosure-mini { font-size: .8rem; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .ad-slot, .sidebar, .related, .home-cta { display: none; }
  body { font-size: 12pt; }
}
