/* SITE-99: blog styles — loaded ONLY by the 6 blog pages (/blog/, /en/blog/ and the 4 articles),
   after site.css, so the home page and landings pay 0 bytes for them (perf, docs/perf/site-99-budget.md).
   Source of the main block: docs/design/site-99-blog-mockup.html (between «SITE-99: blog» and «mockup-only»),
   copied verbatim; changes vs. the mockup are marked SITE-99 r2/r3 below.
   Tokens, .section, .hero--page, .lp-crumbs etc. come from site.css (this file has no :root of its own). */

/* ===================== SITE-99: blog ===================== */
/* Prefixes: bl- (index) and art- (article). Not bare .blog / .post / .entry-*: WordPress themes
   (GeneratePress included) emit those, and the stack in the ToR is WordPress-compatible. */

/* ---------- index: list of cards ---------- */
.bl-list{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 40px; }
.bl-card{
  position:relative;
  border-top:2px solid var(--sand);
  padding:20px 20px 24px;
  transition:background-color .18s ease;
}
.bl-card:hover{ background:var(--paper-2); }
.bl-card:has(.bl-card__a:active){ background:var(--paper-3); }
.bl-card__title{ font-size:22px; font-weight:600; line-height:1.25; color:var(--heading); overflow-wrap:break-word; }
.bl-card__a{ color:var(--ink); text-decoration:none; }
.bl-card__a:hover{ color:var(--ink); }
/* the whole card is ONE link: the title link is stretched over the card */
.bl-card__a::before{ content:""; position:absolute; inset:0; }
.bl-card__a::after{
  content:""; display:inline-block; width:11px; height:11px; margin-left:8px;
  background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 1l5 5-5 5' fill='none' stroke='%2323282A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition:transform .2s ease;
}
.bl-card:hover .bl-card__a{ text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:4px; }
.bl-card:hover .bl-card__a::after{ transform:translateX(3px); }
/* the focus ring goes around the whole card, not around the title text */
.bl-card__a:focus-visible{ outline:none; }
.bl-card__a:focus-visible::before{ outline:2px solid var(--ink); outline-offset:3px; }
.bl-card__date{ margin-top:8px; font-size:14px; line-height:1.4; color:var(--body); }
.bl-card__lead{ margin-top:12px; font-size:16px; line-height:1.6; color:var(--body); max-width:62ch; }

/* ---------- article: hero ---------- */
.hero--page.art-hero .hero__title{ max-width:26ch; }
.art-byline{ display:grid; grid-template-columns:48px minmax(0,1fr); gap:2px 12px; align-items:center; }
.art-byline__img{
  grid-row:1 / span 2; width:48px; height:48px;
  object-fit:cover; object-position:50% 14%;   /* no-op on the pre-cropped square files; keeps a face if the master is used */
  border:1px solid var(--line-strong); background:var(--paper);
}
.art-byline__name{ align-self:end; font-size:16px; font-weight:600; line-height:1.3; color:var(--ink); }
.art-byline__dates{ align-self:start; font-size:14px; line-height:1.5; color:var(--body-alt); }
.art-byline__sep{ padding-inline:2px; }

/* ---------- article: layout ---------- */
.art-main{ padding-top:40px; }
.art-layout{ display:grid; grid-template-columns:minmax(0,1fr); gap:0 80px; align-items:start; }
.art{ min-width:0; max-width:66ch; font-size:17px; line-height:1.7; color:var(--body); }
.art > * + *{ margin-top:20px; }
.art strong{ font-weight:600; color:var(--ink); }
.art h2{
  font-size:26px; font-weight:600; line-height:1.2; color:var(--heading);
  overflow-wrap:break-word; hyphens:auto;
}
.art > h2{ margin-top:48px; }
.art > h2 + *{ margin-top:12px; }
.art > ul, .art > ol{ padding-left:1.3em; display:grid; gap:10px; }
.art > ul{ list-style:disc; }
.art > ol{ list-style:decimal; }
.art > ul > li::marker, .art > ol > li::marker{ color:var(--steel); }
.art :not(pre) > code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size:.9em; background:var(--paper-3); padding:1px 5px; overflow-wrap:anywhere;
}

/* links in the text: underlined ALWAYS (meaning not by colour); hover thickens, never recolours below 4.5:1 */
.art a{ color:var(--ink); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.art a:hover{ color:var(--steel); text-decoration-thickness:2px; }
.art a:active{ color:var(--ink); background:var(--sand); }
/* SITE-104: hit area >=24px, line box unchanged */
.art a:not(.art-fnref){ padding-block:2px; }

/* short answer */
.art-answer{
  background:var(--paper-2);
  border-left:3px solid var(--sand);
  padding:20px 24px;
  color:var(--ink);
}
.art > .art-checked{ font-size:14px; line-height:1.55; color:var(--muted); margin-top:12px; }

/* code (robots.txt example): system monospace, 0 bytes of webfont */
.art-code{
  margin:0; overflow-x:auto;
  padding:16px 20px;
  background:var(--paper-3); border-left:3px solid var(--steel);
  font:400 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color:var(--ink); tab-size:2;
}

/* table (thresholds): scrolls inside its own box if a long word forces it */
.art-table{ overflow-x:auto; }
.art-table table{ width:100%; border-collapse:collapse; font-size:15px; line-height:1.45; }
.art-table th, .art-table td{
  text-align:left; vertical-align:top; padding:10px 12px 10px 0;
  border-bottom:1px solid var(--line); color:var(--body);
}
.art-table thead th{ font-weight:500; color:var(--ink); border-bottom-color:var(--line-strong); }
.art-table tbody th{ font-weight:600; color:var(--ink); }

/* footnote reference [n] */
.art-fnref{
  display:inline-block; min-width:24px; height:24px; padding-inline:2px;
  text-align:center; font-size:14px; font-weight:600; line-height:24px;
}
.art-fnref::before{ content:"["; }
.art-fnref::after{ content:"]"; }
.art-fnref + .art-fnref{ margin-left:2px; }
.art-fnref:focus-visible{ outline-offset:1px; }
.art-fnref:target{ background:var(--sand-2); box-shadow:0 0 0 2px var(--steel); }   /* you came back from the note */

/* sources */
.art > .art-sources{ margin-top:56px; padding-top:28px; border-top:1px solid var(--line-strong); }
.art-sources > h2{ margin-top:0; }
.art-sources > p{ margin-top:12px; font-size:15px; line-height:1.6; color:var(--body); }
.art-fn{ margin-top:20px; display:grid; counter-reset:artfn; }
.art-fn > li{
  counter-increment:artfn;
  display:grid; grid-template-columns:28px minmax(0,1fr); column-gap:8px;
  padding:14px 8px 6px 12px; border-top:1px solid var(--line);
  font-size:14px; line-height:1.55; color:var(--body);
  overflow-wrap:anywhere;
}
.art-fn > li::before{ content:counter(artfn); font-weight:600; color:var(--ink); }
.art-fn > li:target{ background:var(--sand-2); box-shadow:inset 3px 0 0 var(--steel); }   /* you came from reference [n] */
.art-fn__t{ margin:0; }
.art .art-fn__t a{ padding-block:4px; }   /* SITE-116: 18 + 8 = 26 >= 24, line box unchanged */
.art-fn__back{ grid-column:2; margin:0; display:flex; flex-wrap:wrap; align-items:center; font-size:14px; line-height:1.4; }
.art-fn__back a{ display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; }
.art-fn__back-k{ margin-right:4px; }

/* end of article */
.art > .art-end{
  margin-top:40px; padding-top:12px; border-top:1px solid var(--line);
  display:flex; flex-wrap:wrap; gap:0 32px;
}
.art-end a{ display:inline-flex; align-items:center; min-height:44px; }
.art-end__back::before, .art-end__pair::after{
  content:""; width:9px; height:9px; flex:none;
  background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M9 1L4 6l5 5' fill='none' stroke='%2355636B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.art-end__back::before{ margin-right:8px; }
.art-end__pair::after{ margin-left:8px; transform:scaleX(-1); }

/* table of contents: only where there is room (≥1200), after the text in DOM order */
.art-toc{ display:none; }
@media (min-width:1200px){
  .art-layout{ grid-template-columns:minmax(0,66ch) 280px; }
  .art-toc{ display:block; grid-column:2; grid-row:1; position:sticky; top:24px; padding-top:4px; }
  .art-toc ol{ display:grid; gap:12px; }
  .art-toc a{ display:block; font-size:14px; line-height:1.45; color:var(--ink); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
  .art-toc a:hover{ color:var(--steel); text-decoration-thickness:2px; }
  .art-toc a:active{ color:var(--ink); background:var(--sand); }
}

/* ---------- responsive ---------- */
@media (max-width:899px){
  .bl-list{ grid-template-columns:1fr; gap:12px; }
  .bl-card{ padding:16px 12px 20px; }
  .bl-card__title{ font-size:19px; }
  .art-main{ padding-top:28px; }
  .art{ font-size:16px; line-height:1.65; }
  .art > * + *{ margin-top:16px; }
  .art h2{ font-size:22px; }
  .art > h2{ margin-top:40px; }
  .art > h2 + *{ margin-top:12px; }
  .art-answer{ padding:16px; }
  .art-table table{ font-size:14px; }
  .art-table th, .art-table td{ padding:8px 8px 8px 0; }
  .art > .art-sources{ margin-top:48px; padding-top:24px; }
}
@media (max-width:479px){
  /* photo + name in one row; the two dates drop under it, one per line (a real date fits 280px at 14px) */
  .art-byline__img{ grid-row:1; }
  .art-byline__name{ align-self:center; }
  .art-byline__dates{ grid-column:1 / -1; margin-top:8px; }
  .art-byline__dates > span{ display:block; }
  .art-byline__dates > .art-byline__sep{ display:none; }   /* SITE-99 r2: 0,2,0 must beat .art-byline__dates > span (0,1,1) above */
}
@media (pointer:coarse){
  /* inline reference: 32×32 (not 44) — adjacent [1][2][3] cannot be 44 wide without a gap that breaks the line; see handoff §4.6 */
  .art-fnref{ min-width:32px; height:32px; line-height:32px; margin-block:-4px; }
  .art-toc a{ display:flex; align-items:center; min-height:44px; }
  .art-toc ol{ gap:0; }
}

/* SITE-99 r3 (ui-ux P1): closing call to action in the article, a path to the footer form #solicitud.
   Tokens only (paper-2, steel, ink), radius 0, no new colours; the link keeps the .art a states. */
.art > .art-cta{
  margin-top:40px;
  padding:20px 24px;
  background:var(--paper-2);
  border-left:3px solid var(--steel);
  color:var(--ink);
}
@media (max-width:899px){
  .art > .art-cta{ margin-top:32px; padding:16px; }
}
