/* Estilos comunes de quedicelaciencia (#15): portada, página de cada pregunta y páginas
   informativas. Blanco y sencillo; el color solo marca las respuestas (puntos y barras). */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface-2: #f9f9f9;
  --text: #0d0d0d;
  --muted: #5d5d5d;
  --subtle: #6e6e6e;
  --line: #e3e3e3;
  --line-soft: #efefef;
  --accent: #10a37f;
  --accent-ink: #0b6e55;
  --accent-soft: #e8f6f1;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --yes: #10a37f;
  --no: #e5484d;
  --partial: #f5a524;
  --no_effect: #6e7f99;
  --inconclusive: #a1a1a1;
  --not_addressed: #d4d4d4;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --surface: #2a2a2a;
    --surface-2: #222222;
    --text: #ececec;
    --muted: #b4b4b4;
    --subtle: #a0a0a0;
    --line: #363636;
    --line-soft: #2c2c2c;
    --accent-ink: #3dd6a5;
    --accent-soft: #123a30;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --not_addressed: #555555;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
a:hover { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---- cabecera y pie */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 24px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.nav a {
  min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px;
  border-radius: 999px; text-decoration: none; color: var(--muted); white-space: nowrap;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.outline { border: 1px solid var(--line); color: var(--text); }
.site-footer {
  margin-top: auto; padding: 20px 20px 24px; text-align: center; font-size: 12px; color: var(--subtle);
}
.site-footer a { color: var(--subtle); }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---- botones */

.btn {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; color: var(--text);
}
.btn:hover { background: var(--surface); color: var(--text); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: progress; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.link-btn {
  padding: 0; border: 0; background: none; color: var(--subtle); font-size: 13px;
  text-decoration: underline; cursor: pointer;
}

/* ---- puntos, barras y píldoras */

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.vbar { display: flex; gap: 3px; height: 6px; }
.vbar span { display: block; height: 100%; border-radius: 3px; min-width: 3px; }
.vlegend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.vlegend span { display: inline-flex; align-items: center; gap: 6px; }
.certainty {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  background: var(--surface); color: var(--muted); font-size: 13px; white-space: nowrap;
}
.certainty.high { background: var(--accent-soft); color: var(--accent-ink); }
.certainty i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); display: inline-block; }
.certainty i.on { background: currentColor; }
.cite {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 10px; background: var(--surface); color: var(--text);
  font-size: 12px; line-height: 1; text-decoration: none; vertical-align: 2px;
}
.cite:hover { background: var(--line); color: var(--text); }
.chip {
  min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px;
  border-radius: 999px; border: 0; background: var(--surface); font-size: 13px; cursor: pointer; color: var(--text);
}
.chip.active { background: var(--text); color: var(--bg); }
.chip b { font-weight: 500; color: inherit; opacity: 0.7; }

/* ---- veredicto */

.verdict { display: flex; flex-direction: column; gap: 16px; }
.kicker { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); }
.verdict .kicker { margin-bottom: -12px; }
.verdict h2 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.vhead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.plain { margin: 0; font-size: 17px; line-height: 1.75; }
.health { margin: 0; font-size: 14px; color: var(--muted); }
ol.refs {
  list-style: none; margin: 0; padding: 0; counter-reset: ref;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
}
ol.refs li {
  counter-increment: ref; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
  border: 1px solid var(--line-soft); border-radius: 14px; font-size: 13px; line-height: 1.4;
}
ol.refs li::before { content: counter(ref); font-size: 12px; color: var(--subtle); }
ol.refs a { text-decoration: none; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; color: var(--muted); }
.actions details { margin-left: 8px; font-size: 13px; }
.actions summary { cursor: pointer; color: var(--muted); list-style: none; padding: 6px 4px; }
.actions summary::-webkit-details-marker { display: none; }
.how { margin-top: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.how p { margin: 0 0 8px; }
.how ul { margin: 0; padding-left: 18px; }

/* ---- secciones plegables (revisiones, correcciones) */

.fold { border-bottom: 1px solid var(--line); }
.fold > summary {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; list-style: none; font-size: 15px;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .count { display: inline-flex; align-items: center; gap: 10px; color: var(--subtle); }
.fold > summary .count::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s;
}
.fold[open] > summary .count::after { transform: rotate(225deg) translate(-2px, -2px); }
.fold-body { padding: 0 0 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.fold-body ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.fold-body li { display: flex; gap: 8px; align-items: baseline; line-height: 1.45; }
.fold-body li .dot { transform: translateY(-1px); }
.fold-body a { text-decoration: none; }
.fold-body .counts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }

/* ---- lista de papers */

.paper { display: flex; flex-direction: column; gap: 5px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.paper .p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--muted); }
.paper .p-title { font-size: 15px; font-weight: 500; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.src { color: var(--subtle); font-size: 13px; overflow-wrap: anywhere; }
.src a.oa, a.oa { color: var(--accent-ink); font-weight: 500; text-decoration: none; }
.excerpt { margin: 2px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.excerpt a { color: var(--subtle); }
.paper details summary { cursor: pointer; font-size: 13px; color: var(--subtle); }
.paper details p { white-space: pre-line; font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.p-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; }
.unc { border-bottom: 1px dashed currentColor; }
.report-form {
  display: grid; gap: 10px; margin-top: 8px; padding: 14px; border-radius: 16px; background: var(--surface-2);
  font-size: 13px; max-width: 420px;
}
.report-form label { display: grid; gap: 4px; color: var(--muted); }
.report-form select, .report-form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 14px;
}
.report-form .row { display: flex; gap: 6px; justify-content: flex-end; }

.notice { padding: 12px 16px; border-radius: 14px; background: var(--surface); font-size: 14px; }
.notice.error { background: color-mix(in srgb, var(--no) 12%, var(--bg)); }
