/* ── Staour — design tokens ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@font-face {
  font-family: 'Exposure';
  src: url('assets/fonts/Exposure-0.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Nota: sólo existe el corte "Exposure 0" (regular). Las negritas del sitio son
   sintéticas; para el aspecto más negro de goose harían falta los cortes
   Exposure -20/-50/-70 de 205TF. */

:root {
  --color-blue: #5E84B0;
  --color-beige: #F9F4EC;
  --color-black: #2A2A2A;
  --color-default-bg: #F9F4EC;
  --font-default: "Exposure", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-strong: "Exposure", sans-serif;

  /* Engrosado óptico: imita los cortes subexpuestos (Exposure -50/-70) que usa
     goose partiendo del único corte que tenemos, Exposure 0. Sube o baja este
     valor para más o menos "tinta". */
  --ink: 0.03em;

  /* Tokens que usan privacidad.html y soporte.html en sus estilos propios */
  --text: var(--color-black);
  --text-soft: #4a4a4a;
  --text-muted: #7c7c7c;
  --primary: var(--color-blue);
  --primary-soft: rgba(94, 132, 176, 0.12);

  /* Márgenes laterales seguros (respetan el notch en horizontal) */
  --gutter: 1.25rem;
  --gutter-left: max(var(--gutter), env(safe-area-inset-left));
  --gutter-right: max(var(--gutter), env(safe-area-inset-right));
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* alto real del banner de cookies (lo calcula app.js); 0 si no se muestra */
  --cookie-h: 0px;
}

@media (min-width: 768px) {
  :root { --gutter: 2.5rem; }
}

html {
  -webkit-font-smoothing: antialiased;
  /* tono del vídeo: si algún borde queda sin cubrir, no canta como el negro */
  background-color: #314045;
  font-family: var(--font-default);
  color: var(--color-black);
  line-height: 1.25;
}

body {
  position: relative; /* ancla del fondo de vídeo */
  min-height: 100svh;
  /* clip, no hidden: "hidden" convierte el body en contenedor de scroll y
     entonces iOS no repliega sus barras al deslizar. */
  overflow-x: clip;
}

/* iOS Safari sólo repliega sus barras (y deja que el vídeo ocupe TODA la
   pantalla, también detrás de la barra de direcciones y la de compartir) si la
   página se puede desplazar. Este espaciador mide justo lo que ocupan esas
   barras, así que el contenido sigue cabiendo entero sin scroll al entrar.
   En escritorio y Android vale 0. */
body::after {
  content: '';
  display: block;
  height: 0;
  height: calc(100lvh - 100svh);
}

/* Exposure en todo, incluidos los controles de formulario (no heredan por sí solos) */
body, input, select, textarea, optgroup, button {
  font-family: var(--font-default);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

.hidden { display: none !important; }

/* ── Video background ───────────────────────────────────────────────────── */
.video-bg {
  /* absolute, no fixed: iOS recorta los elementos fixed al viewport y deja sin
     cubrir la banda de las barras de Safari. En el flujo del documento sí se
     pinta esa banda, y los 10rem de más por arriba y por abajo la tapan. */
  position: absolute;
  top: -10rem;
  bottom: -10rem;
  left: 0;
  right: 0;
  z-index: 0;
  overflow: hidden;
  background: #314045;
}

/* Páginas largas (about): ahí el fondo debe quedarse quieto al desplazar */
.video-bg--blur {
  position: fixed;
}

.video-bg video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* La franja superior queda por encima del origen del documento: ahí sólo llega
   el color de fondo del html, ningún elemento puede pintarse. Este degradado
   funde el vídeo con ese mismo color para que el corte no se vea. */
body:not(.page-doc)::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 7rem;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, #314045 0%, rgba(49, 64, 69, 0) 100%);
}

/* ── Layout grid ────────────────────────────────────────────────────────── */
.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns:
    [full-bleed-start] var(--gutter-left)
    [wide-start content-start] minmax(0, 3fr)
    [content-end wide-end] var(--gutter-right)
    [full-bleed-end];
  grid-template-rows:
    [header-start] minmax(0, auto)
    [header-end content-start] 1fr
    [content-end footer-start] minmax(0, auto)
    [footer-end];
  /* dvh: al replegarse las barras, el CTA se reancla al borde real de pantalla */
  min-height: 100svh;
  min-height: 100dvh;
  color: var(--color-beige);
  user-select: none;
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns:
      [full-bleed-start] var(--gutter-left)
      [wide-start] minmax(0, 1fr)
      [content-start] minmax(15rem, 3fr)
      [content-end] minmax(0, 1fr)
      [wide-end] var(--gutter-right)
      [full-bleed-end];
  }
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  grid-column: full-bleed;
  grid-row: header;
  position: relative;
  z-index: 20;
  /* en móvil el banner de cookies está arriba: la cabecera se coloca debajo */
  padding: calc(1rem + var(--safe-top) + var(--cookie-h)) var(--gutter-right) 1rem var(--gutter-left);
  transition: padding-top 0.2s ease;
  pointer-events: none;
}

@media (min-width: 768px) {
  .header { padding: calc(2.5rem + var(--safe-top)) var(--gutter-right) 2.5rem var(--gutter-left); }
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 2.25rem;
  margin: 0 auto;
}

.header__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  max-width: 64rem;
}

.header__logo {
  display: block;
  flex-shrink: 0;
  height: clamp(1.625rem, 7vw, 2rem);
  max-width: 45vw;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .header__nav {
    position: relative;
    width: 100%;
  }

  .header__logo {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 2.25rem;
    max-width: none;
  }
}

.header__logo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.header__links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  pointer-events: auto;
  font-size: 13px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .header__links { display: flex; }
}

@media (min-width: 1024px) {
  .header__links { gap: 3rem; }
}

.header__links a,
.nav-dropdown__trigger {
  transition: font-weight 0.15s;
}

.header__links a:hover,
.nav-dropdown:hover .nav-dropdown__trigger,
.nav-dropdown__menu a:hover {
  font-family: var(--font-strong);
  font-weight: 700;
}

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown__trigger { cursor: default; }

.nav-dropdown__menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  max-width: 9rem;
  padding: 0.5rem 0;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  display: block;
}

.nav-dropdown__menu a {
  display: block;
  padding: 0.25rem 0;
}

/* Mobile menu button */
.header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  margin-block: -0.5rem;
  pointer-events: auto;
  color: var(--color-beige);
  font-size: 0.9375rem;
  line-height: 1;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .header__menu-btn { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  grid-column: content;
  grid-row: content;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 2rem 0;
  margin: auto;
  text-align: center;
  pointer-events: none;
}

.hero__title {
  max-width: min(100%, 22rem);
  /* escala con el ancho de pantalla: nunca se corta por los lados */
  font-size: clamp(1.75rem, 9vw, 3.25rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-beige);
  text-wrap: balance;
  overflow-wrap: break-word;
  /* aire para que el trazo (-webkit-text-stroke) no toque el borde */
  padding-inline: 0.125em;
}

@media (min-width: 768px) {
  .hero__title { max-width: 30rem; }
}

/* Pantallas bajas (móvil en horizontal): menos aire vertical */
@media (max-height: 520px) {
  .hero { padding: 0.75rem 0; }
  .hero__title { font-size: clamp(1.5rem, 5.5vh, 2.5rem); }
}

.hero__title strong {
  font-family: var(--font-strong);
  font-weight: 900;
  -webkit-text-stroke: 1px var(--color-blue);
  color: var(--color-blue);
}

/* ── Footer CTA ─────────────────────────────────────────────────────────── */
.layout > .footer {
  grid-column: full-bleed;
  grid-row: footer;
  display: flex;
  justify-content: center;
  padding: 2.5rem var(--gutter-right) calc(1.5rem + var(--safe-bottom)) var(--gutter-left);
  text-align: center;
}

@media (min-width: 768px) {
  .layout > .footer { padding-bottom: calc(3.75rem + var(--safe-bottom)); }
}

/* Pantallas bajas: el banner ocupa la franja inferior, el CTA se aparta */
@media (max-height: 520px) {
  .layout > .footer { padding-top: 1rem; }
}

@media (min-width: 768px) and (max-height: 520px) {
  .layout > .footer {
    padding-bottom: calc(1rem + var(--safe-bottom) + var(--cookie-h));
  }
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.875rem 2.5rem;
  border-radius: 9999px;
  background: var(--color-beige);
  color: var(--color-black);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: center;
  pointer-events: auto;
  transition: transform 0.15s, opacity 0.15s;
  width: 100%;
  max-width: 26rem;
}

@media (min-width: 768px) {
  .cta-btn { width: auto; }
}

.cta-btn:hover {
  transform: scale(1.03);
  opacity: 0.93;
}

.cta-btn--full { width: 100%; }

/* ── Cookie banner ──────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;
}

@media (min-width: 768px) {
  .cookie-banner {
    top: auto;
    left: auto;
    right: 0;
    bottom: 0;
    width: 33.333%;
    max-width: 30rem;
  }
}

/* Móvil en horizontal: barra inferior a ancho completo, no una columna alta */
@media (min-width: 768px) and (max-height: 520px) {
  .cookie-banner {
    left: 0;
    width: 100%;
    max-width: none;
  }
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  width: 100%;
  padding: calc(0.875rem + var(--safe-top)) var(--gutter-right) 0.875rem var(--gutter-left);
  background: var(--color-black);
}

@media (min-width: 768px) {
  .cookie-banner__inner {
    flex-wrap: nowrap;
    padding: 1.25rem calc(1.25rem + env(safe-area-inset-right, 0px)) calc(1.25rem + var(--safe-bottom)) 1.25rem;
  }
}

.cookie-banner__text {
  flex: 1;
  font-size: 13px;
  line-height: 1.25;
  color: var(--color-beige);
}

@media (min-width: 768px) {
  .cookie-banner__text { font-size: 1rem; }
}

.cookie-banner__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 1rem;
}

.cookie-banner__link,
.cookie-banner__accept {
  color: var(--color-beige);
  font-size: 1rem;
}

.cookie-banner__link:hover,
.cookie-banner__accept:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner__accept { font-weight: 700; }

/* ── Mobile menu overlay ────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--color-black);
  color: var(--color-beige);
}

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 2rem;
  padding: calc(1rem + var(--safe-top)) var(--gutter-right) 1rem var(--gutter-left);
}

.mobile-menu__close {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-beige);
  font-size: 0.9375rem;
}

.mobile-menu__nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem var(--gutter-right) 2rem var(--gutter-left);
}

.mobile-menu__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu__nav a {
  display: inline-block;
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  line-height: 1.08;
  word-break: break-word;
  color: var(--color-beige);
  -webkit-text-stroke: var(--ink) currentColor;
}

.mobile-menu__nav a:hover,
.mobile-menu__nav a:focus {
  font-family: var(--font-strong);
  font-weight: 700;
}

.mobile-menu__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem var(--gutter-right) calc(1.5rem + var(--safe-bottom)) var(--gutter-left);
}

/* ── About page ────────────────────────────────────────────────────────── */

/* Blurred video variant */
.video-bg--blur video {
  filter: blur(6px) brightness(0.7);
  transform: scale(1.05); /* prevent blur white edges */
}

/* About layout override */
.layout--about {
  grid-template-rows:
    [header-start] minmax(0, auto)
    [header-end content-start] 1fr
    [content-end];
}

.about-hero {
  grid-column: full-bleed;
  grid-row: content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 2rem var(--gutter-right) calc(3rem + var(--safe-bottom)) var(--gutter-left);
}

@media (min-width: 768px) {
  .about-hero {
    flex-direction: row;
    gap: 4rem;
    padding: 0 4rem;
  }
}

@media (min-width: 1200px) {
  .about-hero {
    gap: 6rem;
    padding: 0 8rem;
  }
}

/* ── Phone mockup ──────────────────────────────────────────────────────── */
.phone-mockup {
  flex-shrink: 0;
  perspective: 1200px;
}

.phone-mockup__frame {
  position: relative;
  /* 28svh ≈ 60% de alto de pantalla con esta proporción: el móvil entra entero */
  width: min(280px, 68vw, 28svh);
  max-width: 100%;
  height: auto;
  aspect-ratio: 280 / 600;
  overflow: hidden; /* la pantalla nunca se sale del marco */
  background: #1a1a1a;
  border-radius: 44px;
  padding: 4px;
  box-shadow:
    0 0 0 1.5px #444,
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 10px 25px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  .phone-mockup__frame {
    width: 320px;
    aspect-ratio: 320 / 680;
    max-height: none;
    border-radius: 50px;
    padding: 5px;
  }
}

.phone-mockup__notch {
  display: none;
}

/* Posicionada con inset en vez de height:100%: así nunca depende de que el
   navegador resuelva porcentajes contra una altura derivada de aspect-ratio. */
.phone-mockup__screen {
  position: absolute;
  inset: 4px;
  background: #000;
  border-radius: 40px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .phone-mockup__screen {
    inset: 5px;
    border-radius: 46px;
  }
}

/* ── Phone slideshow ───────────────────────────────────────────────────── */
.phone-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.phone-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.phone-slide--active {
  opacity: 1;
}

/* ── About content (text side) ─────────────────────────────────────────── */
.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
  max-width: 28rem;
}

@media (min-width: 768px) {
  .about-content {
    align-items: flex-start;
    text-align: left;
  }
}

.about-content__text {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--color-beige);
  font-weight: 400;
}

@media (min-width: 768px) {
  .about-content__text {
    font-size: 1.25rem;
    line-height: 1.6;
  }
}

.about-content__text strong {
  font-family: var(--font-strong);
  font-weight: 900;
  -webkit-text-stroke: 0.5px var(--color-beige);
}

.about-content .cta-btn {
  width: auto;
  padding: 1rem 3rem;
  font-size: 1rem;
}

/* ── Contact page ──────────────────────────────────────────────────────── */
.layout--contact {
  grid-template-rows:
    [header-start] minmax(0, auto)
    [header-end content-start] 1fr
    [content-end];
}

.contact {
  grid-column: content;
  grid-row: content;
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 1rem 0 calc(3.5rem + var(--safe-bottom));
}

@media (min-width: 768px) {
  .contact { padding-top: 2rem; }
}

.contact__inner {
  width: 100%;
  max-width: 34rem;
  text-align: center;
  /* el formulario sí se puede seleccionar aunque .layout lo bloquee */
  user-select: text;
}

.contact__title {
  font-size: clamp(2rem, 10vw, 3.25rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-beige);
  text-wrap: balance;
  padding-inline: 0.125em;
}

.contact__title strong {
  font-family: var(--font-strong);
  font-weight: 900;
  -webkit-text-stroke: 1px var(--color-blue);
  color: var(--color-blue);
}

.contact__sub {
  max-width: 26rem;
  margin: 1rem auto 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-beige);
  text-wrap: balance;
}

@media (min-width: 768px) {
  .contact__sub { font-size: 1.125rem; }
}

/* ── Contact form ──────────────────────────────────────────────────────── */
.contact-form {
  margin-top: 2.5rem;
  text-align: left;
}

@media (min-width: 768px) {
  .contact-form { margin-top: 3rem; }
}

/* Trampa antispam: invisible y fuera del alcance del usuario */
.contact-form__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-field {
  position: relative;
  margin-bottom: 1.75rem;
}

/* La etiqueta existe para lectores de pantalla; en pantalla la hace el placeholder */
.contact-field__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-field__input {
  display: block;
  width: 100%;
  padding: 0.625rem 0;
  border: none;
  border-bottom: 1px solid var(--color-beige);
  border-radius: 0;
  background: transparent;
  color: var(--color-beige);
  font-family: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  user-select: text;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s;
}

.contact-field__input::placeholder {
  color: var(--color-beige);
  opacity: 0.75;
}

.contact-field__input:focus {
  outline: none;
  border-bottom-color: var(--color-blue);
}

.contact-field__input:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 4px;
}

/* Autocompletado de Chrome: sin el fondo azul por defecto */
.contact-field__input:-webkit-autofill,
.contact-field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-beige);
  transition: background-color 9999s;
}

.contact-field__textarea {
  min-height: 3rem;
  overflow: hidden;
  resize: none;
}

/* Select: flecha propia, porque appearance:none quita la nativa */
.contact-field__select {
  padding-right: 2rem;
  cursor: pointer;
}

/* Placeholder del select (la opción deshabilitada) atenuado como los demás */
.contact-field__select:invalid { opacity: 0.75; }

.contact-field__select option {
  background: var(--color-black);
  color: var(--color-beige);
}

.contact-field--select::after {
  content: '';
  position: absolute;
  right: 0.25rem;
  top: 1.125rem;
  width: 0.625rem;
  height: 0.625rem;
  border-right: 1.5px solid var(--color-beige);
  border-bottom: 1.5px solid var(--color-beige);
  transform: rotate(45deg);
  pointer-events: none;
}

.contact-form__actions {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.contact-form__actions .cta-btn {
  padding: 1rem 3rem;
  font-size: 1rem;
}

.contact-form__actions .cta-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.contact-form__status:empty { display: none; }

.contact-form__status {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
  color: var(--color-beige);
}

.contact-form__status--error { color: #F2B8B5; }

.contact-form__legal {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
  color: var(--color-beige);
  opacity: 0.8;
}

.contact-form__legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Páginas de documento (privacidad, soporte) ─────────────────────────── */
/* No llevan vídeo de fondo: fondo claro propio y la misma tipografía Exposure */
html.theme-doc {
  background-color: var(--color-default-bg);
}

.page-doc {
  background: var(--color-default-bg);
  color: var(--text);
}

.page-doc .nav {
  display: flex;
  align-items: center;
  padding: 1.5rem var(--gutter-right) 0 var(--gutter-left);
}

.page-doc .nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.page-doc .footer {
  padding: 2rem var(--gutter-right) calc(2rem + var(--safe-bottom)) var(--gutter-left);
  border-top: 1px solid rgba(42, 42, 42, 0.12);
}

.page-doc .footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 740px;
  margin: 0 auto;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.page-doc .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.page-doc .footer-links a:hover { text-decoration: underline; }

/* ── Componente "documento" (legales y FAQ) ─────────────────────────────── */
.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: calc(1.25rem + var(--safe-top)) var(--gutter-right) 0 var(--gutter-left);
}

.doc-topbar__logo {
  display: block;
  height: clamp(1.5rem, 6vw, 1.875rem);
}

.doc-topbar__logo img {
  display: block;
  height: 100%;
  width: auto;
}

.doc-topbar__close {
  font-size: 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.doc-topbar__close:hover { text-decoration: underline; text-underline-offset: 3px; }

.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter-right) 4rem var(--gutter-left);
}

.doc__mark {
  display: block;
  width: 4.5rem;
  height: auto;
  margin: 0 auto 2rem;
  color: var(--text);
}

.doc__title {
  font-size: clamp(2.5rem, 11vw, 4rem);
  line-height: 1.02;
  font-weight: 400;
  text-align: center;
  text-wrap: balance;
  -webkit-text-stroke: var(--ink) currentColor;
}

.doc__updated {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.doc__intro {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

.doc__toc { margin-top: 3rem; }

.doc__toc h2 {
  font-size: 1.75rem;
  font-weight: 400;
  -webkit-text-stroke: var(--ink) currentColor;
}

.doc__toc ul {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.doc__toc li { color: var(--text-muted); }

.doc__toc a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.doc section { margin-top: 3rem; scroll-margin-top: 1.5rem; }

.doc h2 {
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
  -webkit-text-stroke: var(--ink) currentColor;
}

.doc h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 1.75rem 0 0.5rem;
}

.doc p, .doc li {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-soft);
}

.doc p + p { margin-top: 1rem; }

.doc ul, .doc ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: disc;
}

.doc ol { list-style: decimal; }

.doc a:not(.doc__toc a) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc strong { color: var(--text); font-weight: 700; }

.doc__note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
}

.doc__placeholder {
  background: rgba(214, 158, 46, 0.22);
  padding: 0 0.25rem;
  border-radius: 3px;
  font-weight: 700;
  color: var(--text);
}

.doc__table {
  width: 100%;
  margin-top: 1.25rem;
  border-collapse: collapse;
  font-size: 1rem;
}

.doc__table-wrap { overflow-x: auto; }

.doc__table th, .doc__table td {
  padding: 0.75rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid rgba(42, 42, 42, 0.14);
  vertical-align: top;
  color: var(--text-soft);
}

.doc__table th { color: var(--text); font-weight: 700; }

.doc-footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem var(--gutter-right) calc(2.5rem + var(--safe-bottom)) var(--gutter-left);
  border-top: 1px solid rgba(42, 42, 42, 0.12);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.doc-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
}

.doc-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

.doc ul + p,
.doc ol + p,
.doc .doc__table-wrap + p,
.doc .doc__note + p { margin-top: 1rem; }

/* ── Impresión / PDF ────────────────────────────────────────────────────── */
@media print {
  html.theme-doc, .page-doc { background: #fff; }
  .doc-topbar__close { display: none; }
  .doc { max-width: none; padding: 0 0 1rem; }
  .doc-topbar, .doc-footer { max-width: none; padding-left: 0; padding-right: 0; }
  .doc__title { font-size: 2.25rem; }
  .doc h2 { font-size: 1.375rem; page-break-after: avoid; break-after: avoid; }
  .doc h3 { page-break-after: avoid; break-after: avoid; }
  .doc section { margin-top: 1.75rem; page-break-inside: auto; }
  .doc p, .doc li { font-size: 10.5pt; line-height: 1.5; color: #2A2A2A; }
  .doc__toc a, .doc a { color: #2A2A2A; }
  .doc__note { border-left-color: #999; background: #f2f2f2; }
  .doc__placeholder { background: #eee; border: 1px solid #999; }
  .doc__table { page-break-inside: avoid; }
}
