/* Voteye — manual de usuario.
 *
 * Same Editorial 2026 vocabulary as public/landing/index.html (paper/stage
 * palette, Fraunces display, IBM Plex Sans body) so the manual reads as part
 * of the product rather than as documentation bolted on beside it.
 *
 * Phone-first: most readers open the participante and consulta pages on the
 * device they are about to vote with.
 */

:root {
  --paper: #FBFBF8;
  --paper-soft: #F4F2EA;
  --paper-sunk: #EDEAE3;
  --ink: #0B0D10;
  --ink-soft: #16181C;
  --muted: rgba(22, 24, 28, 0.62);
  --faint: rgba(22, 24, 28, 0.38);
  --rule: rgba(11, 13, 16, 0.10);
  --rule-strong: rgba(11, 13, 16, 0.22);
  --civic: #3B6934;
  --civic-soft: #B5D49D;
  --civic-wash: #EDF4E6;
  --civic-ink: #1F3D18;
  --stage: #0B0D10;
  --stage-cream: #FBFAF5;
  --stage-rule: rgba(251, 250, 245, 0.12);
  --stage-muted: rgba(251, 250, 245, 0.55);
  --aviso: #7A2E2E;
  --aviso-wash: #F7EDEC;
  --display: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* The manual must never scroll sideways on a phone — the failure mode the
     admin shell itself hit at 390px (ISS-28). */
  overflow-x: hidden;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 32px); }
.wrap-ancho { max-width: 1080px; }

/* ─── Primitives ──────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--civic);
  display: block;
}

.numeral {
  font-family: var(--display);
  font-weight: 300;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ─── Cabecera ────────────────────────────────────────────────────────────── */

.top {
  background: var(--stage);
  color: var(--stage-cream);
  padding: 20px 0;
  border-bottom: 1px solid var(--stage-rule);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.top a { color: var(--stage-cream); text-decoration: none; }
.top .marca { font-family: var(--display); font-size: 1.2rem; }
.top nav { display: flex; gap: 18px; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.top nav a { color: var(--stage-muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--civic-soft); }

.hero {
  background: var(--stage);
  color: var(--stage-cream);
  padding: clamp(48px, 9vh, 88px) 0 clamp(40px, 8vh, 72px);
}
.hero .eyebrow { color: var(--civic-soft); margin-bottom: 14px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.hero p {
  margin-top: 20px;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.6;
  color: var(--stage-muted);
  max-width: 54ch;
}

/* ─── Secciones ───────────────────────────────────────────────────────────── */

section { padding: clamp(40px, 7vh, 72px) 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }

h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
/* A sub-heading needs air above it to read as a new step rather than as the
   next line of the paragraph before it — but not when it opens a card. */
p + h3, ul + h3, ol + h3, figure + h3, .nota + h3, .aviso + h3 { margin-top: 32px; }
p, li { font-size: 1rem; line-height: 1.65; color: var(--ink-soft); }
p + p { margin-top: 14px; }
section > .wrap > p { color: var(--muted); max-width: 62ch; }
strong { font-weight: 600; }
a { color: var(--civic); }

ul, ol { margin: 16px 0 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }

/* ─── Pasos numerados ─────────────────────────────────────────────────────── */

.paso {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(24px, 4vh, 40px) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.paso .numeral { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--civic); }
.paso p { color: var(--muted); max-width: 60ch; }
@media (max-width: 560px) {
  .paso { grid-template-columns: 1fr; gap: 8px; }
}

/* ─── Figuras ─────────────────────────────────────────────────────────────── */

.figura { margin: 20px 0 0; }
.figura img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule-strong);
  background: var(--paper-soft);
}
/* Phone captures are 390px wide; blown up to full column width they look
   like a bug rather than a phone. */
.figura.movil img { max-width: 320px; margin: 0 auto; }
.figura figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--faint);
  line-height: 1.5;
}

/* ─── Notas y avisos ──────────────────────────────────────────────────────── */

.nota, .aviso {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 3px solid var(--civic);
  background: var(--civic-wash);
}
.nota p, .aviso p { color: var(--ink-soft); }
.aviso { border-left-color: var(--aviso); background: var(--aviso-wash); }
.nota .etiqueta, .aviso .etiqueta {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--civic); display: block; margin-bottom: 8px;
}
.aviso .etiqueta { color: var(--aviso); }

/* ─── Tarjetas de rol ─────────────────────────────────────────────────────── */

.rol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.rol-card {
  display: block;
  padding: 26px 24px;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1), border-color 0.25s;
}
.rol-card:hover { transform: translateY(-3px); border-color: var(--civic-soft); }
.rol-card h3 { margin-bottom: 6px; }
.rol-card p { font-size: 0.92rem; color: var(--muted); }
.rol-card .quien { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--civic); display: block; margin-bottom: 10px; }

/* ─── Tablas ──────────────────────────────────────────────────────────────── */

.tabla-scroll { overflow-x: auto; margin-top: 20px; }
table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 0.94rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }

/* ─── Pie ─────────────────────────────────────────────────────────────────── */

.footer-nav { background: var(--stage); color: var(--stage-muted); padding: 40px 0; margin-top: 40px; }
.footer-nav a { color: var(--civic-soft); text-decoration: none; }
.footer-nav .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; }

/* ─── Impresión ───────────────────────────────────────────────────────────── */

@media print {
  .top, .footer-nav, .no-imprimir { display: none; }
  body { background: #fff; }
  .hero { background: #fff; color: #000; padding: 0 0 24px; }
  .hero p, .hero .eyebrow { color: #333; }
  /* Somebody will print the participante page for the back of the room; a
     figure split across a page break is useless there. */
  .paso, .figura { break-inside: avoid; page-break-inside: avoid; }
  .figura img { border-color: #999; }
  a { color: #000; text-decoration: underline; }
}
