/*
 * content.css — guides, comparisons, About and tool pages.
 *
 * Self-contained on purpose: these pages do not load styles.css, so the
 * homepage can be redesigned without breaking them (and vice versa).
 * Tokens mirror the live homepage (paper, ink, cobalt, night) so the two
 * read as one site.
 */

:root {
  --paper: #fbfcfd;
  --paper-2: #f2f5f8;
  --ink: #0e1b2d;
  --ink-2: #44526a;
  --ink-3: #5d6a80;
  --line: #dde3ea;
  --line-strong: #c6cfda;
  --cobalt: #1567db;
  --cobalt-dark: #0b4ca9;
  --cobalt-tint: #eaf2fd;
  --night: #09111f;
  --night-2: #13203a;
  --night-ink: #eef3fa;
  --night-ink-2: #a9b6ca;
  --teal: #2b9e98;
  --teal-text: #18716c;
  --red: #d54e58;
  --red-text: #a8323b;
  --amber-text: #8a5a06;
  --wrap: 1180px;
  --read: 720px;
  --radius: 6px;
  --radius-lg: 14px;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(14, 27, 45, .06), 0 12px 32px -12px rgba(14, 27, 45, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cobalt-dark); }
:focus-visible { outline: 3px solid rgba(21, 103, 219, .45); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.wrap { width: min(calc(100% - 64px), var(--wrap)); margin: 0 auto; }
.read { width: min(calc(100% - 48px), var(--read)); margin: 0 auto; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 252, 253, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 64px; display: flex; align-items: center; gap: 28px; }
.nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.01em;
}
.nav-brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--ink-2); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta { margin-left: 4px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius);
  font: 600 15px/1 var(--body); text-decoration: none;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); color: var(--ink); border-color: var(--ink-3); }
.button-primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.button-primary:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); color: #fff; }
.button-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* ---------- Page header ---------- */
.page-head { padding: 56px 0 28px; }
.breadcrumbs { font-size: 14px; color: var(--ink-3); margin: 0 0 18px; }
.breadcrumbs a { color: var(--ink-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cobalt); }
.breadcrumbs span[aria-hidden] { margin: 0 6px; }
.kicker {
  margin: 0 0 12px; font: 600 14px/1.3 var(--body); color: var(--cobalt);
}
h1 {
  font: 700 clamp(2.1rem, 4.6vw, 3.3rem)/1.06 var(--sans);
  letter-spacing: -.025em; margin: 0 0 18px; text-wrap: balance;
}
.lede { font-size: clamp(1.1rem, 1.9vw, 1.25rem); line-height: 1.5; color: var(--ink-2); margin: 0; }
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-3);
}
.byline a { color: var(--ink-2); }

/* ---------- Article body ---------- */
.prose { padding-bottom: 24px; }
.prose > * + * { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose h2 {
  font: 700 clamp(1.5rem, 2.6vw, 1.9rem)/1.18 var(--sans);
  letter-spacing: -.018em; margin: 52px 0 14px; text-wrap: balance;
  scroll-margin-top: 84px;
}
.prose h3 { font: 650 1.2rem/1.3 var(--sans); letter-spacing: -.01em; margin: 30px 0 8px; scroll-margin-top: 84px; }
.prose strong { font-weight: 650; }
.prose code, .prose kbd {
  font: 500 .88em var(--mono); background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px;
}
.prose .menu { font-weight: 600; white-space: nowrap; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* The one-paragraph answer that leads every guide. */
.answer {
  margin: 8px 0 28px; padding: 20px 22px;
  background: var(--cobalt-tint); border: 1px solid #cfe0fa; border-left: 4px solid var(--cobalt);
  border-radius: var(--radius-lg);
}
.answer-label { display: block; font: 700 13px/1.2 var(--body); color: var(--cobalt-dark); margin-bottom: 6px; }
.answer p:last-child { margin-bottom: 0; }

.note {
  margin: 24px 0; padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--paper-2); border: 1px solid var(--line); font-size: 16px;
}
.note p:last-child { margin-bottom: 0; }
.note-warn { background: #fff8eb; border-color: #f0dcb4; }

.toc {
  margin: 0 0 28px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; font-size: 15px;
}
.toc strong { display: block; font-size: 14px; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2 240px; column-gap: 32px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }

/* Lists with their own layout: no prose indent */
.prose .picks, .prose .steps { padding-left: 0; }

/* Numbered steps */
.steps { list-style: none; padding: 0; counter-reset: step; margin: 20px 0 24px; }
.steps > li {
  position: relative; padding: 2px 0 14px 48px; margin: 0 0 6px; counter-increment: step;
}
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 700 14px/1 var(--body);
  background: var(--ink); color: #fff;
}
.steps > li > strong:first-child { display: block; margin-bottom: 2px; }

/* Quick picks */
.picks { list-style: none; padding: 0; margin: 18px 0 28px; display: grid; gap: 10px; }
.picks li {
  margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff;
}
.picks li strong { display: block; font-size: 15px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }

/* ---------- Tables ---------- */
.table-wrap {
  margin: 20px 0 10px; overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: #fff;
}
.prose .table-wrap { width: min(calc(100vw - 32px), 1040px); margin-left: 50%; transform: translateX(-50%); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
caption { text-align: left; padding: 14px 16px 0; font-weight: 650; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th {
  background: var(--paper-2); font-weight: 650; font-size: 14px; color: var(--ink-2);
  white-space: nowrap; border-bottom-color: var(--line-strong);
}
tbody th { font-weight: 650; min-width: 150px; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tr.is-us { background: #f4f8fe; }
tr.is-us th { color: var(--cobalt-dark); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-note { font-size: 14px; color: var(--ink-3); margin: 8px 0 24px; }
.yes { color: var(--teal-text); font-weight: 600; }
.no { color: var(--red-text); font-weight: 600; }
.part { color: var(--amber-text); font-weight: 600; }

/* ---------- Figures ---------- */
figure { margin: 28px 0; }
figure img { border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
figcaption { font-size: 14px; color: var(--ink-3); margin-top: 10px; }
.prose figure.wide { width: min(calc(100vw - 32px), 1040px); margin-left: 50%; transform: translateX(-50%); }

/* Stat row (real numbers from the demo set) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 20px 0 26px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.stat b { display: block; font: 700 1.3rem/1.15 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat span { font-size: 14px; color: var(--ink-3); }

/* ---------- Pros and cons ---------- */
.fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 18px 0 26px; }
.fit > div { padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; }
.fit h3 { margin-top: 0 !important; font-size: 1.05rem; }
.fit ul { margin-bottom: 0 !important; }
.fit .good { border-top: 3px solid var(--teal); }
.fit .bad { border-top: 3px solid var(--red); }

/* ---------- FAQ ---------- */
.faq { margin: 8px 0 20px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font: 650 1.05rem/1.4 var(--sans);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 24px; width: 10px; height: 10px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq .faq-a { padding: 0 0 16px; color: var(--ink-2); }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- Author box ---------- */
.author {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start;
  margin: 44px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
}
.author img { width: 56px; height: 56px; border-radius: 14px; }
.author p { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); }
.author p:last-child { margin: 0; }
.author strong { color: var(--ink); }

.sources { font-size: 14px; color: var(--ink-3); }
.sources h2 { font-size: 1.1rem !important; margin-top: 40px !important; }
.sources li { margin: 4px 0; }

/* ---------- Cards (hub, related) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 18px 0 32px; }
.card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; min-height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
  color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--cobalt); color: var(--ink); transform: translateY(-2px); }
.card .card-tag { font: 600 13px/1.2 var(--body); color: var(--cobalt); }
.card h3, .card .card-title { margin: 0; font: 650 1.12rem/1.3 var(--sans); letter-spacing: -.01em; }
.card p { margin: 0; font-size: 15px; color: var(--ink-2); }
.hub-section { padding: 8px 0 12px; }
.hub-section h2 { font: 700 1.5rem/1.2 var(--sans); letter-spacing: -.018em; margin: 28px 0 4px; }
.hub-section > p { margin: 0; color: var(--ink-2); }

.related { padding: 36px 0 12px; border-top: 1px solid var(--line); margin-top: 32px; }
.related h2 { font: 700 1.3rem/1.2 var(--sans); margin: 0; }

/* ---------- Call to action band ---------- */
.cta-band {
  margin-top: 56px; padding: 56px 0; color: var(--night-ink);
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--night);
}
.cta-band h2 { font: 700 clamp(1.6rem, 3vw, 2.2rem)/1.12 var(--sans); letter-spacing: -.02em; margin: 0 0 10px; }
.cta-band p { color: var(--night-ink-2); margin: 0; max-width: 620px; }
.cta-band .button { border-color: rgba(255,255,255,.25); background: transparent; color: #fff; }
.cta-band .button:hover { border-color: #fff; color: #fff; }
.cta-band .button-primary { background: var(--cobalt); border-color: var(--cobalt); }
.cta-band .button-primary:hover { background: #2d7ef0; border-color: #2d7ef0; }
.cta-band small { display: block; margin-top: 16px; color: var(--night-ink-2); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { padding: 44px 0 52px; background: var(--paper-2); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand { display: flex; gap: 10px; align-items: flex-start; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-brand strong { display: block; color: var(--ink); font-size: 15px; }
.footer-col strong { display: block; color: var(--ink); margin-bottom: 8px; font-size: 14px; }
.footer-col a { display: block; color: var(--ink-3); text-decoration: none; padding: 3px 0; }
.footer-col a:hover { color: var(--cobalt); }
.legal { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); line-height: 1.55; }

/* ---------- Scale calculator ---------- */
.tool {
  margin: 8px 0 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; box-shadow: var(--shadow);
}
.tool h2 { margin-top: 0 !important; font-size: 1.3rem !important; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 600 14px/1.3 var(--body); color: var(--ink-2); }
.field input, .field select {
  font: 500 16px/1.2 var(--body); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 12px; min-height: 46px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(21, 103, 219, .18); }
.tool-out {
  margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--night); color: var(--night-ink); font-size: 16px;
}
.tool-out b { font: 700 1.6rem/1.15 var(--mono); letter-spacing: -.01em; display: block; color: #fff; }
.tool-out .muted { color: var(--night-ink-2); font-size: 14px; }
.tool-out.is-warn { background: #2b1d05; box-shadow: inset 4px 0 0 #e0a43a; }
.tabs { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.tabs button {
  font: 600 14px/1 var(--body); padding: 10px 14px; min-height: 40px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
}
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 16.5px; }
  .wrap { width: min(calc(100% - 32px), var(--wrap)); }
  .read { width: min(calc(100% - 32px), var(--read)); }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .page-head { padding-top: 36px; }
  .footer-grid { grid-template-columns: 1fr; }
  .prose .table-wrap, .prose figure.wide { width: 100%; margin-left: 0; transform: none; }
  th, td { padding: 10px 12px; }
  .author { grid-template-columns: 1fr; }
}

@media print {
  .site-nav, .cta-band, .site-footer, .skip-link { display: none; }
  .faq details { display: block; }
}
