/* ============================================================
   Ayuda de Dodo DOCS — hoja de estilo compartida
   Identidad visual de 3ysolutions.com:
     tipografías  Bricolage Grotesque / Source Sans 3 / JetBrains Mono
     acento       cian  #00BDC7  (enlaces y estados: cyan-deep)
     tema         claro / oscuro con conmutador (data-theme + localStorage)
   ============================================================ */

:root {
  /* superficies */
  --ground: #f4f7f8;        /* page-alt: fondo de página */
  --surface: #ffffff;        /* page */
  --surface-2: #e9eff1;      /* sunken */
  /* texto */
  --ink: #10243a;
  --ink-soft: #4e6779;
  --muted: #8ca1af;          /* ink-faint */
  /* líneas */
  --border: #dce6ea;         /* rule */
  --border-strong: #c7d5dc;
  /* acento cian */
  --accent: #00bdc7;         /* cyan */
  --accent-ink: #00707a;     /* cyan-deep — enlaces, eyebrows, estado activo */
  --accent-bg: #e0f7f9;      /* cyan-wash */
  /* dorado — usado en consejos y etiqueta de administradores */
  --code-ink: #6b6200;       /* gold-deep */
  --code-bg: #f7f1be;        /* gold-wash */
  --code-border: #e5d982;
  --warn-bg: #f7f1be;
  --warn-border: #e5d982;
  --warn-ink: #6b6200;
  --danger-bg: #fbeae8;
  --danger-border: #e6b0a8;
  --danger-ink: #98261a;
  /* verde — usado solo en la insignia "Nuevo" */
  --new-bg: #e2f6ea;
  --new-border: #a7ddbc;
  --new-ink: #16794a;
  --shadow: 0 1px 2px rgba(16,36,58,.05), 0 20px 46px -26px rgba(16,36,58,.28);
  /* tipografías */
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body-font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --meta: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

/* Oscuro por preferencia del sistema (salvo que el usuario haya elegido claro) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0a1620;
    --surface: #0e1e2b;
    --surface-2: #060f17;
    --ink: #e8f2f7;
    --ink-soft: #94aebe;
    --muted: #627d8e;
    --border: #1a3244;
    --border-strong: #24435a;
    --accent: #2bdde9;
    --accent-ink: #00bdc7;
    --accent-bg: #07303a;
    --code-ink: #f1e7a2;
    --code-bg: #2b2607;
    --code-border: #4a4210;
    --warn-bg: #2b2607;
    --warn-border: #4a4210;
    --warn-ink: #f1e7a2;
    --danger-bg: #2a1512;
    --danger-border: #5a2a22;
    --danger-ink: #f0a99e;
    --new-bg: #0f2b1c;
    --new-border: #1f4a30;
    --new-ink: #7fe3ab;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 20px 46px -26px rgba(0,0,0,.85);
  }
}

/* Oscuro elegido explícitamente con el conmutador */
:root[data-theme="dark"] {
  --ground: #0a1620;
  --surface: #0e1e2b;
  --surface-2: #060f17;
  --ink: #e8f2f7;
  --ink-soft: #94aebe;
  --muted: #627d8e;
  --border: #1a3244;
  --border-strong: #24435a;
  --accent: #2bdde9;
  --accent-ink: #00bdc7;
  --accent-bg: #07303a;
  --code-ink: #f1e7a2;
  --code-bg: #2b2607;
  --code-border: #4a4210;
  --warn-bg: #2b2607;
  --warn-border: #4a4210;
  --warn-ink: #f1e7a2;
  --danger-bg: #2a1512;
  --danger-border: #5a2a22;
  --danger-ink: #f0a99e;
  --new-bg: #0f2b1c;
  --new-border: #1f4a30;
  --new-ink: #7fe3ab;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 20px 46px -26px rgba(0,0,0,.85);
}

/* Claro elegido explícitamente (gana sobre prefers-color-scheme: dark) */
:root[data-theme="light"] {
  --ground: #f4f7f8;
  --surface: #ffffff;
  --surface-2: #e9eff1;
  --ink: #10243a;
  --ink-soft: #4e6779;
  --muted: #8ca1af;
  --border: #dce6ea;
  --border-strong: #c7d5dc;
  --accent: #00bdc7;
  --accent-ink: #00707a;
  --accent-bg: #e0f7f9;
  --code-ink: #6b6200;
  --code-bg: #f7f1be;
  --code-border: #e5d982;
  --warn-bg: #f7f1be;
  --warn-border: #e5d982;
  --warn-ink: #6b6200;
  --danger-bg: #fbeae8;
  --danger-border: #e6b0a8;
  --danger-ink: #98261a;
  --new-bg: #e2f6ea;
  --new-border: #a7ddbc;
  --new-ink: #16794a;
  --shadow: 0 1px 2px rgba(16,36,58,.05), 0 20px 46px -26px rgba(16,36,58,.28);
}

* { box-sizing: border-box; }
/* Tamaño base de todo el sitio. Subir aquí escala texto y espacios en rem
   de forma proporcional (títulos, lede, intro, índice…). */
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body-font);
  font-weight: 400;
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
::selection { background: var(--code-bg); color: var(--ink); }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px 120px;
}

/* ---------- Barra superior ---------- */
.sitebar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.sitebar .wrap {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sitebar a { color: inherit; text-decoration: none; }

/* marca: logo 3Y (dos variantes por tema) + nombre del producto */
.sitebar .brand { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.sitebar .brand img { height: 58px; width: auto; display: block; }
.sitebar .brand .logo-dark { display: none; }
:root[data-theme="dark"] .sitebar .brand .logo-light { display: none; }
:root[data-theme="dark"] .sitebar .brand .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sitebar .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .sitebar .brand .logo-dark { display: block; }
}
.sitebar .brand .prod {
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -0.02em;
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
  color: var(--ink-soft);
}
.sitebar .brand .prod span { color: var(--accent-ink); }

.sitebar .right { display: flex; align-items: center; gap: 13px; }
.sitebar nav {
  font-family: var(--meta);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sitebar nav a:hover { color: var(--accent-ink); }

/* ---------- Conmutador de tema (44x44, área táctil) ---------- */
.toggle {
  width: 40px; height: 40px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color .15s, color .15s;
  flex: none;
}
.toggle:hover { border-color: var(--ink); color: var(--ink); }
.toggle svg { width: 17px; height: 17px; }
.toggle .moon { display: none; }
:root[data-theme="dark"] .toggle .sun { display: none; }
:root[data-theme="dark"] .toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toggle .sun { display: none; }
  :root:not([data-theme="light"]) .toggle .moon { display: block; }
}

/* ---------- Miga de pan ---------- */
.crumbs {
  font-family: var(--meta);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 26px 0 0;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs .sep { padding: 0 7px; opacity: .6; }

/* ---------- Cabecera de artículo ---------- */
header.mast {
  padding: 18px 0 34px;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  font-family: var(--meta);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 16px;
}
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.95rem, 4.6vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 18px;
}
.lede {
  max-width: 62ch;
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.meta-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Escuchar artículo (síntesis de voz del navegador) ---------- */
.listen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.listen:hover { border-color: var(--accent); color: var(--accent-ink); }
.listen svg { width: 16px; height: 16px; flex: none; }
.listen[data-state="reproduciendo"],
.listen[data-state="pausado"] {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-bg);
}
.listen[hidden] { display: none; }

/* ---------- Distribución ---------- */
.layout { display: block; }
@media (min-width: 1000px) {
  .layout {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
  }
}

nav.toc { margin: 40px 0 0; }
@media (min-width: 1000px) {
  nav.toc {
    position: sticky;
    top: 28px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    margin-top: 56px;
  }
}
nav.toc h2 {
  font-family: var(--meta);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 500;
}
nav.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
nav.toc li { margin: 0; }
nav.toc a {
  counter-increment: toc;
  display: flex;
  gap: 9px;
  padding: 6px 0 6px 10px;
  margin-left: -12px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
nav.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--meta);
  font-size: 12px;
  color: var(--muted);
  padding-top: 2px;
}
nav.toc a:hover { color: var(--accent-ink); }
nav.toc a.active {
  color: var(--accent-ink);
  border-left-color: var(--accent);
  font-weight: 600;
}

main { min-width: 0; }
main a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
main a:hover { text-decoration-thickness: 2px; }

/* ---------- Llamados / notas ---------- */
.note {
  margin: 26px 0 8px;
  padding: 16px 20px;
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.note b { color: var(--ink); }
.note.result {
  background: var(--surface-2);
  border-color: var(--border-strong);
  border-left-color: var(--border-strong);
}
.note.tip,
.note.aviso {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  border-left-color: var(--warn-ink);
  color: var(--warn-ink);
}
.note.tip b,
.note.aviso b { color: var(--warn-ink); }
.note.warn {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  border-left-color: var(--danger-ink);
  border-left-width: 4px;
  color: var(--danger-ink);
}
.note.warn b { color: var(--danger-ink); }

/* ---------- Secciones ---------- */
section.area {
  padding-top: 52px;
  scroll-margin-top: 24px;
}
section.area > h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 6px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-strong);
}
section.area > h2 .num {
  font-family: var(--meta);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-ink);
  margin-right: 12px;
}
section.area > p {
  color: var(--ink-soft);
  margin: 14px 0 4px;
  max-width: 66ch;
}
section.area > p.intro { font-size: 1.03rem; color: var(--ink); }
section.area h3 {
  font-family: var(--display);
  font-size: 1.14rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 26px 0 4px;
  color: var(--ink);
}
section.area ul, section.area ol { max-width: 66ch; color: var(--ink-soft); }
section.area li { margin: 3px 0; }
section.area strong { color: var(--ink); }

/* pasos numerados */
ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 18px 0 6px;
  max-width: 66ch;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 2px 0 12px 40px;
  color: var(--ink-soft);
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-family: var(--meta);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
}

/* ---------- Etiquetas ---------- */
.tag {
  display: inline-block;
  font-family: var(--meta);
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 2px 7px;
  white-space: nowrap;
}
.tag.accent {
  color: var(--accent-ink);
  border-color: var(--border);
  background: var(--accent-bg);
}
.tag.admin {
  color: var(--code-ink);
  border-color: var(--code-border);
  background: var(--code-bg);
}

/* Insignia "Nuevo": marca una novedad reciente. Cada una lleva
   data-new="AAAA-MM-DD" (fecha en que se agregó a esta ayuda); un script
   en cada página la oculta sola pasados 8 meses — ver NEW_BADGE_JS en
   build_site.py. Sin JavaScript, la insignia queda visible siempre. */
.badge-new {
  display: inline-block;
  font-family: var(--meta);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--new-ink);
  background: var(--new-bg);
  border: 1px solid var(--new-border);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: 2px;
  white-space: nowrap;
}

/* ---------- Figuras ---------- */
figure.shot {
  margin: 20px 0 6px;
  max-width: 720px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
figure.shot.narrow { max-width: 420px; }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption {
  font-family: var(--meta);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  letter-spacing: .02em;
}

/* ---------- Enlaces prev/next ---------- */
.prevnext {
  display: grid;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
@media (min-width: 620px) { .prevnext { grid-template-columns: 1fr 1fr; } }
.prevnext a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
}
.prevnext a:hover { border-color: var(--accent); }
.prevnext .dir {
  font-family: var(--meta);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.prevnext .next { text-align: right; }

a.top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-family: var(--meta);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
a.top:hover { color: var(--accent-ink); }

footer.end {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  font-family: var(--meta);
  line-height: 1.7;
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Portada ---------- */
.hero { padding: 64px 0 34px; border-bottom: 1px solid var(--border); }
.hero:has(.buscar-hint:not([hidden])) { padding-bottom: 18px; }
.hero p { max-width: 64ch; color: var(--ink-soft); }
.cat { padding-top: 44px; }
.cat h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-strong);
}
.cards {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 18px 18px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .15s, border-color .15s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.card .icn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-bg);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.card .icn svg { width: 19px; height: 19px; }
.card b { font-weight: 700; font-size: .98rem; display: block; margin-bottom: 6px; }
.card p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .go {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--meta);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card:hover .go { color: var(--accent-ink); }
.card.pending { border-left-color: var(--border-strong); opacity: .62; }
.card.pending .icn { background: var(--surface-2); color: var(--muted); }
.card[hidden] { display: none; }

.cat h2 .count {
  font-family: var(--meta);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  margin-left: 8px;
  vertical-align: 2px;
}
.muted-note { color: var(--muted); font-size: 15px; }
.buscar-hint { margin-top: 10px; }
.buscar-hint span {
  display: inline-block;
  font-size: 13px;
  color: var(--accent-ink);
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 11px;
}
.buscar {
  margin-top: 22px;
  width: 100%;
  max-width: 420px;
  display: block;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}
.buscar:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 620px) {
  .sitebar .brand .prod { display: none; }
  .sitebar .brand img { height: 46px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 18px 90px; }
}


/* Flechas para subir y bajar: aparecen solo cuando la página tiene barra de desplazamiento */
.scroll-nav {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scroll-nav[hidden], .scroll-nav-btn[hidden] { display: none; }
.scroll-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 36, 58, .16);
  transition: color .15s, border-color .15s, transform .15s;
}
.scroll-nav-btn:hover { color: var(--accent-ink); border-color: var(--accent); transform: translateY(-1px); }
@media print { .scroll-nav { display: none; } }


/* ============================================================
   Portada nueva (menú lateral + perfiles). Usa los tokens del sitio
   y agrega los propios, en claro y oscuro.
   ============================================================ */
:root {
  --nav-bg: #013c75; --nav-fg: #d4e6f5; --nav-on-bg: #ffffff; --nav-on-fg: #013c75; --nav-faint: #7fe3e9;
  --title: #013c75; --chip: #e1f7f8;
  --tab-bg: #e3edf3; --tab-on-bg: #013c75; --tab-on-fg: #ffffff;
  --btn-bg: #13243a; --btn-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nav-bg: #01274d; --nav-fg: #c3d6e8; --nav-on-bg: #12263d; --nav-on-fg: #ffffff; --nav-faint: #33d4dd;
    --title: #e4f1ff; --chip: #0f3a4a;
    --tab-bg: #12263d; --tab-on-bg: #00bdc7; --tab-on-fg: #06222b;
    --btn-bg: #00bdc7; --btn-fg: #06222b;
  }
}
:root[data-theme="dark"] {
  --nav-bg: #01274d; --nav-fg: #c3d6e8; --nav-on-bg: #12263d; --nav-on-fg: #ffffff; --nav-faint: #33d4dd;
  --title: #e4f1ff; --chip: #0f3a4a;
  --tab-bg: #12263d; --tab-on-bg: #00bdc7; --tab-on-fg: #06222b;
  --btn-bg: #00bdc7; --btn-fg: #06222b;
}

.home { display: flex; flex-wrap: wrap; min-height: 100vh; }
.home [hidden] { display: none !important; }
.home-side {
  scrollbar-width: none;
  flex: 0 0 300px; box-sizing: border-box; background: var(--nav-bg); color: #fff;
  padding: 32px 24px; display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow: hidden;
}
.home-side .dodo { width: 190px; height: auto; display: block; }
.home-side .lbl { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--nav-faint); }
.home-side nav { display: flex; flex-direction: column; gap: 4px; font-size: 16px; font-weight: 600; line-height: 1.35;
  position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; margin-right: -8px; padding-right: 8px; }
.home-side nav::-webkit-scrollbar { display: none; }
.home-side .dodo, .home-side .lbl { flex: none; }
.home-side nav a {
  color: var(--nav-fg); text-decoration: none; padding: 12px 14px; border-radius: 12px;
  display: flex; justify-content: space-between; gap: 12px;
}
.home-side nav a:hover { background: rgba(255,255,255,.08); }
.home-side nav a.on { background: var(--nav-on-bg); color: var(--nav-on-fg); }
.home-side nav .n { opacity: .65; }

.home-main {
  flex: 999 1 720px; min-width: 0; box-sizing: border-box; padding: 48px 64px 64px;
  display: flex; flex-direction: column; gap: 48px;
}
.home-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.home-search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 16px; padding: 6px 6px 6px 18px;
}
.home-search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.home-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 17px;
}
.home-search button {
  border: 0; background: var(--btn-bg); color: var(--btn-fg); font: inherit; font-weight: 700;
  font-size: 15px; padding: 12px 22px; border-radius: 12px; min-height: 44px; cursor: pointer;
}
.home-top .toggle { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); }
.home-top .toggle svg { width: 22px; height: 22px; }
.home-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.home-hero .eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 16px; }
.home-hero h1 {
  margin: 0 0 16px; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.08; color: var(--title); max-width: 760px;
}
.home-hero p { margin: 0; font-size: 1.12rem; line-height: 1.5; color: var(--ink-soft); max-width: 660px; }
.home-hero .home-hint { margin: 14px 0 0; font-size: 15px; color: var(--muted); }

.home .mod { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.home .mod .h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.home .mod h2, .home .mod h3 { margin: 0; font-family: var(--display); font-size: 23px; font-weight: 700; line-height: 1.2; color: var(--title); border: 0; padding: 0; }
.home .mod .n { color: var(--muted); font-size: 15px; white-space: nowrap; }
.home .mod ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.home .item { display: flex; align-items: flex-start; gap: 10px; text-decoration: none; font-size: 17px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.home .item:hover { color: var(--accent-ink); }
.home .item .bul { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; color: var(--accent-ink); }
.home .more { align-self: flex-start; border: 0; background: none; padding: 4px 0 0; font: inherit; font-weight: 700; color: var(--accent-ink); cursor: pointer; }
.home .more:hover { text-decoration: underline; }

.home .start { border-radius: 24px; padding: 28px 32px; }
.home .start ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.home .start li a {
  display: block; height: 100%; box-sizing: border-box; background: var(--chip); border-radius: 16px;
  padding: 18px; text-decoration: none; color: var(--title); font-weight: 700; font-size: 17px; line-height: 1.3;
}
.home .start li a:hover { outline: 2px solid var(--accent); }
.home .start .item .bul { display: none; }

.home-tabs { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.home-tabs .seg { display: inline-flex; gap: 8px; background: var(--tab-bg); padding: 6px; border-radius: 999px; flex-wrap: wrap; }
.home-tabs button {
  border: 0; background: transparent; color: var(--title); font: inherit; font-weight: 700; font-size: 16px;
  padding: 10px 22px; border-radius: 999px; cursor: pointer;
}
.home-tabs button[aria-pressed="true"] { background: var(--tab-on-bg); color: var(--tab-on-fg); }
.home-tabs .hint-perfil { font-size: 15px; color: var(--muted); }
.home .mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.home-empty { color: var(--ink-soft); font-size: 1.05rem; }

.home-foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  border-top: 1px solid var(--border); padding-top: 28px; color: var(--muted); font-size: 15px;
}
.home-foot .by { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.home-foot img { width: 150px; height: auto; display: block; }
.home-foot .logo-dark { display: none; }
:root[data-theme="dark"] .home-foot .logo-light { display: none; }
:root[data-theme="dark"] .home-foot .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-foot .logo-light { display: none; }
  :root:not([data-theme="light"]) .home-foot .logo-dark { display: block; }
}

@media (max-width: 1100px) { .home .start ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .home-side { flex-basis: 100%; position: static; height: auto; padding: 20px 24px; }
  .home-side nav, .home-side .lbl { display: none; }
  .home-main { padding: 28px 24px 48px; gap: 36px; }
  .home .mods { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .home .start ul { grid-template-columns: 1fr; }
  .home-main { padding: 24px 18px 40px; }
  .home-tabs .seg { flex-direction: column; flex-wrap: nowrap; width: 100%; border-radius: 18px; gap: 4px; box-sizing: border-box; }
  .home-tabs button { text-align: left; border-radius: 12px; }
  .home .mod { padding: 22px; }
}


/* ---------- Artículo con el diseño nuevo (tarjetas) ---------- */
.home-side::-webkit-scrollbar { display: none; }
.home-side nav .sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 8px 14px; padding-left: 12px; border-left: 2px solid rgba(255,255,255,.18); }
.home-side nav .sub a { padding: 8px 10px; font-size: 14.5px; font-weight: 600; border-radius: 10px; line-height: 1.3; }
.home-side nav .sub a.cur { background: rgba(0,189,199,.22); color: #fff; }

.art .home-main { gap: 28px; padding: 40px 56px 56px; }
/* Cabezote fijo: miga de pan, buscador y tema siempre a la vista */
.art .art-top {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 30;
  margin: -40px -56px 0; padding: 14px 56px;
  background: var(--ground); border-bottom: 1px solid var(--border);
}
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .art .art-top { background: color-mix(in srgb, var(--ground) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.art .art-top .crumbs { flex: 1 1 240px; margin: 0; padding: 0; font-size: 12.5px; }
.art .art-top .home-search { flex: 0 1 340px; padding: 4px 4px 4px 14px; border-radius: 14px; }
.art .art-top .home-search input { font-size: 16px; }
.art .art-top .home-search button { padding: 10px 16px; min-height: 40px; font-size: 14px; border-radius: 10px; }

.art header.mast {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 36px 40px;
}
.art header.mast h1 { color: var(--title); font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.art header.mast .lede { max-width: 720px; font-size: 1.2rem; }
.art .meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.art .meta-row .meta-tags { margin: 0; }
.art .meta-row .listen { margin: 0 0 0 auto; }

.art-grid { display: flex; flex-direction: column; gap: 28px; }
.art .art-body { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.art nav.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 24px; margin: 0; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: none;
}
.art nav.toc::-webkit-scrollbar { display: none; }
.art nav.toc a { margin-left: 0; border-left: 0; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 1rem; }
.art nav.toc a.active { background: var(--chip); color: var(--accent-ink); }
@media (min-width: 1280px) {
  .art-grid { flex-direction: row-reverse; align-items: flex-start; }
  .art-grid nav.toc { flex: 0 0 260px; position: sticky; top: 92px; max-height: calc(100vh - 116px); }
  .art-grid .art-body { flex: 1 1 0; }
}

.art section.area {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 36px 40px; scroll-margin-top: 92px;
}
.art section.area > h2 {
  display: flex; align-items: center; gap: 14px; font-size: 1.5rem;
  color: var(--title); border: 0; padding: 0; margin: 0 0 18px;
}
.art section.area > h2 .num {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; margin: 0;
  border-radius: 11px; background: var(--accent); color: #06222b;
  font-family: var(--display); font-size: 16px; font-weight: 800;
}
.art section.area > p { max-width: 70ch; }
.art ol.steps > li { padding-left: 46px; }
.art ol.steps > li::before {
  width: 30px; height: 30px; background: var(--chip); border: 0; color: var(--accent-ink);
  font-family: var(--body-font); font-size: 15px; top: 1px;
}
.art figure.shot { max-width: 100%; border-radius: 18px; }
.art figure.shot.narrow { max-width: 420px; }
.art .note { border-radius: 16px; }
.prevnext .arr { display: none; }
.art .prevnext { border: 0; margin: 0; padding: 0; gap: 16px; display: grid; grid-template-columns: 1fr; }
@media (min-width: 700px) { .art .prevnext { grid-template-columns: 1fr 1fr; } }
.art .prevnext a {
  display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-radius: 22px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.art .prevnext a.next { justify-content: space-between; text-align: right; }
.art .prevnext a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.art .prevnext .txt { flex: 1 1 auto; min-width: 0; }
.art .prevnext .dir {
  display: block; margin: 0; font-family: var(--body-font); font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.art .prevnext .ttl {
  display: block; margin-top: 3px; font-family: var(--display); font-size: 1rem; font-weight: 700;
  line-height: 1.25; color: var(--title);
}
.art .prevnext .arr {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--chip); color: var(--accent-ink); transition: background .15s, color .15s, transform .15s;
}
.art .prevnext .arr svg { width: 18px; height: 18px; }
.art .prevnext a:hover .arr { background: var(--accent); color: #06222b; }
.art .prevnext a.prev:hover .arr { transform: translateX(-3px); }
.art .prevnext a.next:hover .arr { transform: translateX(3px); }
@media (max-width: 900px) { .art .home-main { padding: 20px 18px 40px; } .art .art-top { margin: -20px -18px 0; padding: 12px 18px; } .art header.mast, .art section.area { padding: 26px 22px; } }
@media (max-width: 560px) { .art .meta-row .listen { margin-left: 0; } }

/* ---------- Aviso de filtro en la portada ---------- */
.home-filter {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--chip); border: 1px solid var(--accent); border-radius: 16px;
  padding: 12px 18px; color: var(--title); font-weight: 600; margin-top: -24px;
}
.home-filter svg { width: 20px; height: 20px; flex: none; color: var(--accent-ink); }
.home-filter button {
  margin-left: auto; border: 0; border-radius: 10px; padding: 8px 16px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg); font: inherit; font-weight: 700; font-size: 15px;
}
.home.filtering .home-search { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.home.filtering .home-tabs .seg { opacity: .45; }
.home.filtering .home-tabs .hint-perfil { visibility: hidden; }
@media (max-width: 560px) { .home-filter button { margin-left: 0; } }

/* ---------- Resaltado y extracto de la búsqueda ---------- */
.home .item .t { display: block; min-width: 0; }
.home .snip { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--muted); }
.home .snip[hidden] { display: none; }
.home mark { background: rgba(0,189,199,.3); color: inherit; border-radius: 4px; padding: 0 2px; }
.home .start li a .snip { font-weight: 400; color: var(--ink-soft); }
