/* DoesItStand: one stylesheet for the whole site.
   Design source: design/stitch/DESIGN.md ("Archival Verification").
   Rules of the system: serif headlines and quotes (Libre Caslon Text), sans for
   everything else (Geist), sharp corners everywhere, hairline borders, no shadows.
   Change a colour or font here and every page follows. */

:root {
  --canvas: #fbfbfa;
  --surface: #f4f3ef;
  --white: #ffffff;
  --ink: #12151a;
  --muted: #4a4f59;
  --rule: #e2e0d8;
  --green: #0d5c3a;
  --green-deep: #004328;
  --green-soft: #8ad2a7;

  /* The five verdicts: solid colour, light tint, dark text on the tint */
  --stands: #0d5c3a;      --stands-tint: #e6f4ea;     --stands-ink: #083c25;
  --part: #9a5b00;        --part-tint: #fef3c7;       --part-ink: #663c00;
  --misleading: #b43403;  --misleading-tint: #ffedd5; --misleading-ink: #782302;
  --falls: #991b1b;       --falls-tint: #fee2e2;      --falls-ink: #601111;
  --unproven: #475569;    --unproven-tint: #f1f5f9;   --unproven-ink: #1e293b;

  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --max: 1320px;
}

.v-stands     { --v: var(--stands);     --v-tint: var(--stands-tint);     --v-ink: var(--stands-ink); }
.v-part       { --v: var(--part);       --v-tint: var(--part-tint);       --v-ink: var(--part-ink); }
.v-misleading { --v: var(--misleading); --v-tint: var(--misleading-tint); --v-ink: var(--misleading-ink); }
.v-falls      { --v: var(--falls);      --v-tint: var(--falls-tint);      --v-ink: var(--falls-ink); }
.v-unproven   { --v: var(--unproven);   --v-tint: var(--unproven-tint);   --v-ink: var(--unproven-ink); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 2.6vw, 28px); }
h3 { font-size: 19px; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.label.green { color: var(--green); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.section { padding-block: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head a { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.7; }
.prose h2 { margin-top: 14px; font-size: 22px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Sample banner (delete the call in build.py when real content goes in) ---------- */
.sample { background: var(--ink); color: var(--white); font-size: 12px; text-align: center; padding: 6px 16px; }

/* ---------- Header ---------- */
.site-head { background: var(--canvas); border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand b { font-family: var(--serif); font-size: 22px; letter-spacing: -0.02em; white-space: nowrap; }
.brand b i { font-style: normal; color: var(--green); }
.search { display: flex; flex: 1 1 240px; min-width: 0; }
.search input { flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border: 1px solid var(--rule); border-right: 0; background: var(--white); color: var(--ink); border-radius: 0; }
.search button { font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 0 16px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); cursor: pointer; border-radius: 0; }
.edition { position: relative; }
.edition summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 9px 12px; border: 1px solid var(--ink); white-space: nowrap; }
.edition summary::-webkit-details-marker { display: none; }
.edition summary::after { content: " \25BE"; }
.edition ul { position: absolute; right: 0; top: 100%; z-index: 10; margin: 4px 0 0; padding: 0; list-style: none; background: var(--white); border: 1px solid var(--ink); min-width: 220px; }
.edition li a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; text-decoration: none; border-top: 1px solid var(--rule); }
.edition li:first-child a { border-top: 0; }
.edition li a:hover, .edition li a[aria-current] { background: var(--surface); }
.nav { display: flex; gap: 4px 24px; flex-wrap: wrap; padding-bottom: 12px; }
.nav a { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }

/* Country code chip, used instead of flag emoji */
.cc { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; border: 1px solid currentColor; padding: 0 4px; line-height: 16px; vertical-align: 1px; }

/* ---------- Country tabs ---------- */
.tabs-bar { background: var(--surface); border-bottom: 1px solid var(--rule); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 10px; }
.tabs a { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 6px 12px; background: var(--canvas); border: 1px solid var(--rule); white-space: nowrap; }
.tabs a:hover { border-color: var(--ink); }
.tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- Verdict pieces ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--v-tint); color: var(--v-ink); border-left: 3px solid var(--v); padding: 4px 10px 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; text-decoration: none; }
.badge svg, .verdict-block svg, .scale-row svg { width: 16px; height: 16px; flex: none; }
.verdict-block { background: var(--v); color: var(--white); padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; outline: 1px solid rgba(255,255,255,.45); outline-offset: -5px; }
.verdict-block svg { width: 34px; height: 34px; }
.verdict-block .label { color: var(--white); opacity: .85; display: block; }
.verdict-block strong { font-size: 28px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.1; display: block; }
.verdict-block .figure { margin-left: auto; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.16); padding: 4px 10px; }

/* ---------- Home layout ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 28px 40px; }
@media (min-width: 1024px) { .home-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; } }
.home-grid > * { min-width: 0; display: flex; flex-direction: column; gap: 32px; }

/* ---------- Lead check ---------- */
.lead { background: var(--white); border: 1px solid var(--ink); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .lead { padding: 28px; } }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--muted); }
.meta .label { color: var(--ink); }
.quote { font-family: var(--serif); font-style: italic; margin: 0; background: var(--surface); border-left: 3px solid var(--ink); padding: 18px 20px; font-size: clamp(22px, 3.2vw, 34px); line-height: 1.25; letter-spacing: -0.01em; }
.quote a { text-decoration: none; }
.quote a:hover { text-decoration: underline; }
.speaker { display: flex; gap: 12px; align-items: center; }
.avatar { width: 40px; height: 40px; flex: none; background: var(--green); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.speaker b { font-family: var(--serif); font-size: 18px; display: block; line-height: 1.2; }
.speaker b a { text-decoration: none; }
.speaker b a:hover { text-decoration: underline; }
.finding { background: var(--surface); padding: 14px 16px; font-size: 16px; }
.btn { display: inline-block; text-align: center; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; padding: 12px 24px; background: var(--green); color: var(--white); border: 1px solid var(--green); cursor: pointer; border-radius: 0; }
.btn:hover { background: var(--white); color: var(--green); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--surface); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Check cards (lists) ---------- */
.cards { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.card { padding-block: 20px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-style: italic; font-weight: 400; font-size: 21px; line-height: 1.3; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card .result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.card .result span { font-size: 13px; font-weight: 600; }
.card p { color: var(--muted); max-width: 70ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chips a { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 5px 10px; border: 1px solid var(--rule); background: var(--white); }
.chips a[aria-current] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.empty { padding: 24px; background: var(--surface); color: var(--muted); }

/* ---------- Rating scale ---------- */
.scale { display: flex; flex-direction: column; border: 1px solid var(--rule); background: var(--white); }
.scale-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px; border-top: 1px solid var(--rule); align-items: start; }
.scale-row:first-child { border-top: 0; }
.scale-row .icon { width: 36px; height: 36px; background: var(--v); color: var(--white); display: flex; align-items: center; justify-content: center; }
.scale-row .icon svg { width: 20px; height: 20px; }
.scale-row b { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v-ink); display: block; }
.scale-row span { font-size: 13px; color: var(--muted); display: block; }
.scale-row p { margin-top: 6px; font-size: 14px; }

/* ---------- Scorecards ---------- */
.score { background: var(--white); border: 1px solid var(--rule); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.score-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.score-top b { font-family: var(--serif); font-size: 18px; line-height: 1.2; }
.score-top b a { text-decoration: none; }
.score-top b a:hover { text-decoration: underline; }
.score-top .count { font-size: 12px; font-weight: 600; background: var(--surface); padding: 2px 8px; white-space: nowrap; }
.bar { display: flex; height: 12px; gap: 1px; background: var(--white); }
.bar i { display: block; background: var(--v); min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.legend li::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--v); margin-right: 5px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ---------- Submit box ---------- */
.submit-box { background: var(--green-deep); color: var(--white); padding: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.submit-box h2 { font-size: 22px; }
.submit-box p { color: var(--green-soft); }
.submit-box .btn { background: var(--white); color: var(--green-deep); border-color: var(--white); }
.submit-box .btn:hover { background: transparent; color: var(--white); }

/* ---------- Page header band (inner pages) ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--rule); padding-block: 28px; }
.page-head .wrap { display: flex; flex-direction: column; gap: 8px; }
.page-head p { color: var(--muted); max-width: 70ch; font-size: 16px; }
.crumb { font-size: 12px; color: var(--muted); }
.crumb a { color: var(--green); }

/* ---------- Check page ---------- */
.check-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 28px 48px; }
@media (min-width: 1024px) { .check-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; } }
.check-grid > * { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.block h2 { font-size: 20px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.evidence { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.evidence li { padding-block: 12px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.evidence b { font-weight: 600; }
.evidence .type { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.evidence span { font-size: 13px; color: var(--muted); }
.reply { border-left: 3px solid var(--ink); background: var(--surface); padding: 14px 16px; font-family: var(--serif); font-style: italic; font-size: 17px; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--rule); font-size: 14px; }
.log time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.log .correction { font-weight: 600; color: var(--falls-ink); }
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 14px; background: var(--surface); padding: 16px; }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { padding-block: 10px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 14px; }
.mini a { text-decoration: none; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.3; }
.mini a:hover { text-decoration: underline; }

/* Share card: the square image for social posts */
.share { aspect-ratio: 1 / 1; max-width: 360px; width: 100%; background: var(--v); color: var(--white); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; outline: 1px solid rgba(255,255,255,.5); outline-offset: -8px; }
.share q { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.3; quotes: "\201C" "\201D"; }
.share strong { font-size: 30px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; }
.share small { font-size: 12px; opacity: .9; }
.share .foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: 12px; font-weight: 600; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.form input, .form select, .form textarea { font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 400; padding: 10px 12px; border: 1px solid var(--rule); background: var(--white); color: var(--ink); border-radius: 0; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); }
.form textarea { min-height: 120px; resize: vertical; }

/* ---------- Footer ---------- */
.site-foot { background: var(--surface); border-top: 1px solid var(--rule); padding-block: 32px; margin-top: 24px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.foot-grid ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.foot-grid p { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 40ch; }
.foot-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }

/* ---------- Checks list filters (Django version) ---------- */
.filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; padding: 16px; background: var(--surface); border: 1px solid var(--rule); }
.filter-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; }
.radio-chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.radio-chips legend { padding: 0; margin-bottom: 6px; }
.radio-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-chips label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--rule); border-left: 3px solid var(--v, var(--rule)); background: var(--white); cursor: pointer; }
.radio-chips input:checked + label { background: var(--ink); color: var(--white); border-color: var(--ink); }
.radio-chips input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.filters label.label { display: flex; flex-direction: column; gap: 6px; }
.filters select { font: inherit; font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 400; padding: 6px 10px; border: 1px solid var(--rule); background: var(--white); color: var(--ink); border-radius: 0; }
.result-note { margin-bottom: 8px; }
.cards + .cards { border-top: 0; }
.more { padding-block: 24px; text-align: center; }
#results.htmx-request { opacity: .5; }
.thanks { background: var(--stands-tint); border-left: 3px solid var(--stands); padding: 24px; display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.form .error { color: var(--falls); text-transform: none; letter-spacing: 0; font-weight: 500; }
.filters .search { flex: none; }
