/* ==========================================================================
   Microbiota pediátrica · línea temporal interactiva
   Tokens de diseño, componentes y responsive
   ========================================================================== */

:root {
  /* Paleta base (papel cálido + tinta) */
  --bg: #fbf8f3;
  --bg-alt: #f3ede4;
  --surface: #ffffff;
  --ink: #1f2a33;
  --ink-soft: #4a5660;
  --ink-mute: #76838d;
  --line: #e4dcd0;
  --accent: #2a9d8f;
  --accent-ink: #19665d;
  --focus: #1b6ef3;

  /* Períodos */
  --p-gestacion: #7c6ac8;
  --p-nacimiento: #e8735a;
  --p-0-6: #2a9d8f;
  --p-6-24: #e0a12f;
  --p-24-36: #5b9e4b;

  /* Factores */
  --f-inmune: #3d7bd9;
  --f-lactancia: #2a9d8f;
  --f-dieta: #d98f1f;
  --f-antibioticos: #d9534f;
  --f-entorno: #6aa84f;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(31, 42, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(31, 42, 51, 0.18);
  --wrap: 1120px;
  --gutter: 16px;
  --font-head: "Nunito", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 2 * var(--gutter)); }

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

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #0f1a22; box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.iconbtn {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: border-color .15s;
}
.iconbtn:hover { border-color: var(--ink); }

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 9vw, 120px) 0 clamp(40px, 7vw, 96px);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 106, 200, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(42, 157, 143, .18), transparent 60%),
    var(--bg);
}
.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero__kicker { font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin-bottom: 1em; }
.hero__accent { color: var(--p-gestacion); }
.hero__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.hero__author { color: var(--ink-mute); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.hero__art { position: absolute; right: 0; top: 0; bottom: 0; width: 32%; opacity: .9; pointer-events: none; }
.hero__title, .hero__lead { max-width: 640px; }
.hero__art svg { width: 100%; height: 100%; }
@media (max-width: 860px) { .hero__art { display: none; } }

/* --------------------------------------------------------------------------
   Navegación fija por períodos + filtros
   -------------------------------------------------------------------------- */
.periodnav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 243, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
}
.periodnav__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 0; }
.periodnav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.periodnav__list::-webkit-scrollbar { display: none; }
.periodnav__link {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .92rem;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.periodnav__link::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink)); flex: none; }
.periodnav__link:hover, .periodnav__link.is-active { background: var(--surface); color: var(--ink); border-color: var(--c, var(--line)); }
.periodnav__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.periodnav__filters-label { font-size: .8rem; color: var(--ink-mute); margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--surface); font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--ink-soft); transition: all .15s;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chip[aria-pressed="true"]::before { background: #fff; }
.chip--reset::before { display: none; }

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--tight { padding: 32px 0 8px; }
.section--alt { background: var(--bg-alt); }
.section__title { max-width: 30ch; }
.section__intro { color: var(--ink-soft); max-width: 70ch; margin-bottom: 2em; }

.howto { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.howto li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .95rem; display: flex; gap: 12px; align-items: flex-start; }
.howto__icon { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--bg-alt); display: grid; place-items: center; font-size: 1rem; }

/* --------------------------------------------------------------------------
   Línea temporal horizontal
   -------------------------------------------------------------------------- */
.tl { position: relative; margin-top: 8px; }
.tl__scroller { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), (100vw - var(--wrap)) / 2); padding: 12px 0 28px; scrollbar-width: thin; }
.tl__track { display: flex; gap: 0; min-width: max-content; padding-inline: max(var(--gutter), (100vw - var(--wrap)) / 2); }
.tl__period { scroll-snap-align: start; width: min(88vw, 520px); max-width: 92vw; flex: none; position: relative; padding-right: 24px; }
.tl__period-head { display: inline-flex; align-items: baseline; gap: 10px; margin-bottom: 4px; position: relative; z-index: 1; background: color-mix(in srgb, var(--bg) 85%, transparent); border-radius: 999px; padding: 4px 12px 4px 4px; }
.tl__period-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 20%, transparent); }
.tl__period-name { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; }
.tl__period-range { color: var(--ink-mute); font-size: .9rem; }
.tl__line { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff)); margin: 112px 0 104px; }
.tl__period:not(:last-child) .tl__line::after { content: ""; position: absolute; right: -24px; top: 0; width: 24px; height: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c-next, var(--c))); }
.tl__nodes { position: absolute; inset: 0; }
.tl__node {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--c); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; padding: 6px; transition: transform .2s ease, box-shadow .2s ease, opacity .2s;
  box-shadow: 0 6px 16px rgba(31, 42, 51, .12);
}
.tl__node img, .tl__node svg { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.tl__node:hover, .tl__node:focus-visible { transform: translate(-50%, -50%) scale(1.12); box-shadow: 0 12px 28px rgba(31, 42, 51, .2); z-index: 2; }
.tl__node-label {
  position: absolute; left: 50%; transform: translateX(-50%); width: 150px; text-align: center;
  font-size: .74rem; line-height: 1.25; color: var(--ink-soft); font-weight: 600; pointer-events: none;
}
.tl__node-label--up { bottom: calc(50% + 34px); }
.tl__node-label--down { top: calc(50% + 34px); }
.tl__node-label--up::after, .tl__node-label--down::before { content: ""; display: block; width: 2px; height: 10px; margin: 4px auto 0; background: var(--line); }
.tl__node-label--down::before { margin: 0 auto 4px; }
.tl__node-time { display: block; color: var(--ink-mute); font-weight: 500; font-size: .72rem; }
.tl__controls { display: flex; justify-content: flex-end; gap: 8px; width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; margin-top: -8px; }
.is-dimmed { opacity: .22; filter: grayscale(.6); }

/* --------------------------------------------------------------------------
   Tarjetas de hito por período
   -------------------------------------------------------------------------- */
.period { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.period__head { display: grid; grid-template-columns: auto 1fr; gap: 16px 20px; align-items: start; margin-bottom: 28px; }
.period__num { width: 56px; height: 56px; border-radius: 16px; background: var(--c); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; }
.period__range { color: var(--ink-mute); font-weight: 600; margin-bottom: .4em; }
.period__summary { color: var(--ink-soft); max-width: 70ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s; cursor: pointer; text-align: left; position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--c); }
.card:hover, .card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__fig { height: 120px; flex: none; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 8%, #fff); border-radius: var(--radius-sm); padding: 10px; }
.card__fig img, .card__fig svg { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.card__time { font-size: .78rem; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .06em; }
.card__title { font-size: 1.08rem; margin: 0; }
.card__text { color: var(--ink-soft); font-size: .93rem; margin: 0; flex: 1; }
.card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card__more { font-weight: 600; color: var(--accent-ink); font-size: .9rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--c, var(--ink-mute)); letter-spacing: .02em; }

/* --------------------------------------------------------------------------
   Ventana emergente (modal)
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 28, 35, .55); backdrop-filter: blur(3px); }
.modal__card {
  position: relative; width: min(880px, 100%); max-height: min(92vh, 980px); overflow: auto; background: var(--surface);
  border-radius: 22px; box-shadow: var(--shadow-lg); animation: pop .25s ease; border-top: 8px solid var(--c, var(--accent));
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-alt); font-size: 1.5rem; cursor: pointer; z-index: 2; }
.modal__body { padding: 20px clamp(20px, 4vw, 40px) 8px; }
.modal__nav { display: flex; justify-content: space-between; gap: 10px; padding: 12px clamp(20px, 4vw, 40px) 24px; flex-wrap: wrap; }
.hito { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .hito { grid-template-columns: 260px 1fr; } }
.hito__fig { background: color-mix(in srgb, var(--c) 8%, #fff); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; justify-content: center; align-self: start; }
.hito__fig img { width: 100%; max-height: 240px; object-fit: contain; }
.hito__caption { font-size: .8rem; color: var(--ink-mute); text-align: center; margin: 10px 0 0; }
.hito__time { color: var(--c); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .2em; }
.hito__title { font-size: 1.6rem; margin-bottom: .3em; }
.hito__block { margin-top: 1.2em; }
.hito__block h4 { margin-bottom: .4em; }
.ce { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ce li { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .95rem; }
.ce__arrow { font-size: 1.4rem; color: var(--c); font-weight: 800; }
.ce__why { grid-column: 1 / -1; font-size: .88rem; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }
.ce__cause, .ce__effect { font-weight: 600; }
@media (max-width: 560px) { .ce li { grid-template-columns: 1fr; } .ce__arrow { transform: rotate(90deg); justify-self: center; } }
.hito__refs { font-size: .88rem; color: var(--ink-soft); }
.hito__refs li { margin-bottom: .5em; }

/* --------------------------------------------------------------------------
   Citas y glosario (tooltips)
   -------------------------------------------------------------------------- */
.cite { font-size: .72em; vertical-align: super; line-height: 0; text-decoration: none; font-weight: 700; color: var(--accent-ink); margin-left: 1px; }
.cite:hover { text-decoration: underline; }
.term { border-bottom: 2px dotted var(--accent); cursor: help; text-decoration: none; color: inherit; }
.tip {
  position: fixed; z-index: 90; max-width: 320px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px;
  font-size: .88rem; line-height: 1.45; box-shadow: var(--shadow-lg); pointer-events: none;
}
.tip strong { color: #ffd98a; display: block; margin-bottom: 2px; }
.tip[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Comparadores con pestañas
   -------------------------------------------------------------------------- */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.compare { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.compare__head h3 { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.tabs { display: flex; gap: 4px; padding: 12px 20px 0; }
.tab { flex: 1; padding: 10px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; font-weight: 700; cursor: pointer; color: var(--ink-mute); border-radius: 8px 8px 0 0; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.panels { display: grid; gap: 0; }
.compare.is-both .tabs { display: none; }
.compare.is-both .panels { grid-template-columns: 1fr 1fr; }
.compare.is-both .panel { display: block !important; border-right: 1px solid var(--line); }
.compare.is-both .panel:last-child { border-right: 0; }
.panel { padding: 18px 20px 22px; display: none; }
.panel[data-active] { display: block; }
.panel__fig { height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; background: color-mix(in srgb, var(--c) 8%, #fff); border-radius: var(--radius-sm); padding: 10px; }
.panel__fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.panel h4 { color: var(--c); margin-bottom: .5em; }
.panel ul { padding-left: 1.1em; margin: 0; font-size: .93rem; }
.panel li { margin-bottom: .5em; }
.compare__synth { padding: 14px 20px 18px; background: var(--bg); border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 640px) { .compare.is-both .panels { grid-template-columns: 1fr; } .compare.is-both .panel { border-right: 0; border-bottom: 1px solid var(--line); } }

/* --------------------------------------------------------------------------
   Acordeón de mecanismos
   -------------------------------------------------------------------------- */
.accordion { display: grid; gap: 12px; }
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acc summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 16px 20px; }
.acc summary::-webkit-details-marker { display: none; }
.acc__sigla { width: 64px; height: 64px; border-radius: 16px; background: var(--c); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; text-align: center; line-height: 1; padding: 4px; }
.acc__name { margin: 0; font-size: 1.15rem; }
.acc__def { margin: 2px 0 0; color: var(--ink-soft); font-size: .92rem; }
.acc__chev { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; transition: transform .2s; font-size: 1.1rem; }
.acc[open] .acc__chev { transform: rotate(180deg); }
.acc__body { padding: 0 20px 22px; display: grid; gap: 18px; }
@media (min-width: 760px) { .acc__body { grid-template-columns: 300px 1fr; } }
.acc__fig { background: color-mix(in srgb, var(--c) 8%, #fff); border-radius: var(--radius); padding: 14px; align-self: start; }
.acc__fig img { width: 100%; }
.acc__text p { font-size: .96rem; }

/* --------------------------------------------------------------------------
   Gráfico interactivo (evolución)
   -------------------------------------------------------------------------- */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chart__svg { width: 100%; height: auto; overflow: visible; }
.chart__svg text { font-family: var(--font-body); fill: var(--ink-soft); }
.chart__series { transition: opacity .2s; }
.chart__series.is-off { opacity: .08; }
.chart__pt { cursor: pointer; transition: r .15s; }
.chart__pt:hover, .chart__pt:focus { r: 9; }
.chart__note { font-size: .85rem; color: var(--ink-mute); margin-top: 12px; }

/* --------------------------------------------------------------------------
   Factores de alteración
   -------------------------------------------------------------------------- */
.factores { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.factor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; border-left: 6px solid var(--c, var(--ink-mute)); }
.factor h3 { font-size: 1.05rem; }
.factor dl { margin: 0; font-size: .93rem; }
.factor dt { font-weight: 700; color: var(--ink-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .8em; }
.factor dd { margin: .2em 0 0; }

/* --------------------------------------------------------------------------
   Quiz
   -------------------------------------------------------------------------- */
.quiz { display: grid; gap: 16px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.q__n { font-weight: 800; color: var(--accent-ink); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.q__text { font-weight: 600; font-size: 1.05rem; margin: .3em 0 .8em; }
.q__opts { display: grid; gap: 8px; }
.q__opt { text-align: left; padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s; }
.q__opt:hover { border-color: var(--ink); }
.q__opt.is-correct { border-color: var(--f-entorno); background: color-mix(in srgb, var(--f-entorno) 12%, #fff); }
.q__opt.is-wrong { border-color: var(--f-antibioticos); background: color-mix(in srgb, var(--f-antibioticos) 10%, #fff); }
.q__opt[disabled] { cursor: default; }
.q__fb { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-alt); font-size: .93rem; display: none; }
.q__fb.is-show { display: block; }
.q__fb a { font-weight: 600; }
.quiz__score { text-align: center; font-weight: 700; font-size: 1.1rem; padding: 16px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   Referencias
   -------------------------------------------------------------------------- */
.refs { padding-left: 2.2em; font-size: .92rem; color: var(--ink-soft); }
.refs li { margin-bottom: .9em; scroll-margin-top: 90px; }
.refs li:target { background: #fff6d6; outline: 2px solid #ffd98a; border-radius: 6px; padding: 4px 8px; }
.refs a { word-break: break-all; }

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */
.footer { background: var(--ink); color: #d8dee3; padding: 32px 0; font-size: .9rem; }
.footer a { color: #ffd98a; }
.footer__inner p { margin: 0 0 .6em; }

/* --------------------------------------------------------------------------
   Impresión
   -------------------------------------------------------------------------- */
@media print {
  .periodnav, .hero__cta, .tl__controls, .modal, .tip, .skip-link, .quiz, #quiz { display: none !important; }
  .acc { break-inside: avoid; }
  .acc:not([open]) .acc__body { display: grid; }
  .card { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}
