/* ==========================================================================
   Criterio IA — hoja de estilos (prototipo)
   Sistema de diseño: papel cálido + tinta azul-verdosa + un solo acento de señal.
   Tipografía: serif editorial para titulares, sans humanista para texto,
   mono solo para etiquetas de datos (fechas, artículos, códigos).
   Sin dependencias externas ni fuentes remotas (sin transferencias a terceros).
   ========================================================================== */

:root {
  --paper: #f5f2ea;
  --paper-2: #ece7da;
  --white: #ffffff;
  --ink: #12222b;
  --ink-soft: #33454f;
  --muted: #566771;
  --line: #d9d3c3;
  --line-strong: #b9b19b;
  --brand: #0e5a55;
  --brand-strong: #0a4541;
  --brand-tint: #dcebe8;
  --signal: #b8400c;
  --signal-tint: #fbe7da;
  --dark: #0d1f27;
  --dark-2: #16303b;
  --ok: #1d6b3a;
  --focus: #b8400c;

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Charis SIL", Georgia, serif;
  --font-sans: "Segoe UI", "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Liberation Mono", Menlo, Consolas, monospace;

  --radius: 6px;
  --container: 1140px;
  --gap: clamp(1rem, 2vw, 1.75rem);
  --section-y: clamp(3.5rem, 7vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--brand); color: var(--white); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; color: var(--ink); margin: 0 0 .6em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.7rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.65rem, 1.1rem + 1.8vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); }
h4 { font-size: 1.05rem; font-family: var(--font-sans); letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { font-weight: 650; }
small, .small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--white { background: var(--white); }
.section--tint { background: var(--paper-2); }
.section--dark { background: var(--dark); color: #e7eef0; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #ffffff; }
.section--dark a { color: #9be0d6; }
.section--dark .eyebrow { color: #9be0d6; }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }

.eyebrow { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); margin: 0 0 .9rem; font-weight: 600; }
.lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.32rem); line-height: 1.55; color: var(--ink-soft); max-width: 62ch; }
.section--dark .lead { color: #c9d6da; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: var(--gap); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Enlace de salto y banner de prototipo */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .7rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
.proto-banner { background: var(--signal); color: #fff; font-size: .82rem; padding: .45rem 1rem; text-align: center; line-height: 1.35; }
.proto-banner a { color: #fff; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(245,242,234,.97); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--font-serif); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span small { display: block; font-family: var(--font-sans); font-weight: 500; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: -.15rem; }
.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-list li { margin: 0; }
.nav-list a { display: block; padding: .55rem .75rem; color: var(--ink-soft); text-decoration: none; font-size: .96rem; border-radius: var(--radius); }
.nav-list a:hover { background: var(--paper-2); color: var(--ink); }
.nav-list a[aria-current="page"] { color: var(--brand); font-weight: 650; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav-list a.btn-primary { background: var(--brand); color: #fff; padding: .6rem 1rem; margin-left: .5rem; }
.nav-list a.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.nav-list a.btn-primary[aria-current="page"] { box-shadow: none; border-radius: var(--radius); }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .55rem .8rem; font: inherit; color: var(--ink); cursor: pointer; min-height: 44px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem; }
  .js .nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav-list a { padding: .8rem .5rem; }
  .nav-list a[aria-current="page"] { box-shadow: none; background: var(--brand-tint); }
  .nav-list .btn { margin: .5rem 0 0; text-align: center; }
  .no-js .nav-list { flex-wrap: wrap; }
}

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.35rem; border-radius: var(--radius); font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; border: 2px solid transparent; cursor: pointer; min-height: 46px; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-strong); }
.btn-light { background: #fff; color: var(--dark); }
.btn-light:hover { background: var(--brand-tint); color: var(--dark); }
.btn-outline-light { background: transparent; color: #fff; border-color: #6f8a93; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.link-arrow { font-weight: 650; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Hero */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero-note { font-size: .9rem; color: var(--muted); margin-top: 1.25rem; max-width: 56ch; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero { overflow-x: clip; }

/* Hoja de evidencias (ilustración en CSS) */
.sheet { background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 1px 0 var(--line), 0 18px 40px -22px rgba(18,34,43,.35); transform: rotate(.6deg); overflow: hidden; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.sheet-head strong { font-family: var(--font-serif); font-size: 1.02rem; }
.sheet-head span { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.sheet table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.sheet th { text-align: left; font-family: var(--font-mono); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .55rem 1.1rem; border-bottom: 1px solid var(--line); }
.sheet td { padding: .65rem 1.1rem; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
.sheet tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-family: var(--font-mono); font-size: .68rem; padding: .12rem .45rem; border-radius: 3px; white-space: nowrap; font-weight: 600; }
.tag-ok { background: #dff0e5; color: #14502b; }
.tag-mid { background: var(--signal-tint); color: #7a2a06; }
.tag-stop { background: #f3d9d6; color: #7a1d14; }
.sheet-foot { padding: .7rem 1.1rem; font-size: .72rem; color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); font-family: var(--font-mono); }

/* Dos columnas */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split--wide-left { grid-template-columns: 1.2fr .8fr; }
.split--wide-right { grid-template-columns: .8fr 1.2fr; }
@media (max-width: 860px) { .split, .split--wide-left, .split--wide-right { grid-template-columns: 1fr; } }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.section-head p:last-child { margin-bottom: 0; }

/* Datos de contexto */
.datalist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); margin: 2rem 0 .75rem; }
.datalist > div { padding: 1.1rem 1.25rem 1.1rem 0; }
.datalist > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.datalist b { display: block; font-family: var(--font-serif); font-size: 1.75rem; line-height: 1.1; color: var(--brand); }
.datalist span { font-size: .92rem; color: var(--ink-soft); display: block; margin-top: .35rem; }
.datalist small { display: block; color: var(--muted); margin-top: .35rem; font-size: .78rem; }
@media (max-width: 720px) { .datalist { grid-template-columns: 1fr; } .datalist > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }
.source { font-size: .8rem; color: var(--muted); }

/* Mito vs realidad */
.myths { display: grid; gap: 0; }
.myth { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.5rem; padding: 1.25rem 0; border-top: 1px solid #2c4653; }
.myth:last-child { border-bottom: 1px solid #2c4653; }
.myth q { font-family: var(--font-serif); font-size: 1.15rem; color: #fff; quotes: "«" "»"; }
.myth p { margin: 0; color: #c9d6da; }
.myth .label { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #8fb4bb; margin-bottom: .3rem; }
@media (max-width: 720px) { .myth { grid-template-columns: 1fr; gap: .5rem; } }
.date-flag { display: inline-flex; gap: .6rem; align-items: baseline; background: var(--signal-tint); color: #5d2004; border-radius: var(--radius); padding: .9rem 1.1rem; margin-top: 1.5rem; }
.date-flag b { font-family: var(--font-mono); font-size: .95rem; white-space: nowrap; }
.section--dark .date-flag { background: #2b1b12; color: #f7d9c7; border: 1px solid #6b3418; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: paso; border-top: 2px solid var(--ink); }
.steps li { position: relative; padding: 1.25rem 1.25rem 0 0; margin: 0; counter-increment: paso; }
.steps li + li { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.steps li::before { content: "0" counter(paso); display: block; font-family: var(--font-mono); font-size: .8rem; color: var(--signal); font-weight: 700; margin-bottom: .6rem; }
.steps h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.steps p { font-size: .96rem; color: var(--ink-soft); }
.steps .ref { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; } .steps li:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

/* Índice de cursos (lista editorial comparable) */
.index-list { border-top: 2px solid var(--ink); }
.index-row { display: grid; grid-template-columns: 4.5rem minmax(0, 2.2fr) minmax(0, 1.2fr) 8.5rem 2rem; gap: 1.25rem; align-items: start; padding: 1.35rem .25rem; border-bottom: 1px solid var(--line-strong); text-decoration: none; color: inherit; transition: background-color .15s; }
.index-row:hover { background: var(--white); color: inherit; }
.index-row .code { font-family: var(--font-mono); font-weight: 700; color: var(--signal); font-size: .95rem; padding-top: .2rem; }
.index-row h3 { margin: 0 0 .25rem; font-size: 1.28rem; }
.index-row p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.index-row .meta { font-size: .9rem; color: var(--ink-soft); }
.index-row .meta b { display: block; font-weight: 650; color: var(--ink); }
.index-row .price { font-size: .86rem; color: var(--muted); }
.index-row .price b { display: block; font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); }
.index-row .go { font-size: 1.4rem; color: var(--brand); text-align: right; }
@media (max-width: 860px) {
  .index-row { grid-template-columns: 3.2rem 1fr; }
  .index-row .meta, .index-row .price { grid-column: 2; }
  .index-row .go { display: none; }
}

/* Estado del curso */
.status { display: inline-block; font-family: var(--font-mono); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 3px; margin-left: .5rem; vertical-align: middle; }
.status--ok { background: #dff0e5; color: #14502b; }
.status--soon { background: var(--signal-tint); color: #7a2a06; }

/* Listas con marca */
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .5em; width: .9rem; height: .5rem; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg) translateY(-30%); }
.crosslist { list-style: none; padding: 0; margin: 0 0 1rem; }
.crosslist li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; }
.crosslist li::before { content: "×"; position: absolute; left: .1rem; top: -.05em; font-size: 1.3rem; color: var(--signal); font-weight: 700; }
.numbered { padding-left: 0; list-style: none; counter-reset: n; }
.numbered li { counter-increment: n; position: relative; padding-left: 2.4rem; margin-bottom: .8rem; }
.numbered li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: .1em; font-family: var(--font-mono); font-size: .78rem; font-weight: 700; color: var(--signal); }

/* Pilares */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line-strong); }
.pillar { padding: 1.6rem 1.6rem 1.6rem 0; border-bottom: 1px solid var(--line-strong); }
.pillar:nth-child(even) { padding-left: 1.6rem; padding-right: 0; border-left: 1px solid var(--line); }
.pillar .n { font-family: var(--font-mono); font-size: .8rem; font-weight: 700; color: var(--signal); }
.pillar h3 { margin: .3rem 0 .4rem; }
.pillar p { margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) { .pillars { grid-template-columns: 1fr; } .pillar:nth-child(even) { padding-left: 0; border-left: 0; } }

/* Llamadas de atención (sin filete lateral) */
.callout { background: var(--brand-tint); border-radius: var(--radius); padding: 1.15rem 1.35rem; margin: 1.5rem 0; }
.callout > :last-child { margin-bottom: 0; }
.callout .label { display: block; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-strong); font-weight: 700; margin-bottom: .35rem; }
.callout--warn { background: var(--signal-tint); }
.callout--warn .label { color: #7a2a06; }
.callout--plain { background: var(--white); border: 1px solid var(--line); }

/* Tablas */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 620px; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data th { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--paper); position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data td:first-child { font-weight: 650; }
table.data .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: .75rem 1rem; font-size: .85rem; color: var(--muted); caption-side: bottom; }

/* Chips y metadatos */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; margin: 1rem 0; }
.chips li { margin: 0; background: var(--white); border: 1px solid var(--line-strong); border-radius: 999px; padding: .3rem .8rem; font-size: .88rem; color: var(--ink-soft); }
.chips b { color: var(--ink); }
.meta-panel { background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.meta-panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; font-size: .95rem; }
.meta-panel dt { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: .25rem; }
.meta-panel dd { margin: 0; }
.meta-panel .btn { width: 100%; margin-top: 1.1rem; }
.meta-panel .price-line { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.meta-panel .price-line b { font-family: var(--font-serif); font-size: 1.6rem; display: block; line-height: 1.1; }
.meta-panel .price-line small { color: var(--muted); }
body.sin-precios .precio { display: none !important; }

/* Cabecera de curso */
.course-hero { padding-block: clamp(2.25rem, 5vw, 4rem); }
.breadcrumbs { font-size: .86rem; color: var(--muted); margin-bottom: 1.25rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span[aria-hidden] { margin: 0 .4rem; }
.course-grid { display: grid; grid-template-columns: 1fr 340px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .course-grid { grid-template-columns: 1fr; } }
.course-body h2 { margin-top: 2.5rem; }
.course-body h2:first-child { margin-top: 0; }
.aside-sticky { position: sticky; top: 5.5rem; }
@media (max-width: 900px) { .aside-sticky { position: static; } }

/* Pestañas */
.tabs [role="tablist"] { display: flex; gap: .25rem; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.tabs [role="tab"] { font: inherit; font-weight: 650; background: transparent; border: 0; padding: .8rem 1.2rem; cursor: pointer; color: var(--ink-soft); border-radius: var(--radius) var(--radius) 0 0; min-height: 46px; }
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs [role="tab"]:hover:not([aria-selected="true"]) { background: var(--paper-2); }
.tabs [role="tabpanel"] { padding-top: 1.5rem; }
.js .tabs [role="tabpanel"][hidden] { display: none; }

/* Programa / agenda */
details.mod { border-top: 1px solid var(--line-strong); }
details.mod:last-of-type { border-bottom: 1px solid var(--line-strong); }
details.mod > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 3.2rem 1fr auto 1.5rem; gap: 1rem; align-items: baseline; padding: 1rem .25rem; min-height: 44px; }
details.mod > summary::-webkit-details-marker { display: none; }
details.mod > summary .mn { font-family: var(--font-mono); font-size: .82rem; font-weight: 700; color: var(--signal); }
details.mod > summary .mt { font-family: var(--font-serif); font-size: 1.13rem; font-weight: 700; }
details.mod > summary .mh { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }
details.mod > summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); text-align: right; }
details.mod[open] > summary::after { content: "–"; }
details.mod > summary:hover { background: var(--white); }
details.mod .mod-body { padding: 0 .25rem 1.25rem 4.2rem; color: var(--ink-soft); }
details.mod .mod-body ul { margin-bottom: .6rem; }
details.mod .mod-body .out { font-size: .9rem; }
details.mod .mod-body .out b { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: .4rem; }
@media (max-width: 640px) { details.mod > summary { grid-template-columns: 2.6rem 1fr 1.5rem; } details.mod > summary .mh { grid-column: 2; } details.mod .mod-body { padding-left: 3.6rem; } }
.agenda-group { margin-top: 2rem; }
.agenda-group > h3 { font-size: 1.05rem; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: .5rem; }

/* FAQ */
details.faq { border-top: 1px solid var(--line-strong); }
details.faq:last-of-type { border-bottom: 1px solid var(--line-strong); }
details.faq > summary { cursor: pointer; padding: 1.05rem .25rem; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 1rem; min-height: 44px; align-items: center; }
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); line-height: 1; }
details.faq[open] > summary::after { content: "–"; }
details.faq > div { padding: 0 .25rem 1.15rem; color: var(--ink-soft); max-width: 70ch; }
details.faq > div > :last-child { margin-bottom: 0; }

/* Línea de tiempo */
.timeline { list-style: none; margin: 1.5rem 0; padding: 0; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 1.4rem 1.6rem; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--brand); }
.timeline li.key::before { background: var(--signal); border-color: var(--signal); }
.timeline time { display: block; font-family: var(--font-mono); font-weight: 700; font-size: .86rem; color: var(--ink); }
.timeline li.key time { color: var(--signal); }
.timeline p { margin: .15rem 0 0; color: var(--ink-soft); font-size: .97rem; }
.timeline .src { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }

/* Guía larga con índice lateral */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: 5.5rem; font-size: .92rem; }
.toc h2 { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: .75rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-strong); }
.toc li { margin: 0; }
.toc a { display: block; padding: .4rem .9rem; text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--brand); background: var(--white); }
.guide-body h2 { margin-top: 3rem; padding-top: 1rem; }
.guide-body h2:first-child { margin-top: 0; padding-top: 0; }
@media (max-width: 900px) { .guide { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } }

/* Formularios */
.form { display: grid; gap: 1.1rem; }
.field label, .field legend { display: block; font-weight: 650; margin-bottom: .35rem; font-size: .96rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .86rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: .75rem .85rem; min-height: 46px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid rgba(14,90,85,.25); outline-offset: 0; }
.field .error { display: none; color: #9b1c12; font-size: .88rem; margin-top: .35rem; }
.field.has-error .error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #9b1c12; }
.check { display: flex; gap: .7rem; align-items: flex-start; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .25rem; flex: none; accent-color: var(--brand); }
.check label { font-weight: 400; font-size: .92rem; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-success { display: none; background: #dff0e5; color: #14502b; border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.form-success.is-visible { display: block; }
.form-panel { background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.checkgroup { border: 0; padding: 0; margin: 0; }
.checkgroup .check { margin-bottom: .45rem; }

/* Autodiagnóstico */
.quiz { background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); margin-bottom: .6rem; }
.quiz-bar { height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; margin-bottom: 1.75rem; }
.quiz-bar span { display: block; height: 100%; background: var(--brand); width: 0; transition: width .25s; }
.quiz fieldset { border: 0; padding: 0; margin: 0; }
.quiz legend { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); line-height: 1.25; margin-bottom: .5rem; padding: 0; }
.quiz .q-help { color: var(--muted); font-size: .95rem; margin-bottom: 1.25rem; }
.opts { display: grid; gap: .6rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.opt label { display: block; padding: .9rem 1.1rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); cursor: pointer; min-height: 48px; }
.opt input:checked + label { border-color: var(--brand); background: var(--brand-tint); font-weight: 650; }
.opt input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt label:hover { border-color: var(--brand); }
.quiz-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.result-step { border-top: 1px solid var(--line-strong); padding: 1.25rem 0; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; }
.result-step:last-of-type { border-bottom: 1px solid var(--line-strong); }
.result-step .rn { font-family: var(--font-mono); font-weight: 700; color: var(--signal); }
.result-step h3 { margin: 0 0 .25rem; }
.result-step p { margin: 0 0 .4rem; color: var(--ink-soft); }
.alerts { list-style: none; padding: 0; }
.alerts li { background: var(--signal-tint); color: #5d2004; padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: .5rem; }

/* CTA final */
.cta-band { background: var(--brand); color: #fff; padding-block: clamp(2.5rem, 5vw, 4rem); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d6ebe8; }
.cta-band .btn-primary { background: #fff; color: var(--brand-strong); }
.cta-band .btn-primary:hover { background: var(--brand-tint); }
.cta-band .btn-ghost { color: #fff; border-color: #a9d3ce; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Pie */
.site-footer { background: var(--dark); color: #b9c8cc; padding-block: 3.5rem 2rem; font-size: .93rem; }
.site-footer a { color: #d5e4e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8fb4bb; margin-bottom: .9rem; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-legal { border-top: 1px solid #22404c; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .82rem; color: #93a8ae; }
.footer-legal p { max-width: 90ch; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Tarjeta de persona (sobre mí) */
.portrait { aspect-ratio: 4 / 5; background: repeating-linear-gradient(135deg, var(--paper-2), var(--paper-2) 10px, var(--paper) 10px, var(--paper) 20px); border: 1px dashed var(--line-strong); border-radius: var(--radius); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: .9rem; padding: 1rem; }
.cv-list { list-style: none; padding: 0; margin: 0; }
.cv-list li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); margin: 0; }
.cv-list li:last-child { border-bottom: 1px solid var(--line); }
.cv-list time { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); padding-top: .2rem; }
@media (max-width: 560px) { .cv-list li { grid-template-columns: 1fr; gap: .1rem; } }

/* Utilidades de listado en 2 columnas */
.two-col { columns: 2; column-gap: 2.5rem; }
.two-col li { break-inside: avoid; }
@media (max-width: 700px) { .two-col { columns: 1; } }
.segment { padding: 2rem 0; border-top: 1px solid var(--line-strong); }
.segment:last-child { border-bottom: 1px solid var(--line-strong); }

.placeholder-note { border: 1px dashed var(--signal); background: #fff8f3; color: #6b2a08; padding: .8rem 1rem; border-radius: var(--radius); font-size: .9rem; }

/* Impresión (lista de evidencias, guía) */
@media print {
  .proto-banner, .site-header, .site-footer, .cta-band, .toc, .btn-row, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .section { padding-block: 1rem; }
  a { color: inherit; text-decoration: none; }
  details > * { display: block !important; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
