/* Shared stylesheet for Fast Stats, Fast Facts, and Fast Acts for Sats.
   Colors are tokens; the dark set follows the OS setting. Charts use the same tokens (lib/chartstyle.py). */

:root {
  color-scheme: light dark;
  /* Brand: the coin renders are copper-orange on deep navy with a cyan rim. Navy carries the header
     and footer on every page; orange is the accent; blue is for links and the second chart series. */
  --navy: #071829;             /* header and footer band, the logo background */
  --navy-ink: #ffffff;
  --navy-muted: #a9b6c8;
  --brand: #f97e1b;            /* the wordmark orange, for marks on navy and large figures */
  --brand-ink: #b85300;        /* orange dark enough to read as small text on white */
  --page: #f6f7f9;
  --surface: #ffffff;
  --ink: #0b1220;
  --ink-2: #4a5565;
  --muted: #67727f;
  --hairline: #e3e6eb;
  --rule: #c6ccd6;
  --accent: #0b63b5;           /* links, categorical slot 2 */
  --accent-2: #dd6a08;         /* categorical slot 1 (the brand orange, deepened for white backgrounds) */
  --good: #1d7a1d;
  --wash: #eaf2fb;
  --placement: #fff4ea;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #050f1c;
    --navy-ink: #ffffff;
    --navy-muted: #a9b6c8;
    --brand: #ffa14a;
    --brand-ink: #ffa14a;
    --page: #0b1a2b;
    --surface: #122238;
    --ink: #f2f5f9;
    --ink-2: #c0c9d6;
    --muted: #8794a6;
    --hairline: #22344d;
    --rule: #2f4563;
    --accent: #5cc3ff;
    --accent-2: #ffa14a;
    --good: #5fd35f;
    --wash: #16293f;
    --placement: #2a2117;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, svg, video { max-width: 100%; height: auto; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 10; }

/* Header: the navy band the logos were drawn on, with the coin and wordmark */
.site-header { background: var(--navy); color: var(--navy-ink); border-bottom: 3px solid var(--brand); }
.family { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 0 0; font-size: 14px; color: var(--navy-muted); }
.family a { color: var(--navy-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.family a:hover { color: var(--navy-ink); text-decoration: underline; }
.family-current { color: var(--navy-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.family-coin { width: 18px; height: 18px; border-radius: 50%; }
.family-sep { color: var(--navy-muted); opacity: 0.6; }
.family-note { color: var(--navy-muted); margin-left: 2px; }
.masthead { padding: 14px 0 12px; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--navy-ink); text-decoration: none; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-coin { width: 56px; height: 56px; flex: none; }
.brand-word { height: 32px; width: auto; display: block; }
.tagline { margin: 6px 0 0; color: var(--navy-muted); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0 0 12px; font-size: 15px; }
.site-nav a { color: var(--navy-ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="true"] { border-bottom-color: var(--brand); }

/* Content */
main.wrap { padding-top: 28px; padding-bottom: 48px; }
.prose { max-width: 720px; }
.prose h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 8px; }
.prose h2 { font-size: 24px; line-height: 1.25; margin: 36px 0 10px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose h2 .step { display: block; margin-bottom: 2px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-ink); font-weight: 600; }   /* "Step 1" above a step heading */
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose th { color: var(--ink-2); font-weight: 600; }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.prose blockquote { margin: 0 0 16px; padding: 0 0 0 14px; border-left: 3px solid var(--rule); color: var(--ink-2); }
.prose code { font-family: var(--mono); font-size: 0.92em; background: var(--surface); border: 1px solid var(--hairline); border-radius: 4px; padding: 1px 5px; }
.prose pre { background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px; padding: 12px 14px; overflow: auto; font-size: 14px; }
.prose pre code { border: 0; padding: 0; background: none; }
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 32px 0; }
.page-head { margin-bottom: 20px; }
.eyebrow { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-ink); font-weight: 600; }
.eyebrow a { color: inherit; text-decoration: none; }
.updated { margin: 0; color: var(--muted); font-size: 14px; }
.home h1 { font-size: 38px; }
.lead { font-size: 20px; color: var(--ink-2); }
.understand-first { background: var(--wash); border-radius: 6px; padding: 10px 14px; }
.disclosure { color: var(--ink-2); font-size: 14px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 8px 0; }
.page-list { list-style: none; padding: 0; }
.page-list li { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.page-list a { font-weight: 600; }
.page-list-desc { display: block; color: var(--ink-2); font-size: 15px; }

/* Live figures (shared/static/live.js replaces the text when the API answers) */
.live { font-variant-numeric: tabular-nums; }
.live-when { color: var(--muted); font-size: 14px; }

/* Three-site cards on home pages */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 24px 0; padding: 0; list-style: none; }
.cards li { background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: 14px 16px; margin: 0; }
.cards strong { display: block; margin-bottom: 4px; }
.cards a { text-decoration: none; }
.cards a:hover { text-decoration: underline; }

/* Charts */
figure.chart { margin: 0 0 20px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: 10px; }
figure.chart img { display: block; width: 100%; height: auto; border-radius: 4px; }
figure.chart figcaption { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
details.embed { margin: 0 0 24px; font-size: 15px; }
details.embed summary { cursor: pointer; color: var(--accent); }
details.embed pre { font-size: 13px; }

/* Embeds: what another site would show, the code for it, and the copy button */
.embed-preview { margin: 0 0 12px; padding: 14px; background: var(--surface); border: 1px dashed var(--rule); border-radius: 8px; overflow-wrap: anywhere; }
.embed-preview p { margin: 8px 0 0; }
.embed-form { margin-bottom: 12px; }
.embed-form .converter-row:last-child { margin-bottom: 0; }
.embed-form input[type="text"] { width: 280px; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.copy { font: inherit; font-size: 15px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.copy:hover { border-color: var(--accent); }
.copy-done { color: var(--good); font-size: 14px; }

/* Affiliate placement boxes */
.placements { margin: 28px 0; display: grid; gap: 12px; }
.placement { background: var(--placement); border: 1px solid var(--hairline); border-radius: 8px; padding: 12px 16px; }
.placement p { margin: 0 0 6px; }
.placement-head { font-size: 18px; font-weight: 600; }
.placement-cta a { font-weight: 600; }
.placement-tag { font-size: 13px; color: var(--muted); margin-left: 6px; }

/* Sources */
.sources { margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--hairline); font-size: 15px; color: var(--ink-2); }
.sources h2 { font-size: 16px; margin: 0 0 8px; }
.sources ul { margin: 0; padding-left: 20px; }

/* Footer: the same navy band */
.site-footer { background: var(--navy); color: var(--navy-muted); font-size: 14px; }
.site-footer .wrap { padding-top: 22px; padding-bottom: 30px; }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: #d6deea; }
.site-footer a:hover { color: var(--navy-ink); }
.attribution { margin: 0 0 8px; padding: 0; list-style: none; }
.attribution li { margin-bottom: 4px; }
.sats-line { color: var(--navy-ink); }
.family-footer { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0 12px; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.family-footer li { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.family-footer a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--navy-ink); font-weight: 600; }
.family-footer a:hover { text-decoration: underline; }
.family-footer span { color: var(--navy-muted); font-weight: 400; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 10px; padding: 0; }   /* privacy, affiliate disclosure, terms, contact */
.footer-links li { margin: 0; }
.colophon { color: var(--navy-muted); opacity: 0.85; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .prose table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* wide comparison tables scroll sideways instead of widening the page */
  .prose h1 { font-size: 28px; }
  .home h1 { font-size: 30px; }
  .brand { font-size: 22px; gap: 10px; }
  .brand-coin { width: 44px; height: 44px; }
  .brand-word { height: 25px; }
}
@media print {
  .site-nav, .skip, details.embed { display: none; }
  body { background: #fff; color: #000; }
}

/* Stats: headline numbers */
.bignumber { background: var(--surface); border: 1px solid var(--hairline); border-left: 5px solid var(--brand); border-radius: 10px; padding: 18px 20px 12px; margin: 0 0 28px; }
.big { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.big-label { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.big-value { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
@media (prefers-color-scheme: dark) { .big-value { color: var(--brand); } }
.big-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; font-size: 20px; font-weight: 600; }
.big-row a { text-decoration: none; }
/* A long label ("Fee estimate, about an hour") must not wrap beside short ones, or its figure drops a line below the
   others. From tablet width up the columns fit their labels in one row; on a phone the figures stack. */
@media (min-width: 600px) {
  .big-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
  .big-row .big-label { white-space: nowrap; }
}
@media (max-width: 599px) { .big-row { grid-template-columns: 1fr; } }
.big-when { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.big-credit { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }   /* a source's credit right under its figure */
.big-row .big-credit a { text-decoration: underline; }

/* Stats: tables of numbers, galleries, grids */
.home-block { margin: 32px 0; }
.home-block h2 { font-size: 22px; margin: 0 0 12px; }
.more { font-size: 15px; }
table.numbers { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 15px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; }
table.numbers th, table.numbers td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.numbers th { color: var(--ink-2); font-weight: 600; }
table.numbers tbody tr:last-child td, table.numbers tbody tr:last-child th { border-bottom: 0; }
table.numbers .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.numbers tr.now td { font-weight: 600; }
.small { font-size: 14px; color: var(--ink-2); }
.gallery { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery li { margin: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; padding: 10px; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 4px; }
.gallery strong { display: block; margin: 8px 0 2px; }
.gallery a { text-decoration: none; color: var(--ink); }
.gallery a:hover strong { color: var(--accent); }
.gallery p { margin: 0; font-size: 14px; color: var(--ink-2); }
.link-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.rate { margin: -6px 0 10px; color: var(--ink-2); font-variant-numeric: tabular-nums; }   /* the sats-per-unit line under a currency heading */
.amount-grid { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; font-size: 15px; }
.amount-grid li { margin: 0; padding: 4px 0; border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; gap: 8px; }
.amount-grid span { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Stats: converter */
.converter { background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: 16px 18px; margin: 0 0 24px; }
.converter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.converter label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); min-width: 64px; }
.converter input, .converter select { font: inherit; font-size: 20px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--page); color: var(--ink); min-width: 0; }
.converter input { width: 200px; max-width: 100%; }
.converter-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 20px; margin: 4px 0 14px; }
.converter output { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
#conv-money { font-size: 20px; font-weight: 600; }

/* Columns that can go on a phone */
@media (max-width: 480px) {
  .hide-sm { display: none; }
}

/* Acts: the campaign checklist, the newsletter block, buttons */
.acts { list-style: none; counter-reset: act; padding: 0; margin: 20px 0 28px; }
.acts li { counter-increment: act; position: relative; padding: 14px 16px 14px 62px; margin: 0 0 10px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; }
.acts li::before { content: counter(act); position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; border-radius: 8px; background: var(--navy); color: var(--brand); font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.acts strong { display: inline; }
.acts strong a { color: inherit; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.acts strong a:hover { color: var(--accent); }
.newsletter { margin: 36px 0 0; padding: 18px 20px; background: var(--wash); border-radius: 10px; }
.newsletter h2 { margin: 0 0 8px; font-size: 22px; }
.newsletter p { margin: 0 0 10px; }
.newsletter-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.button { display: inline-block; background: var(--brand-ink); color: #fff; font-weight: 600; text-decoration: none; padding: 10px 16px; border-radius: 8px; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .button { background: var(--brand); color: var(--navy); } }
@media (max-width: 480px) {
  .acts li { padding-left: 54px; }
  .acts li::before { left: 10px; width: 30px; height: 30px; font-size: 15px; }
}
