/* ============================================================
   saber sobre café — design system
   Direction: brutalist editorial.

   THE ACCENT RULE (do not break):
   one ink, one paper, one red. Nothing else.
   --red is the bright one and is for LARGE text and filled
   blocks only — it fails AA below ~24px on paper.
   --red-ink is the same hue darkened so small labels pass AA.
   They are one accent at two lightnesses, not two accents.
   Neutrals are alpha of --ink, never new hues.
   A second accent is how this system stops being sharp.
   ============================================================ */

@font-face { font-family: Archivo; src: url("/fonts/archivo-92895abae7c57c46cedefc6165191735.woff2?vsn=d") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-45ac3f4b61c187a0e3d9e6ba1198df6a.woff2?vsn=d") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-italic-c63ef70f797b0c45b7668600c927aa54.woff2?vsn=d") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/fonts/space-mono-d62e75a5cd2d7406d1c855ae5aac62d3.woff2?vsn=d") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/fonts/space-mono-700-55408a774dfe38eb61f842b03ef9e24a.woff2?vsn=d") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #faf8f4;
  --ink: #0f0e0c;
  --red: #ff3b00;
  --red-ink: #c41e00;

  --wash: rgba(15, 14, 12, 0.045);
  --muted: rgba(15, 14, 12, 0.66);
  /* 0.62 is the floor that keeps 10-11px mono text at AA (5.3:1) on paper. */
  --faint: rgba(15, 14, 12, 0.62);
  --rule: rgba(15, 14, 12, 0.16);

  --rule-hair: 1px solid var(--rule);
  --rule-mid: 2px solid var(--ink);
  --rule-heavy: 3px solid var(--ink);

  /* Control tokens. Nothing uses these yet — they exist so the first
     widget inherits this system instead of inventing a second one. */
  --control-h: 48px;
  --control-radius: 0;
  --control-border: var(--rule-mid);
  --focus-ring: 0 0 0 3px var(--red);

  --measure: 68ch;
  --shell: 1240px;
  --display: Archivo, "Helvetica Neue", Helvetica, sans-serif;
  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}


*, *::before, *::after { box-sizing: border-box; }

/* An author `display` rule outranks the UA stylesheet's [hidden] rule, which
   silently un-hides anything toggled by the attribute. This keeps `hidden`
   authoritative — it is how the consent banner and the no-match block hide. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--red-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { background: var(--red-ink); color: var(--paper); text-decoration: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: pretty; }
p { margin: 0; }
strong { font-weight: 700; }

.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--muted);
}

.skip { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: 14px 20px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

/* -- shell ---------------------------------------------------- */

.wrap { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 40px; }
.measure { max-width: var(--measure); }

.site-header { border-bottom: var(--rule-heavy); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 52px; }
.wordmark {
  display: flex; align-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.wordmark:hover { background: none; color: var(--red-ink); }
.wordmark-icon { display: none; }
.site-nav { display: flex; gap: 22px; }
.site-nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.site-nav a:hover { background: none; color: var(--ink); }

.site-footer { border-top: var(--rule-heavy); margin-top: 72px; padding: 28px 0 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 40px; justify-content: space-between; }
.site-footer span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }

/* -- home: question box + topic list --------------------------- */

.ask { display: flex; flex-direction: column; gap: 18px; }
.ask h1 { margin: 0; }
.ask label { cursor: pointer; }

.ask input[type="search"] {
  width: 100%;
  min-height: 64px;
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 20px;                 /* >=20px so iOS does not zoom on focus */
  color: var(--ink);
  background: var(--paper);
  border: var(--rule-heavy);
  border-radius: var(--control-radius);
  -webkit-appearance: none;
  appearance: none;
}
.ask input[type="search"]::placeholder { color: var(--faint); }
.ask input[type="search"]:focus-visible { box-shadow: var(--focus-ring); }

.ask-submit {
  align-self: flex-start;
  min-height: var(--control-h);
  padding: 0 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: var(--rule-heavy);
  cursor: pointer;
}

.topic-list { list-style: none; padding: 0; margin: 0; border-top: var(--rule-heavy); }
.topic-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 26px 0; border-bottom: var(--rule-hair);
}
.topic-card-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--faint);
}
.topic-card-title {
  font-family: var(--display); font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 900; letter-spacing: -0.03em; line-height: 1.08;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.topic-card-title:hover { background: none; color: var(--red-ink); }
.topic-card-question { font-size: 16px; line-height: 1.55; color: var(--muted); }

.no-match {
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
  border-left: 3px solid var(--red); padding: 4px 0 4px 18px; margin-top: 28px;
}
.no-match p { font-size: 18px; line-height: 1.6; max-width: 46ch; }

/* -- topic header --------------------------------------------- */

.topic-head { padding: 44px 0 32px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--red-ink); margin-bottom: 20px;
}

/* The h1 keeps the full topic title — the display treatment is a span
   inside it, never a replacement for it. */
.topic-head h1 {
  font-size: clamp(40px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.042em;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.title-lead { display: block; font-size: 0.44em; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 0.12em; }
.title-display { display: block; color: var(--red); }

.head-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px; border-top: var(--rule-heavy); padding-top: 20px;
}
.lede { font-size: 22px; line-height: 1.4; font-weight: 600; font-family: var(--display); letter-spacing: -0.012em; }
.byline { font-family: var(--mono); font-size: 12px; line-height: 1.9; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.byline strong { color: var(--ink); font-weight: 700; }

/* -- figures strip -------------------------------------------- */

.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule-heavy); border-bottom: var(--rule-heavy); margin-top: 40px; }
.figure-cell { padding: 24px 24px 28px; border-right: var(--rule-heavy); }
.figure-cell:last-child { border-right: none; }
.figure-cell.hot { background: var(--red); color: var(--paper); }
/* The figure itself is 60px, so paper-on-red clears the large-text threshold.
   The note under it is 15px and does not, so it takes ink instead. */
.figure-cell.hot .figure-note { color: var(--ink); }
.figure-num { font-family: var(--mono); font-weight: 700; font-size: 60px; line-height: 0.95; letter-spacing: -0.045em; display: block; }
.figure-note { font-size: 15px; line-height: 1.45; font-weight: 600; margin-top: 12px; color: var(--ink); }

/* -- band (the slot a tool drops into later) ------------------- */

.band { border-bottom: var(--rule-heavy); padding: 40px 0 44px; }
.one-line { font-family: var(--display); font-size: clamp(24px, 3.4vw, 40px); line-height: 1.16; font-weight: 700; letter-spacing: -0.028em; max-width: 22ch; }

/* -- sections -------------------------------------------------- */

.section { padding: 48px 0 0; }
.section > h2 { font-size: clamp(26px, 3.6vw, 42px); line-height: 1; font-weight: 900; letter-spacing: -0.035em; text-transform: uppercase; margin-bottom: 10px; }
.section-lead { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: var(--measure); margin-bottom: 26px; }

.prose { max-width: var(--measure); }
.prose h2 { font-size: clamp(26px, 3.6vw, 42px); line-height: 1; font-weight: 900; letter-spacing: -0.035em; text-transform: uppercase; margin: 40px 0 10px; }
.prose h3 { font-family: var(--display); font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 32px 0 10px; }
.prose p { font-size: 18px; line-height: 1.7; margin-bottom: 20px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { font-size: 18px; line-height: 1.7; margin-bottom: 10px; }
.prose em { font-style: italic; }

/* -- claims ---------------------------------------------------- */

.claims { width: 100%; border-collapse: collapse; text-align: left; }
.claims caption { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; }
.claims thead th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); font-weight: 400; padding: 0 24px 10px 0; border-bottom: var(--rule-mid); }
.claims tbody tr { border-bottom: var(--rule-hair); }
.claims tbody tr:last-child { border-bottom: var(--rule-heavy); }
.claims tbody tr:target { background: var(--wash); }
.claims td { padding: 22px 24px 22px 0; vertical-align: top; }
.claims td:last-child { padding-right: 0; }
.col-verdict { width: 172px; }
.col-source { width: 190px; }

.claim-text { font-family: var(--display); font-size: 21px; line-height: 1.24; font-weight: 700; letter-spacing: -0.018em; margin-bottom: 9px; }
.claim-note { font-size: 16px; line-height: 1.6; color: var(--muted); }
.claim-anchor { display: inline-block; margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--faint); text-decoration: none; }
.claim-anchor:hover { background: none; color: var(--red-ink); }

/* Verdicts read by treatment, not hue: outlined / filled / red.
   Icon and word are always present, so colour is never the only signal. */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 5px 9px; white-space: nowrap; border: var(--rule-mid);
}
.badge-glyph { font-weight: 700; }
.badge-confirmada { background: transparent; color: var(--ink); }
.badge-matiz      { background: var(--ink); color: var(--paper); }
.badge-incorrecta { background: var(--red-ink); border-color: var(--red-ink); color: var(--paper); }

/* The incorrecta row inverts to a black bar: the myth being corrected is the
   thing most worth seeing at a glance on a page about a myth. */
.claims tbody tr.row-incorrecta { background: var(--ink); }
.claims tbody tr.row-incorrecta .claim-text,
.claims tbody tr.row-incorrecta .claim-note { color: var(--paper); }
.claims tbody tr.row-incorrecta .claim-note { opacity: 0.82; }
.claims tbody tr.row-incorrecta .claim-anchor,
.claims tbody tr.row-incorrecta .src-list,
.claims tbody tr.row-incorrecta .src-list a,
.claims tbody tr.row-incorrecta .src-list .detail { color: var(--paper); opacity: 0.7; }
.claims tbody tr.row-incorrecta .badge-incorrecta {
  background: var(--paper); border-color: var(--paper); color: var(--ink);
}
.claims tbody tr.row-incorrecta td { padding-left: 18px; }
.claims tbody tr.row-incorrecta td:first-child { padding-left: 18px; }

.src-list { display: flex; flex-direction: column; gap: 3px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; }
.src-list a { color: var(--muted); text-decoration: none; }
.src-list a:hover { background: var(--ink); color: var(--paper); }
.src-list .detail { color: var(--faint); }

/* -- facts ----------------------------------------------------- */

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: var(--rule-heavy); }
.fact { padding: 22px 24px 26px; border-right: var(--rule-hair); border-bottom: var(--rule-heavy); }
.fact:nth-child(3n) { border-right: none; }
.fact-figure { font-family: var(--mono); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -0.04em; display: block; margin-bottom: 12px; }
.fact-statement { font-size: 15.5px; line-height: 1.55; margin-bottom: 10px; }
.fact-not { font-size: 14px; line-height: 1.5; color: var(--muted); }
.fact-src { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--faint); display: block; margin-top: 12px; }

/* -- contradictions -------------------------------------------- */

.contras { width: 100%; border-collapse: collapse; text-align: left; }
.contras caption { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; }
.contras thead th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); font-weight: 400; padding: 0 24px 10px 0; border-bottom: var(--rule-mid); }
.contras td { padding: 20px 24px 20px 0; vertical-align: top; border-bottom: var(--rule-hair); font-size: 16px; line-height: 1.6; }
.contras tr:last-child td { border-bottom: var(--rule-heavy); }
.contras .point { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; }
.side { margin-bottom: 14px; }
.side:last-child { margin-bottom: 0; }
.side-who { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }

/* -- unverified ------------------------------------------------ */

.unverified { list-style: none; padding: 0; margin: 0; }
.unverified li { border-left: 3px solid var(--red); padding: 2px 0 2px 18px; margin-bottom: 18px; }
.unverified p { font-size: 16.5px; line-height: 1.6; }
.unverified .pending { font-family: var(--mono); font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 6px; }

/* -- sources --------------------------------------------------- */

.sources { list-style: none; padding: 0; margin: 0; border-top: var(--rule-mid); }
.sources li { padding: 18px 0; border-bottom: var(--rule-hair); }
.source-id { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--red-ink); margin-bottom: 5px; }
.source-cite { display: block; font-size: 16px; line-height: 1.55; }
.source-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; align-items: baseline; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase; border: var(--rule-hair); padding: 2px 7px; color: var(--muted); }

/* -- series ---------------------------------------------------- */

.episodes { list-style: none; padding: 0; margin: 0; border-top: var(--rule-mid); }
.episode { display: flex; align-items: baseline; gap: 18px; padding: 18px 0; border-bottom: var(--rule-hair); }
.episode-n { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--red-ink); }
.episode-title { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.episode-state { margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* -- cite ------------------------------------------------------ */

.cite { border: var(--rule-mid); padding: 22px 24px; }
.cite-string { font-family: var(--mono); font-size: 13.5px; line-height: 1.8; word-break: break-word; }

/* -- consent --------------------------------------------------- */

.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--ink); color: var(--paper);
  border-top: var(--rule-heavy);
}
.consent-inner {
  width: 100%; max-width: var(--shell); margin: 0 auto; padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.consent-copy { font-size: 14.5px; line-height: 1.55; max-width: 68ch; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-btn {
  min-height: var(--control-h); padding: 0 18px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; border: 2px solid var(--paper);
  background: transparent; color: var(--paper);
}
.consent-btn:hover { background: var(--paper); color: var(--ink); }
.consent-accept { background: var(--paper); color: var(--ink); }
.consent-accept:hover { background: var(--red); border-color: var(--red); color: var(--paper); }
.consent-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--red); }

@media (max-width: 767px) {
  .consent-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 20px; }
  .consent-actions { justify-content: stretch; }
  .consent-btn { flex: 1; }
}

/* -- responsive ------------------------------------------------ */

@media (max-width: 1023px) {
  .head-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .figure-cell { border-right: none; border-bottom: var(--rule-heavy); }
  .figure-cell:last-child { border-bottom: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3n) { border-right: var(--rule-hair); }
  .fact:nth-child(2n) { border-right: none; }
}

@media (max-width: 767px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }

  /* Wordmark: icon only once the header gets tight. Placeholder mark,
     swap for the real logo per SPEC.md's brand assets when it exists. */
  .wordmark-text { display: none; }
  .wordmark-icon { display: block; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { border-right: none !important; }

  /* Claims become stacked cards — same markup, CSS only. */
  .claims, .claims tbody, .claims tr, .claims td { display: block; width: 100%; }
  .claims thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .claims tbody tr { border: var(--rule-mid); padding: 18px; margin-bottom: 14px; }
  .claims td { padding: 0 0 12px; }
  .claims td:last-child { padding-bottom: 0; }
  .col-verdict, .col-source { width: auto; }
  .src-list { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; padding-top: 12px; border-top: var(--rule-hair); }

  .contras, .contras tbody, .contras tr, .contras td { display: block; width: 100%; }
  .contras thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .contras tbody tr { border: var(--rule-mid); padding: 18px; margin-bottom: 14px; }
  .contras td { padding: 0 0 14px; border-bottom: none; }
  .contras tr:last-child td { border-bottom: none; }

  .episode { flex-wrap: wrap; gap: 8px 14px; }
  .episode-state { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
