/* Biblioteca pública (docs/seo-library.md). Reproduce el tema de la portada
   (nauticatest-v2/apps/web/src/landing/index.html) a partir del prototipo
   aprobado (docs/prototypes/organic-growth/styles.css): mismos colores,
   tipografía, radios, sombras, botones, cabecera, panel azul final y pie.
   Sin modo oscuro, igual que la portada. Las referencias asset:… entre llaves dobles se
   sustituyen al arrancar por las URL con huella de /assets/library/. */

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/library/poppins-400-latin-7d93459d8658.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/library/poppins-600-latin-f4e80d9dfd37.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/library/poppins-700-latin-9338e65fc077.woff2') format('woff2'); }

:root {
  --navy: #0b1730; --navy-2: #0e1f40; --brand: #2563eb; --brand-2: #1d4ed8; --sky: #7cb4ff;
  --bg: #f5f8fc; --surface: #fff; --surface-2: #f1f5fb; --line: #dbe3ee; --line-2: #c6d2e2;
  --ink: #0f2240; --ink-2: #2e4363; --muted: #5d6e87; --tint: #e7eefd;
  --ok: #15803d; --ok-t: #e3f5ea; --bad: #c2413a; --bad-t: #fbe9e7;
  --topic: #b26a00; --topic-t: #fff4de;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Poppins', system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Trama de barcos de fondo, como la portada */
body::before { content: ''; position: fixed; inset: 0; background: url('/assets/library/pattern-c9391b22f1c3.webp') repeat; background-size: 100px; opacity: .05; pointer-events: none; z-index: -1; }

/* Aviso de borrador (solo vista previa del laboratorio) */
.draft-bar { background: #fff4de; color: #7a4a00; font-size: 12.5px; font-weight: 600; text-align: center; padding: 5px 12px; letter-spacing: .02em; border-bottom: 1px solid #f5dca8; }

/* Botones (idénticos a la portada) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 14px 22px; font: 600 16px/1.2 'Poppins', sans-serif; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; text-align: center; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-quiet { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-quiet:hover { border-color: var(--brand); }
.btn-light { background: #fff; color: #1e3a8a; }
.btn-light:hover { background: var(--tint); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Cabecera azul marino */
.hero { position: relative; color: #fff; background: radial-gradient(900px 420px at 50% -10%, #1e3a8a 0%, transparent 70%), linear-gradient(180deg, var(--navy), var(--navy-2)); overflow: hidden; isolation: isolate; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/assets/library/pattern-c9391b22f1c3.webp') repeat; background-size: 100px; filter: invert(1); opacity: .03; pointer-events: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.12); flex: none; }
.brand-mark img { width: 28px; height: 28px; }
.platform-link { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.platform-link:hover { background: rgba(255,255,255,.08); }
.platform-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: #a9bde3; }
.crumbs li + li::before { content: '›'; margin-right: 8px; color: #7d93bd; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #dbe6fb; }

.page-head { max-width: 780px; padding: 26px 0 56px; display: grid; gap: 14px; justify-items: start; }
.eyebrow-d { display: inline-block; font: 600 12px 'Poppins', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--sky); background: rgba(124,180,255,.12); border: 1px solid rgba(124,180,255,.3); border-radius: 99px; padding: 5px 12px; }
.page-head h1 { font-size: 46px; line-height: 1.08; letter-spacing: -.03em; font-weight: 700; }
.page-head h1 em { font-style: normal; color: var(--sky); }
.answer { font-size: 18px; color: #dbe6fb; max-width: 62ch; }
.answer strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.meta { font-size: 13px; color: #9fb2d4; }
.meta a { color: #c9d7f2; text-decoration: underline; text-underline-offset: 2px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 36px; margin-top: 4px; }
.hero-facts b { display: block; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.hero-facts span { font-size: 13px; color: #a9bde3; }

/* Paneles blancos sobre la trama */
main { padding: 20px 0 40px; }
.panel { padding: 20px 0; }
.panel > .wrap { width: min(1120px, calc(100% - 32px)); max-width: none; margin-inline: auto; padding: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 1px 2px rgba(8,20,48,.04), 0 24px 60px rgba(8,20,48,.07); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.panel h2 { font-size: 30px; letter-spacing: -.02em; line-height: 1.15; margin-top: 6px; }
.panel h3 { font-size: 18px; margin: 26px 0 6px; }
.lead { color: var(--muted); margin-top: 10px; max-width: 62ch; font-size: 17px; }

/* Texto de lectura */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 14px; }
.prose h2 + *, .prose h3 + * { margin-top: 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 6px; }
.prose a, .link { color: var(--brand); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover, .link:hover { color: var(--brand-2); }
.soon { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }

/* Disposición de dos columnas: texto y figura */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 40px; align-items: start; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Figuras */
.fig { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig-scroll { overflow-x: auto; }
.fig-scroll svg { min-width: 480px; }
.fig figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.fig figcaption b { color: var(--ink); font-weight: 600; }

/* Tablas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
caption { text-align: left; font-size: 13px; color: var(--muted); padding: 10px 14px 0; caption-side: bottom; padding-bottom: 12px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td, tr.total th { background: var(--tint); font-weight: 600; color: var(--ink); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--tint); color: var(--brand-2); white-space: nowrap; }
.pill.warn { background: var(--topic-t); color: var(--topic); }
.pill.ok { background: var(--ok-t); color: var(--ok); }
.bar { display: inline-block; width: 90px; height: 8px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); vertical-align: middle; margin-right: 8px; overflow: hidden; }
td.num .v { display: inline-block; min-width: 3.3em; }
.nw { white-space: nowrap; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }

/* Avisos y cajas */
.note { font-size: 13px; color: var(--muted); margin-top: 14px; max-width: 80ch; }
.callout { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface-2); }
.callout h3 { margin: 0 0 6px; font-size: 16px; }
.callout p { color: var(--ink-2); font-size: 15px; }
.callout p + p { margin-top: 8px; }
.callout.bad { background: var(--bad-t); border-color: #f2c7c2; }
.callout.bad h3 { color: var(--bad); }
.callout.exam { background: var(--tint); border-color: #c7d7fb; }
.callout.exam h3 { color: var(--brand-2); }
.sources { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.wrap > .sources:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sources a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.sources li { margin-left: 1.1em; }
.sources li + li { margin-top: 4px; }
.pending { display: inline-block; font-size: 12px; font-weight: 600; color: var(--topic); background: var(--topic-t); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }

/* Tarjetas y rejillas */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h3 { font-size: 16.5px; margin: 0 0 4px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .url { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
a.card { display: block; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--brand); box-shadow: 0 10px 30px rgba(8,20,48,.08); }
a.card h3 { color: var(--ink); }
.card.is-off { background: var(--surface-2); }

/* Preguntas (oficiales y propias) */
.q { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface); }
.q + .q { margin-top: 12px; }
.q small { display: block; color: var(--muted); font-size: 12.5px; }
.q .q-text { font-weight: 600; margin: 6px 0 10px; color: var(--ink); }
.q ol { list-style: none; display: grid; gap: 6px; }
.q ol li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--ink-2); }
.q ol li b { flex: none; width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; }
.q details { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 10px; }
.q summary { cursor: pointer; font-weight: 600; color: var(--brand); font-size: 14.5px; list-style: none; }
.q summary::-webkit-details-marker { display: none; }
.q summary::before { content: '+ '; }
.q details[open] summary::before { content: '– '; }
.q details p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }

/* Mini test: opciones como en la portada */
.quiz { border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: var(--surface); box-shadow: 0 18px 44px rgba(8,20,48,.08); }
.quiz-item + .quiz-item { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.quiz-item fieldset { border: 0; }
.quiz-item legend { font-weight: 600; margin-bottom: 10px; }
.quiz-item small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.opt { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 1.5px solid var(--line-2); border-radius: 11px; padding: 10px 12px; margin-bottom: 7px; background: var(--surface); font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.opt .k { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 12px; flex: none; }
.opt:hover:not(:disabled) { border-color: var(--brand); }
.opt:disabled { cursor: default; }
.opt.ok { border-color: var(--ok); background: var(--ok-t); } .opt.ok .k { background: var(--ok); color: #fff; border-color: var(--ok); }
.opt.ko { border-color: var(--bad); background: var(--bad-t); } .opt.ko .k { background: var(--bad); color: #fff; border-color: var(--bad); }
.quiz-exp { font-size: 14.5px; color: var(--ink-2); margin-top: 6px; }
.quiz-exp summary { cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; }
.quiz-exp summary::-webkit-details-marker { display: none; }
.quiz-exp p { margin-top: 4px; }
.js .quiz-exp { display: none; }
.js .quiz-exp summary { display: none; }
.js .quiz-item.done .quiz-exp { display: block; }
.quiz-res { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; justify-items: start; }
.quiz-res p { font-weight: 600; }
.js .quiz-res { display: none; }
.js .quiz.done .quiz-res { display: grid; }
.quiz-nojs { font-size: 13px; color: var(--muted); }
.js .quiz-nojs { display: none; }

/* Pasos de resolución */
.steps { list-style: none; counter-reset: step; display: grid; gap: 14px; max-width: 72ch; }
.steps > li { counter-increment: step; position: relative; min-width: 0; padding-left: 46px; color: var(--ink-2); }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--brand-2); font-weight: 700; font-size: 14px; }
.steps h3 { margin: 0 0 4px; font-size: 16.5px; color: var(--ink); }
.calc { display: block; margin-top: 8px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; font-size: 14.5px; color: var(--ink); overflow-x: auto; }
.calc span { display: block; white-space: nowrap; }
.data { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.data div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface-2); }
.data dt { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.data dd { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.result { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.result div { border-radius: 14px; padding: 14px 16px; background: var(--ok-t); border: 1px solid #bfe3cb; }
.result span { display: block; font-size: 12.5px; color: var(--ok); font-weight: 600; }
.result b { font-size: 20px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* Preguntas frecuentes (como la portada) */
.faq-list { display: grid; gap: 10px; margin-top: 22px; max-width: 80ch; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--brand); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { color: var(--muted); margin-top: 10px; font-size: 14.5px; }


/* Cuenta atrás */
.countdown[hidden] { display: none; }
.countdown { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-radius: 18px; padding: 20px 22px; background: var(--tint); border: 1px solid #c7d7fb; margin-top: 22px; }
.countdown b { font-size: 34px; letter-spacing: -.02em; color: var(--brand-2); line-height: 1; }
.countdown p { flex: 1 1 260px; color: var(--ink-2); font-size: 15px; }

/* Llamada final azul (como la portada) */
.final { padding: 20px 0 0; color: #fff; text-align: center; }
.final > .wrap { position: relative; isolation: isolate; width: min(1120px, calc(100% - 32px)); max-width: none; margin-inline: auto; padding: 64px 56px; border-radius: 28px; background: radial-gradient(1000px 480px at 85% 0%, rgba(37,99,235,.30), transparent 60%), linear-gradient(160deg, #0e1f40, #0b1730); box-shadow: 0 30px 70px rgba(8,20,48,.22); display: grid; gap: 14px; justify-items: center; }
.final > .wrap::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: url('/assets/library/pattern-c9391b22f1c3.webp') repeat; background-size: 100px; filter: invert(1); opacity: .045; pointer-events: none; }
.final h2 { font-size: 34px; letter-spacing: -.02em; }
.final p { color: #dbe6fb; max-width: 56ch; }
.final small { color: #c3d3f5; font-size: 13.5px; }
.final small a { text-decoration: underline; }
.final .btn-light { padding: 16px 28px; font-size: 17px; }

/* Pie (como la portada) */
.footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto auto; gap: 16px 40px; align-items: center; padding-block: 26px 18px; }
.footer .brand { color: var(--ink); font-size: 16px; }
.footer .brand-mark { background: linear-gradient(135deg, #2563eb, #1e40af); width: 36px; height: 36px; border-radius: 10px; }
.footer-brand p { margin-top: 4px; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--ink-2); } .footer-links a:hover { color: var(--brand); }
.social-links { display: flex; gap: 6px; }
.social-links a { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); }
.social-links svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-copy { border-top: 1px solid var(--line); text-align: center; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); font-size: 12.5px; }

/* Botón fijo en móvil, como la portada */
.sticky-cta { display: none; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border-radius: 14px; padding: 15px; font-weight: 600; box-shadow: 0 12px 30px rgba(15,34,64,.3); }

@media (max-width: 899px) {
  .split, .split--even { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr auto; } .footer-links { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  .page-head { padding: 16px 0 40px; }
  .page-head h1 { font-size: 32px; }
  .answer { font-size: 16.5px; }
  .hero-actions .btn { width: 100%; }
  .hero-facts { gap: 10px 26px; } .hero-facts b { font-size: 20px; }
  main { padding: 10px 0 24px; }
  .panel { padding: 10px 0; }
  .panel > .wrap { width: calc(100% - 24px); padding: 32px 18px; border-radius: 22px; }
  .panel h2 { font-size: 24px; }
  .lead { font-size: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .fig { padding: 12px; border-radius: 14px; }
  .q, .quiz { padding: 16px; }
  th, td { padding: 9px 10px; }
  table { font-size: 13.5px; }
  .final { padding: 10px 0 0; }
  .final > .wrap { width: calc(100% - 24px); padding: 44px 20px; border-radius: 22px; }
  .final h2 { font-size: 26px; }
  .final .btn-light { width: 100%; white-space: normal; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .footer-copy { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .sticky-cta { display: flex; }
  .steps > li { padding-left: 42px; }
  .calc span { white-space: normal; }
  .countdown b { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Separaciones de bloques dentro del cuerpo (sustituyen estilos en línea del prototipo). */
.stack-gap { margin-top: 12px; }
.stack-gap-sm { margin-top: 14px; }
.stack-gap-md { margin-top: 16px; }
.stack-gap-lg { margin-top: 20px; }
.callout .note { margin-top: 10px; }
