/* Moondog site, 2026 brand: inner pages and the blog. Loaded by each brand2026 page template through head_extra,
   after tokens.css and base.css. Uses the --md-* tokens and the global classes of base.css, never redefines them.

   INDEX
   1  Page frame        .page .page--narrow .page-head .page-empty .crumbs .chips .chip .pager .searchbar
   2  Blog index        .cats .cat-tile .cat-band .blog-bar .post-lead .post-grid .post-card (+ __link __media __body __meta __title __intro)
   3  Post              .post-header .post-title .post-byline .listen .post-hero .toc .post-main .post-body .pb (--text --heading
                        --visual --wide --stats --<block>) .post-foot .post-terms .pn .related .closer
   4  Article blocks    .prose .blk-head .pq .fig (__title __source) .stat-callout .chart .dtable .data-table .blk-img
   5  Glossary          .az .az-group .az-list .az-row .term .term-card .term-posts .term-post
   6  Legal             .legal .notice
   7  Contact           .contact .form .form__actions .errsum__h (base.css owns .field .errsum .done)
   8  Search            .results .result
   9  Page builder      .fx .fx--<block> .fx-hero .fx-head .fx-grid .fx-cta .fx-actions .fx-faq .fx-usp .fx-steps
                        .fx-stats .fx-tags .fx-tiers .fx-tier .fx-ticks .fx-points .fx-line-ic
   10 Lost pages        .lost (404 and 500)
   Local tokens: --pg-* below, themed with the same two selectors as tokens.css. */

:root {
  --pg-text: 36rem;            /* the reading column: about 68 characters of Inter at 18px */
  --pg-wide: calc(var(--pg-text) * 1.35); /* the wide track for charts, wide tables and images */
  --pg-hero: 1120px;           /* the post cover band */
  --pg-gap-head: 2.75rem;      /* space before a heading in a post */
  --pg-gap-fig: 3rem;          /* space before and after every visual block */
  --pg-narrow: 820px;          /* glossary, legal, search */
  --pg-cover-edge: transparent; /* a night cover on paper needs no edge, on ink a hairline */
  --pg-reading: rgb(var(--md-ink-rgb) / .06);
  --pg-hover: rgb(var(--md-ink-rgb) / .035);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --pg-cover-edge: var(--md-line); --pg-reading: rgb(var(--md-paper-rgb) / .09); --pg-hover: rgb(var(--md-paper-rgb) / .05); }
}
:root[data-theme="dark"] { --pg-cover-edge: var(--md-line); --pg-reading: rgb(var(--md-paper-rgb) / .09); --pg-hover: rgb(var(--md-paper-rgb) / .05); }

/* ---------- 1. Page frame ---------- */
.page { padding-block: var(--md-s-8) var(--md-s-9); }
.page--narrow { max-width: calc(var(--pg-narrow) + 2 * var(--md-margin)); }
.page--head { padding-bottom: 0; }
.page-head { display: grid; gap: var(--md-s-4); margin-bottom: var(--md-s-7); }
.page-head .sec__head { margin-bottom: var(--md-s-2); }
.page-head .h1 { overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 14 6 6; }
.page-head .lede p + p { margin-top: var(--md-s-3); }
.page-head .lede a { text-underline-offset: 4px; }
.page-empty { color: var(--md-fg-2); padding-block: var(--md-s-6); }

.crumbs { margin-bottom: var(--md-s-5); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; font: 400 var(--md-text-index)/1.3 var(--md-font-mono); color: var(--md-fg-3); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; padding-inline: var(--md-s-2); color: var(--md-fg-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--md-fg-2); text-decoration: none; }
.crumbs a:hover { color: var(--md-fg); text-decoration: underline; text-underline-offset: 4px; }
.crumbs a[aria-current] { color: var(--md-fg-3); }

.chips { display: flex; flex-wrap: wrap; gap: var(--md-s-2); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--md-s-4); border: 1px solid var(--md-line-strong); border-radius: var(--md-r-sm);
  font: 500 var(--md-text-small)/1.2 var(--md-font-sans); color: var(--md-fg-2); text-decoration: none; background: transparent;
  transition: border-color var(--md-dur-hover) var(--md-ease), color var(--md-dur-hover) var(--md-ease), background-color var(--md-dur-hover) var(--md-ease); }
.chip:hover { border-color: var(--md-fg); color: var(--md-fg); }
.chip[aria-current] { background: var(--md-primary); border-color: var(--md-primary); color: var(--md-on-primary); }

.pager { display: flex; align-items: center; justify-content: center; gap: var(--md-s-4); margin-top: var(--md-s-8); }
.pager .btn--sm { min-height: 44px; }

.searchbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--md-s-3); margin-bottom: var(--md-s-7); }
.searchbar .field { flex: 1 1 260px; }

/* ---------- 2. Blog index ---------- */
/* Category navigation: each category with its picture, the same picture as on its cards */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--md-s-3); margin-bottom: var(--md-s-6); }
@media (min-width: 768px) { .cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat-tile { display: grid; gap: var(--md-s-2); color: var(--md-fg-2); text-decoration: none; border-radius: var(--md-r-sm); }
.cat-tile__pic { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--md-r-sm); background: var(--md-ink); position: relative;
  outline: 1px solid transparent; outline-offset: 2px; transition: outline-color var(--md-dur-hover) var(--md-ease); }
.cat-tile__pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--pg-cover-edge); }
.cat-tile__pic > svg { width: 100%; height: 100%; }
.cat-tile__name { display: flex; align-items: center; min-height: 28px; font: 500 var(--md-text-small)/1.2 var(--md-font-sans); }
.cat-tile:hover { color: var(--md-fg); }
.cat-tile:hover .cat-tile__pic { outline-color: var(--md-line-strong); }
.cat-tile[aria-current] { color: var(--md-fg); }
.cat-tile[aria-current] .cat-tile__pic { outline-color: var(--md-fg); }
.cat-tile[aria-current] .cat-tile__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* The filtered index opens on its category's picture as a low band */
.cat-band { position: relative; margin-bottom: var(--md-s-7); border-radius: var(--md-r-md); overflow: hidden; background: var(--md-ink); color: var(--md-paper); aspect-ratio: 3 / 1; }
@media (min-width: 768px) { .cat-band { aspect-ratio: 5 / 1; } }
.cat-band__pic, .cat-band__pic > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cat-band__text { position: relative; height: 100%; display: grid; align-content: end; gap: var(--md-s-1); padding: var(--md-s-5); max-width: 36em; }
.cat-band__name { font: 500 var(--md-text-h3)/1.15 var(--md-font-display); letter-spacing: -0.015em; }
.cat-band__desc { font-size: var(--md-text-ui); line-height: 1.5; color: var(--md-x-silver); }

.blog-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--md-s-4); padding-bottom: var(--md-s-5);
  margin-bottom: var(--md-s-7); border-bottom: 1px solid var(--md-line); }
.blog-bar__rss .ic { width: 16px; height: 16px; }

.post-lead { margin-bottom: var(--md-s-8); }
.post-grid { display: grid; grid-template-columns: 1fr; gap: var(--md-s-7) var(--md-gutter); }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.post-card { height: 100%; }
.post-card__link { display: flex; flex-direction: column; gap: var(--md-s-4); height: 100%; color: inherit; text-decoration: none; border-radius: var(--md-r-md); }
.post-card__link:focus-visible { outline-offset: 6px; }
.post-card__media { position: relative; aspect-ratio: 720 / 440; overflow: hidden; border-radius: var(--md-r-md); background: var(--md-ink); }
.post-card__media > svg, .post-card__media > img { width: 100%; height: 100%; object-fit: cover; }
.post-card__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--pg-cover-edge); pointer-events: none; }
.post-card__body { display: grid; gap: var(--md-s-2); align-content: start; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: var(--md-s-1) var(--md-s-3); line-height: 1.5; }
.post-card__cat { color: var(--md-fg-2); text-transform: uppercase; letter-spacing: .06em; }
.post-card__title { font: 500 1.375rem/1.22 var(--md-font-display); letter-spacing: -0.015em; color: var(--md-fg); text-wrap: balance; overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 14 6 6;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-color var(--md-dur-hover) var(--md-ease); }
.post-card__link:hover .post-card__title { text-decoration-color: currentColor; }
.post-card__intro { color: var(--md-fg-2); font-size: var(--md-text-ui); line-height: 1.55; }
.post-card__time { margin-top: var(--md-s-1); }

.post-card--featured .post-card__title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.625rem); line-height: 1.1; letter-spacing: var(--md-track-heading); }
.post-card--featured .post-card__intro { font-size: var(--md-text-lede); line-height: 1.5; max-width: 34em; }
@media (min-width: 900px) {
  .post-card--featured .post-card__link { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--md-s-7); align-items: center; }
  .post-card--featured .post-card__body { gap: var(--md-s-3); }
}

/* ---------- 3. Post ---------- */
/* The reading system. One text column (--pg-text, about 68 characters) and one wide track
   (--pg-wide, 1.35 times the column, capped by the viewport). Text, headings, quotes, single
   callouts and small tables sit in the column. Charts, wide tables, images, embeds and rows of
   callouts take the wide track, centred on the column. Vertical rhythm: 1em between text
   blocks, --pg-gap-head before a heading, --pg-gap-fig around every visual block. */
.post-header { max-width: calc(var(--pg-text) + 2 * var(--md-margin)); padding-top: var(--md-s-7); }
.post-title { font: var(--md-weight-display) clamp(2.125rem, 1.45rem + 2.6vw, 3.5rem)/1.06 var(--md-font-display); letter-spacing: -0.028em; text-wrap: balance;
  overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 14 6 6; }
.post-header .lede { margin-top: var(--md-s-5); max-width: none; }
.post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--md-s-3) var(--md-s-5); margin-top: var(--md-s-6); padding-top: var(--md-s-4);
  border-top: 1px solid var(--md-line); }
.post-byline__author { display: inline-flex; align-items: center; gap: var(--md-s-3); font: 500 var(--md-text-ui)/1.3 var(--md-font-sans); color: var(--md-fg); }
.post-byline__role { font-weight: 400; color: var(--md-fg-2); }
.post-byline__avatar { width: 40px; height: 40px; border-radius: 50%; }
.post-byline__meta { display: inline-flex; flex-wrap: wrap; gap: var(--md-s-2); line-height: 1.5; }

.listen { display: inline-flex; align-items: center; gap: var(--md-s-3); }
.listen-btn { display: inline-flex; align-items: center; gap: var(--md-s-3); min-height: 44px; padding: 0 var(--md-s-4) 0 6px; border: 1px solid var(--md-line-strong);
  border-radius: var(--md-r-sm); background: transparent; color: var(--md-fg); font: 500 var(--md-text-small)/1 var(--md-font-sans); cursor: pointer;
  transition: border-color var(--md-dur-hover) var(--md-ease); }
.listen-btn:hover { border-color: var(--md-fg); }
.listen-ico { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--md-r-xs); background: var(--md-primary); color: var(--md-on-primary); }
.listen-ico svg { width: 14px; height: 14px; display: block; }
.listen-ico .ico-pause { display: none; }
.listen-btn[data-state="playing"] .ico-play { display: none; }
.listen-btn[data-state="playing"] .ico-pause { display: block; }
.is-reading { background: var(--pg-reading); box-shadow: 0 0 0 6px var(--pg-reading); border-radius: 2px; }

/* The cover: a calm band, 21:9 on wide screens */
.post-hero { max-width: calc(var(--pg-hero) + 2 * var(--md-margin)); margin-block: var(--md-s-7); }
.post-hero__img { width: 100%; border-radius: var(--md-r-md); aspect-ratio: 21 / 9; object-fit: cover; }
.post-hero--cover > svg { display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; border-radius: var(--md-r-md); background-color: var(--md-ink);
  outline: 1px solid var(--pg-cover-edge); outline-offset: -1px; }
@media (max-width: 767px) { .post-hero--cover > svg, .post-hero__img { aspect-ratio: 16 / 9; } }

/* Table of contents: a disclosure under the header, the sticky list in the margin from 1400px */
.toc--inline { max-width: calc(var(--pg-text) + 2 * var(--md-margin)); margin: 0 auto var(--md-s-7); padding-inline: var(--md-margin); }
.toc--inline details { border-block: 1px solid var(--md-line); }
.toc--inline summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; font: 500 var(--md-text-ui)/1.3 var(--md-font-sans); color: var(--md-fg); }
.toc--inline summary::-webkit-details-marker { display: none; }
.toc--inline summary .ic { color: var(--md-fg-3); transition: transform var(--md-dur-ui) var(--md-ease); }
.toc--inline details[open] summary .ic { transform: rotate(45deg); }
.toc ol { counter-reset: toc; display: grid; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 2.25em 1fr; align-items: baseline; padding-block: 10px; color: var(--md-fg-2); text-decoration: none; font-size: var(--md-text-ui); line-height: 1.4; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 400 var(--md-text-index)/1 var(--md-font-mono); color: var(--md-fg-3); }
.toc a:hover { color: var(--md-fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.toc--inline ol { padding-bottom: var(--md-s-3); }
.toc--side { display: none; }
@media (min-width: 1400px) {
  .toc--inline { display: none; }
  .post-main { position: relative; }
  .toc--side { display: block; position: absolute; top: 0; bottom: 0; left: var(--md-margin);
    width: calc((100% - var(--pg-wide)) / 2 - var(--md-margin) - var(--md-s-6)); }
  .toc__in { position: sticky; top: calc(var(--md-nav-h) + var(--md-s-6)); max-height: calc(100vh - var(--md-nav-h) - var(--md-s-8)); overflow: auto; }
  .toc--side .md-label { padding-bottom: var(--md-s-3); border-bottom: 1px solid var(--md-line); }
  .toc--side a { font-size: var(--md-text-small); padding-block: 7px; }
}

.post-body { display: grid; grid-template-columns: [wide-start] minmax(0, 1fr) [text-start] minmax(0, var(--pg-text)) [text-end] minmax(0, 1fr) [wide-end];
  max-width: calc(var(--pg-wide) + 2 * var(--md-margin)); margin-inline: auto; padding-inline: var(--md-margin);
  font-size: 1.125rem; line-height: 1.7; color: var(--md-fg-2); }
.pb { grid-column: text; min-width: 0; margin-top: 1em; }
.pb:first-child { margin-top: 0; }
.pb--wide { grid-column: wide; }
.pb--heading { margin-top: var(--pg-gap-head); scroll-margin-top: calc(var(--md-nav-h) + var(--md-s-5)); }
.pb--heading + .pb { margin-top: .75em; }
.pb--visual, .pb--visual + .pb { margin-top: var(--pg-gap-fig); }
.pb--heading + .pb--visual { margin-top: var(--md-s-5); }
.pb--visual + .pb--heading { margin-top: var(--pg-gap-head); }
.pb--embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--md-r-md); }
/* Callouts that follow each other: one row of two or three */
.pb--stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0 var(--md-gutter); }
.pb--stats .stat-callout { grid-template-columns: 1fr; align-content: start; }
.pb--stats .stat-callout__source { grid-column: 1; }

.post-foot { max-width: calc(var(--pg-text) + 2 * var(--md-margin)); margin: var(--pg-gap-fig) auto 0; padding-inline: var(--md-margin); display: grid; gap: var(--md-s-7); }
.post-foot > :first-child { padding-top: var(--md-s-5); border-top: 1px solid var(--md-line); }
.post-terms h2 { margin-bottom: var(--md-s-3); }
.post-terms__list { display: grid; border-top: 1px solid var(--md-line); }
.post-terms__list li { border-bottom: 1px solid var(--md-line); }
.post-terms__list a { display: grid; gap: 2px; padding-block: var(--md-s-3); color: inherit; text-decoration: none; }
.post-terms__name { font: 500 1.0625rem/1.3 var(--md-font-display); color: var(--md-fg); }
.post-terms__def { font-size: var(--md-text-small); line-height: 1.5; color: var(--md-fg-2); }
.post-terms__list a:hover .post-terms__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* Previous and next: two doors at the end (posts in the category, terms A to Z) */
.pn { display: grid; grid-template-columns: 1fr; gap: var(--md-s-3); }
@media (min-width: 640px) { .pn { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pn__link { display: grid; gap: var(--md-s-2); align-content: start; padding: var(--md-s-4) var(--md-s-5); border: 1px solid var(--md-line); border-radius: var(--md-r-md);
  color: inherit; text-decoration: none; transition: border-color var(--md-dur-hover) var(--md-ease); }
.pn__link:hover { border-color: var(--md-fg-3); }
.pn__link .md-index { display: inline-flex; align-items: center; gap: var(--md-s-2); }
.pn__link .ic { width: 14px; height: 14px; }
.pn__link--prev .ic { transform: rotate(180deg); }
.pn__link--next { text-align: right; justify-items: end; }
@media (min-width: 640px) { .pn__link--next:only-child { grid-column: 2; } }
.pn__title { font: 500 1.0625rem/1.3 var(--md-font-display); color: var(--md-fg); text-wrap: balance; }

.related { padding-block: var(--md-s-9); }
.related .sec__head { margin-bottom: var(--md-s-6); }

.closer { padding-block: var(--md-s-9); text-align: center; }
.closer__in { display: grid; justify-items: center; gap: var(--md-s-5); }
.closer .h2 { max-width: 18em; }

/* ---------- 4. Article blocks (posts, legal and glossary prose, page-builder text) ---------- */
.prose { color: var(--md-fg-2); }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4 { color: var(--md-fg); font-family: var(--md-font-display); font-weight: 500; text-wrap: balance; }
.prose h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; margin-top: 2.2em; }
.prose h3 { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.012em; margin-top: 1.8em; }
.prose h4 { font-size: 1.0625rem; line-height: 1.3; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose > :first-child { margin-top: 0; }
.prose strong, .prose b { color: var(--md-fg); font-weight: 600; }
.prose a { color: var(--md-fg); text-decoration: underline; text-decoration-color: var(--md-line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose a.glossary-link { text-decoration-style: dotted; text-decoration-color: var(--md-fg-3); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { padding-left: .2em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--md-fg-3); }
.prose blockquote { border-left: 1px solid var(--md-line-strong); padding-left: var(--md-s-5); color: var(--md-fg); }
.prose hr { border: 0; border-top: 1px solid var(--md-line); margin-block: 2em; }

.blk-head { display: grid; gap: var(--md-s-2); }
.blk-head--center { text-align: center; justify-items: center; }
.blk-head h2 { font: 500 clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem)/1.14 var(--md-font-display); letter-spacing: -0.022em; color: var(--md-fg); text-wrap: balance; }
.blk-head h3 { font: 500 1.375rem/1.25 var(--md-font-display); letter-spacing: -0.012em; color: var(--md-fg); text-wrap: balance; }

/* Pull quote: display type in the column, a short rule above, the attribution in mono */
.pq { position: relative; padding-top: var(--md-s-5); }
.pq::before { content: ""; position: absolute; top: 0; left: 0; width: 48px; height: 1px; background: var(--md-fg); }
.pq__q { font: 500 clamp(1.375rem, 1.15rem + .9vw, 1.875rem)/1.28 var(--md-font-display); letter-spacing: -0.016em; color: var(--md-fg); text-wrap: balance; }
.pq__by { margin-top: var(--md-s-4); font: 400 var(--md-text-index)/1.5 var(--md-font-mono); color: var(--md-fg-3); }
.pq--card { padding-top: 0; padding-left: var(--md-s-5); }
.pq--card::before { content: none; }

/* Figures: one caption system. The title above in Inter 500, the source or caption beneath in mono */
.fig { border-top: 1px solid var(--md-line); padding-top: var(--md-s-4); }
.fig__title { font: 500 var(--md-text-ui)/1.4 var(--md-font-sans); color: var(--md-fg); margin-bottom: var(--md-s-4); text-wrap: balance; }
.fig__source { margin-top: var(--md-s-3); font: 400 var(--md-text-index)/1.5 var(--md-font-mono); color: var(--md-fg-3); }

/* Stat callout: the figure settled, never coloured, the source beneath */
.stat-callout { display: grid; gap: var(--md-s-2) var(--md-s-6); padding-block: var(--md-s-5); border-block: 1px solid var(--md-line); }
.stat-callout__value { font-size: var(--md-figure-hero); line-height: 1; color: var(--md-fg); overflow-wrap: anywhere; }
.stat-callout__label { font-size: 1.0625rem; line-height: 1.5; color: var(--md-fg-2); max-width: 30em; }
.stat-callout__source { grid-column: 1 / -1; margin-top: 0; }
@media (min-width: 640px) {
  .stat-callout { grid-template-columns: minmax(0, auto) minmax(0, 1fr); align-items: center; }
  .stat-callout__source { grid-column: 2; }
}

/* Bar chart, drawn in CSS. Every row has the same height and the same bar, so a chart is as
   tall as its rows and never stretched: label, bar, figure. Negative values diverge from a zero line */
.chart__bars { display: grid; gap: 0; border-bottom: 1px solid var(--md-line); }
.chart__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label val" "track track"; column-gap: var(--md-s-4); align-items: center;
  padding-block: 10px; }
.chart__label { grid-area: label; font-size: var(--md-text-small); line-height: 1.35; color: var(--md-fg-2); text-wrap: balance; }
.chart__track { grid-area: track; position: relative; height: 12px; margin-top: 6px; }
.chart__fill { position: absolute; top: 0; bottom: 0; left: var(--l, 0%); width: var(--w, 0%); min-width: 2px; background: var(--md-fg); border-radius: 1px; }
.chart__fill--neg { background: transparent; box-shadow: inset 0 0 0 1px var(--md-fg); }
.chart--diverging .chart__track::before { content: ""; position: absolute; top: -6px; bottom: -6px; left: var(--zero); width: 1px; background: var(--md-fg-3); }
.chart__val { grid-area: val; font: 400 var(--md-text-small)/1.3 var(--md-font-mono); font-variant-numeric: tabular-nums; color: var(--md-fg); white-space: nowrap; text-align: right; }
@media (min-width: 768px) {
  .chart__row { grid-template-columns: 12rem minmax(0, 1fr) 6rem; grid-template-areas: "label track val"; min-height: 48px; padding-block: 6px; }
  .chart__track { margin-top: 0; height: 14px; }
}

/* Data table: hairline rows, figures right aligned in tabular numerals, the first column stays in
   view while the table scrolls inside its own frame on a phone. Never an inner vertical scroll */
.dtable__scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.dtable__scroll:focus-visible { outline: 2px solid var(--md-focus-ring); outline-offset: 2px; }
.data-table { width: 100%; min-width: max(100%, calc(var(--cols, 2) * 7.5rem)); border-collapse: collapse; font-size: var(--md-text-small); line-height: 1.45; font-variant-numeric: tabular-nums lining-nums; }
.data-table thead th { text-align: left; vertical-align: bottom; padding: 0 var(--md-s-4) var(--md-s-3) 0; border-bottom: 1px solid var(--md-line-strong);
  font: 400 var(--md-text-index)/1.35 var(--md-font-mono); color: var(--md-fg-3); }
.data-table tbody th, .data-table td { text-align: left; vertical-align: top; padding: var(--md-s-3) var(--md-s-4) var(--md-s-3) 0; border-bottom: 1px solid var(--md-line); }
.data-table tr > :last-child { padding-right: 0; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody th { font-weight: 500; color: var(--md-fg); }
.data-table td { color: var(--md-fg-2); }
.data-table .num { text-align: right; white-space: nowrap; }
.data-table tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--md-bg); min-width: 8rem; }
.dtable .fig__source { border-top: 1px solid var(--md-line); padding-top: var(--md-s-3); }

.blk-img img { width: 100%; border-radius: var(--md-r-sm); }
.blk-img.fig { border-top: 0; padding-top: 0; }

/* ---------- 5. Glossary ---------- */
.az { margin: 0 0 var(--md-s-6); padding: var(--md-s-2) 0;
  background: var(--md-bg); border-bottom: 1px solid var(--md-line); }
@media (min-width: 768px) { .az { position: sticky; top: var(--md-nav-h); z-index: 5; } }
.az ul { display: flex; flex-wrap: wrap; gap: 2px; }
.az a { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: var(--md-r-sm); font: 500 var(--md-text-ui)/1 var(--md-font-mono); color: var(--md-fg-2); text-decoration: none; }
.az a:hover { background: var(--pg-hover); color: var(--md-fg); }
.az-group { padding-block: var(--md-s-5) var(--md-s-6); border-top: 1px solid var(--md-line); scroll-margin-top: calc(var(--md-nav-h) + 72px); }
.az-group__letter { font: 500 var(--md-text-h3)/1 var(--md-font-display); color: var(--md-fg); margin-bottom: var(--md-s-3); }
.az-row { display: grid; gap: var(--md-s-1); padding-block: var(--md-s-3); border-bottom: 1px solid var(--md-line); }
.az-row:last-child { border-bottom: 0; }
.az-row dt a { display: inline-flex; align-items: center; min-height: 32px; font: 500 1.125rem/1.3 var(--md-font-display); letter-spacing: -0.01em; color: var(--md-fg);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.az-row dt a:hover { text-decoration-color: currentColor; }
.az-row dd { color: var(--md-fg-2); font-size: var(--md-text-ui); line-height: 1.55; }
@media (min-width: 768px) {
  .az-group { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
  .az-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--md-s-5); align-items: baseline; }
}

.term__aka { line-height: 1.5; }
.term__body { font-size: 1.125rem; line-height: 1.7; max-width: var(--pg-text); }
.term__related { margin-top: var(--md-s-8); }
.term__related .sec__head { margin-bottom: var(--md-s-5); }
.term__grid { display: grid; gap: var(--md-s-3); }
@media (min-width: 640px) { .term__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.term-card { display: grid; gap: var(--md-s-2); height: 100%; padding: var(--md-s-5); border: 1px solid var(--md-line); border-radius: var(--md-r-md); background: var(--md-bg-raised);
  color: inherit; text-decoration: none; transition: border-color var(--md-dur-hover) var(--md-ease); }
.term-card:hover { border-color: var(--md-fg-3); }
.term-card__title { font: 500 1.125rem/1.3 var(--md-font-display); color: var(--md-fg); }
.term-card__def { font-size: var(--md-text-small); line-height: 1.55; color: var(--md-fg-2); }
.term__articles { margin-top: var(--md-s-8); }
.term__articles .sec__head { margin-bottom: var(--md-s-4); }
.term-posts { display: grid; gap: var(--md-s-3); }
.term-post { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--md-s-4); align-items: center; color: inherit; text-decoration: none; }
.term-post__pic { position: relative; display: block; aspect-ratio: 720 / 440; overflow: hidden; border-radius: var(--md-r-sm); background: var(--md-ink); }
.term-post__pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--pg-cover-edge); }
.term-post__pic > svg { width: 100%; height: 100%; }
.term-post__text { display: grid; gap: var(--md-s-1); }
.term-post__title { font: 500 1.0625rem/1.3 var(--md-font-display); color: var(--md-fg); text-wrap: balance; }
.term-post:hover .term-post__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pn--terms { margin-top: var(--md-s-8); }
.term__back { margin-top: var(--md-s-6); }
.tlink--back .ic { transform: rotate(180deg); }
.tlink--back:hover .ic { transform: rotate(180deg) translateX(3px); }

/* ---------- 6. Legal ---------- */
.notice { display: flex; gap: var(--md-s-3); align-items: flex-start; padding: var(--md-s-4); margin-bottom: var(--md-s-7); border: 1px solid var(--md-line-strong);
  border-radius: var(--md-r-sm); background: var(--md-bg-raised); color: var(--md-fg); font-size: var(--md-text-ui); line-height: 1.5; }
.notice .ic { margin-top: 1px; color: var(--md-fg-2); }
.legal-body { font-size: 1.0625rem; line-height: 1.7; max-width: var(--pg-text); }
.legal-body h2 { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); margin-top: 2.4em; padding-top: var(--md-s-4); border-top: 1px solid var(--md-line); }

/* ---------- 7. Contact ---------- */
.contact { display: grid; gap: var(--md-s-5) var(--md-gutter); }
@media (min-width: 1024px) {
  .contact { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .contact__head { grid-column: 1 / span 5; position: sticky; top: calc(var(--md-nav-h) + var(--md-s-6)); }
  .contact__body { grid-column: 7 / span 6; }
}
.form { display: flex; flex-wrap: wrap; gap: var(--md-s-5) var(--md-s-4); }
.form .errsum ul { display: grid; gap: var(--md-s-1); }
.errsum__h { font: 500 var(--md-text-ui)/1.3 var(--md-font-sans); color: var(--md-alert-fg); margin-bottom: var(--md-s-2); }
.errsum li a { display: inline-flex; min-height: 32px; align-items: center; }
.form .field--check { flex: 1 1 100%; display: grid; }
.form .field--check label a { color: var(--md-fg); text-underline-offset: 3px; }
.form__actions { flex: 1 1 100%; display: grid; gap: var(--md-s-3); justify-items: start; padding-top: var(--md-s-2); }
.form__actions .field__hint { max-width: 40em; line-height: 1.5; }
.form .field textarea { min-height: 128px; }
.lead-thanks { border-top: 1px solid var(--md-line); padding-top: var(--md-s-6); }
.lead-thanks .done__ok { font: 500 var(--md-text-lede)/1.4 var(--md-font-sans); align-items: flex-start; }
.lead-thanks .done__ok .ic { margin-top: .3em; }

/* ---------- 8. Search ---------- */
.results__count { margin-bottom: var(--md-s-4); }
.results { border-top: 1px solid var(--md-line); }
.results li { border-bottom: 1px solid var(--md-line); }
.result { display: grid; gap: var(--md-s-1); padding: var(--md-s-4) var(--md-s-2); margin-inline: calc(var(--md-s-2) * -1); color: inherit; text-decoration: none; border-radius: var(--md-r-sm); }
.result:hover { background: var(--pg-hover); }
.result__title { font: 500 1.1875rem/1.3 var(--md-font-display); color: var(--md-fg); }
.result__desc { font-size: var(--md-text-ui); line-height: 1.5; color: var(--md-fg-2); }

/* ---------- 9. Page builder (FlexPage) ---------- */
.fx--paragraph, .fx--heading, .fx--image { width: 100%; max-width: calc(var(--pg-text) + 2 * var(--md-margin)); margin-inline: auto; padding: var(--md-s-4) var(--md-margin); }
.fx--image { max-width: calc(var(--pg-wide) + 2 * var(--md-margin)); }
.fx--paragraph .prose { font-size: 1.0625rem; line-height: 1.7; }
.fx-sec + .fx-sec, .fx + .fx > .fx-sec { padding-top: 0; }
.fx-sec--tight { padding-block: var(--md-s-8); }
.fx-head { display: grid; gap: var(--md-s-4); margin-bottom: var(--md-s-7); max-width: 46rem; }
.fx-head .sec__head { margin-bottom: var(--md-s-3); }
.fx-head--center { text-align: center; justify-items: center; margin-inline: auto; }
.fx-hero { padding-block: var(--md-s-9) var(--md-s-8); }
.fx-hero .wrap { display: grid; gap: var(--md-s-5); }
.fx-hero__h { font: var(--md-weight-display) var(--md-text-hero)/var(--md-leading-hero) var(--md-font-display); letter-spacing: var(--md-track-hero); max-width: 16em; text-wrap: balance; overflow-wrap: break-word; }
.fx-hero--center .wrap { justify-items: center; text-align: center; }
.fx-hero--center .lede { margin-inline: auto; }
.fx-actions { display: flex; flex-wrap: wrap; gap: var(--md-s-3); margin-top: var(--md-s-3); }
.fx-grid { display: grid; grid-template-columns: 1fr; gap: var(--md-s-7) var(--md-gutter); }
.fx-grid .col p { margin-top: var(--md-s-2); }
@media (min-width: 768px) {
  .fx-grid--2, .fx-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .fx-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fx-cta { padding-block: var(--md-s-9); text-align: center; }
.fx-cta__in { display: grid; justify-items: center; gap: var(--md-s-4); }
.fx-cta .h2 { max-width: 20em; }
.fx-cta .lede { margin-inline: auto; }
.fx-faq__list { border-top: 1px solid var(--md-line); }
@media (min-width: 1024px) {
  .fx-faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--md-gutter); align-items: start; }
  .fx-faq .fx-head { grid-column: 1 / span 4; position: sticky; top: calc(var(--md-nav-h) + var(--md-s-6)); }
  .fx-faq__list { grid-column: 6 / span 7; }
}
.fx-faq__list details { border-bottom: 1px solid var(--md-line); }
.fx-faq__list summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--md-s-5); min-height: 64px; padding: var(--md-s-4) 0;
  font: 500 1.1875rem/1.3 var(--md-font-display); letter-spacing: -0.01em; }
.fx-faq__list summary::-webkit-details-marker { display: none; }
.fx-faq__list summary .ic { color: var(--md-fg-3); transition: transform var(--md-dur-ui) var(--md-ease); }
.fx-faq__list details[open] summary .ic { transform: rotate(45deg); }
.fx-faq__list details p { padding: 0 var(--md-s-8) var(--md-s-5) 0; color: var(--md-fg-2); max-width: 40em; }
.fx-usp { max-width: 22em; margin-bottom: var(--md-s-8); }
.fx-steps { display: grid; gap: var(--md-s-6) var(--md-gutter); }
@media (min-width: 768px) { .fx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .fx-steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.fx-step { display: grid; gap: var(--md-s-3); align-content: start; padding-top: var(--md-s-4); border-top: 1px solid var(--md-line); }
.fx-step p { color: var(--md-fg-2); }
.fx-line-ic { width: 28px; height: 28px; margin-bottom: var(--md-s-4); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--md-fg-2); }
.fx-tags { display: flex; flex-wrap: wrap; gap: var(--md-s-2); margin-top: var(--md-s-7); }
.fx-tags li { padding: 8px 12px; border: 1px solid var(--md-line); border-radius: var(--md-r-xs); line-height: 1.2; }
.fx-stats__v { font-size: var(--md-figure-hero); line-height: 1; color: var(--md-fg); margin-bottom: var(--md-s-3); }
.fx-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--md-gutter); }
.fx-tier { display: grid; gap: var(--md-s-4); align-content: start; padding: var(--md-s-6); border: 1px solid var(--md-line); border-radius: var(--md-r-md); background: var(--md-bg-raised); }
.fx-tier--on { border-color: var(--md-fg); }
.fx-tier__price { font-size: 2.25rem; line-height: 1.1; }
.fx-tier__desc { color: var(--md-fg-2); }
.fx-ticks, .fx-points { display: grid; gap: var(--md-s-3); margin-top: var(--md-s-4); }
.fx-ticks li { display: flex; gap: var(--md-s-3); color: var(--md-fg-2); }
.fx-ticks .ic { width: 18px; height: 18px; margin-top: 3px; color: var(--md-fg); }
.fx-points li { padding-left: var(--md-s-4); position: relative; color: var(--md-fg-2); }
.fx-points li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: var(--md-fg-3); }

/* ---------- 10. Lost pages: 404 and 500 ---------- */
.lost { min-height: min(100svh, 880px); display: grid; align-items: center; padding-block: calc(var(--md-nav-h) + var(--md-s-8)) var(--md-s-9); text-align: center; }
.lost--alone { min-height: 100svh; padding-top: var(--md-s-9); }
.lost__in { display: grid; justify-items: center; gap: var(--md-s-5); }
.lost__moon { width: clamp(140px, 22vw, 220px); height: auto; margin-bottom: var(--md-s-3); }
.lost .h2 { max-width: 18em; }

/* ---------- Conversion pages: the walkthrough page and the gated brief ----------
   (templates/brand2026/leads/demo_request_page.html, brief_page.html)
   Two columns: the pitch or the cover on one side, a short form in a panel on the other. One column on phones. */
.convert { display: grid; gap: var(--md-s-7) var(--md-gutter); align-items: start; }
.convert .sec__head { margin-bottom: var(--md-s-5); }
.convert .h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem); overflow-wrap: break-word; }
.convert .lede { margin-top: var(--md-s-4); max-width: 30em; }
.convert__sub { margin-top: var(--md-s-7); }
.convert__points { margin-top: var(--md-s-3); display: grid; border-top: 1px solid var(--md-line); }
.convert__points li { display: grid; grid-template-columns: 20px 1fr; column-gap: var(--md-s-3); align-items: start; padding: var(--md-s-3) 0;
  border-bottom: 1px solid var(--md-line); color: var(--md-fg); font-size: var(--md-text-ui); line-height: 1.45; }
.convert__points .ic { margin-top: 2px; color: var(--md-fg-2); }
.convert__trust { margin-top: var(--md-s-5); font: 400 var(--md-text-small)/1.5 var(--md-font-sans); color: var(--md-fg-3); }
.convert__panel { border: 1px solid var(--md-line); border-radius: var(--md-r-lg); background: var(--md-bg-raised); padding: var(--md-s-6) var(--md-s-5); }
.convert .form { gap: var(--md-s-4); }
.convert .form__actions { padding-top: var(--md-s-1); justify-items: stretch; }
.convert .form__actions .convert__trust { margin-top: 0; }
.convert .form .field textarea { min-height: 96px; }
/* The optional note: one line until opened */
.note { flex: 1 1 100%; }
.note > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--md-s-2); min-height: 44px; font: 500 var(--md-text-small)/1.3 var(--md-font-sans); color: var(--md-fg-2); }
.note > summary::-webkit-details-marker { display: none; }
.note > summary .ic { width: 16px; height: 16px; transition: transform var(--md-dur-ui) var(--md-ease); }
.note[open] > summary .ic { transform: rotate(45deg); }
.note > summary:hover { color: var(--md-fg); }
.note .field { margin-top: var(--md-s-1); }
/* The brief: the cover, then what is inside and the form */
.convert__cover { margin: 0; }
.convert__cover img:not(.paper__moon) { width: 100%; height: auto; border: 1px solid var(--md-line); border-radius: var(--md-r-md); box-shadow: var(--md-shadow-float); }
.convert--brief .convert__cover { max-width: 300px; }
.convert--brief .convert__panel .convert__sub { margin-top: var(--md-s-6); }
.convert--brief .form { margin-top: var(--md-s-6); }
.convert__expired { margin-top: var(--md-s-5); }
.convert__get { margin-top: var(--md-s-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--md-s-3) var(--md-s-5); }
.convert__back { margin-top: var(--md-s-6); }
/* The drawn cover, shown until the cover picture is placed: the title on a night ground with the cut moon */
.paper { position: relative; aspect-ratio: 210 / 297; border-radius: var(--md-r-md); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 9% 9% 8%; box-shadow: var(--md-shadow-float); }
.paper__moon { position: absolute; left: 9%; top: 12%; width: 74%; height: auto; }
.paper__title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.05; color: var(--md-fg); max-width: 7em; text-wrap: balance; }
.paper__by { margin-top: 8%; color: var(--md-fg-2); }
@media (min-width: 768px) {
  .convert__panel { padding: var(--md-s-7); }
}
@media (min-width: 1024px) {
  .convert { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .convert__pitch { grid-column: 1 / span 5; position: sticky; top: calc(var(--md-nav-h) + var(--md-s-6)); }
  .convert__panel { grid-column: 7 / span 6; }
  .convert--brief .convert__cover { grid-column: 1 / span 5; max-width: none; position: sticky; top: calc(var(--md-nav-h) + var(--md-s-6)); padding-right: 12%; }
}
@media (max-width: 767px) {
  .convert { gap: var(--md-s-6); }
  .convert--brief .convert__cover { max-width: 200px; }
  .convert__get .btn { width: 100%; }
}
/* The brief: compact enough for the button to sit on the first screen of a laptop */
.convert--brief .convert__panel { display: flex; flex-direction: column; }
.convert--brief .h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.convert--brief .convert__panel .convert__sub { margin-top: var(--md-s-5); }
.convert--brief .convert__points li { padding: var(--md-s-2) 0; }
.convert--brief .form { margin-top: var(--md-s-5); gap: var(--md-s-3) var(--md-s-4); }
@media (min-width: 768px) { .convert--brief .convert__panel { padding-block: var(--md-s-6); } }
/* Phones and tablets: the form comes right after the promise, the detail follows it */
@media (max-width: 1023px) {
  .convert { display: flex; flex-direction: column; }
  .convert__pitch { display: contents; }
  .convert__lead { order: 1; }
  .convert > .convert__panel { order: 2; }
  .convert__pitch .convert__more { order: 3; }
  .convert__pitch .convert__sub { margin-top: 0; }
  .convert--brief .convert__cover { order: 0; max-width: 132px; }
  .convert--brief .convert__panel .convert__lead { order: 1; }
  .convert--brief .convert__expired { order: 2; }
  .convert--brief .form { order: 3; }
  .convert--brief .convert__panel .convert__more { order: 4; margin-top: var(--md-s-6); }
  .convert--brief .convert__panel .convert__sub { margin-top: 0; }
}

/* An expired link is told calmly, not as an error */
.convert .convert__expired { color: var(--md-fg-2); border-left-color: var(--md-line-strong); }

/* The brief: two inner pages as a second, smaller preview under the cover. Wide screens only:
   beside a thumbnail cover on phones and tablets it would be too small to read */
.convert__spread { display: none; }
@media (min-width: 1024px) {
  .convert__spread { display: block; width: 78%; height: auto; margin-top: var(--md-s-5); border: 1px solid var(--md-line); border-radius: var(--md-r-sm); }
}

