/* PlainBroker. System fonts only: nothing is loaded from a font service. */
:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #5a6470;
  --line: #dfe3e8;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --risk-bg: #fff4e0;
  --risk-ink: #5c3b00;
  --warn: #9a2b14;
  --unchecked: #8a5a00;
  --radius: 10px;
  --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: #14171b;
    --surface: #1c2026;
    --text: #e8eaed;
    --muted: #a2abb5;
    --line: #2e343c;
    --accent: #6fb3e0;
    --accent-ink: #0d1620;
    --risk-bg: #2d2412;
    --risk-ink: #f3d9a4;
    --warn: #ff9c86;
    --unchecked: #e6b95c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); margin: 0.4em 0 0.3em; }
h2 { font-size: 1.4rem; margin-top: 2em; }
h3 { font-size: 1.1rem; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }

/* Risk warning: top of every page */
.riskbar { background: var(--risk-bg); color: var(--risk-ink); font-size: 0.88rem; padding: 8px 16px; text-align: center; }
.riskbar p { margin: 0.15em auto; max-width: 820px; }
.riskbar a { color: inherit; }
.riskbar-aff { opacity: 0.9; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--text); }

main { padding-bottom: 48px; }
.lead { font-size: 1.12rem; color: var(--muted); }
.eyebrow { margin: 24px 0 0; font-size: 0.9rem; }
.hint, .privacy-note, .checked { color: var(--muted); font-size: 0.92rem; }
.unchecked { color: var(--unchecked); font-style: italic; }
.draft-banner { margin-top: 12px; padding: 10px 14px; border: 2px dashed var(--unchecked); border-radius: var(--radius); color: var(--unchecked); }

.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.cards a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); }
.cards a:hover { border-color: var(--accent); }
.cards strong { display: block; color: var(--accent); }
.cards span { display: block; color: var(--muted); font-size: 0.93rem; margin-top: 4px; }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 4px 18px; }
.callout-title { margin-top: 0.8em; font-size: 1.1rem; }

/* Affiliate block: risk line and disclosure always next to the link */
.aff { margin: 20px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aff-risk { margin: 0 0 10px; color: var(--risk-ink); background: var(--risk-bg); padding: 6px 10px; border-radius: 6px; font-size: 0.95rem; }
.aff-link { display: inline-block; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.aff-note { margin: 10px 0 0; font-size: 0.88rem; color: var(--muted); }
.aff-missing { border-style: dashed; color: var(--unchecked); font-size: 0.92rem; }

.toc { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.92rem; margin: 16px 0; }
.facts { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 16px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
.pros-cons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th[aria-sort="ascending"]::after { content: " \2191"; }
table.sortable th[aria-sort="descending"]::after { content: " \2193"; }
.steps li { margin-bottom: 6px; }
.flags li { margin-bottom: 8px; }
.author { padding: 4px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* Calculators */
.calc { margin: 20px 0 8px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field[hidden] { display: none; }
.field label { font-weight: 600; font-size: 0.93rem; }
.field small { color: var(--muted); font-size: 0.82rem; }
.field input, .field select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.advanced { margin-top: 14px; }
.advanced summary { cursor: pointer; color: var(--accent); font-size: 0.93rem; }
.advanced .calc-grid { margin-top: 10px; }
.calc button { margin-top: 14px; font: inherit; font-weight: 600; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.result-main { font-size: 1.9rem; font-weight: 700; margin: 0.2em 0 0; font-variant-numeric: tabular-nums; }
.result-sub { color: var(--muted); margin: 0.2em 0; }
.result-warn { color: var(--warn); font-weight: 600; }
.result-steps { font-variant-numeric: tabular-nums; }
.result h3 { margin-bottom: 0.3em; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0 32px; font-size: 0.9rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 8px; }
  .calc { padding: 14px; }
}

.quick-answers h3 { font-size: 1.02rem; margin: 1.1em 0 0.2em; }
.quick-answers p { margin: 0 0 0.4em; }
