/* Coorl: editorial stylesheet. Light only, tokens first. */

/* Source Serif 4 (OFL), latin subset, variable weight 400-700. */
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-italic-latin.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
/* Overrides computed from the hhea tables and average advance width of both fonts: limits layout shift on swap. */
@font-face {
  font-family: "Source Serif Fallback";
  src: local("Georgia");
  size-adjust: 108.8%; ascent-override: 95.2%; descent-override: 30.8%; line-gap-override: 0%;
}

:root {
  color-scheme: light;

  /* Colour */
  --c-paper: #ffffff;
  --c-tint: #f3f5f8;
  --c-ink: #1f242b;
  --c-head: #0f2240;
  --c-dek: #3d4550;
  --c-muted: #5a6370;
  --c-rule: #e2e5ea;
  --c-accent: #1d4f91;
  --c-accent-soft: #b8c7dc;
  --c-rule-dark: #2e4163;
  --c-footer-bg: #1a1a1d;
  --c-footer-text: #b4b4ba;
  --c-footer-link: #ececf0;
  --c-footer-rule: #6d6d75;
  /* Topic colours: strong for labels and highlights (>= 5:1 on white and tint), soft for shapes, tint for backgrounds */
  --c-t-incentivi: #2c6b4c; --c-t-incentivi-soft: #b7d4c3; --c-t-incentivi-tint: #edf4f0;
  --c-t-norme: #8b2d3d; --c-t-norme-soft: #e3bcc3; --c-t-norme-tint: #f8eef0;
  --c-t-ai: #16707c; --c-t-ai-soft: #b0d6da; --c-t-ai-tint: #ebf5f6;
  --c-t-sicurezza: #5a3f8f; --c-t-sicurezza-soft: #cdc3e4; --c-t-sicurezza-tint: #f2eff8;
  --c-t-software: #1d4f91; --c-t-software-soft: #b8c7dc; --c-t-software-tint: #f3f5f8;

  /* Type: Source Serif 4 for reading, system sans for interface */
  --f-serif: "Source Serif 4", "Source Serif Fallback", Georgia, serif;
  --f-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-s: 0.9375rem;
  --fs-ms: 1.0625rem;
  --fs-m: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-l: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-xl: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --fs-xxl: clamp(2rem, 1.5rem + 2.2vw, 3.125rem);
  --fs-wordmark: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  --fs-figure: clamp(2rem, 1.7rem + 1.2vw, 2.75rem);
  --tracking-display: -0.015em;
  --tracking-tight: -0.02em;
  --lh-body: 1.65;
  --lh-head: 1.15;

  /* Space and measure */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --measure: 42rem;
  --page: 74rem;
  --aside: 17rem;
  --radius: 0.375rem;
  --focus: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-serif);
  font-size: var(--fs-m);
  line-height: var(--lh-body);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--c-accent); }
/* anywhere, not break-word: a long word must also let flex and grid items shrink (WCAG 1.4.10, 1.4.12 at 320px) */
h1, h2, h3 { color: var(--c-head); line-height: var(--lh-head); font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }
p, li, dd { text-wrap: pretty; }
ul, ol { padding: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

:focus-visible { outline: var(--focus) solid var(--c-accent); outline-offset: 3px; border-radius: 2px; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[id] { scroll-margin-top: var(--sp-5); }

.skip-link {
  position: absolute; left: var(--sp-4); top: var(--sp-4); z-index: 10;
  background: var(--c-head); color: var(--c-paper); padding: var(--sp-2) var(--sp-4);
  font-family: var(--f-sans); font-size: var(--fs-s); transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.skip-link:hover { color: var(--c-paper); }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* Shared small type */
/* Topic scope: sets --c-topic* for every descendant label, pill or illustration */
.t-incentivi { --c-topic: var(--c-t-incentivi); --c-topic-soft: var(--c-t-incentivi-soft); --c-topic-tint: var(--c-t-incentivi-tint); }
.t-norme { --c-topic: var(--c-t-norme); --c-topic-soft: var(--c-t-norme-soft); --c-topic-tint: var(--c-t-norme-tint); }
.t-ai { --c-topic: var(--c-t-ai); --c-topic-soft: var(--c-t-ai-soft); --c-topic-tint: var(--c-t-ai-tint); }
.t-sicurezza { --c-topic: var(--c-t-sicurezza); --c-topic-soft: var(--c-t-sicurezza-soft); --c-topic-tint: var(--c-t-sicurezza-tint); }
.t-software { --c-topic: var(--c-t-software); --c-topic-soft: var(--c-t-software-soft); --c-topic-tint: var(--c-t-software-tint); }

.kicker, .teaser__topic, .next-list span {
  font-family: var(--f-sans); font-size: var(--fs-xs); font-weight: 600; color: var(--c-topic, var(--c-accent)); letter-spacing: 0.01em;
}
.meta, .teaser__meta {
  font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-muted);
}

/* Header */
.site-header { border-bottom: 1px solid var(--c-rule); }
.masthead {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "mark edition" "tag tag";
  align-items: center; column-gap: var(--sp-4);
  padding-block: var(--sp-5) var(--sp-4); border-bottom: 3px solid var(--c-head);
}
.masthead__brand { display: contents; }
.masthead .wordmark { grid-area: mark; justify-self: start; }
.masthead__tagline {
  grid-area: tag; max-width: 40rem; margin-top: var(--sp-3);
  font-size: var(--fs-m); font-weight: 400; font-style: italic; line-height: 1.4; color: var(--c-muted); text-wrap: pretty;
}
/* Emphasis inside italic is set in roman (classic convention); the italic face is static 400, so a heavier italic would be synthesised */
.masthead__tagline strong { font-style: normal; font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--c-head); }
.wordmark {
  display: inline-flex; align-items: center; gap: 0.3em;
  font-size: var(--fs-wordmark); font-weight: 700; letter-spacing: -0.025em; color: var(--c-head); text-decoration: none; line-height: 1;
}
.wordmark:hover { color: var(--c-head); }
.wordmark__mark { width: 1.05em; height: 1.05em; flex: none; }
.wordmark__mark rect { fill: var(--c-head); }
.wordmark__mark path { fill: none; stroke: var(--c-paper); stroke-width: 3.5; stroke-linecap: round; }
.masthead__edition {
  grid-area: edition; display: grid; justify-items: end; text-align: right;
  font-family: var(--f-sans); font-size: var(--fs-xs); line-height: 1.4; color: var(--c-muted);
}
.masthead__edition time { color: var(--c-head); font-weight: 600; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: var(--sp-6); margin-top: var(--sp-1); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; column-gap: var(--sp-5); font-family: var(--f-sans); font-size: var(--fs-s); white-space: nowrap; }
.site-nav a { display: inline-block; padding-block: var(--sp-3); text-decoration: none; color: var(--c-ink); border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--c-accent); }
.site-nav a[aria-current] { border-bottom-color: var(--c-head); color: var(--c-head); font-weight: 600; }
/* Language switch: must follow the generic .site-nav a rules (same specificity) */
.site-nav__lang { column-gap: var(--sp-2); padding-block: var(--sp-2); }
.site-nav__lang a {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0;
  border: 0; border-radius: 50%; font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--c-muted);
}
.site-nav__lang a:hover { background: var(--c-tint); color: var(--c-head); }
.site-nav__lang a[aria-current] { background: var(--c-head); color: var(--c-paper); }

/* Notice: one at a time under the header. Default = service note; --alert = deadline or update */
.notice { background: var(--c-tint); color: var(--c-muted); font-family: var(--f-sans); font-size: var(--fs-s); line-height: 1.5; padding-block: var(--sp-3); }
.notice__label { color: var(--c-head); font-weight: 700; margin-right: var(--sp-2); }
.notice a { color: inherit; }
.notice--alert { background: var(--c-head); color: var(--c-paper); }
.notice--alert .notice__label { color: var(--c-accent-soft); }
.notice--alert :focus-visible { outline-color: var(--c-paper); }

/* Home: lead story */
.lead { padding-top: var(--sp-6); }
.lead__grid { display: grid; gap: var(--sp-5); padding-bottom: var(--sp-7); }
.lead__grid > * { min-width: 0; }
.lead__side { display: grid; gap: var(--sp-4); align-content: start; }
.lead__headline { font-size: var(--fs-xxl); letter-spacing: var(--tracking-display); margin-top: var(--sp-2); }
.lead__headline a { text-decoration: none; }
.lead__headline a:hover { color: var(--c-head); text-decoration: underline; text-decoration-thickness: 2px; }
.lead__dek { font-size: var(--fs-l); color: var(--c-dek); margin-top: var(--sp-4); max-width: 38rem; }
.lead .meta { margin-top: var(--sp-4); }
.takeaway {
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-tint); border-radius: var(--radius); font-size: var(--fs-s); line-height: 1.55;
}
.takeaway strong { font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-head); display: block; margin-bottom: var(--sp-1); }
.lead__figure img { width: 100%; border-radius: var(--radius); }
@media (min-width: 60rem) {
  .lead__grid { grid-template-columns: 7fr 5fr; gap: var(--sp-7); align-items: start; }
  .lead__side { padding-top: var(--sp-6); }
}

/* Home: sections */
/* Weekly figures band */
.week { background: var(--c-tint); padding-block: var(--sp-6) var(--sp-7); }
.week__list { list-style: none; display: grid; gap: var(--sp-5); margin-top: var(--sp-5); }
.week__list li + li { border-top: 1px solid var(--c-rule); padding-top: var(--sp-5); }
.week__figure { font-size: var(--fs-figure); font-weight: 700; color: var(--c-head); line-height: 1.1; letter-spacing: var(--tracking-display); font-variant-numeric: lining-nums; }
.week__text { font-size: var(--fs-s); color: var(--c-dek); line-height: 1.55; margin-top: var(--sp-2); max-width: 22rem; }
.week__text a { color: var(--c-accent); }
@media (min-width: 48rem) {
  .week__list { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
  .week__list li + li { border-top: 0; padding-top: 0; border-left: 1px solid var(--c-rule); padding-left: var(--sp-6); }
}

/* Signals: dark band, sourced future change plus a labelled AI opinion */
.signals { background: var(--c-head); color: var(--c-paper); padding-block: var(--sp-8); }
.signals .section__title { color: var(--c-paper); }
.signals .section__intro { color: var(--c-accent-soft); }
.signals :focus-visible { outline-color: var(--c-paper); }
.signals__list { list-style: none; display: grid; gap: var(--sp-6); margin-top: var(--sp-6); }
.signals__list li + li { border-top: 1px solid var(--c-rule-dark); padding-top: var(--sp-6); }
.signals__when time { display: flex; align-items: baseline; gap: var(--sp-3); }
/* Light type on the dark band reads heavier, so the band uses 600 instead of the 700 of light sections */
.signals__year { font-size: var(--fs-figure); font-weight: 600; line-height: 1; letter-spacing: var(--tracking-display); font-variant-numeric: lining-nums; }
.signals__day { font-family: var(--f-sans); font-size: var(--fs-s); color: var(--c-accent-soft); }
.signals__title { margin-top: var(--sp-3); font-size: var(--fs-l); font-weight: 600; color: var(--c-paper); line-height: 1.25; }
/* "Fonte" and the "Chi riguarda" and "Lettura dell'AI" labels share one typographic style */
.signals__source, .signals__who strong, .signals__take strong { font-family: var(--f-sans); font-size: var(--fs-xs); font-weight: 400; color: var(--c-accent-soft); }
.signals__source { margin-top: var(--sp-4); }
.signals__source a { color: inherit; }
.signals__source a:hover { color: var(--c-paper); }
.signals__who, .signals__take { margin-top: var(--sp-4); font-size: var(--fs-s); line-height: 1.5; color: var(--c-paper); }
.signals__who strong, .signals__take strong { display: block; margin-bottom: var(--sp-1); }
/* 30/70 layout: the nearest signal leads on the left, the other two stack on the right with the date in its own column */
@media (min-width: 60rem) {
  .signals__list { grid-template-columns: 3fr 7fr; grid-template-rows: auto auto; gap: 0; }
  .signals__list li:first-child { grid-row: 1 / span 2; padding-right: var(--sp-7); }
  .signals__list li:first-child .signals__year { font-size: clamp(3rem, 2rem + 2.5vw, 4.5rem); }
  .signals__list li:first-child .signals__title { margin-top: var(--sp-5); }
  /* site.js adds --big only when the lead title fits in 3 lines at the larger size */
  .signals__list li:first-child .signals__title--big { font-size: var(--fs-xl); }
  .signals__list li:first-child :is(.signals__who, .signals__take) { font-size: var(--fs-ms); font-weight: 350; line-height: 1.45; }
  .signals__list li:first-child .signals__take { margin-top: var(--sp-5); }
  .signals__list li .signals__who { margin-top: var(--sp-5); }
  .signals__list li:first-child .signals__who { margin-top: var(--sp-6); }
  .signals__list li + li {
    display: grid; grid-template-columns: 7rem 1fr; column-gap: var(--sp-5); align-content: start;
    border-top: 0; border-left: 1px solid var(--c-rule-dark); padding: 0 0 var(--sp-6) var(--sp-7);
  }
  .signals__list li:last-child { border-top: 1px solid var(--c-rule-dark); padding-top: var(--sp-6); padding-bottom: 0; }
  .signals__list li + li > * { grid-column: 2; }
  .signals__list li + li > .signals__when { grid-column: 1; grid-row: 1 / span 4; }
  .signals__list li + li .signals__when time { flex-direction: column; gap: var(--sp-1); }
  .signals__list li + li .signals__title { margin-top: 0; }
}

.home-columns { display: grid; gap: var(--sp-7); padding-block: var(--sp-7); }
@media (min-width: 60rem) { .home-columns { grid-template-columns: 1fr 19rem; gap: var(--sp-8); } }
.section + .section { margin-top: var(--sp-7); }
.section__title { font-size: var(--fs-xl); }
.section__intro { font-family: var(--f-sans); font-size: var(--fs-s); color: var(--c-muted); margin-top: var(--sp-1); }
.teasers { list-style: none; display: grid; gap: var(--sp-6); margin-top: var(--sp-5); }
@media (min-width: 40rem) { .teasers--grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); } }
.teaser__img { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: var(--sp-3); }
.teaser__title { font-size: 1.25rem; margin-top: var(--sp-1); }
.teaser__title a { text-decoration: none; }
.teaser__title a:hover { text-decoration: underline; }
.teaser__dek { font-size: var(--fs-s); color: var(--c-muted); margin-top: var(--sp-2); line-height: 1.55; }
.teaser__meta { margin-top: var(--sp-2); }
.teasers--list { gap: var(--sp-5); }
.teasers--list .teaser { border-top: 1px solid var(--c-rule); padding-top: var(--sp-4); }
/* Single column on phones shows only the first four items */
@media (max-width: 39.99rem) { .latest .teasers--list .teaser:nth-child(n + 5) { display: none; } }
@media (min-width: 40rem) { .teasers--list { grid-template-columns: repeat(2, 1fr); column-gap: var(--sp-6); } }
@media (min-width: 60rem) { .teasers--list { grid-template-columns: repeat(3, 1fr); column-gap: var(--sp-7); } }
.latest { padding-block: var(--sp-7) var(--sp-8); }
.latest__more { margin-top: var(--sp-6); font-family: var(--f-sans); font-size: var(--fs-s); font-weight: 600; }

/* Topic page: same head as an article, then every article of the topic */
.topic-list { margin-top: 0; padding-bottom: var(--sp-8); }
.topic-empty { padding-bottom: var(--sp-8); font-family: var(--f-sans); color: var(--c-muted); }

.ranked { list-style: none; counter-reset: rank; display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
.ranked li { counter-increment: rank; display: grid; grid-template-columns: 2rem 1fr; align-items: baseline; }
.ranked li::before { content: counter(rank); font-size: 1.75rem; font-weight: 700; color: var(--c-accent); line-height: 1; }
.ranked a, .ranked span { font-size: var(--fs-ms); font-weight: 700; color: var(--c-head); text-decoration: none; line-height: 1.3; }
.ranked a:hover { text-decoration: underline; }

.topics { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.topics a {
  display: inline-block; padding: var(--sp-2) var(--sp-4); border-radius: 999px; background: var(--c-topic-tint, var(--c-tint));
  font-family: var(--f-sans); font-size: var(--fs-s); text-decoration: none; color: var(--c-topic, var(--c-head));
}
.topics a:hover { background: var(--c-topic-soft, var(--c-accent-soft)); color: var(--c-head); }

/* Article */
.breadcrumb { font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-muted); padding-top: var(--sp-6); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--c-rule); }
.breadcrumb a { text-decoration: none; color: var(--c-accent); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.article-head { max-width: var(--measure); padding-block: var(--sp-4) var(--sp-6); }
.article-title { font-size: var(--fs-xxl); letter-spacing: var(--tracking-display); }
.article-dek { font-size: var(--fs-l); color: var(--c-dek); margin-top: var(--sp-4); line-height: 1.5; }
.article-head .meta { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--c-rule); }
.status {
  margin-top: var(--sp-3); font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-ink);
}
.status strong { color: var(--c-accent); }

.cover { margin-top: var(--sp-6); }
.cover img { width: 100%; border-radius: var(--radius); }
.cover figcaption, .figure figcaption { font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--sp-2); }

/* minmax(0, 1fr): without it wide tables set the column's min width and the page scrolls sideways. */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); padding-bottom: var(--sp-8); }
/* Desktop: the aside spans head and body, so the right column is filled from the title down */
@media (min-width: 64rem) {
  .article {
    display: grid; grid-template-columns: minmax(0, var(--measure)) var(--aside);
    justify-content: space-between; column-gap: var(--sp-7); padding-bottom: var(--sp-8);
  }
  .article-layout { display: contents; }
  .article-head, .prose { grid-column: 1; }
  .aside { grid-column: 2; grid-row: 1 / span 2; padding-top: var(--sp-4); }
}

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--sp-4); }
.prose > h2 { font-size: var(--fs-xl); margin-top: var(--sp-7); }
.prose h3 { font-size: 1.1875rem; }
.prose sup { font-family: var(--f-sans); font-size: 0.7em; line-height: 0; }
.prose sup a { color: var(--c-accent); text-decoration: none; font-weight: 600; padding-right: 0.15em; }
.prose sup a:hover, .prose sup a:focus-visible { text-decoration: underline; }

.brief { background: var(--c-tint); border-radius: var(--radius); padding: var(--sp-5); }
.brief h2 { font-size: 1.25rem; }
.brief dl { margin-top: var(--sp-3); }
.brief dt { font-family: var(--f-sans); font-size: var(--fs-xs); font-weight: 700; color: var(--c-accent); margin-top: var(--sp-4); }
.brief dt:first-child { margin-top: 0; }
.brief dd { margin-top: var(--sp-1); line-height: 1.55; }

/* Data tables with inline bars */
.table-wrap { overflow-x: auto; margin-top: var(--sp-5); }
table { border-collapse: collapse; width: 100%; font-family: var(--f-sans); font-size: var(--fs-s); line-height: 1.45; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; color: var(--c-head); padding-bottom: var(--sp-3); }
th, td { text-align: left; padding: var(--sp-3); border-bottom: 1px solid var(--c-rule); vertical-align: top; }
thead th { border-bottom: 1px solid var(--c-head); font-size: var(--fs-xs); color: var(--c-muted); font-weight: 600; }
tbody th { font-weight: 600; color: var(--c-head); }
td.num, th.num { text-align: right; }
td.num { white-space: nowrap; }
@media (max-width: 30rem) { th, td { padding-inline: var(--sp-1); } }
.bar { display: block; height: 0.375rem; margin-top: var(--sp-2); margin-left: auto; border-radius: 999px; background: var(--c-accent-soft); }
.bar--full { background: var(--c-accent); }
.table-note { font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-muted); }
.prose > .table-note { margin-top: var(--sp-2); }
.prose > .page-updated { margin-top: var(--sp-7); }
/* No breadcrumb on the 404 page: the same top space it would take. */
.not-found { padding-top: var(--sp-6); }

/* Bar chart: a real table (screen readers read label and value per row) with CSS bars; values carry the meaning, bars only show it */
.chart { margin-top: var(--sp-5); }
.chart th, .chart td { border-bottom: 0; padding-block: var(--sp-2); }
.chart tbody th { width: 40%; font-weight: 400; color: var(--c-ink); }
.chart__cell { display: flex; align-items: center; gap: var(--sp-3); }
.chart__track { flex: 1; min-width: 0; }
.chart__bar { display: block; min-width: 2px; height: 0.75rem; border-radius: 0 999px 999px 0; background: var(--c-topic, var(--c-accent)); }
.chart__value { flex: none; min-width: 3.5em; text-align: right; }
.chart__key th, .chart__key .chart__value { font-weight: 700; color: var(--c-head); }
.chart__key .chart__bar { background: var(--c-head); }
.chart figcaption { font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--sp-2); }

/* Image in running text */
.prose > .figure { margin-top: var(--sp-6); }
.figure img { width: 100%; border-radius: var(--radius); }

/* Quote: always attributed to one of the article sources */
.prose > .quote { margin-block: var(--sp-6); }
.quote blockquote { padding-left: var(--sp-5); border-left: 3px solid var(--c-topic, var(--c-accent)); }
.quote blockquote p { font-size: var(--fs-l); line-height: 1.45; color: var(--c-head); }
.quote figcaption { margin-top: var(--sp-3); padding-left: calc(var(--sp-5) + 3px); font-family: var(--f-sans); font-size: var(--fs-xs); color: var(--c-muted); }
.quote cite { font-style: normal; }
.quote cite a { color: var(--c-accent); }

/* Bulleted list in running text */
.prose > .list { padding-left: var(--sp-5); }
.list li + li { margin-top: var(--sp-2); }
.list li::marker { color: var(--c-accent); }

.todo { list-style: none; counter-reset: step; display: grid; gap: var(--sp-4); }
.todo li { counter-increment: step; position: relative; padding-left: 2.75rem; }
.todo li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1em;
  width: 1.875rem; height: 1.875rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-head); color: var(--c-paper); font-family: var(--f-sans); font-size: var(--fs-xs); font-weight: 700;
}

/* FAQ: site.js turns each question into a disclosure button; without JS all answers show */
.qa { border-top: 1px solid var(--c-rule); }
.qa__item { padding-block: var(--sp-4); }
.qa__item + .qa__item { border-top: 1px solid var(--c-rule); }
.qa__a p { margin-top: var(--sp-3); padding-bottom: var(--sp-1); }
.qa__toggle {
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); width: 100%;
  padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.qa__toggle:hover { color: var(--c-accent); }
.qa__toggle::after {
  content: ""; flex: none; width: 0.6rem; height: 0.6rem; margin: 0.35em 0.25rem 0 0;
  border-right: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent); transform: rotate(45deg);
}
.qa__toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 0.65em; }

.sources { border-top: 1px solid var(--c-rule); padding-top: var(--sp-5); }
.prose > .sources { margin-top: var(--sp-7); }
.sources h2 { font-size: 1.25rem; }
.sources ol { padding-left: var(--sp-5); margin-top: var(--sp-3); font-family: var(--f-sans); font-size: var(--fs-s); line-height: 1.5; }
.sources li + li { margin-top: var(--sp-3); }
.sources li::marker { color: var(--c-muted); }
.src-kind { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--c-accent); }
.sources a { color: var(--c-head); }

.ai-note {
  font-family: var(--f-sans); font-size: var(--fs-s); line-height: 1.55; color: var(--c-muted);
  background: var(--c-tint); border-radius: var(--radius); padding: var(--sp-4) var(--sp-5);
}
.prose > .ai-note { margin-top: var(--sp-6); }
.ai-note strong { display: block; color: var(--c-head); font-family: var(--f-serif); font-size: var(--fs-ms); margin-bottom: var(--sp-1); }
.ai-note a { color: var(--c-accent); }

/* Aside */
.aside { font-family: var(--f-sans); }
.aside__block + .aside__block { margin-top: var(--sp-6); }
.aside__block h2 { font-family: var(--f-sans); font-size: var(--fs-xs); font-weight: 700; color: var(--c-muted); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--c-rule); }
.aside__block ol, .aside__block ul { list-style: none; display: grid; gap: var(--sp-1); margin-top: var(--sp-2); font-size: var(--fs-s); line-height: 1.4; }
.aside__block a { display: block; padding-block: var(--sp-1); text-decoration: none; color: var(--c-ink); }
.aside__block a:hover { color: var(--c-accent); }
.aside__block .next-list { gap: var(--sp-4); }
.next-list a { font-family: var(--f-serif); font-weight: 700; color: var(--c-head); font-size: var(--fs-ms); line-height: 1.3; padding-top: 0; }

.toc--mobile { font-family: var(--f-sans); border-block: 1px solid var(--c-rule); }
.toc--mobile summary { cursor: pointer; font-size: var(--fs-s); font-weight: 600; color: var(--c-head); min-height: 2.75rem; display: flex; align-items: center; }
.toc--mobile ol { padding-bottom: var(--sp-3); }
.toc--desktop { display: none; }
/* site.js marks the section in view with aria-current="location"; the transparent rail keeps text from shifting */
.toc--desktop a { padding-left: var(--sp-3); border-left: 2px solid transparent; }
.toc--desktop a[aria-current] { border-left-color: var(--c-head); color: var(--c-head); font-weight: 600; }
@media (min-width: 64rem) {
  .aside { position: sticky; top: var(--sp-5); align-self: start; }
  .toc--mobile { display: none; }
  .toc--desktop { display: block; }
}

/* Footer: Volcanic Minds legal data only */
.site-footer { background: var(--c-footer-bg); color: var(--c-footer-text); font-family: var(--f-sans); font-size: var(--fs-s); line-height: 1.6; padding-block: var(--sp-6); }
.site-footer__grid { display: grid; gap: var(--sp-5); align-items: center; }
.site-footer a { color: var(--c-footer-link); }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; column-gap: var(--sp-5); }
.site-footer nav a { text-decoration: none; white-space: nowrap; display: inline-block; min-height: 2.75rem; padding-block: var(--sp-2); }
.site-footer nav a:hover { text-decoration: underline; }
/* Full-width rule under the disclaimer, text kept to a readable measure. */
.site-footer__disclaimer { grid-column: 1 / -1; padding-right: max(0px, 100% - var(--measure)); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--c-footer-rule); }
.site-footer__credit a { text-decoration-color: var(--c-footer-rule); }
.site-footer__credit svg { display: inline; width: 1em; height: 1em; vertical-align: -0.12em; fill: var(--c-footer-text); }
.site-footer :focus-visible { outline-color: var(--c-footer-link); }
@media (min-width: 64rem) {
  .site-footer__grid { grid-template-columns: auto auto 1fr; gap: var(--sp-7); }
  .site-footer__credit { text-align: right; }
}
