/* Estilos compartidos de las páginas internas de pablostamati.com.
   Mismo sistema que la portada: tinta azul marino + ámbar, Archivo, claro y oscuro según el dispositivo.
   Radios: controles 10px, paneles 18px, tapas 3px. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f8fa;
  --surface: #eef1f5;
  --tile-cool: #e6ecf5;
  --tile-warm: #f8ecdf;
  --ink: #0f1a2e;
  --ink-2: #2b3a52;
  --muted: #4a5a72;
  --line: #d5dce6;
  --field-line: #7b8798;
  --accent: #e8862a;
  --link: #a3500e;
  --error: #b42318;
  --btn-bg: #0f1a2e;
  --btn-fg: #f7f8fa;
  --btn-bg-hover: #23365a;
  --btn2-line: #a3500e;
  --btn2-fg: #a3500e;
  --btn2-bg-hover: rgba(163, 80, 14, .08);
  --focus: #a3500e;
  --tip-bg: #e6ecf5;
  --tip-line: #23365a;
  --warn-bg: #f8ecdf;
  --warn-line: #a3500e;
  --shadow-cover: 0 1px 1px rgba(15, 26, 46, .10), 0 10px 22px -8px rgba(15, 26, 46, .32), 0 26px 46px -22px rgba(15, 26, 46, .38);
  --shadow-lift: 0 2px 3px rgba(15, 26, 46, .12), 0 22px 40px -10px rgba(15, 26, 46, .42), 0 44px 70px -30px rgba(15, 26, 46, .48);
  --r-ui: 10px;
  --r-panel: 18px;
  --r-cover: 3px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1322;
    --surface: #111c30;
    --tile-cool: #13203a;
    --tile-warm: #291c0f;
    --ink: #edf1f7;
    --ink-2: #c9d2df;
    --muted: #9aa8bb;
    --line: #26344c;
    --field-line: #5d6f8c;
    --accent: #f0913a;
    --link: #f6a861;
    --error: #ff8a7a;
    --btn-bg: #f0913a;
    --btn-fg: #0b1322;
    --btn-bg-hover: #f6a861;
    --btn2-line: #f6a861;
    --btn2-fg: #f6a861;
    --btn2-bg-hover: rgba(246, 168, 97, .10);
    --focus: #f6a861;
    --tip-bg: #13203a;
    --tip-line: #9fb3d6;
    --warn-bg: #291c0f;
    --warn-line: #f6a861;
    --shadow-cover: 0 1px 1px rgba(0, 0, 0, .35), 0 10px 22px -8px rgba(0, 0, 0, .6), 0 26px 46px -22px rgba(0, 0, 0, .7);
    --shadow-lift: 0 2px 3px rgba(0, 0, 0, .4), 0 22px 40px -10px rgba(0, 0, 0, .7), 0 44px 70px -30px rgba(0, 0, 0, .75);
  }
}

/* Páginas con los dos idiomas: solo se muestra el activo. */
html[lang="en"] [data-show="es"],
html[lang="es"] [data-show="en"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 30; padding: 10px 16px; border-radius: var(--r-ui); background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.ic { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav-links a:hover { color: var(--ink); text-decoration: underline; }
.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-ui); }
.lang button, .lang a, .lang span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .06em; cursor: pointer; text-decoration: none; }
.lang button:hover, .lang a:hover { color: var(--ink); }
.lang button[aria-pressed="true"], .lang [aria-current="true"], .lang .lang-btn.active { background: var(--ink); color: var(--bg); cursor: default; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: var(--r-ui); background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn .ic { width: 26px; height: 26px; }
.menu-btn[aria-expanded="true"] .ic-open, .menu-btn[aria-expanded="false"] .ic-close { display: none; }
@media (max-width: 767px) {
  .nav { gap: 8px; }
  .menu-btn { display: inline-flex; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.open a { display: block; padding: 14px 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  min-height: 48px; padding: .72em 1.3em;
  border: 1.5px solid transparent; border-radius: var(--r-ui);
  font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--btn-bg-hover); }
.btn--quiet { border-color: var(--btn2-line); color: var(--btn2-fg); background: transparent; }
.btn--quiet:hover { background: var(--btn2-bg-hover); }
.btn[disabled] { background: var(--surface); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.textlink { color: var(--link); font-weight: 600; }
.textlink .ic { display: inline-block; margin-left: .3em; vertical-align: -.15em; }

/* Encabezado de página interna */
.page-hero { padding-block: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 48px); }
.kicker { font-size: 1rem; font-weight: 600; color: var(--link); margin-bottom: 12px; }
.page-hero .kicker { margin-bottom: 14px; }
.page-hero h1 { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.3rem); line-height: 1.04; letter-spacing: -.03em; }
.page-hero h1 em { font-style: normal; color: var(--link); }
.page-hero .lede { margin-top: 20px; max-width: 58ch; font-size: clamp(1.1rem, 1rem + .3vw, 1.25rem); }
.page-hero .lede + .lede { margin-top: 12px; }
.lede-soft { color: var(--muted); }
.page-hero .meta { margin-top: 16px; font-size: .95rem; color: var(--muted); }
.page-hero .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.crumbs { font-size: .95rem; color: var(--muted); margin-bottom: 16px; }
.hero-book { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 56px); align-items: center; }
.hero-book .cover-img { width: clamp(92px, 20vw, 220px); }
.crumbs a { color: var(--ink-2); }

/* Texto largo: políticas y guías */
.prose { max-width: 70ch; padding-bottom: clamp(56px, 8vw, 104px); }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 44px; font-size: clamp(1.45rem, 1.2rem + .8vw, 1.85rem); }
.prose h3 { margin-top: 28px; font-size: 1.2rem; font-weight: 700; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--ink); }
.prose code { font-size: .92em; background: var(--surface); padding: .1em .35em; border-radius: 6px; }
.prose .small { font-size: 1rem; color: var(--muted); }
.callout { padding: 18px 22px; border-radius: var(--r-panel); background: var(--surface); }
.callout ul { margin: 8px 0 0; }
.tip, .warning { padding: 16px 20px; border-radius: 0 var(--r-ui) var(--r-ui) 0; border-left: 4px solid; font-size: 1.0625rem; }
.tip { background: var(--tip-bg); border-left-color: var(--tip-line); }
.warning { background: var(--warn-bg); border-left-color: var(--warn-line); }
.age-badge { padding: 12px 16px; border-radius: var(--r-ui); background: var(--tile-cool); color: var(--ink); font-size: 1rem; font-weight: 600; }
.steps { list-style: none; padding: 0 !important; counter-reset: paso; }
.steps li { position: relative; padding: 14px 16px 14px 58px; border-radius: var(--r-ui); background: var(--surface); counter-increment: paso; }
.steps li + li { margin-top: 8px !important; }
.steps li::before { content: counter(paso); position: absolute; left: 14px; top: 13px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .95rem; }
.checklist { list-style: none; padding: 0 !important; }
.checklist li { padding: 12px 16px; border-radius: var(--r-ui); background: var(--surface); }
.checklist li + li { margin-top: 6px !important; }
.checklist label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin: .2em 0 0; accent-color: var(--link); }
.table-scroll { overflow-x: auto; border-radius: var(--r-ui); border: 1px solid var(--line); }
.compare { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 1rem; }
.compare th { text-align: left; padding: 10px 14px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: .95rem; }
.compare td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.related { padding: 16px 20px; border-radius: var(--r-panel); background: var(--surface); }
.last-checked { font-size: 1rem; color: var(--muted); }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: clamp(56px, 8vw, 104px); }
.guide-layout .prose { padding-bottom: 0; }
.guide-aside { display: grid; gap: 22px; align-content: start; padding: 22px; border-radius: var(--r-panel); background: var(--surface); }
.official-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--r-ui); background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; transition: background-color .2s; }
.official-card:hover { background: var(--btn-bg-hover); }
.official-card .oc-kicker { font-size: .9rem; opacity: .85; }
.official-card .oc-title { font-weight: 700; line-height: 1.3; }
.official-card .oc-title .ic { display: inline-block; margin-left: .35em; vertical-align: -.15em; }
.guide-back { margin: 0; }
.textlink.back .ic { margin: 0 .35em 0 0; }
.book-note { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; font-size: 1rem; color: var(--muted); }
.book-note .cover-img { width: 64px; }
@media (min-width: 1024px) {
  .guide-layout { grid-template-columns: minmax(0, 70ch) 320px; justify-content: space-between; column-gap: 56px; row-gap: 40px; }
  .guide-layout .prose { grid-column: 1; grid-row: 1; }
  .guide-aside { grid-column: 2; grid-row: 1 / span 2; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }
  .guide-back { grid-column: 1; grid-row: 2; }
}
.book-title { font-style: italic; }

/* Listado de guías */
.guide-group { margin-top: 36px; }
.guide-group h2 { font-size: 1.35rem; }
.guide-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: center; height: 100%;
  padding: 16px 18px; border-radius: var(--r-panel); background: var(--surface); color: var(--ink-2); text-decoration: none;
  transition: background-color .2s, transform .25s var(--ease); }
.guide-card:hover { background: var(--tile-cool); }
@media (prefers-reduced-motion: no-preference) { .guide-card:hover { transform: translateY(-3px); } }
.guide-card .gi { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); }
.guide-card .gi .ic { width: 24px; height: 24px; }
.guide-card .gn { font-weight: 700; color: var(--ink); line-height: 1.25; }
.guide-card .gd { font-size: .95rem; color: var(--muted); line-height: 1.35; }
.guide-card .new { margin-left: 6px; font-size: .8rem; font-weight: 700; color: var(--link); }
@media (max-width: 1023px) { .guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .guide-list { grid-template-columns: 1fr; } }
.guide-head { display: flex; align-items: center; gap: 16px; }
.guide-head .gi { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--ink); flex: none; }
.guide-head .gi .ic { width: 30px; height: 30px; }

/* Recursos y llamados */
.section { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); }
.section .section-lede { margin-top: 14px; max-width: 60ch; }
.res-list { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.res-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-radius: var(--r-panel); background: var(--surface); }
.res-item .gi { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink); }
.res-item .gi .ic { width: 24px; height: 24px; }
.res-item h3 { font-size: 1.15rem; font-weight: 700; }
.res-item p { margin-top: 6px; font-size: 1.0625rem; }
.res-item .soon { display: inline-block; margin-top: 8px; font-size: .9rem; font-weight: 700; color: var(--link); }
@media (max-width: 760px) { .res-list { grid-template-columns: 1fr; } }
.cta-panel { padding: clamp(24px, 4vw, 48px); border-radius: var(--r-panel); background: var(--tile-warm); }
.cta-panel h2, .cta-panel h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.cta-panel p { margin-top: 12px; max-width: 60ch; }
.cta-panel .btn { margin-top: 22px; }

/* Libros (Lino, desglose) */
.cover-img { border-radius: var(--r-cover); box-shadow: var(--shadow-cover); }
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 767px) { .split { grid-template-columns: 1fr; } }
.lino-books { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lino-book { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 22px; align-items: start; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r-panel); background: var(--surface); }
.lino-book .tema { font-size: .95rem; font-weight: 600; color: var(--link); }
.lino-book h3 { margin-top: 6px; font-size: 1.35rem; }
.lino-book .blurb { margin-top: 10px; font-size: 1.0625rem; }
.lino-book .buy { margin-top: 16px; }
@media (max-width: 1023px) { .lino-books { grid-template-columns: 1fr; } }
.lino-book > picture, .lino-book > img { display: block; }
@media (max-width: 520px) { .lino-book { grid-template-columns: 1fr; } .lino-book > picture, .lino-book > img.cover-img { width: min(50%, 170px); } }
.next-list { margin-top: 24px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.next-list li { padding: 16px 18px; border-radius: var(--r-panel); background: var(--surface); }
.next-list .n-tema { display: block; font-size: .95rem; color: var(--muted); }
.next-list .n-title { display: block; margin-top: 4px; font-weight: 700; color: var(--ink); line-height: 1.3; }
@media (max-width: 900px) { .next-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pack { padding: clamp(24px, 3.5vw, 44px); border-radius: var(--r-panel); background: var(--surface); }
.pack h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.pack ul { margin: 18px 0 0; padding: 0; list-style: none; }
.pack li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; line-height: 1.45; }
.pack li::before { content: ""; position: absolute; left: 0; top: calc(12px + .5em); width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.pack li span { font-weight: 400; color: var(--muted); }
.pack .btn { margin-top: 22px; }
.pack .meta { margin-top: 12px; font-size: .95rem; color: var(--muted); }
.promo { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 28px; align-items: center; margin: 8px 0 clamp(56px, 8vw, 104px); padding: clamp(20px, 3vw, 36px); border-radius: var(--r-panel); background: var(--tile-cool); }
.promo h2 { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem); }
.promo p { max-width: 62ch; }
.promo p { margin-top: 10px; }
.promo .textlink { display: inline-block; margin-top: 14px; }
@media (max-width: 520px) { .promo { grid-template-columns: 1fr; } .promo img { width: min(45%, 160px); } }

/* Pie */
.site-footer { border-top: 1px solid var(--line); padding-block: 32px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Página de Lino */
.lino-hero { align-items: center; }
.lino-hero-art { position: relative; margin: 0; justify-self: center; width: min(100%, 360px); }
@media (max-width: 767px) { .lino-hero-art { justify-self: start; width: min(80%, 300px); margin: 12px 0 0 12px; } }
.lino-hero-art .pin { position: absolute; top: -12px; left: -12px; z-index: 1; padding: 6px 12px; border-radius: var(--r-ui); background: var(--btn-bg); color: var(--btn-fg); font-size: .9rem; font-weight: 700; }
.lino-hero-art .cover-img { width: 100%; }
.lino-book .tema { font-size: .95rem; font-weight: 600; color: var(--link); }
.lino-book .cover-img { width: 100%; }
.otros { margin-top: 10px; font-size: 1rem; }
.otros .ic { display: inline-block; width: .9em; height: .9em; margin-left: .15em; vertical-align: -.08em; }
.more { margin-top: 18px; color: var(--muted); }
.about-series { max-width: 70ch; }
.about-series p { margin-top: 16px; }
.about-series .sign { color: var(--muted); }
.about-series .sign strong { color: var(--ink); }

/* Recursos de Hijos Conectados y textos de las páginas legales */
.section .guide-list { margin-top: 28px; }
.back-row { margin-top: 40px !important; }

/* Desglose */
.desglose { align-items: start; }
.desglose .lede { max-width: 52ch; }
