/* =====================================================================
   NUBE EN CASA · tema de Ghost para nubeen.casa
   Tokens copiados de brand/tokens.css (fuente de verdad). Si cambian allí, se cambian aquí.
   Escala adaptada a web: los mínimos del brandbook (36 px, peso 600) son para vídeo a un brazo
   de distancia; en una guía larga el cuerpo va a 18–19 px y peso 430 para leer sin cansar.
   ===================================================================== */

/* ---------- Fuentes locales ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  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;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-Variable-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --nc-case: #EDE3CC;
  --nc-case-shade: #DCCDAC;
  --nc-paper: #FFF8E8;
  --nc-night: #17140F;
  --nc-night-2: #27221A;
  --nc-ink: #1A1712;
  --nc-ink-2: #4A4236;
  --nc-turbo: #E8461B;
  --nc-turbo-deep: #B0330D;
  --nc-turbo-light: #FF7A52;
  --nc-sky: #2B5FE0;
  --nc-sky-deep: #1D47B8;
  --nc-sky-light: #8FB1FF;
  --nc-led: #FFB21A;
  --nc-ok: #186640;

  /* Tintes para fondos de avisos (siempre con tinta encima, contraste > 12:1) */
  --tint-sky: #DFE7FB;
  --tint-turbo: #F9DCCF;
  --tint-led: #FFE8B5;
  --tint-ok: #DCEBDD;
  --code-bg: #F3EAD3;

  --font-display: var(--gh-font-heading, "Archivo"), "Arial Black", sans-serif;
  --font-text: var(--gh-font-body, "Archivo"), Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --border: 3px;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --shadow: 6px 6px 0 0 var(--nc-ink);
  --shadow-lg: 10px 10px 0 0 var(--nc-ink);
  --grille: radial-gradient(circle, rgba(26, 23, 18, .10) 1.5px, transparent 1.6px) 0 0 / 24px 24px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-stamp: cubic-bezier(.34, 1.56, .64, 1);

  --measure: 41rem;          /* ~68 caracteres a 19 px */
  --wide: 56rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--nc-case);
  color: var(--nc-ink);
  font-family: var(--font-text);
  font-size: 1.125rem;
  font-weight: 430;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 760px) { body { font-size: 1.1875rem; } }
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
::selection { background: var(--nc-led); color: var(--nc-ink); }

:focus-visible {
  outline: 3px solid var(--nc-sky-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--nc-led); color: var(--nc-ink);
  font-weight: 800; border: var(--border) solid var(--nc-ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.site-main:focus { outline: none; }
.mono { font-family: var(--font-mono); font-weight: 600; }
.grille { background-image: var(--grille); background-position: 12px 12px; }

/* ---------- Cabecera ---------- */
.site-header { background: var(--nc-case); }
.site-header-inner {
  max-width: 76rem; margin: 0 auto; padding: 1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.logo-plate {
  display: inline-flex; align-items: stretch; text-decoration: none;
  background: var(--nc-ink); border-radius: var(--radius-sm); padding: 4px;
  box-shadow: 4px 4px 0 0 rgba(26, 23, 18, .35);
}
.logo-plate-mark {
  display: grid; place-items: center; width: 2.4rem; background: var(--nc-paper);
  border-radius: 3px; color: var(--nc-ink);
}
.logo-plate-mark .marca { width: 2rem; height: 2rem; }
.logo-plate-name {
  display: flex; align-items: center; gap: .55em; padding: 0 .7rem 0 .75rem;
  font: 700 1.05rem/1 var(--font-mono); letter-spacing: .06em; color: var(--nc-paper); white-space: nowrap;
}
.on { color: var(--nc-led); }
.site-nav { display: flex; align-items: center; gap: .5rem 1.25rem; flex-wrap: wrap; }
.nav-list { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.nav-list a {
  font-weight: 700; text-decoration: none; padding: .2rem 0;
  border-bottom: 3px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--nc-turbo); }
.nav-list .is-current a { border-bottom-color: var(--nc-ink); }
.search-button {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font: 700 .95rem/1 var(--font-text); color: var(--nc-ink);
  background: var(--nc-paper); border: 2px solid var(--nc-ink); border-radius: var(--radius-sm);
  padding: .45rem .7rem; box-shadow: 3px 3px 0 0 var(--nc-ink);
}
.search-button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--nc-ink); }
.search-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 var(--nc-ink); }
@media (max-width: 520px) {
  .logo-plate-name { font-size: .92rem; }
  .search-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.3rem;
  font: 800 1.05rem/1.1 var(--font-text); font-stretch: 105%; text-decoration: none; color: var(--nc-ink);
  border: var(--border) solid var(--nc-ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 0 var(--nc-ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 0 var(--nc-ink); }
.btn-turbo { background: var(--nc-turbo); }   /* tinta sobre turbo: 4,5:1 */
.btn-paper { background: var(--nc-paper); }

/* ---------- Kicker de serie ---------- */
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 1.4rem; }
.kicker-plate {
  display: inline-flex; gap: .55em; padding: .35rem .65rem .4rem;
  background: var(--nc-ink); color: var(--nc-paper); border-radius: var(--radius-sm);
  font: 700 .95rem/1 var(--font-mono); letter-spacing: .06em;
}
.kicker-rest { font-weight: 800; font-size: 1.05rem; }

/* ---------- Portada ---------- */
.home-hero { border-top: 2px solid rgba(26, 23, 18, .12); }
.home-hero-inner {
  max-width: 76rem; margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter) clamp(3.5rem, 8vw, 6.5rem);
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 900px) { .home-hero-inner { grid-template-columns: minmax(0, 1fr) 17rem; } }
.home-title, .tag-title, .error-title {
  margin: 0 0 1.4rem; max-width: 15ch;
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: clamp(2.35rem, 6.4vw, 4.6rem); line-height: .95; letter-spacing: -.02em;
  text-wrap: balance;
}
.home-lede {
  margin: 0 0 2rem; max-width: 36rem;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem); font-weight: 500; line-height: 1.5; color: var(--nc-ink);
}
.home-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; margin: 0; }
.home-hero-art { position: relative; display: none; }
@media (min-width: 900px) { .home-hero-art { display: block; height: 17rem; } }
.hero-sticker {
  position: absolute; inset: 0 0 2rem 0;
  background: var(--nc-paper); border: 5px solid var(--nc-ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); transform: rotate(-6deg);
  display: grid; place-items: center; color: var(--nc-ink);
}
.hero-sticker .marca { width: 72%; height: 72%; }
.hero-chip {
  position: absolute; right: -1rem; bottom: 0; transform: rotate(4deg);
  font: 700 1.15rem/1 var(--font-mono); background: var(--nc-led); color: var(--nc-ink);
  padding: .55rem .8rem; border: var(--border) solid var(--nc-ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

/* Costura turbo con pestaña, como en los Reels */
.seam { position: relative; height: 12px; background: var(--nc-turbo); }
.seam-tab {
  position: absolute; left: max(var(--gutter), calc((100% - 72rem) / 2)); top: 50%; transform: translateY(-50%);
  margin: 0; padding: .45rem .9rem .5rem;
  background: var(--nc-paper); border: var(--border) solid var(--nc-ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font: 800 1.05rem/1.1 var(--font-text); font-stretch: 110%;
}

/* ---------- Listado ---------- */
.listing { background: var(--nc-paper); }
.listing-inner {
  max-width: 72rem; margin: 0 auto;
  padding: 4rem var(--gutter) 5rem;
  display: grid; gap: 2.5rem;
}
.post-card {
  position: relative; display: grid; gap: 0;
  background: var(--nc-paper); border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.post-card:hover, .post-card:focus-within { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 0 var(--nc-ink); }
@media (min-width: 860px) { .listing-inner { grid-template-columns: 1fr 1fr; gap: 2.75rem 2.5rem; } }
.post-card { grid-template-rows: auto 1fr; }
.post-card.no-image { grid-template-rows: 1fr; }
.post-card-image { display: block; aspect-ratio: 1200 / 630; background: var(--nc-case); border-bottom: var(--border) solid var(--nc-ink); }
.post-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; }
@media (min-width: 900px) { .post-card-body { padding: 1.4rem 1.6rem 1.5rem; } }
.post-card-kicker, .article-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .8rem; }
.ep-label {
  display: inline-flex; align-items: center; gap: .35em;
  padding: .28rem .5rem .3rem; background: var(--nc-turbo); color: var(--nc-ink);
  border: 2px solid var(--nc-ink); border-radius: 4px;
  font: 700 .85rem/1 var(--font-mono); letter-spacing: .04em;
}
/* El tag interno es «#ep-07»: en mono cada carácter mide 1ch; una caja de 2ch con sangría de -4ch deja sólo el número. */
.ep-num { display: inline-block; width: 2ch; overflow: hidden; white-space: nowrap; text-indent: -4ch; letter-spacing: 0; vertical-align: bottom; }
.bloque {
  font: 700 .9rem/1 var(--font-text); text-decoration: none; color: var(--nc-ink-2);
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.bloque:hover { color: var(--nc-ink); border-bottom-color: var(--nc-turbo); }
.sticker-nuevo {
  margin-left: auto; transform: rotate(-4deg);
  font: 800 .85rem/1 var(--font-text); background: var(--nc-led); color: var(--nc-ink);
  padding: .35rem .55rem; border: 2px solid var(--nc-ink); border-radius: 4px; box-shadow: 3px 3px 0 0 var(--nc-ink);
}
.post-card-title {
  margin: 0 0 .7rem;
  font-family: var(--font-display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem); line-height: 1.12; letter-spacing: -.01em;
  text-wrap: balance;
}
.post-card-title a { text-decoration: none; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* toda la tarjeta enlaza */
.post-card .bloque { position: relative; z-index: 2; }
.post-card-title a:focus-visible { outline: none; }
.post-card:has(.post-card-title a:focus-visible) { outline: 3px solid var(--nc-sky-deep); outline-offset: 4px; }
.post-card-excerpt { margin: 0 0 1rem; color: var(--nc-ink-2); font-size: 1.02rem; line-height: 1.55; }
.post-card-meta { margin: auto 0 0; font: 600 .85rem/1.3 var(--font-mono); color: var(--nc-ink-2); }

.pagination { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; }
.pagination-info { font: 600 .9rem/1 var(--font-mono); color: var(--nc-ink-2); }

/* ---------- Etiqueta y error ---------- */
.tag-hero-inner, .error-inner { max-width: 72rem; margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 7vw, 5rem); }
.error-code {
  margin: 0; font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: clamp(5rem, 16vw, 10rem); line-height: .9; color: var(--nc-turbo);
  -webkit-text-stroke: 4px var(--nc-ink); paint-order: stroke fill;
}

/* ---------- Artículo ---------- */
.article-header { padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) 0; }
.article-header-inner { max-width: var(--wide); margin: 0 auto; padding-bottom: 2.5rem; }
.article-title {
  margin: 0 0 1.1rem; max-width: 22ch;
  font-family: var(--font-display); font-weight: 900; font-stretch: 125%;
  font-size: clamp(2rem, 5.2vw, 3.6rem); line-height: 1; letter-spacing: -.02em;
  text-wrap: balance; overflow-wrap: break-word; hyphens: auto;
}
.article-lede { margin: 0 0 1.2rem; max-width: 40rem; font-size: clamp(1.15rem, 2vw, 1.3rem); font-weight: 500; line-height: 1.5; }
.article-meta { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin: 0; font: 600 .9rem/1.4 var(--font-mono); color: var(--nc-ink-2); }

/* La portada 1200×630 se muestra entera, a 1,91:1, y monta sobre la costura */
.feature-image {
  position: relative; z-index: 2;
  max-width: var(--wide); margin: 0 auto -5rem;
  border: 4px solid var(--nc-ink); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--nc-case);
}
.feature-image img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.feature-image figcaption { padding: .6rem 1rem; background: var(--nc-paper); border-top: var(--border) solid var(--nc-ink); font-size: .9rem; color: var(--nc-ink-2); }
@media (max-width: 640px) { .feature-image { margin-bottom: -2.5rem; box-shadow: var(--shadow); border-width: 3px; } }

.article-sheet {
  position: relative;
  background: var(--nc-paper); border-top: 12px solid var(--nc-turbo);
  padding: 8rem var(--gutter) 5rem;
}
.article-sheet.no-feature { padding-top: 3.5rem; }
@media (max-width: 640px) { .article-sheet { padding-top: 5rem; } .article-sheet.no-feature { padding-top: 2.5rem; } }

/* ---------- Índice ---------- */
.toc { max-width: var(--measure); margin: 0 auto 3rem; }
.toc-box {
  background: var(--nc-case); border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}
.toc-title {
  cursor: pointer; list-style: none; padding: .85rem 1.1rem;
  font: 700 .85rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
}
.toc-title::-webkit-details-marker { display: none; }
.toc-title::after { content: ""; width: .6rem; height: .6rem; border: solid var(--nc-ink); border-width: 0 3px 3px 0; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.toc-box[open] .toc-title::after { transform: rotate(-135deg) translateY(-2px); }
.toc-list { margin: 0; padding: 0 1.1rem 1rem 2.6rem; font-size: 1rem; line-height: 1.35; counter-reset: toc; }
.toc-list li { margin: .45rem 0; padding-left: .2rem; }
.toc-list li::marker { font: 700 .85rem var(--font-mono); color: var(--nc-turbo-deep); }
.toc-list a { text-decoration: none; font-weight: 600; }
.toc-list a:hover { text-decoration: underline; text-decoration-color: var(--nc-turbo); text-decoration-thickness: 2px; }
.toc-list a[aria-current="true"] { background: var(--nc-led); box-shadow: 0 0 0 2px var(--nc-led); border-radius: 2px; }

/* Con sitio a los lados, el índice va fijo a la izquierda mientras se lee */
@media (min-width: 1400px) {
  .toc { position: fixed; z-index: 5; top: 1.5rem; left: max(1.5rem, calc(50% - var(--measure) / 2 - 18rem)); width: 16rem; margin: 0;
         max-height: calc(100vh - 3rem); overflow: auto; padding: 0 10px 10px 0; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
  .toc.is-visible { opacity: 1; visibility: visible; }
  .toc-list { font-size: .92rem; }
  /* con el índice al lado, las imágenes «anchas» se quedan en la columna de texto para no pisarlo */
  body.has-toc .gh-content > .kg-width-wide { grid-column: main; }
}

/* ---------- Contenido (guías) ---------- */
.gh-content {
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [wide-start] minmax(0, calc((var(--wide) - var(--measure)) / 2))
    [main-start] min(var(--measure), 100%) [main-end]
    minmax(0, calc((var(--wide) - var(--measure)) / 2)) [wide-end]
    minmax(0, 1fr) [full-end];
}
.gh-content > * { grid-column: main; margin: 0; min-width: 0; }
.gh-content > * + * { margin-top: 1.35em; }
.gh-content > .kg-width-wide { grid-column: wide; }
.gh-content > .kg-width-full { grid-column: full; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.gh-content > .kg-width-full img { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }

.gh-content h2, .gh-content h3, .gh-content h4 {
  font-family: var(--font-display); letter-spacing: -.01em; text-wrap: balance; position: relative;
}
.gh-content h2 { margin-top: 2.6em; font-weight: 800; font-stretch: 112%; font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.12; }
.gh-content h3 { margin-top: 2em; font-weight: 800; font-stretch: 106%; font-size: clamp(1.25rem, 2.2vw, 1.45rem); line-height: 1.2; }
.gh-content h4 { margin-top: 1.8em; font-weight: 800; font-size: 1.1rem; line-height: 1.3; }
.gh-content h2 + *, .gh-content h3 + *, .gh-content h4 + * { margin-top: .7em; }
.gh-content > :first-child { margin-top: 0; }
.gh-content h2::before {
  content: ""; display: block; width: 2.5rem; height: 6px; margin-bottom: .7rem;
  background: var(--nc-turbo); border-radius: 1px;
}
.heading-anchor {
  margin-left: .35em; padding: 0 .15em;
  font: 700 .7em/1 var(--font-mono); color: var(--nc-turbo-deep); text-decoration: none;
  opacity: 0; transition: opacity .15s;
}
.gh-content :is(h2, h3, h4):hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
@media (hover: none) { .heading-anchor { opacity: .55; } }

.gh-content p, .gh-content li { overflow-wrap: break-word; }
.gh-content a:not(.kg-btn):not(.kg-bookmark-container):not(.heading-anchor) {
  color: var(--nc-ink); font-weight: 560;
  text-decoration: underline; text-decoration-color: var(--nc-turbo); text-decoration-thickness: 2px; text-underline-offset: .18em;
}
.gh-content a:not(.kg-btn):not(.kg-bookmark-container):not(.heading-anchor):hover { background: var(--tint-led); text-decoration-color: var(--nc-ink); }
.gh-content strong { font-weight: 750; }
.gh-content em { font-style: italic; }
.gh-content mark { background: var(--nc-led); color: var(--nc-ink); padding: 0 .15em; }

.gh-content ul, .gh-content ol { padding-left: 1.6em; }
.gh-content li + li { margin-top: .45em; }
.gh-content li > ul, .gh-content li > ol { margin-top: .45em; }
.gh-content ul > li::marker { color: var(--nc-turbo-deep); font-size: 1.1em; }
.gh-content ol > li::marker { font-family: var(--font-mono); font-weight: 700; color: var(--nc-turbo-deep); }
/* Pasos numerados: la lista ordenada de primer nivel se pinta como pasos */
.gh-content > ol { list-style: none; counter-reset: paso; padding-left: 0; }
.gh-content > ol > li { counter-increment: paso; position: relative; padding-left: 2.9rem; min-height: 2rem; }
.gh-content > ol > li + li { margin-top: .9em; }
.gh-content > ol > li::before {
  content: counter(paso); position: absolute; left: 0; top: -.05em;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  font: 700 .95rem/1 var(--font-mono); background: var(--nc-ink); color: var(--nc-paper); border-radius: var(--radius-sm);
}
.gh-content > ol[start] { counter-reset: none; }

.gh-content hr {
  border: 0; height: 12px; margin: 3em 0;
  background: radial-gradient(circle, var(--nc-ink-2) 2px, transparent 2.5px) center / 24px 12px repeat-x;
  opacity: .5;
}

/* Citas: tarjeta tipo ficha (los posts abren con «Qué conseguirás / Cuánto tardarás / Qué necesitas») */
.gh-content blockquote:not(.kg-blockquote-alt) {
  padding: 1.1rem 1.3rem 1.1rem 1.4rem;
  background: var(--nc-case); border: var(--border) solid var(--nc-ink); border-left-width: 10px; border-radius: var(--radius-md);
  box-shadow: var(--shadow); font-size: 1rem; line-height: 1.55;
}
.gh-content blockquote > * + * { margin-top: .7em; }
.gh-content blockquote p { margin: 0; }
.gh-content blockquote.kg-blockquote-alt {
  padding: .5rem 0 .5rem 1.4rem; border-left: 6px solid var(--nc-turbo);
  font-family: var(--font-display); font-weight: 800; font-stretch: 110%; font-size: 1.35rem; line-height: 1.3; font-style: normal; text-align: left;
}

/* Código en línea */
.gh-content :not(pre) > code {
  font-family: var(--font-mono); font-weight: 500; font-size: .86em;
  background: var(--code-bg); border: 1px solid rgba(26, 23, 18, .18); border-radius: 4px;
  padding: .08em .32em; overflow-wrap: anywhere;
}

/* Bloques de código: panel con barra (lenguaje + Copiar) */
.code-panel, .gh-content > pre {
  border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md);
  box-shadow: var(--shadow); background: var(--code-bg); overflow: hidden;
}
.gh-content > .code-panel, .gh-content > pre { margin-top: 1.5em; }
.gh-content .kg-code-card { margin-top: 1.5em; }
.kg-code-card .code-panel { margin: 0; }
.code-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .35rem .45rem .35rem .9rem; background: var(--nc-ink); color: var(--nc-paper);
}
.code-lang { font: 700 .75rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--nc-led); }
.code-copy {
  font: 700 .8rem/1 var(--font-mono); cursor: pointer;
  color: var(--nc-ink); background: var(--nc-paper); border: 0; border-radius: 4px; padding: .45rem .65rem;
}
.code-copy:hover { background: var(--nc-led); }
.code-copy.is-done { background: var(--nc-led); }
.gh-content pre, .code-panel pre {
  margin: 0; padding: 1rem 1.1rem 1.1rem; overflow-x: auto; tab-size: 4;
  font: 500 .875rem/1.65 var(--font-mono); color: var(--nc-ink); background: transparent;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 760px) { .gh-content pre, .code-panel pre { font-size: .84rem; } }
.gh-content pre code { font: inherit; background: none; border: 0; padding: 0; white-space: pre; }
.kg-code-card figcaption, .kg-card figcaption, .kg-image-card figcaption {
  margin-top: .7rem; font-size: .9rem; line-height: 1.45; color: var(--nc-ink-2); text-align: left;
}
/* Resaltado (lo pinta main.js: sin dependencias) */
.tk-c { color: var(--nc-ink-2); }
.tk-s { color: var(--nc-sky-deep); }
.tk-k { color: var(--nc-turbo-deep); font-weight: 700; }
.tk-n { color: var(--nc-sky-deep); }
.tk-f { color: var(--nc-ink-2); font-weight: 600; }
.tk-v { color: var(--nc-turbo-deep); }
.tk-p { color: var(--nc-ink-2); user-select: none; -webkit-user-select: none; }

/* Tablas: scroll horizontal en móvil */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md); box-shadow: var(--shadow);
  background: var(--nc-paper);
}
.table-wrap:focus-visible { outline-offset: 4px; }
.gh-content table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.gh-content > table { display: block; overflow-x: auto; }   /* si no hay JS */
.table-wrap table { min-width: 32rem; }
.gh-content th {
  text-align: left; vertical-align: bottom; padding: .65rem .9rem;
  background: var(--nc-ink); color: var(--nc-paper); font-weight: 750; white-space: nowrap;
}
.gh-content td { padding: .6rem .9rem; vertical-align: top; border-top: 2px solid rgba(26, 23, 18, .14); }
.gh-content tbody tr:nth-child(even) td { background: rgba(237, 227, 204, .55); }
.gh-content td code { white-space: nowrap; }
.table-hint { display: none; margin-top: .45rem !important; font: 600 .78rem/1.2 var(--font-mono); color: var(--nc-ink-2); }
.table-wrap.is-scrollable + .table-hint { display: block; }

/* ---------- Cards de Ghost ---------- */
.kg-image-card img, .kg-gallery-image img {
  display: block; margin: 0 auto;
  border: var(--border) solid var(--nc-ink); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.kg-image-card.kg-width-wide img, .kg-image-card.kg-width-full img { width: 100%; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 1rem; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; gap: 1rem; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; box-shadow: 4px 4px 0 0 var(--nc-ink); }
@media (max-width: 600px) { .kg-gallery-container, .kg-gallery-row { gap: .6rem; } }

/* Avisos (callout) */
.gh-content .kg-callout-card {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1.05rem 1.25rem; margin-top: 1.6em;
  background: var(--nc-case); color: var(--nc-ink);
  border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md); box-shadow: var(--shadow);
  font-size: 1rem; line-height: 1.55;
}
.gh-content .kg-callout-card + * { margin-top: 1.6em; }
.kg-callout-emoji { flex: none; font-size: 1.3rem; line-height: 1.2; }
.kg-callout-text { min-width: 0; }
.kg-callout-text > * + * { margin-top: .6em; }
.gh-content .kg-callout-card-grey { background: var(--nc-case); }
.gh-content .kg-callout-card-white { background: #FFFDF6; }
.gh-content .kg-callout-card-blue, .gh-content .kg-callout-card-purple { background: var(--tint-sky); border-left: 10px solid var(--nc-sky); }
.gh-content .kg-callout-card-green { background: var(--tint-ok); border-left: 10px solid var(--nc-ok); }
.gh-content .kg-callout-card-yellow { background: var(--tint-led); border-left: 10px solid var(--nc-led); }
.gh-content .kg-callout-card-red, .gh-content .kg-callout-card-pink { background: var(--tint-turbo); border-left: 10px solid var(--nc-turbo); }
.gh-content .kg-callout-card-accent { background: var(--nc-ink); color: var(--nc-paper); }
.gh-content .kg-callout-card-accent a { color: var(--nc-led) !important; text-decoration-color: var(--nc-led) !important; }
.gh-content .kg-callout-card-accent a:hover { background: transparent !important; }
.gh-content .kg-callout-card-accent code { background: var(--nc-night-2); color: var(--nc-paper); border-color: transparent; }

/* Desplegable (toggle) */
.gh-content .kg-toggle-card {
  margin-top: 1.4em; padding: 0;
  background: var(--nc-paper); border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md); box-shadow: var(--shadow);
}
.gh-content .kg-toggle-card + .kg-toggle-card { margin-top: 1rem; }
.gh-content .kg-toggle-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; cursor: pointer; }
.gh-content .kg-toggle-heading-text { margin: 0; font-family: var(--font-text); font-size: 1.05rem; font-weight: 750; line-height: 1.35; }
.gh-content .kg-toggle-card-icon {
  flex: none; width: 2rem; height: 2rem; display: grid; place-items: center;
  background: var(--nc-turbo); border: 2px solid var(--nc-ink); border-radius: var(--radius-sm); color: var(--nc-ink); cursor: pointer; padding: 0;
}
.gh-content .kg-toggle-card-icon svg { width: .9rem; height: .9rem; color: var(--nc-ink); transition: transform .2s; }
.gh-content .kg-toggle-card-icon svg path { fill: none; stroke: currentColor; stroke-width: 4; }
.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-card-icon svg { transform: rotate(0deg); }
.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon svg { transform: rotate(180deg); }
.gh-content .kg-toggle-content { padding: 0 1.1rem 1rem; font-size: 1rem; border-top: 2px solid rgba(26, 23, 18, .14); padding-top: .9rem; }
.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content { display: none; }
.kg-toggle-content > * + * { margin-top: .7em; }

/* Botón */
.kg-button-card { display: flex; }
.kg-button-card.kg-align-center { justify-content: center; }
.kg-button-card.kg-align-left { justify-content: flex-start; }
.gh-content .kg-btn, .gh-content .kg-btn-accent {
  display: inline-flex; align-items: center; min-height: 3rem; padding: .75rem 1.4rem;
  font: 800 1.05rem/1.1 var(--font-text); text-decoration: none; color: var(--nc-ink) !important;
  background: var(--nc-turbo) !important; border: var(--border) solid var(--nc-ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.gh-content .kg-btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 0 var(--nc-ink); opacity: 1; }

/* Marcador (bookmark) */
.gh-content .kg-bookmark-card { width: 100%; }
.gh-content .kg-bookmark-card a.kg-bookmark-container {
  display: flex; min-height: 8rem; text-decoration: none; color: var(--nc-ink);
  background: var(--nc-paper); border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.gh-content .kg-bookmark-card a.kg-bookmark-container:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 0 var(--nc-ink); }
.kg-bookmark-content { flex: 1 1 auto; min-width: 0; padding: 1rem 1.2rem; display: flex; flex-direction: column; justify-content: flex-start; }
.kg-bookmark-title { font-weight: 800; font-size: 1.02rem; line-height: 1.3; }
.kg-bookmark-description {
  margin-top: .35rem; font-size: .9rem; line-height: 1.45; color: var(--nc-ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kg-bookmark-metadata { display: flex; align-items: center; gap: .4rem; margin-top: .75rem; font: 600 .78rem/1.2 var(--font-mono); color: var(--nc-ink-2); min-width: 0; flex-wrap: wrap; }
.kg-bookmark-icon { width: 1.1rem; height: 1.1rem; }
.kg-bookmark-author::after { content: "·"; margin-left: .4rem; }
.kg-bookmark-author:last-child::after { content: none; }
.kg-bookmark-thumbnail { position: relative; flex: 0 0 33%; max-width: 15rem; min-height: 8rem; border-left: var(--border) solid var(--nc-ink); }
.kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) {
  .gh-content .kg-bookmark-card a.kg-bookmark-container { flex-direction: column-reverse; }
  .kg-bookmark-thumbnail { flex-basis: auto; max-width: none; aspect-ratio: 1200 / 630; border-left: 0; border-bottom: var(--border) solid var(--nc-ink); }
}

/* Cabecera (header card), vídeo, archivo, audio: lo básico con la casa */
.kg-file-card-container, .kg-audio-card, .kg-video-card {
  border: var(--border) solid var(--nc-ink) !important; border-radius: var(--radius-md); box-shadow: var(--shadow); background: var(--nc-paper);
}
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.kg-embed-card iframe { max-width: 100%; }

/* ---------- Final del artículo ---------- */
.article-end { max-width: var(--measure); margin: 4rem auto 0; }
.article-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 2.5rem; }
.article-tags a {
  font: 600 .85rem/1 var(--font-mono); text-decoration: none; color: var(--nc-ink);
  padding: .45rem .6rem; background: var(--nc-case); border: 2px solid var(--nc-ink); border-radius: 4px;
}
.article-tags a:hover { background: var(--nc-led); }
.article-next { display: grid; gap: 1rem; }
@media (min-width: 640px) { .article-next { grid-template-columns: 1fr 1fr; } .article-next .prev-link { order: -1; } }
.next-link, .prev-link {
  display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.2rem; text-decoration: none;
  background: var(--nc-case); border: var(--border) solid var(--nc-ink); border-radius: var(--radius-md); box-shadow: var(--shadow);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.next-link { background: var(--nc-turbo); text-align: right; }
.next-link:only-child { grid-column: 2; }
.next-link:hover, .prev-link:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 0 var(--nc-ink); }
.next-label { font: 700 .78rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.next-title { font-weight: 800; font-stretch: 108%; line-height: 1.25; }
@media (max-width: 639px) { .next-link:only-child { grid-column: auto; } }

/* ---------- Pie ---------- */
.site-footer { background: var(--nc-night); color: var(--nc-case); border-top: 12px solid var(--nc-turbo); }
.site-footer-inner {
  max-width: 72rem; margin: 0 auto; padding: 3.5rem var(--gutter) 2rem;
  display: grid; gap: 2rem 3rem; align-items: start;
}
@media (min-width: 900px) { .site-footer-inner { grid-template-columns: auto 1fr auto; } }
.footer-brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--nc-case); --nc-icon-body: var(--nc-night-2); }
.footer-mark { width: 4.2rem; height: 4.2rem; }
.footer-name { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 900; font-stretch: 125%; font-size: 1.85rem; line-height: .92; letter-spacing: -.02em; }
.footer-claim { margin: 0 0 .5rem; font-weight: 700; font-size: 1.1rem; max-width: 28rem; }
.footer-sub { margin: 0; color: var(--nc-case-shade); font-size: 1rem; }
.footer-sub .mono, .footer-links .mono { color: var(--nc-sky-light); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; font-weight: 700; }
.footer-links a { color: var(--nc-case); text-decoration: underline; text-decoration-color: var(--nc-turbo-light); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.footer-links a:hover { color: var(--nc-led); }
.site-footer :focus-visible { outline-color: var(--nc-led); }
.footer-legal { max-width: 72rem; margin: 0 auto; padding: 1.2rem var(--gutter) 2rem; font: 500 .8rem/1 var(--font-mono); color: #A89C86; border-top: 1px solid var(--nc-night-2); }

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

/* ---------- Impresión ---------- */
@media print {
  .site-header, .site-footer, .toc, .code-bar, .article-next, .skip-link { display: none !important; }
  body, .article-sheet { background: #fff; }
  .article-sheet { border: 0; padding: 0; }
  .feature-image { margin-bottom: 1rem; box-shadow: none; }
}
