/* Content blocks. Same tokens, radii, type scale and surfaces as the home page.
   Rhythm: one major gap between blocks (--block-gap); enclosed blocks share one inset (--block-inset);
   inside a block, intro to content is --block-intro. Values shrink together on phones. */
.blocks-host { --block-gap: clamp(56px, 5vw, 72px); --block-inset: 40px; --block-intro: 32px; min-width: 0; }
.blocks { display: flex; flex-direction: column; gap: var(--block-gap); }
.b { position: relative; }
.b--tone-surface { background: var(--surface); border-radius: var(--radius-card); padding: var(--block-inset); }
.b--tone-amber { background: var(--field); color: var(--field-ink); border-radius: var(--radius-card); padding: var(--block-inset); }
.b--tone-amber .button { background: var(--field-ink); color: #fff; }
.b--tone-amber .button--ghost { background: rgba(23, 18, 10, 0.1); color: var(--field-ink); }
.b--tone-amber .link, .b--tone-amber .b__more { color: var(--field-ink); }
.b--tone-amber :focus-visible { outline-color: var(--field-ink); }

/* Type: page title, section title, row title, card title. Tokens from styles.css, nothing new. */
.b__intro { display: flex; flex-direction: column; gap: 14px; margin-bottom: var(--block-intro); max-width: 720px; }
.b__title { font-size: var(--text-h2); line-height: 1.06; letter-spacing: -0.03em; max-width: 22ch; }
.b__h1 { font-size: var(--text-h1); line-height: 1.02; letter-spacing: -0.035em; max-width: 14ch; }
.b__h3 { font-size: var(--text-lead); line-height: 1.25; letter-spacing: -0.01em; }
.b--split .b__title { font-size: var(--text-h3); line-height: 1.12; letter-spacing: -0.025em; max-width: 24ch; }
.b__lead { color: var(--muted); font-size: var(--text-lead); line-height: 1.4; max-width: 60ch; }
.b p { max-width: 60ch; }
.b .b__copy > p:not(.b__lead) { color: var(--muted); }
/* Amber field: every supporting line in the field's own brown (6:1 on amber). Same specificity as the rule above. */
.b.b--tone-amber p, .b.b--tone-amber .b__lead, .b.b--tone-amber .b__note, .b.b--tone-amber .b__copy > p:not(.b__lead) { color: var(--field-muted); }
.b__copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.b__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.b__actions--after { margin-top: 28px; }
/* Beside a filled button the second destination is a text link, as in the home hero. */
.b__actions .button--ghost { background: none; color: inherit; padding: 0 4px; min-height: 48px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; font-weight: 500; transition: text-decoration-color var(--t-hover) ease; }
.b__actions .button--ghost:hover { text-decoration-color: currentColor; }
.b__actions .button--ghost:only-child { background: var(--surface-2); color: var(--ink); padding: 0 22px; text-decoration: none; }
.b--tone-amber .b__actions .button--ghost:only-child { background: rgba(23, 18, 10, 0.1); color: var(--field-ink); }
.b__note { font-size: var(--text-small); color: var(--muted); max-width: 56ch; margin-top: 20px; }
.b__note a { text-decoration: underline; text-underline-offset: 0.2em; }
.b__small { font-size: var(--text-small); color: var(--muted); }
.b__more { font-size: 1rem; color: var(--accent); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color var(--t-hover) ease; }
.b__more:hover { text-decoration-color: currentColor; }
.b__mark { font-size: 22px; color: var(--accent); }
.b--tone-amber .b__mark { color: var(--field-ink); }

/* Visuals: in-house drawings are decoration and scale with their column; pictures keep their ratio. */
.b-visual { margin: 0; min-width: 0; }
.b-visual svg { display: block; width: 100%; height: auto; max-height: 360px; }
.b-visual img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--surface-2); }
.b-visual figcaption { font-size: var(--text-small); color: var(--muted); margin-top: 10px; }
/* The drawings were made for one ground each: hero-pods and cta-swarm for amber, the others for dark. Swap palettes on the other ground. */
.b:not(.b--tone-amber) .b-visual--art svg [fill="#17120a"] { fill: #eceef1; }
.b:not(.b--tone-amber) .b-visual--art svg [stroke="#17120a"] { stroke: #a3a9b3; }
.b:not(.b--tone-amber) .b-visual--art svg [fill="#ffffff"] { fill: #22262c; }
.b--tone-amber .b-visual--art svg [fill="#eceef1"], .b--tone-amber .b-visual--art svg [fill="#a3a9b3"] { fill: #17120a; }
.b--tone-amber .b-visual--art svg [stroke="#eceef1"], .b--tone-amber .b-visual--art svg [stroke="#a3a9b3"] { stroke: #4a390c; }
.b--tone-amber .b-visual--art svg [fill="#22262c"], .b--tone-amber .b-visual--art svg [fill="#171a1e"], .b--tone-amber .b-visual--art svg [fill="#0f1113"] { fill: #e3a52c; }
.b--tone-amber .b-visual--art svg [fill="#f2b134"] { fill: #17120a; }
.b--tone-amber .b-visual--art svg [stroke="#f2b134"] { stroke: #17120a; }

/* Hero */
.b--hero.b--tone-dark { padding-block: 16px 0; }
.b__hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.b--hero:not(.b--has-visual) .b__hero { grid-template-columns: minmax(0, 1fr); }
.b--hero.b--layout-centered .b__hero { text-align: center; justify-items: center; }
.b--hero.b--layout-centered .b__copy { align-items: center; }
.b--hero.b--layout-centered .b__h1 { max-width: 18ch; }
.b--hero.b--layout-centered .b__actions { justify-content: center; }
.b--layout-reverse .b__hero > .b__copy, .b--layout-reverse .b__split > .b__copy { order: 2; }

/* Reading text */
.b--text .b__reading { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 28px 48px; max-width: 920px; }
.b--text .b__reading:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.b__reading-item { display: flex; flex-direction: column; gap: 10px; }
.b__reading-item h3 { font-size: var(--text-lead); line-height: 1.25; }
.b__reading-item p { color: var(--muted); }

/* Text + visual: the explanation block. Text leads; the drawing sits beside it and never below the fold alone. */
.b__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 48px; align-items: start; }
.b__split > .b-visual { align-self: center; }
.b--split:not(.b--has-visual) .b__split, .b--split.b--layout-wide .b__split { grid-template-columns: minmax(0, 1fr); }
.b--split.b--layout-wide .b-visual { max-width: 860px; margin-inline: auto; }
.b__facts { margin-top: 4px; }
.b__facts strong { font-weight: 600; color: var(--ink); }
.b__facts li { color: var(--muted); }
/* Inside a card the facts list is a plain ruled list, not a second box. */
.b--tone-surface .b__facts { background: transparent; padding: 0; border-radius: 0; }
.b--tone-surface .b__facts li { padding-block: 12px; }

/* Feature cards */
.b__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.b__grid[data-count="4"], .b__grid[data-count="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.b__grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.b__card { display: flex; flex-direction: column; gap: 12px; }
.b__card h3 { font-size: var(--text-lead); line-height: 1.25; letter-spacing: -0.01em; }
.b__card p { color: var(--muted); font-size: 1rem; }
.b__card--featured { background: var(--field); color: var(--field-ink); }
.b__card--featured p { color: var(--field-muted); }
.b__card--featured .b__mark, .b__card--featured .b__more { color: var(--field-ink); }
.b--tone-surface .b__card { background: var(--surface-2); }

/* Numbered steps: the home's step cards. Three across for three; two by two for four. */
.b__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; padding: 0; margin: 0; }
.b__steps[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.b__steps[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.b__steps .step__text { color: var(--muted); }

/* Facts & figures: figure on the left, meaning on the right, a two-column ledger. Nothing stacks above a number. */
.b__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 0 48px; margin: 0; border-top: 1px solid var(--surface-3); }
.b__stat { background: none; border-radius: 0; display: grid; grid-template-columns: minmax(132px, auto) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--surface-3); }
.b__figure { grid-row: 1 / 3; font-size: clamp(2.25rem, 1.6rem + 1.6vw, 3rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.b__stat dt { font-weight: 600; font-size: 1.125rem; }
.b__stat p { color: var(--muted); font-size: 1rem; }

/* Comparison table: one surface, the block's own. The first column stays put while the rest scrolls; a cue says so. */
.b__scroll { position: relative; overflow-x: auto; scrollbar-width: thin; }
.b__table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 1rem; line-height: 1.45; }
.b__table th, .b__table td { text-align: left; padding: 14px 20px 14px 0; vertical-align: top; border-top: 1px solid var(--surface-3); min-width: 9rem; }
.b__table thead th { color: var(--muted); font-weight: 500; font-size: var(--text-small); border-top: 0; padding-top: 0; }
.b__table tbody th { font-weight: 500; }
.b__table tbody tr:last-child th, .b__table tbody tr:last-child td { border-bottom: 1px solid var(--surface-3); }
.b__table th:first-child, .b__table td:first-child { position: sticky; left: 0; background: var(--surface); padding-right: 24px; }
.b--tone-dark .b__table th:first-child, .b--tone-dark .b__table td:first-child { background: var(--bg); }
.b__table .is-hi { color: var(--accent); font-weight: 500; }
.b__scrollcue { display: none; font-size: var(--text-small); color: var(--muted); margin: 0 0 10px; }
.b__scroll.is-overflowing + .b__scrollcue, .b__scrollcue.is-shown { display: block; }

/* Plans: four fixed positions, two pairs on tablets, one column on phones. */
.b__plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.b__plans .plan__lines { padding: 0; }

/* Works with */
.b__marks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; }
.b__marks li { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; }
.b__marks .mark { font-size: 24px; }

/* Checklist */
.b__checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px 40px; }
.b__checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; }
.b__checklist h3 { font-size: 1.125rem; line-height: 1.35; font-weight: 600; }
.b__checklist p { color: var(--muted); font-size: 1rem; margin-top: 4px; }
.b__check { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); position: relative; margin-top: 2px; }
.b__check::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* Note: a qualification next to what it qualifies. Compact on purpose. */
.b--callout.b--tone-surface, .b--callout.b--tone-amber { padding: 24px 28px; }
.b__callout { background: none; padding: 0; border-radius: 0; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; }
.b__callout .b__copy { flex: 1 1 420px; gap: 6px; }
.b__callout .b__h3 { font-size: 1.125rem; }
.b__callout p { color: var(--muted); font-size: 1rem; max-width: 64ch; }
.b__callout .b__actions { margin: 0; }

/* Terminal */
.b__term { background: var(--ui-dark); border-radius: 16px; overflow: hidden; }
.b__termbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #1c1f24; color: var(--ui-dark-muted); font-size: 12.5px; }
.b__termdot { width: 10px; height: 10px; border-radius: 50%; background: #3a3f47; }
.b__termname { margin-left: 8px; font-family: var(--font-mono); }
.b__copybtn { margin-left: auto; min-height: 32px; padding: 0 12px; background: #2a2f36; color: var(--ui-dark-text); border-radius: var(--radius-control); font-size: 13px; }
.b__term .ui__term { border-radius: 0; }

/* Link cards and the compact anchor index */
.b__links { margin: 0; }
.b__anchors { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.b__anchors a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius-button); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; transition: background-color var(--t-hover) ease; }
.b__anchors a:hover { background: var(--surface-2); }

/* FAQ reuses the home card. */
.b__faq { margin-top: 0; }

/* CTA */
.b__cta { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 24px 48px; align-items: center; }
.b--cta.b--has-visual .b__cta { grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 0.6fr); }
.b__cta .b__title { max-width: 22ch; }
.b__cta .b__actions { margin: 0; }
.b--cta.b--layout-centered .b__cta { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
.b--cta.b--layout-centered .b__actions { justify-content: center; }

/* Reveal on scroll: travel only, nothing hidden, and only once the script has taken over. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] > *, html.js [data-reveal] :is(.b__links, .b__grid, .b__steps, .b__stats, .b__anchors, .b__plans, .b__checklist, .b__reading, .b__faq, .b__marks) > * { transition: transform 700ms var(--ease-out); }
  html.js [data-reveal]:not(.is-in) > *, html.js [data-reveal]:not(.is-in) :is(.b__links, .b__grid, .b__steps, .b__stats, .b__anchors, .b__plans, .b__checklist, .b__reading, .b__faq, .b__marks) > * { transform: translateY(16px); }
  html.js [data-reveal] :is(.b__links, .b__grid, .b__steps, .b__stats, .b__anchors, .b__plans, .b__checklist, .b__reading, .b__faq, .b__marks) > :nth-child(2) { transition-delay: 60ms; }
  html.js [data-reveal] :is(.b__links, .b__grid, .b__steps, .b__stats, .b__anchors, .b__plans, .b__checklist, .b__reading, .b__faq, .b__marks) > :nth-child(3) { transition-delay: 120ms; }
  html.js [data-reveal] :is(.b__links, .b__grid, .b__steps, .b__stats, .b__anchors, .b__plans, .b__checklist, .b__reading, .b__faq, .b__marks) > :nth-child(n+4) { transition-delay: 180ms; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.page[data-theme="light"] .b__term { background: #15171a; }
.page[data-theme="light"] .b__table th:first-child, .page[data-theme="light"] .b__table td:first-child { background: #ffffff; }

@media (max-width: 900px) {
  .blocks-host { --block-gap: 48px; --block-inset: 28px; --block-intro: 24px; }
  .b__hero, .b__split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .b--layout-reverse .b__hero > .b__copy, .b--layout-reverse .b__split > .b__copy { order: 0; }
  .b__split > .b-visual svg { max-height: 240px; }
  .b__cta, .b--cta.b--has-visual .b__cta { grid-template-columns: minmax(0, 1fr); }
  .b--cta .b-visual { display: none; }
  .b__plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b__steps, .b__steps[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b__grid[data-count="4"], .b__grid[data-count="8"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b__scrollcue { display: block; }
}
@media (max-width: 560px) {
  .blocks-host { --block-gap: 40px; --block-inset: 24px; --block-intro: 20px; }
  .b__title, .b--split .b__title { font-size: 2rem; }
  .b__h1 { font-size: 2.5rem; }
  .b__lead { font-size: 1.125rem; }
  .b--hero .b-visual { display: none; }
  .b__split > .b-visual svg { max-height: 180px; }
  .b__stat { grid-template-columns: minmax(104px, auto) minmax(0, 1fr); }
  /* Phones: each row becomes a small ledger, criterion first, every cell labelled with its column. No sideways scroll. */
  .b__scroll { overflow: visible; }
  .b__scrollcue { display: none; }
  .b__table, .b__table tbody, .b__table tr, .b__table th, .b__table td { display: block; min-width: 0; }
  .b__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .b__table tr { padding: 14px 0; border-top: 1px solid var(--surface-3); }
  .b__table tbody tr:last-child { border-bottom: 1px solid var(--surface-3); }
  .b__table th, .b__table td { border: 0; padding: 0; position: static; background: none; }
  .b__table tbody th { font-weight: 600; margin-bottom: 6px; }
  .b__table td { color: var(--muted); font-size: 1rem; padding-left: 0; }
  .b__table td + td { margin-top: 4px; }
  .b__table td::before { content: attr(data-col) ": "; color: var(--ink); font-weight: 500; }
  .b__table td.is-hi::before { color: var(--accent); }
  .b__table tbody tr:last-child th, .b__table tbody tr:last-child td { border-bottom: 0; }
  .b__plans, .b__steps, .b__steps[data-count="4"], .b__steps[data-count="2"], .b__grid[data-count="4"], .b__grid[data-count="8"], .b__grid[data-count="2"] { grid-template-columns: minmax(0, 1fr); }
}
