/* The article page on the clean pattern set: a Learn article (`learn_article.html`) and a blog post
 * (`blog_post.html`). Sigrix_new/learn/Learn - Article v2.html, design repo commit b0a4e3c (the page moved to v2 at
 * f063551), laid out as Hub post v2: the hero with the contents as an in-page jump row, the article's facts and
 * share in a left column beside one reading column, the end of the article as one hairline row and the author as
 * a rail card, Keep reading as Learn v2's picks grid and the digest on the Hub v2 subscribe layout.
 *
 * The page is Home v2's parts (`.hm-hero`, `.hm-sec`, `.hm-head`, `.hm-eb`, `.hm-alt`, `.hm-found`, `.hm-perks`,
 * `.hm-seats`, all in css/sx-home.css, which the shell bundle carries), this sheet's `la-*` layer (the prototype's
 * own names, its `#la-page` block), and the body's reading rules, which css/sx-learn-article.css holds because the
 * Learn and blog editors' previews draw the body too. The draft banner, the corrections, the cover and the lesson
 * video keep their `art-*` names: the prototype draws none of them, and the page keeps every one.
 *
 * Inverted from the prototype the usual way: it is authored at data-theme="dark", so every value here is a token
 * each theme already resolves, and no selector names a theme. What the page keeps against the prototype is the
 * 2026-11-16 entry in docs/reference/design_sync_log.md. */

/* ─────────── Reading progress: one solid line under the top bar ───────────
   Under the bar on the stacking ladder, as the prototype's 4 under its 50: here the bar is 5 and the phone menu
   40, so the line never paints over the open menu. Its width is the script's (learn_article.js). */
.la-progress { position: fixed; top: 60px; left: 0; right: 0; z-index: 4; height: 2px; pointer-events: none; }
.la-progress span { display: block; width: 0; height: 100%; background: var(--sx-brand-3); }

/* ─────────── Hero: the title's second clause in text-2, the contents as a jump row ───────────
   The wayfinder owns the gap above the title (`--sx-eb-gap`, css/sx-eyebrow.css). Home v2's `.hm-hero h1`
   (0,1,1) outranks its `.sx-eb + *` (0,1,0); the prototype answers the same collision with an 18px margin, and
   here the token decides, as on /faq and /mission. */
.hm-hero.la-hero h1 {
  margin-top: 0;
  font-size: 52px; letter-spacing: -0.032em; line-height: 1.06;
  max-width: 20ch;
  text-wrap: balance;
}
.hm-hero.la-hero .lede { max-width: 62ch; text-wrap: pretty; }
/* In text-2, not text-3, so its 13px links keep 4.5:1. */
.la-jump {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  margin-top: 48px; padding-top: 18px;
  border-top: 1px solid var(--sx-line);
}
.la-jump a { font-size: 13px; font-weight: 500; color: var(--sx-text-2); transition: color 0.12s; }
.la-jump a:hover { color: var(--sx-text); }
.la-jump a:focus-visible,
.art-main .hm-alt:focus-visible { outline: 2px solid var(--sx-brand-3); outline-offset: 2px; }

/* ─────────── Body: the facts column beside one reading column ─────────── */
.la-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 720px);
  gap: 56px;
  align-items: start;
  padding-top: 64px;
}
/* Pinned under the 61px bar while the article scrolls past it. */
.la-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.la-read { min-width: 0; }

/* The category on a dot, never in its colour: the label is text-2, so it keeps 4.5:1 in both themes. */
.la-cat {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sx-text-2);
}
.la-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--la-dot, var(--sx-text-3)); }
/* A dot's colour is its category's token, named by the attribute the server writes: the prototype sets it in a
   `style`, which the CSP refuses. A blog category's token is declared in blog_post.html. */
.la-dot[data-cat-var="--cat-foundations"] { --la-dot: var(--cat-foundations); }
.la-dot[data-cat-var="--cat-tutorials"] { --la-dot: var(--cat-tutorials); }
.la-dot[data-cat-var="--cat-patterns"] { --la-dot: var(--cat-patterns); }
.la-dot[data-cat-var="--cat-seller"] { --la-dot: var(--cat-seller); }
.la-dot[data-cat-var="--cat-buyer"] { --la-dot: var(--cat-buyer); }
.la-dot[data-cat-var="--cat-case"] { --la-dot: var(--cat-case); }
.la-dot[data-cat-var="--cat-spotlights"] { --la-dot: var(--cat-spotlights); }
.la-dot[data-cat-var="--cat-founder"] { --la-dot: var(--cat-founder); }
.la-dot[data-cat-var="--cat-news"] { --la-dot: var(--cat-news); }
.la-dot[data-cat-var="--cat-guides"] { --la-dot: var(--cat-guides); }

.la-meta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  font-family: var(--sx-font-mono); font-size: 12px; color: var(--sx-text-2);
}
.la-meta .d { font-size: 13px; font-weight: 500; color: var(--sx-text); }
.la-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sx .la-tags .hm-alt { font-size: 12.5px; }
.la-by {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding-top: 14px; border-top: 1px solid var(--sx-line);
  font-size: 12.5px; line-height: 1.45; color: var(--sx-text-2);
}
.la-by b { font-weight: 600; color: var(--sx-text); }

/* Share: Copy link and Save for later are buttons, the six networks are text links. A button drawn as a link
   takes the shell's reset (`:where(.sx) button`: no border, fill or padding, the parent's ink) and states what
   base.css's bare `button` would otherwise give it: 12px corners, and the browser's line height. */
.la-share {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--sx-line);
}
.sx .la-share .hm-alt { font-size: 13px; }
.la-share button.hm-alt { border-radius: 0; line-height: inherit; text-align: left; }
.la-nets { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sx .la-nets .hm-alt { font-size: 12.5px; }

/* What the page draws above the body: a lesson video (src/services/learn_video.py) or an uploaded cover. The
   video's chapters and transcript follow the player in the reading column. */
.art-cover { margin: 0 0 32px; }
.art-cover img {
  display: block; width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--sx-r-lg);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.art-video { display: grid; gap: 16px; margin-bottom: 40px; }
.art-video-figure { margin: 0; min-width: 0; }
.art-video-player {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  /* The frame a poster has not filled yet, in both themes. */
  background: var(--sx-bg-2);
  border-radius: var(--sx-r-lg);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.art-video-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  margin-top: 12px;
  font-size: 13px; color: var(--sx-text-2);
}
.art-video-facts { font-family: var(--sx-font-mono); font-size: 12px; color: var(--sx-text-2); }
.art-video-link {
  color: var(--sx-text); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--sx-line-2); text-underline-offset: 3px;
}
.art-video-link:hover { text-decoration-color: currentColor; }
.art-video-label {
  margin: 0 0 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sx-text-2);
}
.art-video-chapters,
.art-video-transcript {
  min-width: 0; padding: 18px 22px;
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.art-video-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.art-video-chapters a {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px;
  padding: 4px 0;
  font-size: 13.5px; line-height: 1.45; color: var(--sx-text-2);
  overflow-wrap: anywhere;
}
.art-video-chapters a:hover,
.art-video-chapters a[aria-current="true"] { color: var(--sx-text); }
.art-video-chapters .t { font-family: var(--sx-font-mono); font-size: 12px; }
.art-video-transcript summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--sx-text); }
.art-video-transcript .art-video-label { margin: 18px 0 0; }
.art-video-transcript p:not(.art-video-label) { margin: 8px 0 0; font-size: 15px; line-height: 1.65; color: var(--sx-text-2); }

/* A moderator's draft preview (#2848): drafts 404 for the public. */
.art-draft-banner {
  margin: 16px auto 0;
  max-width: 1200px;
  padding: 12px 18px;
  border-radius: var(--sx-r-md);
  background: color-mix(in oklab, var(--sx-warn) 14%, transparent);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--sx-warn) 45%, transparent) inset;
  color: var(--sx-text);
  font-size: 14px;
  text-align: center;
}
.art-draft-banner strong { letter-spacing: 0.08em; }

/* Corrections after publishing (#3488), appended and never applied silently: a flat card, as the notes are. */
.art-corrections {
  margin-top: 32px;
  padding: 18px 22px;
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.art-corrections .art-correction { font-size: 15px; line-height: 1.6; color: var(--sx-text-2); }
.art-corrections .art-correction + .art-correction { margin-top: 10px; }
.art-corrections .art-correction strong { color: var(--sx-text); font-weight: 600; }

/* ─────────── The end of the article: one hairline row, then the author as a rail card ─────────── */
.la-end { margin-top: 56px; }
.la-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  padding: 18px 0;
  border-top: 1px solid var(--sx-line); border-bottom: 1px solid var(--sx-line);
}
.sx .la-foot .hm-alt { font-size: 13px; }
.la-bio {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; align-items: start;
  margin-top: 24px; padding: 22px;
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.la-av {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--sx-surface-2);
  box-shadow: 0 0 0 1px var(--sx-line-2) inset;
  font-size: 15px; font-weight: 600; color: var(--sx-text);
}
.la-bio .k { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sx-text-2); }
.la-bio .nm { margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--sx-text); }
.la-bio .ro { margin-top: 2px; font-size: 13px; color: var(--sx-text-2); }
.la-bio p { margin-top: 10px; max-width: 56ch; font-size: 13.5px; line-height: 1.6; color: var(--sx-text-2); }
.la-bio .ln { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; }
.sx .la-bio .hm-alt { font-size: 13px; }

/* ─────────── Keep reading: Learn v2's picks grid ───────────
   As many cells as there are cards, side by side, as /learn's picks lay out. The cards are up to three of the
   library's other entries, so a library of three draws two, and the prototype's three fixed tracks painted the
   hairline's ground as a card-sized block in the empty one. */
.la-rel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1px;
  background: var(--sx-line);
  border-radius: var(--sx-r-lg); overflow: hidden;
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.la-rel a {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 20px 22px;
  background: var(--sx-surface);
  transition: background 0.16s;
}
.la-rel a:hover { background: var(--sx-surface-2); }
/* base.css draws a focused link's ring 2px outside it, and the grid clips what overflows its rounded box, so the
   first card's ring showed as a sliver: draw it inside the card, as Building Blocks v2's picks do. */
.la-rel a:focus-visible { outline-offset: -2px; }
.la-rel .k {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sx-text-2);
}
.la-rel .t { margin-top: 4px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; color: var(--sx-text); text-wrap: balance; }
.la-rel .d {
  font-size: 13px; line-height: 1.55; color: var(--sx-text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.la-rel .m { margin-top: auto; padding-top: 6px; font-family: var(--sx-font-mono); font-size: 12px; color: var(--sx-text-2); }

/* ─────────── The digest: the Hub v2 subscribe layout ───────────
   The field and its row are the prototype's `.hb-in` and `.hb-sub-row`, the Hub's names, under this page's. The
   perks and the form are Home v2's `.hm-found`, which was one bare `1fr` at 900px and under until 2026-11-17: that
   floors at its content's min-content, so the strip's one column is held at zero here, as every newsletter strip's
   is (tests/test_newsletter_strips_fit_a_phone.py), through a hook of the page's own; the shell's is
   `minmax(0, 1fr)` now and this repeats it. */
.la-sub-label { font-size: 12.5px; font-weight: 500; color: var(--sx-text-2); }
.la-sub-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.la-sub-in {
  width: 100%; height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--sx-r-md);
  background: var(--sx-bg);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  color: var(--sx-text); font: inherit; font-size: 14px;
  outline: none;
  transition: box-shadow 0.16s;
}
.la-sub-in::placeholder { color: var(--sx-text-3); }
.la-sub-in:hover { box-shadow: 0 0 0 1px var(--sx-line-2) inset; }
.la-sub-in:focus {
  box-shadow: 0 0 0 1px var(--sx-brand-3) inset, 0 0 0 4px color-mix(in oklab, var(--sx-brand-3) 12%, transparent);
}
.la-sub .news-form-status { margin: 12px 0 0; }
.la-sub .news-form-status:empty { margin: 0; }

@media (max-width: 960px) {
  .la-body { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 48px; }
  .la-side {
    position: static;
    flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 10px 28px;
    padding-bottom: 18px; border-bottom: 1px solid var(--sx-line);
  }
  .la-meta,
  .la-by,
  .la-share { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding-top: 0; border-top: 0; }
  .la-rel { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .la-digest .la-sub-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .hm-hero.la-hero h1 { font-size: 36px; }
  .la-jump { margin-top: 40px; }
}
@media (max-width: 560px) {
  .la-sub-row,
  .la-bio { grid-template-columns: minmax(0, 1fr); }
}
