/* Opeando · web pública. Misma identidad que la app: verde botella, menta y la hoja de respuestas del examen. */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0030-0039; }

:root {
  --paper: #f2f6f3; --sheet: #ffffff; --sheet-2: #f7faf8; --sheet-3: #e6eee9;
  --ink: #10291f; --ink-2: #44594f; --ink-3: #6c8077; --line: #d7e1db; --line-2: #bccbc2;
  --bottle: #0d3b2e; --bottle-2: #134d3c; --on-bottle: #e9f7f0; --on-bottle-2: #a9cdbd;
  --mint: #4be3a3; --mint-deep: #0b7a50; --mint-soft: #dcf6e9;
  --pen: #0f5a44; --pen-deep: #0a3f30;
  --marker: #f2b33d; --marker-soft: #fdf0d3; --marker-text: #7a5000;
  --bad: #b8323a;
  --form: #fbfdfb; --form-line: #9fd3bc; --form-ink: #2f7a5c; --bubble: #ffffff;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --text: "Atkinson", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px; --gut: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a1813; --sheet: #10221b; --sheet-2: #132a21; --sheet-3: #1a362b;
    --ink: #e4f1ea; --ink-2: #a3bbb0; --ink-3: #7c948a; --line: #23402f; --line-2: #31503f;
    --bottle: #072019; --bottle-2: #0d2e24; --on-bottle: #e4f1ea; --on-bottle-2: #8fb3a3;
    --mint: #5befb0; --mint-deep: #5befb0; --mint-soft: #133b2c;
    --pen: #6ff0b9; --pen-deep: #a6f5d2;
    --marker: #f2b33d; --marker-soft: #3a2c0f; --marker-text: #f5c66a;
    --bad: #ff8088;
    --form: #0f241c; --form-line: #2b6a50; --form-ink: #8fd9b8; --bubble: #0a1813;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a1813; --sheet: #10221b; --sheet-2: #132a21; --sheet-3: #1a362b;
  --ink: #e4f1ea; --ink-2: #a3bbb0; --ink-3: #7c948a; --line: #23402f; --line-2: #31503f;
  --bottle: #072019; --bottle-2: #0d2e24; --on-bottle: #e4f1ea; --on-bottle-2: #8fb3a3;
  --mint: #5befb0; --mint-deep: #5befb0; --mint-soft: #133b2c;
  --pen: #6ff0b9; --pen-deep: #a6f5d2;
  --marker: #f2b33d; --marker-soft: #3a2c0f; --marker-text: #f5c66a;
  --bad: #ff8088;
  --form: #0f241c; --form-line: #2b6a50; --form-ink: #8fd9b8; --bubble: #0a1813;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { max-width: 100%; }
a { color: var(--pen); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.9rem); line-height: 1.02; font-weight: 820; font-stretch: 112%; letter-spacing: -.025em; margin: 0 0 1.1rem; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.15rem); line-height: 1.1; font-weight: 780; font-stretch: 108%; letter-spacing: -.018em; margin: 0 0 .9rem; }
h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 720; font-stretch: 102%; margin: 1.6rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin: .25rem 0; }
strong { font-weight: 700; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.prose { max-width: 68ch; }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sheet); padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-stretch: 112%; font-weight: 800; }

/* Cabecera */
.top { background: var(--bottle); color: var(--on-bottle); position: sticky; top: 0; z-index: 30; }
.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--on-bottle); text-decoration: none; font-family: var(--display); font-weight: 820; font-stretch: 110%; font-size: 1.32rem; letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.nav a { color: var(--on-bottle-2); text-decoration: none; padding: .5rem .7rem; border-radius: 8px; font-weight: 700; font-size: .96rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--on-bottle); background: var(--bottle-2); }
.nav .btn { margin-left: .4rem; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--bottle-2); color: var(--on-bottle); border-radius: 8px; padding: .45rem .75rem; font: 700 .95rem var(--text); cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--bottle); flex-direction: column; align-items: stretch; padding: .5rem var(--gut) 1rem; border-top: 1px solid var(--bottle-2); }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .6rem; }
  .nav .btn { margin: .5rem 0 0; text-align: center; }
}

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.25rem; border-radius: 999px; font: 700 1rem/1.2 var(--text); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-mint { background: var(--mint); color: #062018; }
.btn-mint:hover { background: #6eeab6; text-decoration: none; }
.btn-line { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink-2); }
.top .btn { min-height: 40px; padding: .45rem 1rem; }
.top .btn-mint { color: #062018; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.6rem; }

/* Portada: titular + hoja de respuestas */
.hero { background: var(--bottle); color: var(--on-bottle); padding: 2.2rem 0 3.4rem; overflow: hidden; }
.hero h1 { color: var(--on-bottle); }
.hero .lead { color: var(--on-bottle-2); }
.hero .btn-line { color: var(--on-bottle); border-color: #2c6a55; }
.hero .btn-line:hover { border-color: var(--on-bottle-2); }
.hero-grid { display: grid; gap: 2.4rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 3.5rem; } .hero { padding: 4rem 0 4.6rem; } }
.hero-note { margin-top: 1.1rem; font-size: .95rem; color: var(--on-bottle-2); }
.hero-note a { color: var(--on-bottle); }

.sheet { background: var(--form); color: var(--form-ink); border-radius: 6px; padding: 1.1rem 1.1rem 1rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); transform: rotate(1.4deg); max-width: 430px; justify-self: center; width: 100%; position: relative; }
.sheet::before { content: ""; position: absolute; inset: 0; border-radius: 6px; background: repeating-linear-gradient(90deg, transparent 0 22px, color-mix(in srgb, var(--form-line) 18%, transparent) 22px 23px); pointer-events: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--form-line); padding-bottom: .5rem; margin-bottom: .55rem; font: 700 .82rem/1.2 var(--display); font-stretch: 100%; letter-spacing: .02em; }
.sheet-head b { font-size: 1.05rem; font-weight: 800; font-stretch: 112%; }
.sheet li:nth-child(1) { --i: 0; } .sheet li:nth-child(2) { --i: 1; } .sheet li:nth-child(3) { --i: 2; } .sheet li:nth-child(4) { --i: 3; } .sheet li:nth-child(5) { --i: 4; } .sheet li:nth-child(6) { --i: 5; } .sheet li:nth-child(7) { --i: 6; } .sheet li:nth-child(8) { --i: 7; } .sheet li:nth-child(9) { --i: 8; } .sheet li:nth-child(10) { --i: 9; } 
.mt { margin-top: 1.2rem; }
.sheet ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .32rem; }
.sheet li { display: grid; grid-template-columns: 2.2rem repeat(4, 1fr) 4.6rem; align-items: center; gap: .3rem; margin: 0; font: 700 .86rem/1 var(--display); font-variant-numeric: tabular-nums; }
.sheet li > span:first-child { text-align: right; padding-right: .35rem; }
.bub { width: 26px; height: 26px; border-radius: 50%; border: 1.6px solid var(--form-line); display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: var(--form-ink); background: var(--bubble); justify-self: center; position: relative; }
.bub.on::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--bottle); animation: fill .28s ease-out both; animation-delay: calc(var(--i) * 140ms + 350ms); }
:root[data-theme="dark"] .bub.on::after { background: var(--mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bub.on::after { background: var(--mint); } }
.bub.doubt { border-color: var(--marker); }
.bub.doubt::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px dashed var(--marker); animation: fill .28s ease-out both; animation-delay: calc(var(--i) * 140ms + 350ms); }
.tag { font: 700 .72rem/1 var(--text); padding: .3rem .4rem; border-radius: 5px; text-align: center; animation: fill .3s ease-out both; animation-delay: calc(var(--i) * 140ms + 500ms); }
.tag.ok { background: var(--mint-soft); color: var(--mint-deep); }
.tag.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.tag.rep { background: transparent; color: var(--form-ink); border: 1px dashed var(--form-line); }
.sheet-foot { display: flex; justify-content: space-between; gap: .6rem; margin-top: .7rem; padding-top: .55rem; border-top: 2px solid var(--form-line); font: 700 .82rem/1.3 var(--text); }
.sheet-foot .num { font-size: 1.5rem; color: var(--ink); line-height: 1; }
@keyframes fill { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bub.on::after, .bub.doubt::after, .tag { animation: none; } .sheet { transform: none; } }
.tag { white-space: nowrap; }
@media (max-width: 480px) { .sheet { transform: rotate(.7deg); padding: .9rem .8rem; } .sheet li { grid-template-columns: 1.5rem repeat(4, 1fr) 4.1rem; gap: .2rem; } .sheet .bub { width: 24px; height: 24px; } .tag { font-size: .68rem; padding: .28rem .25rem; } }

/* Bandas */
.band { padding: 3.4rem 0; }
.band + .band { border-top: 1px solid var(--line); }
.band-alt { background: var(--sheet); }
.band-head { max-width: 62ch; margin-bottom: 1.8rem; }
.band-head p { color: var(--ink-2); font-size: 1.08rem; }

/* Índice de categorías */
.cat-list { border-top: 2px solid var(--ink); }
.cat-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1.2rem; padding: 1rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: center; }
.cat-row:hover { background: var(--sheet-2); }
.cat-row:hover .cat-name { text-decoration: underline; text-decoration-thickness: 2px; }
.cat-name { font: 760 1.14rem/1.25 var(--display); font-stretch: 104%; }
.cat-meta { grid-column: 1; color: var(--ink-2); font-size: .94rem; }
.cat-state { grid-row: 1 / span 2; grid-column: 2; font-size: .86rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.st-on { background: var(--mint-soft); color: var(--mint-deep); }
.st-soon { background: var(--sheet-3); color: var(--ink-2); }
@media (min-width: 760px) { .cat-cols { columns: 2; column-gap: 2.6rem; } .cat-cols .cat-row { break-inside: avoid; } }
.cat-group { margin: 0 0 2.2rem; }
.cat-group h3 { margin: 0 0 .6rem; font-size: 1.05rem; color: var(--ink-2); font-weight: 700; }

/* Cifras del examen */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 2px solid var(--ink); }
.fact { padding: 1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--line); }
.fact .num { display: block; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem); line-height: 1; color: var(--ink); }
.fact span:last-child { display: block; margin-top: .4rem; color: var(--ink-2); font-size: .95rem; line-height: 1.35; }

/* Modos de estudio */
.modes { display: grid; gap: 0; border-top: 2px solid var(--ink); }
@media (min-width: 760px) { .modes { grid-template-columns: 1fr 1fr; column-gap: 2.6rem; } }
.mode { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.mode h3 { margin: 0 0 .3rem; }
.mode p { margin: 0; color: var(--ink-2); }

/* Pasos (proceso real en orden) */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; gap: 0 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.steps li::before { content: counter(s); font: 800 1.6rem/1 var(--display); font-stretch: 112%; color: var(--mint-deep); }
.steps h3 { margin: 0 0 .3rem; }
.steps p { margin: 0; color: var(--ink-2); }

/* Tablas */
.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
caption { text-align: left; color: var(--ink-2); font-size: .9rem; padding-bottom: .5rem; }
th, td { text-align: left; padding: .65rem .8rem .65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); font-family: var(--display); font-weight: 760; font-size: .95rem; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* Página interior */
.page-head { background: var(--bottle); color: var(--on-bottle); padding: 1.6rem 0 2.4rem; }
.page-head h1 { color: var(--on-bottle); font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); margin-bottom: .8rem; }
.page-head .lead { color: var(--on-bottle-2); }
.crumbs { font-size: .9rem; margin-bottom: 1rem; color: var(--on-bottle-2); }
.crumbs a { color: var(--on-bottle-2); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .3rem; opacity: .6; }
.updated { font-size: .92rem; color: var(--on-bottle-2); margin: 1rem 0 0; }
.layout { display: grid; gap: 2.4rem; padding-top: 2.6rem; padding-bottom: 3.4rem; }
@media (min-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; } }
.layout article h2 { margin-top: 2.8rem; }
.layout article > h2:first-child, .layout article > section:first-child > h2:first-child { margin-top: 0; }
.layout article .answer + section > h2:first-child { margin-top: 1.8rem; }
.aside-box { position: sticky; top: 88px; border: 2px solid var(--ink); border-radius: 10px; padding: 1.2rem; background: var(--sheet); }
.aside-box h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.aside-box p { color: var(--ink-2); font-size: .97rem; }
.aside-box .btn { width: 100%; }
.toc { margin-top: 1.4rem; font-size: .95rem; }
.toc h2 { font-size: 1rem; color: var(--ink-2); margin: 0 0 .3rem; }
.toc ol { padding-left: 1.2rem; margin: 0; }
.toc a { color: var(--ink-2); }
.toc li { margin: .3rem 0; }
.toc:empty { display: none; }
@media (max-width: 979px) { .aside-box { position: static; } .toc { display: none; } }
tbody th[colspan] { background: var(--sheet-3); font-family: var(--display); font-weight: 760; padding: .55rem .7rem; border-bottom: 1px solid var(--line-2); }
tbody tr:first-child th[colspan] { border-top: 0; }
.st { font-size: .86rem; font-weight: 700; white-space: nowrap; }
.st.on { color: var(--mint-deep); }
.st.soon { color: var(--ink-3); }

.answer { font-size: 1.1rem; border-left: 4px solid var(--mint); padding: .2rem 0 .2rem 1rem; margin: 0 0 1.4rem; max-width: 68ch; }
.note { background: var(--marker-soft); border-radius: 8px; padding: .9rem 1rem; margin: 0 0 1.2rem; max-width: 68ch; }
.note strong { color: var(--marker-text); }
.sources { font-size: .92rem; color: var(--ink-2); border-top: 1px solid var(--line); margin-top: 2.6rem; padding-top: 1rem; }
.sources ol { padding-left: 1.2rem; }
.sources a { word-break: break-word; }
.topics { columns: 1; padding-left: 1.6rem; }
@media (min-width: 760px) { .topics { columns: 2; column-gap: 2.4rem; } }
.topics li { break-inside: avoid; }
.part { font-size: .82rem; color: var(--ink-3); }

/* Preguntas frecuentes */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font: 720 1.1rem/1.35 var(--display); font-stretch: 102%; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: .85rem; font-size: 1.4rem; color: var(--mint-deep); }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 0 1.1rem; max-width: 68ch; color: var(--ink-2); }
.faq .a p:last-child { margin: 0; }

/* Test gratis */
.quiz { max-width: 720px; }
.q { border-top: 2px solid var(--ink); padding: 1.2rem 0 1.4rem; }
.q-n { font: 800 .95rem/1 var(--display); color: var(--mint-deep); margin-bottom: .5rem; display: block; }
.q fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.q legend { font: 720 1.15rem/1.4 var(--display); font-stretch: 100%; padding: 0; margin-bottom: .8rem; }
.opt { display: grid; grid-template-columns: 30px 1fr; gap: .7rem; align-items: center; padding: .55rem .6rem; border-radius: 8px; cursor: pointer; margin: .15rem 0; }
.opt:hover { background: var(--sheet-3); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .bub { width: 30px; height: 30px; font-size: .8rem; }
.opt input:focus-visible + .bub { outline: 3px solid var(--mint); outline-offset: 2px; }
.opt input:checked + .bub { background: var(--bottle); border-color: var(--bottle); color: #fff; }
.q.done .opt { cursor: default; }
.opt.right { background: var(--mint-soft); }
.opt.right .bub { background: var(--mint-deep); border-color: var(--mint-deep); color: #fff; }
.opt.wrong { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.opt.wrong .bub { border-color: var(--bad); color: var(--bad); }
.expl { margin: .8rem 0 0; padding: .8rem 1rem; background: var(--sheet); border-radius: 8px; border: 1px solid var(--line); }
.expl b { display: block; margin-bottom: .2rem; }
.score { border: 2px solid var(--ink); border-radius: 10px; padding: 1.4rem; background: var(--sheet); margin-top: 1rem; }
.score .num { font-size: 3rem; line-height: 1; }

/* Llamada final */
.cta { background: var(--bottle); color: var(--on-bottle); padding: 3.2rem 0; }
.cta h2 { color: var(--on-bottle); max-width: 24ch; }
.cta p { color: var(--on-bottle-2); max-width: 56ch; }
.cta .btn-line { color: var(--on-bottle); border-color: #2c6a55; }
.cta .btn-line:hover { border-color: var(--on-bottle-2); }

/* Pie */
.foot { background: var(--sheet); border-top: 1px solid var(--line); padding: 2.6rem 0 2rem; font-size: .94rem; color: var(--ink-2); }
.foot-grid { display: grid; gap: 1.8rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot h2 { font-size: 1rem; margin: 0 0 .6rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot a { color: var(--ink-2); }
.foot .brand { color: var(--ink); }
.disclaimer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .86rem; }
.theme-btn { background: none; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 999px; padding: .35rem .8rem; font: 700 .86rem var(--text); cursor: pointer; margin-top: .6rem; }

@media print { .top, .foot, .cta, .aside-box, .menu-btn { display: none !important; } body { background: #fff; color: #000; } .page-head { background: none; color: #000; } .page-head h1, .page-head .lead { color: #000; } }
