/* The release note's article: the "On this page" rail and the blocks under it, as
   components/hub_update_article.html renders them (with components/hub_ship_list.html's
   "What shipped"). Two pages render those macros and both link this sheet: the public
   update page (hub_update_detail.html) and the Roadmap editor, whose preview of a saved
   update is the same fragment (_render_update_preview_fragment in src/main.py). While
   these rules lived in the public page's inline <style>, the preview drew every block
   unstyled, under the editor's own mock of them (#6387).

   Hub - Post v2.html (design repo b0a4e3c) sets the article on the clean pattern set: the
   rail is a row of links under a hairline, the body one reading column whose links underline
   in the text's ink, the TL;DR a flat rail card holding one hairline list, "What shipped" the
   Hub feed's ship list, the highlights two ideas with a hairline above each, the lab note a
   flat card with the roadmap's in-flight dot, and "Why it matters" a statement between two
   hairlines. The drop cap, the numbered heading markers, the chips, the glow and the hatched
   strip went with the pre-clean page.

   Everything is scoped to .hub-update-sx. On the public page that is the article's root, a
   plain hook inside the page's `.sx` body, so the shell's tokens and resets reach it and it
   follows the site theme with or without its script. The preview names a theme on its own
   .hub-update-sx, data-theme="light", because its card is white in both themes, and lives on
   a console page that carries neither the shell's tokens nor its resets: the block below is
   that scope's, and only a scope naming its theme takes it. What belongs to the public page
   rather than the article stays in its sheet, css/sx-hub.css: the hero, the column of facts
   beside the article, and the bars under it. */

.hub-update-sx[data-theme="light"] {
  --sx-bg: #FAFAFB;
  --sx-bg-2: #F4F5F8;
  --sx-surface: #FFFFFF;
  --sx-surface-2: #F7F8FB;
  --sx-line: #E6E8EE;
  --sx-line-2: #D6D9E1;
  --sx-text: #0E1320;
  --sx-text-2: #4B5263;
  --sx-text-3: #616879;
  --sx-mute: #B7BCC8;
  --sx-brand: #2A33C4;
  --sx-brand-2: #1A1F6B;
  --sx-brand-3: #3D4DFF;
  /* The ink the rules below read. The preview is light inside a page that may be dark,
     where base.html's value is the dark #A9B4FF. */
  --sx-brand-text: #1A1F6B;
  --sx-accent: #14B8A6;
  --sx-warn: #C77800;
  --sx-danger: #DC2C50;
  --sx-ok: #1F9D55;
  /* The status fills' ink halves, as base.html declares them: a fill read as
     light-theme text falls below AA (#6423). */
  --sx-ok-text: #146B3A;
  --sx-warn-text: #8C5600;
  --sx-accent-text: #0C7065;
  --sx-font-display: 'Geist','Inter',ui-sans-serif,system-ui,sans-serif;
  --sx-font-body: 'Geist','Inter',ui-sans-serif,system-ui,sans-serif;
  --sx-font-mono: 'JetBrains Mono',ui-monospace,monospace;
  --sx-r-sm: 6px; --sx-r-md: 10px; --sx-r-lg: 14px; --sx-r-xl: 20px;

  font-family: var(--sx-font-body);
  color: var(--sx-text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  line-height: 1.5;
  display: block;
}
/* The resets the shell gives an `.sx` page, for the preview's scope alone. */
.hub-update-sx[data-theme], .hub-update-sx[data-theme] * { box-sizing: border-box; }
.hub-update-sx[data-theme] a { color: inherit; text-decoration: none; }
.hub-update-sx[data-theme] h1, .hub-update-sx[data-theme] h2,
.hub-update-sx[data-theme] h3, .hub-update-sx[data-theme] h4 {
  font-family: var(--sx-font-display); margin: 0;
  letter-spacing: -0.02em; line-height: 1.15;
}
.hub-update-sx[data-theme] p { margin: 0; }

/* The rail: a row of links under a hairline (Hub v2's jump row, `.hb-jump` in css/sx-hub.css,
   to the declaration). A body sub-heading's link is set quieter than its section's. */
.hub-update-sx .post-toc {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--sx-line);
}
.hub-update-sx .post-toc a {
  font-size: 13px; font-weight: 500; color: var(--sx-text-3);
  text-decoration: none;
  transition: color 120ms;
}
.hub-update-sx .post-toc a:hover { color: var(--sx-text); }
.hub-update-sx .post-toc a[data-level="3"],
.hub-update-sx .post-toc a[data-level="4"] { font-weight: 400; }

/* Article column. Each block the rail names clears the sticky bar when its link is followed. */
.hub-update-sx .post-article { min-width: 0; }
.hub-update-sx .post-tldr,
.hub-update-sx .post-what-shipped,
.hub-update-sx .post-highlights,
.hub-update-sx .post-testing,
.hub-update-sx .post-callout { scroll-margin-top: 96px; }
.hub-update-sx .post-article > * + * { margin-top: 20px; }
/* A block that opens on its own heading stands as far from what it follows as a body h2. */
.hub-update-sx .post-article > * + .post-what-shipped,
.hub-update-sx .post-article > * + .post-callout { margin-top: 56px; }

/* Article body — applied to rendered markdown */
/* base.css sets a body's paragraphs, lists and code blocks 12px apart from below (0,1,1); here the
   gap is the one above each block, so the one below is taken back. */
.hub-update-sx .post-article .listing-markdown-content > * { margin-bottom: 0; }
.hub-update-sx .post-article .listing-markdown-content > * + * { margin-top: 20px; }
.hub-update-sx .post-article .listing-markdown-content h1,
.hub-update-sx .post-article .listing-markdown-content h2,
.hub-update-sx .post-what-shipped h2,
.hub-update-sx .post-callout h2 {
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.25;
  scroll-margin-top: 96px;
  color: var(--sx-text);
  text-wrap: balance;
}
.hub-update-sx .post-article .listing-markdown-content h1,
.hub-update-sx .post-article .listing-markdown-content h2 { margin-top: 56px; }
.hub-update-sx .post-article .listing-markdown-content > :first-child { margin-top: 0; }
.hub-update-sx .post-article .listing-markdown-content h3 {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.35;
  scroll-margin-top: 96px;
  color: var(--sx-text);
}
.hub-update-sx .post-article .listing-markdown-content p {
  font-size: 16px; line-height: 1.7; color: var(--sx-text-2);
  text-wrap: pretty;
}
/* The opening paragraph is the lede: larger, in the text's ink, with no drop cap. */
.hub-update-sx .post-article .listing-markdown-content > p:first-child {
  font-size: 19px; line-height: 1.6; color: var(--sx-text);
}
.hub-update-sx .post-article .listing-markdown-content strong,
.hub-update-sx .post-article .listing-markdown-content b {
  color: var(--sx-text); font-weight: 600;
}
.hub-update-sx .post-article .listing-markdown-content em { color: var(--sx-text); }
/* A link reads as a link in a sentence: the text's ink over a hairline that takes the ink
   under the pointer, as on Mission v2. */
.hub-update-sx .post-article .listing-markdown-content a {
  color: var(--sx-text);
  text-decoration: underline;
  text-decoration-color: var(--sx-line-2);
  text-underline-offset: 3px;
}
.hub-update-sx .post-article .listing-markdown-content a:hover { text-decoration-color: currentColor; }
.hub-update-sx .post-article .listing-markdown-content ul,
.hub-update-sx .post-article .listing-markdown-content ol {
  margin: 0; padding: 0 0 0 22px;
  display: grid; gap: 8px;
  font-size: 16px; line-height: 1.7; color: var(--sx-text-2);
}
.hub-update-sx .post-article .listing-markdown-content li::marker { color: var(--sx-text-3); }
.hub-update-sx .post-article .listing-markdown-content code,
.hub-update-sx .post-article .listing-markdown-content kbd {
  font-family: var(--sx-font-mono); font-size: 13px;
  padding: 1px 6px; border-radius: 4px;
  background: var(--sx-bg-2); color: var(--sx-text);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.hub-update-sx .post-article .listing-markdown-content pre {
  padding: 16px; border-radius: var(--sx-r-md);
  background: var(--sx-bg-2); color: var(--sx-text);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  overflow: auto; font-family: var(--sx-font-mono); font-size: 13px;
}
.hub-update-sx .post-article .listing-markdown-content pre code { padding: 0; background: none; box-shadow: none; }
/* A quote sits against one hairline in the text's ink; the gradient bar went with the old page. */
.hub-update-sx .post-article .listing-markdown-content blockquote {
  margin-inline: 0;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--sx-line-2);
  color: var(--sx-text); font-size: 16px; line-height: 1.65;
}
.hub-update-sx .post-article .listing-markdown-content img {
  max-width: 100%; height: auto;
  border-radius: var(--sx-r-md);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}

/* TL;DR: a flat rail card holding one hairline list (the prototype's "In short"). */
.hub-update-sx .post-tldr {
  padding: 20px 22px 6px;
  background: var(--sx-surface);
  border-radius: var(--sx-r-lg);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.hub-update-sx .post-tldr-stamp {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sx-text-3);
}
.hub-update-sx .post-tldr ul { list-style: none; margin: 12px 0 0; padding: 0; }
.hub-update-sx .post-tldr li {
  padding: 11px 0;
  border-top: 1px solid var(--sx-line);
  font-size: 14px; line-height: 1.55; color: var(--sx-text-2);
}

/* What shipped: the Hub feed's ship list, one hairline row per change. */
.hub-update-sx .post-what-shipped h2 { margin: 0 0 20px; }
.hub-update-sx .post-ships {
  list-style: none; margin: 0; padding: 0;
  border-bottom: 1px solid var(--sx-line);
}
.hub-update-sx .post-ships > li {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--sx-line);
}
/* Each kind's ink is its ramp's -text half: a status fill reads below AA as light-theme text
   (#6423). Imp takes the brand's ink, and in dark the prototype's own brand-3; the preview,
   which names its light theme inside an editor that may be dark, keeps the ink. */
.hub-update-sx .post-ships .hb-t {
  font-family: var(--sx-font-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 21px;
  color: var(--sx-text-3);
}
.hub-update-sx .post-ships .hb-t--new { color: var(--sx-ok-text); }
.hub-update-sx .post-ships .hb-t--fix { color: var(--sx-warn-text); }
.hub-update-sx .post-ships .hb-t--imp { color: var(--sx-brand-text); }
.hub-update-sx .post-ships .hb-t--lab { color: var(--sx-accent-text); }
[data-theme="dark"] .hub-update-sx:not([data-theme]) .post-ships .hb-t--imp { color: var(--sx-brand-3); }
.hub-update-sx .post-ships .ship-title {
  display: block;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 21px;
  color: var(--sx-text);
}
.hub-update-sx .post-ships .ship-text {
  margin-top: 4px;
  font-size: 14px; line-height: 1.6; color: var(--sx-text-2);
}

/* Highlights: two ideas a row, a hairline above each, numbered in mono (the prototype's pair). */
.hub-update-sx .post-highlights {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px;
}
.hub-update-sx .post-hl { padding: 18px 0 4px; border-top: 1px solid var(--sx-line); }
.hub-update-sx .post-hl .num {
  font-family: var(--sx-font-mono);
  font-size: 12px; letter-spacing: 0.04em; color: var(--sx-text-2);
}
.hub-update-sx .post-hl .ttl {
  display: block; margin-top: 8px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35;
  color: var(--sx-text);
}
.hub-update-sx .post-hl p { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--sx-text-2); }

/* In testing: a flat card, its state the roadmap's in-flight dot. */
.hub-update-sx .post-testing {
  padding: 20px 22px;
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.hub-update-sx .post-testing-head {
  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);
}
.hub-update-sx .post-testing-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--sx-brand-3); }
.hub-update-sx .post-testing h3 {
  margin-top: 10px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35;
  color: var(--sx-text);
}
.hub-update-sx .post-testing p { margin-top: 8px; font-size: 14.5px; line-height: 1.65; color: var(--sx-text-2); }

/* Why it matters: the statement between two hairlines. */
.hub-update-sx .post-say {
  margin-top: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--sx-line);
  border-bottom: 1px solid var(--sx-line);
}
.hub-update-sx .post-say p {
  font-family: var(--sx-font-display);
  font-size: 21px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.5;
  color: var(--sx-text);
}
.hub-update-sx .post-say p + p { margin-top: 14px; }

/* Responsive */
@media (max-width: 720px) {
  .hub-update-sx .post-say p { font-size: 19px; }
}
@media (max-width: 560px) {
  .hub-update-sx .post-highlights { grid-template-columns: minmax(0, 1fr); }
}
