/* GRIPPIA — the blog. Loaded after styles.css on blog pages only, and built
   only from its tokens (--fg, --fg-2, --soft, --line, --blue...): the landing
   stays untouched and every colour follows its light and dark values.

   The idea: an article reads like the layer works. Sections are numbered like
   the three steps on the landing (01, 02, 03) and lit on the same blue rail as
   you read; every article ends by saying where its facts come from, in the same
   blue source chip the landing's chat uses ("Fuente: limpieza.xlsx"). */

/* ---------- frame ---------- */
main.post{padding-top:calc(var(--nav-clear) + clamp(28px,4.5vw,64px))}
main.blog > .blog-head{padding-top:calc(var(--nav-clear) + clamp(40px,5vw,72px));padding-bottom:clamp(32px,4vw,56px)}
main.blog > .blog-body{padding-top:0;padding-bottom:clamp(64px,8vw,112px)}

/* ---------- article grid: contents rail | reading column | air ---------- */
.post-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "body" "end"}
@media(min-width:1100px){
  .post-grid{grid-template-columns:200px minmax(0,68ch) minmax(0,1fr);column-gap:clamp(48px,5vw,88px);
    grid-template-areas:". head head" "toc body ." "toc end ."}
}
.post-head{grid-area:head;min-width:0}
.post-body{grid-area:body;min-width:0;margin-top:clamp(40px,5vw,64px)}
.post-end{grid-area:end;min-width:0;display:grid;gap:clamp(56px,6vw,80px);margin-top:clamp(64px,8vw,104px)}

/* ---------- head ---------- */
.post-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;max-width:68ch}
/* 68ch at the page's base size, like the grid column, so these rows end where the text does */
.crumbs ol{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px;font-size:14.5px;font-weight:500;color:var(--fg-2)}
.crumbs li + li::before{content:"/";margin-right:10px;color:var(--fg-2);opacity:.6}
.crumbs a{display:inline-flex;align-items:center;min-height:44px;color:var(--fg-2);text-decoration:none}
.crumbs a:hover{color:var(--fg)}
.post-title{margin:clamp(12px,1.6vw,20px) 0 0;max-width:21ch;font-size:clamp(36px,4.8vw,66px);line-height:1.03;
  letter-spacing:-.04em;font-weight:500;text-wrap:balance}
.post-lede{margin-top:clamp(18px,2vw,26px);max-width:56ch;font-size:clamp(19px,1.55vw,22px);line-height:1.5;color:var(--fg-2);text-wrap:pretty}

.post-meta{display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px;margin-top:clamp(28px,3vw,40px);
  padding-top:22px;border-top:1px solid var(--line-2);max-width:68ch}
.avatar-i{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;border-radius:50%;background:var(--navy);
  color:#fff;font-size:15px;font-weight:650;letter-spacing:.02em;box-shadow:inset 0 0 0 1px var(--line-2)}
.post-by{display:grid;line-height:1.3;margin-left:-10px}
.post-by b{font-size:15.5px;font-weight:600}
.post-by span:not(.vh){font-size:13.5px;color:var(--fg-2)}
.post-when{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:14.5px;color:var(--fg-2);font-variant-numeric:tabular-nums}
.post-when > span:last-child::before{content:"·";margin-right:10px}
.src-chip{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:0 12px;border-radius:999px;
  background:rgba(26,107,255,.1);color:var(--blue-ink);font-size:13px;font-weight:600;text-decoration:none}
.src-chip::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.src-chip:hover{background:rgba(26,107,255,.18)}
.post-twin{display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--line-2);
  font-size:14px;font-weight:550;color:var(--fg);text-decoration:none;transition:border-color .2s,background .2s}
.post-twin:hover{border-color:var(--fg-2);background:var(--card)}
.draft-chip{display:inline-flex;align-items:center;gap:8px;width:fit-content;margin-top:8px;padding:5px 12px;border-radius:999px;
  background:rgba(245,158,11,.16);color:var(--fg);font-size:13px;font-weight:600}
.draft-chip::before{content:"";width:7px;height:7px;border-radius:50%;background:#B45309}

/* ---------- contents rail (desktop) ---------- */
.post-toc{grid-area:toc;display:none}
@media(min-width:1100px){
  .post-toc{display:block;position:sticky;top:calc(var(--nav-clear) + 40px);align-self:start;margin-top:clamp(40px,5vw,64px)}
}
.post-toc-h{margin-bottom:14px;font-size:13.5px;font-weight:600;color:var(--fg-2)}
.post-toc ol{counter-reset:toc;border-left:2px solid var(--line-2)}
.post-toc li{counter-increment:toc}
.post-toc a{display:grid;grid-template-columns:auto 1fr;gap:10px;margin-left:-2px;padding:9px 0 9px 16px;
  border-left:2px solid transparent;font-size:14.5px;line-height:1.35;color:var(--fg-2);text-decoration:none;
  transition:color .25s,border-color .25s}
.post-toc a::before{content:counter(toc,decimal-leading-zero);content:counter(toc,decimal-leading-zero) / "";
  font-size:12.5px;font-weight:600;font-variant-numeric:tabular-nums;padding-top:1px}
.post-toc a:hover{color:var(--fg)}
.post-toc a[aria-current]{color:var(--fg);border-left-color:var(--blue)}
.post-toc a[aria-current]::before{color:var(--blue-ink)}
.post-toc a:focus-visible{outline-offset:-2px;border-radius:0 8px 8px 0}

/* ---------- the reading column ---------- */
.prose{counter-reset:sec;font-size:clamp(17.5px,1.28vw,19px);line-height:1.7;color:var(--fg)}
.prose > * + *{margin-top:1.15em}
.prose > p:first-child{font-size:1.1em;line-height:1.6;letter-spacing:-.005em}
.prose p,.prose li{text-wrap:pretty}
.prose h2{counter-increment:sec;margin:2.5em 0 0;font-size:clamp(26px,2.3vw,34px);line-height:1.12;letter-spacing:-.03em;
  font-weight:500;text-wrap:balance;scroll-margin-top:calc(var(--nav-clear) + 24px)}
.prose h2::before{content:counter(sec,decimal-leading-zero);content:counter(sec,decimal-leading-zero) / "";
  display:block;margin-bottom:12px;font-size:14px;font-weight:600;letter-spacing:0;color:var(--blue-ink);font-variant-numeric:tabular-nums}
.prose h3{margin:2em 0 0;font-size:clamp(20px,1.55vw,23px);line-height:1.25;letter-spacing:-.018em;font-weight:600;
  scroll-margin-top:calc(var(--nav-clear) + 24px)}
.prose h2 + *{margin-top:.85em}
.prose h3 + *{margin-top:.55em}
.prose strong{font-weight:620}
.prose a{color:var(--blue-ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.2em;
  text-decoration-color:color-mix(in srgb,currentColor 45%,transparent);transition:text-decoration-color .2s}
.prose a:hover{text-decoration-color:currentColor}
.prose a.ext::after{content:"\2197";content:"\2197" / "";margin-left:.12em;font-size:.82em}
.prose code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.84em;padding:.12em .42em;
  border-radius:6px;background:var(--soft);border:1px solid var(--line)}

/* lists: a short blue dash, or the step numbers of the landing */
.prose ul,.prose ol{display:grid;gap:.55em}
.prose ul > li{position:relative;padding-left:1.7em}
.prose ul > li::before{content:"";position:absolute;left:.1em;top:.84em;width:.8em;height:2px;border-radius:2px;background:var(--blue)}
.prose ol{counter-reset:li}
.prose ol > li{position:relative;padding-left:2.5em;counter-increment:li}
.prose ol > li::before{content:counter(li,decimal-leading-zero);position:absolute;left:0;top:.22em;font-size:.76em;font-weight:600;
  color:var(--blue-ink);font-variant-numeric:tabular-nums}

/* quote: the voice of the landing's testimonials, on the blue rail */
.prose blockquote{margin:1.9em 0;padding:2px 0 2px clamp(18px,2vw,26px);border-left:2px solid var(--blue)}
.prose blockquote p{font-size:clamp(22px,2vw,28px);line-height:1.28;letter-spacing:-.022em;font-weight:500;text-wrap:balance}
.prose blockquote p + p{margin-top:.6em}

.prose figure{margin:2em 0}
.prose figure img{width:100%;border-radius:22px;background:var(--soft)}
.prose img{max-width:100%;height:auto}

/* tables: a card of hairlines that scrolls inside itself on a phone */
.tbl{margin:2em 0;overflow-x:auto;border:1px solid var(--line-2);border-radius:18px;background:var(--card);
  -webkit-overflow-scrolling:touch}
.tbl:focus-visible{outline-offset:3px;border-radius:18px}
.prose table{width:100%;min-width:520px;border-collapse:collapse;font-size:15.5px;line-height:1.45;font-variant-numeric:tabular-nums}
.prose th{padding:13px 16px;background:var(--soft);text-align:left;font-size:13px;font-weight:600;color:var(--fg-2);white-space:nowrap}
.prose td{padding:14px 16px;border-top:1px solid var(--line);vertical-align:top}
.prose td:first-child{font-weight:560}

/* ---------- after the text: questions, sources, tags, author ---------- */
.post-sec > h2{margin:0;font-size:clamp(24px,2.1vw,30px);line-height:1.15;letter-spacing:-.025em;font-weight:500}
.post-sec-sub{margin-top:8px;font-size:15.5px;color:var(--fg-2)}
.post-sec .faq{margin-top:12px}
.post-sec .faq summary{font-size:17.5px}

/* the ledger of sources: numbered rows, each with its domain in the source chip */
.sources{counter-reset:s;margin-top:20px;border-top:1px solid var(--line-2)}
.sources li{counter-increment:s;border-bottom:1px solid var(--line-2)}
.sources a{display:grid;grid-template-columns:2.6em minmax(0,1fr) auto;align-items:baseline;gap:6px 14px;min-height:44px;
  padding:16px 0;color:var(--fg);text-decoration:none}
.sources a::before{content:counter(s,decimal-leading-zero);font-size:13px;font-weight:600;color:var(--blue-ink);font-variant-numeric:tabular-nums}
.src-t{font-size:16.5px;font-weight:500;line-height:1.4;transition:color .2s}
.src-h{padding:3px 10px;border-radius:999px;background:rgba(26,107,255,.1);color:var(--blue-ink);font-size:12.5px;font-weight:600;white-space:nowrap}
.sources a:hover .src-t{color:var(--blue-ink)}
.sources a:focus-visible{outline-offset:2px}
@media(max-width:600px){.sources a{grid-template-columns:2.6em minmax(0,1fr)}.src-h{grid-column:2;justify-self:start}}

.tags{display:flex;flex-wrap:wrap;gap:6px}
.tags li{padding:3px 11px;border-radius:999px;border:1px solid var(--line-2);font-size:13px;font-weight:500;color:var(--fg-2)}

.post-author{display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px 18px;align-items:start;padding:clamp(20px,2.4vw,28px);
  border-radius:24px;background:var(--soft)}
.post-author-k{font-size:13px;font-weight:600;color:var(--fg-2)}
.post-author-n{margin-top:4px;font-size:17.5px;line-height:1.35}
.post-author-n b{font-weight:600}
.post-author p:last-child{margin-top:6px;max-width:54ch;font-size:15.5px;line-height:1.55;color:var(--fg-2)}
.post-tags{margin-top:-24px}

/* ---------- lists of articles (index, related) ---------- */
.post-list{border-top:1px solid var(--line-2)}
.post-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"date go" "main main";
  gap:10px 24px;padding:26px 0 30px;border-bottom:1px solid var(--line-2)}
@media(min-width:760px){
  .post-row{grid-template-columns:200px minmax(0,1fr) auto;grid-template-areas:"date main go";align-items:baseline;padding:36px 0 40px}
}
.post-row time{grid-area:date;font-size:14px;font-weight:500;color:var(--fg-2);font-variant-numeric:tabular-nums}
.post-row-main{grid-area:main;min-width:0}
.post-row-t{margin:0;max-width:30ch;font-size:clamp(22px,2.2vw,30px);line-height:1.15;letter-spacing:-.025em;font-weight:500;text-wrap:balance}
.post-row-t a{color:var(--fg);text-decoration:none;transition:color .2s}
.post-row-t a::after{content:"";position:absolute;inset:0;border-radius:4px}
.post-row-t a:focus-visible{outline:none}
.post-row-t a:focus-visible::after{outline:2px solid var(--blue);outline-offset:4px;border-radius:12px}
.post-row:hover .post-row-t a{color:var(--blue-ink)}
.post-row-main > p{margin-top:10px;max-width:62ch;font-size:16.5px;line-height:1.55;color:var(--fg-2)}
.post-row-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:16px;font-size:13.5px;color:var(--fg-2)}
.post-row-meta .draft-chip{margin:0}
.post-row-go{grid-area:go;justify-self:end;font-size:22px;line-height:1;color:var(--fg-2);transition:transform .2s,color .2s}
.post-row:hover .post-row-go{transform:translateX(4px);color:var(--blue-ink)}

/* related articles, at the foot of an article */
main.post > .post-related{margin-top:clamp(72px,9vw,128px);padding-block:clamp(56px,7vw,96px);background:var(--soft)}
.post-related-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:12px 24px;margin-bottom:20px}
.post-related-head a{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:15px;font-weight:550;color:var(--blue-ink);text-decoration:none}
.post-related-head a:hover{text-decoration:underline;text-underline-offset:4px}
.post-related .post-list{border-top-color:var(--line-2)}
main.post > .post-related + .post-cta{margin-top:0}
main.post > .post-cta{margin-top:clamp(72px,9vw,128px)}

/* ---------- index head ---------- */
.blog-h{max-width:13ch}
.blog-sub{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px 48px;margin-top:clamp(22px,2.8vw,36px)}
.feed-link{display:inline-flex;align-items:center;gap:9px;min-height:44px;font-size:14.5px;font-weight:550;color:var(--blue-ink);text-decoration:none}
.feed-link::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;box-shadow:0 0 0 4px rgba(26,107,255,.14)}
.feed-link:hover{text-decoration:underline;text-underline-offset:4px}

/* empty index: a holding page with one way forward */
.blog-empty{display:grid;justify-items:start;gap:0;padding:clamp(36px,6vw,88px) clamp(24px,5vw,80px) clamp(40px,6vw,88px);
  border-radius:32px;background:var(--soft)}
.blog-empty .kicker{margin-bottom:clamp(20px,2.4vw,32px)}
.blog-empty .h2{max-width:none;font-size:clamp(64px,11vw,160px);line-height:.92;letter-spacing:-.055em}
.blog-empty .lede{margin-top:clamp(20px,2.4vw,32px);max-width:54ch}
.blog-empty .btn{margin-top:clamp(28px,3vw,40px)}

/* ---------- the close: the landing's ask, on its blue band ---------- */
.post-cta-in{display:grid;gap:32px 72px;align-items:end}
@media(min-width:960px){.post-cta-in{grid-template-columns:minmax(0,1fr) auto}}
.post-cta .h2{max-width:20ch}
.post-cta-go{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.btn--line{background:transparent;color:#fff;border-color:rgba(255,255,255,.55)}
.btn--line:hover{background:#fff;border-color:#fff;color:#0A0F1E}
.post-cta-note{flex-basis:100%;font-size:13.5px;color:#fff}

@media(prefers-reduced-motion:reduce){
  .post-toc a,.post-row-go,.post-row-t a,.src-t,.post-twin,.prose a{transition:none}
  .post-row:hover .post-row-go{transform:none}
}
/* "being written" is a coming state, not a live one: the landing's "soon" dot */
.blog-empty .kicker .live{background:var(--blue-ink);animation:none}
