/* TheSize.net design system */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #15171c;
  --ink-2: #3d424d;
  --muted: #6b7180;
  --line: #e4e1da;
  --line-2: #d3cfc6;
  --brand: #0f5bd8;
  --brand-ink: #0b47aa;
  --brand-soft: #e8f0fe;
  --accent: #ffc53d;
  --accent-soft: #fff6dc;
  --ok: #157f4b;
  --ok-soft: #e6f5ec;
  --warn: #a35a00;
  --warn-soft: #fff1de;
  --viz-1: #0f5bd8;
  --viz-2: #e8590c;
  --viz-3: #1f9d6b;
  --viz-4: #9c36b5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 22, 28, .05), 0 4px 16px rgba(20, 22, 28, .05);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 720px;
  --wide: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --surface: #181b21; --surface-2: #1f232a; --ink: #eef0f3; --ink-2: #c9cdd5;
    --muted: #949aa6; --line: #2a2f38; --line-2: #3a404b; --brand: #6ea2ff; --brand-ink: #9cbfff;
    --brand-soft: #18263f; --accent: #ffc53d; --accent-soft: #2e2716; --ok: #4cc38a; --ok-soft: #15291f;
    --warn: #f0a24a; --warn-soft: #2e2214; --viz-1: #6ea2ff; --viz-2: #ff8a4c; --viz-3: #4cc38a; --viz-4: #d38bf0;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317; --surface: #181b21; --surface-2: #1f232a; --ink: #eef0f3; --ink-2: #c9cdd5;
  --muted: #949aa6; --line: #2a2f38; --line-2: #3a404b; --brand: #6ea2ff; --brand-ink: #9cbfff;
  --brand-soft: #18263f; --accent: #ffc53d; --accent-soft: #2e2716; --ok: #4cc38a; --ok-soft: #15291f;
  --warn: #f0a24a; --warn-soft: #2e2214; --viz-1: #6ea2ff; --viz-2: #ff8a4c; --viz-3: #4cc38a; --viz-4: #d38bf0;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 1.0625rem; line-height: 1.7; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; flex-shrink: 0; }
.logo:hover { color: var(--ink); }
.logo svg { width: 30px; height: 30px; }
.logo span b { color: var(--brand); font-weight: 800; }
.nav { display: none; gap: 2px; margin-left: 8px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .925rem; font-weight: 600; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current] { background: var(--surface-2); color: var(--ink); }
@media (min-width: 1000px) { .nav { display: flex; } }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: inline-grid; }
@media (min-width: 1000px) { .menu-btn { display: none; } }

/* Search */
.search { position: relative; }
.search-box { display: none; align-items: center; gap: 8px; height: 40px; width: 260px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.search-box svg { width: 16px; height: 16px; flex-shrink: 0; }
.search-box input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: .95rem; width: 100%; }
@media (min-width: 720px) { .search-box { display: flex; } .search-toggle { display: none; } }
.search-results { position: absolute; right: 0; top: 48px; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; display: none; }
.search-results.open { display: block; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.search-results a small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.search-results a:hover, .search-results a.active { background: var(--surface-2); }
.search-results .empty { padding: 12px; color: var(--muted); font-size: .92rem; }
.search-sheet { display: none; padding: 0 0 12px; }
.search-sheet.open { display: block; }
.search-sheet .search-box { display: flex; width: 100%; }
.search-sheet .search-results { position: static; width: 100%; margin-top: 8px; box-shadow: none; }

/* Mobile menu */
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 8px 0 16px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
@media (min-width: 1000px) { .mobile-nav { display: none !important; } }

/* Breadcrumbs */
.crumbs { font-size: .85rem; color: var(--muted); padding: 20px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

/* Article layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding-bottom: 64px; }
@media (min-width: 1100px) { .layout { grid-template-columns: minmax(0, var(--measure)) 320px; justify-content: space-between; } }
.article-head { padding: 20px 0 8px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); text-decoration: none; }
.kicker::before { content: ""; width: 18px; height: 3px; background: var(--accent); border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.95rem, 1.4rem + 2.4vw, 2.85rem); margin: 12px 0 14px; font-weight: 800; letter-spacing: -.03em; }
.lede { font-size: 1.16rem; color: var(--ink-2); margin: 0 0 18px; line-height: 1.6; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .86rem; color: var(--muted); padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.byline a:hover { color: var(--brand); }
.byline .dot { width: 3px; height: 3px; background: var(--line-2); border-radius: 50%; }

/* Quick answer */
.answer { margin: 28px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.answer-label { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.answer-label svg { width: 15px; height: 15px; }
.answer-body { padding: 16px 18px 18px; font-size: 1.08rem; }
.answer-body p { margin: 0; }
.answer-body p + p { margin-top: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
@media (min-width: 640px) { .facts.n3 { grid-template-columns: repeat(3, 1fr); } .facts.n4 { grid-template-columns: repeat(4, 1fr); } }
.fact { padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: -1px; }
.fact:last-child { border-right: 0; }
.fact dt { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 2px 0 0; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.3; }

/* Prose */
.prose { font-size: 1.0625rem; }
.prose > * { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.8rem); margin: 52px 0 14px; padding-top: 8px; font-weight: 800; }
.prose h3 { font-size: 1.22rem; margin: 32px 0 10px; font-weight: 750; }
.prose h4 { font-size: 1.05rem; margin: 24px 0 8px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.prose blockquote { margin: 0 0 20px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tables */
.table-wrap { margin: 8px 0 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; -webkit-overflow-scrolling: touch; box-shadow: var(--shadow); }
.table-wrap:focus-visible { outline-offset: 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
caption { caption-side: top; text-align: left; padding: 14px 16px 10px; font-weight: 700; font-size: .95rem; color: var(--ink); border-bottom: 1px solid var(--line); }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-size: .78rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
tbody th { font-weight: 700; white-space: nowrap; }
tr.hl { background: var(--accent-soft); }
tr.hl:hover { background: var(--accent-soft); }
td small, th small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
@media (max-width: 640px) {
  table { font-size: .9rem; width: max-content; min-width: 100%; }
  th, td { padding: 10px 12px; max-width: 230px; }
  caption { position: sticky; left: 0; }
  tbody th:first-child, tbody td:first-child { position: sticky; left: 0; background: var(--surface); box-shadow: 1px 0 0 var(--line); z-index: 1; }
  tbody tr.hl > :first-child { background: var(--accent-soft); }
}

/* Callouts */
.callout { margin: 8px 0 24px; padding: 16px 18px 16px 18px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); }
.callout > :last-child { margin-bottom: 0; }
.callout > :first-child { margin-top: 0; }
.callout-title { display: block; font-weight: 800; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 4px; color: var(--brand-ink); }
.callout.tip { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.callout.tip .callout-title { color: var(--ok); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.callout.warn .callout-title { color: var(--warn); }

/* Spec cards */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 26px; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.spec-label { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.spec-value { display: block; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.3; }
.spec-note { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* Steps */
ol.steps { list-style: none; padding: 0; counter-reset: step; margin: 8px 0 26px; }
ol.steps > li { counter-increment: step; position: relative; padding: 2px 0 14px 48px; margin: 0; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
ol.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--line); }

/* Pros / cons */
.pros-cons { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 8px 0 26px; }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; background: var(--surface); }
.pros-cons h4 { margin: 0 0 6px; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; }
.pros-cons .pros h4 { color: var(--ok); }
.pros-cons .cons h4 { color: var(--warn); }
.pros-cons ul { margin: 0; padding-left: 1.15em; }

/* Dimension figures */
figure { margin: 8px 0 28px; }
.dimviz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px 14px; box-shadow: var(--shadow); }
.dimviz svg { width: 100%; height: auto; max-height: 420px; margin: 0 auto; overflow: visible; }
.dimviz svg text { font-family: var(--font); font-size: 13px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.dimviz svg .dv-label { font-weight: 700; fill: var(--ink); }
.dimviz svg .dv-dim { fill: var(--muted); font-size: 12px; }
.dimviz figcaption, figure figcaption { font-size: .86rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.dv-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .86rem; color: var(--ink-2); }
.dv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dv-legend i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid currentColor; display: inline-block; }

@media (max-width: 640px) {
  .dimviz { padding: 14px 10px 10px; }
  .dimviz svg text { font-size: 24px; }
  .dimviz svg .dv-dim { font-size: 22px; }
}

/* Tools */
.tool { margin: 8px 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.tool-title { margin: 0 0 12px !important; font-size: 1.05rem !important; font-weight: 800; }
.tool-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tool label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.tool input, .tool select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; }
.tool input:focus, .tool select:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.tool button { height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 0; background: var(--ink); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
.tool-output { margin-top: 6px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; min-height: 52px; }
.tool-output strong { font-size: 1.2rem; }

/* Hub grid */
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 28px; }
.size-grid a { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.size-grid a:hover { border-color: var(--brand); transform: translateY(-1px); }
.size-grid b { display: block; font-size: 1.05rem; letter-spacing: -.01em; }
.size-grid small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; margin-top: 2px; }

/* FAQ */
.faq { margin-top: 8px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.faq summary { list-style: none; cursor: pointer; padding: 15px 48px 15px 18px; font-weight: 700; position: relative; line-height: 1.45; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 18px 16px; color: var(--ink-2); }
.faq details > div p { margin: 0 0 10px; }
.faq details > div p:last-child { margin: 0; }

/* Sources / meta box */
.sources { margin-top: 44px; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: .9rem; color: var(--ink-2); }
.sources h2 { font-size: 1rem !important; margin: 0 0 8px !important; padding: 0 !important; }
.sources ul { margin: 0; padding-left: 1.2em; }
.sources p { margin: 8px 0 0; }

/* Related */
.related { border-top: 1px solid var(--line); padding: 40px 0 8px; margin-top: 48px; }
.related h2 { font-size: 1.3rem; margin: 0 0 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.card-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card b { font-size: 1.04rem; line-height: 1.3; letter-spacing: -.01em; }
.card small { color: var(--muted); font-size: .88rem; line-height: 1.45; }

/* Sidebar */
.sidebar { display: none; }
@media (min-width: 1100px) { .sidebar { display: block; padding-top: 24px; } }
.sidebar-inner { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }
.toc { border-left: 2px solid var(--line); padding: 2px 0 2px 16px; }
.toc-title { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none; font-size: .9rem; line-height: 1.4; }
.toc a:hover { color: var(--brand); }
.toc a.active { color: var(--ink); font-weight: 700; position: relative; }
.toc a.active::before { content: ""; position: absolute; left: -18px; top: 6px; bottom: 6px; width: 2px; background: var(--brand); }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
.side-box h3 { margin: 0 0 8px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li a { display: block; padding: 6px 0; font-size: .92rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.side-box li:last-child a { border-bottom: 0; }
.side-box li a:hover { color: var(--brand); }

/* Mobile TOC */
.toc-mobile { margin: 22px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-mobile summary { padding: 12px 16px; font-weight: 700; cursor: pointer; font-size: .95rem; }
.toc-mobile ol { margin: 0; padding: 0 16px 14px 36px; }
.toc-mobile li { margin: 4px 0; font-size: .95rem; }
.toc-mobile a { color: var(--ink-2); text-decoration: none; }
@media (min-width: 1100px) { .toc-mobile { display: none; } }

/* Simple page */
.page { max-width: var(--measure); padding-bottom: 64px; }

/* Home */
.hero { padding: 56px 0 36px; }
.hero h1 { font-size: clamp(2.2rem, 1.5rem + 3.4vw, 3.6rem); max-width: 15ch; margin: 14px 0 16px; line-height: 1.06; }
.hero p { font-size: 1.18rem; color: var(--ink-2); max-width: 58ch; margin: 0 0 26px; }
.hero .search-box { display: flex; width: 100%; max-width: 560px; height: 56px; border-radius: 14px; padding: 0 18px; box-shadow: var(--shadow); }
.hero .search-box input { font-size: 1.05rem; }
.hero .search { max-width: 560px; }
.hero .search-results { left: 0; right: auto; top: 64px; width: 100%; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick-chips a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 600; }
.quick-chips a:hover { border-color: var(--brand); color: var(--brand); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 48px 0 16px; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); }
.section-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.popular { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.popular .card { padding: 20px; }
.popular .card b { font-size: 1.12rem; }
.dir { display: grid; grid-template-columns: 1fr; gap: 14px; padding-bottom: 64px; }
@media (min-width: 640px) { .dir { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .dir { grid-template-columns: repeat(3, 1fr); } }
.dir-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.dir-col h3 { margin: 0 0 4px; font-size: 1.08rem; display: flex; align-items: center; gap: 10px; }
.dir-col h3 i { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; }
.dir-col p { margin: 0 0 10px; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.dir-col ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 16px; }
.dir-col li { break-inside: avoid; }
.dir-col li a { display: block; padding: 4px 0; font-size: .92rem; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.dir-col li a:hover { color: var(--brand); text-decoration: underline; }
.trust { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 8px 0 0; }
@media (min-width: 800px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust div { padding: 18px 20px; border-radius: var(--radius); background: var(--surface-2); }
.trust b { display: block; margin-bottom: 4px; }
.trust p { margin: 0; font-size: .93rem; color: var(--ink-2); line-height: 1.55; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 32px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); } }
.footer-grid h3 { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { display: block; padding: 4px 0; color: var(--ink-2); text-decoration: none; }
.footer-grid li a:hover { color: var(--brand); }
.footer-grid p { color: var(--ink-2); margin: 10px 0 0; max-width: 40ch; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
/* Amazon affiliate CTAs: disclosure sits above the link (FTC + Associates agreement) */
.shop { margin: 20px 0 8px; padding: 14px 18px 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius); }
.shop-end { margin: 40px 0 0; }
.shop-note { margin: 0 0 10px; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.shop-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.shop-text { font-size: .98rem; color: var(--ink-2); flex: 1 1 260px; }
.shop-text b { color: var(--ink); }
.shop-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-sm); background: var(--accent); color: #15171c; font-weight: 700; font-size: .98rem; text-decoration: none; white-space: nowrap; transition: filter .15s ease; }
.shop-btn:hover { filter: brightness(.94); }
.shop-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 480px) { .shop-btn { width: 100%; justify-content: center; white-space: normal; text-align: center; } }
.footer-aff { margin: 28px 0 0; color: var(--muted); font-size: .82rem; }

.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink-2); font: inherit; font-size: .85rem; cursor: pointer; }

@media print {
  .site-header, .sidebar, .site-footer, .related, .toc-mobile, .shop { display: none !important; }
  body { background: #fff; color: #000; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (min-width: 640px) { .facts.n4 .fact { padding: 14px 14px; } .facts.n4 .fact dd { font-size: 1rem; } }
