/* Les Actes Parlent: clear and modern, neutral in meaning. No colour carries a political meaning,
   and none carries meaning alone: every position and outcome is also written. */
@font-face {
  font-family: "Inter";
  src: url("/assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --soft: #eceef6;
  --fg: #14152b;
  --muted: #54576f;
  --line: #e0e2ec;
  --accent: #4338ca;
  --accent-strong: #3730a3;
  --accent-soft: #eceefe;
  --accent-fg: #ffffff;
  --ok: #166534;
  --ok-soft: #e6f5eb;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --bar-for: #16a34a;
  --bar-against: #dc2626;
  --bar-abst: #8b8fa8;
  --bar-nv: #c9cbd8;
  --bar-none: #e7e8f0;
  --focus: #c25e00;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(20 21 43 / 5%), 0 6px 20px rgb(20 21 43 / 6%);
  --shadow-hover: 0 2px 4px rgb(20 21 43 / 6%), 0 12px 32px rgb(20 21 43 / 10%);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1020; --surface: #171a2e; --soft: #21253d; --fg: #eceefb; --muted: #a8acc7; --line: #2d3252;
    --accent: #a5b4fc; --accent-strong: #c7d2fe; --accent-soft: #252a4d; --accent-fg: #0e1020;
    --ok: #6ee7a0; --ok-soft: #12301f; --bad: #fca5a5; --bad-soft: #3b1719;
    --bar-for: #22c55e; --bar-against: #ef4444; --bar-abst: #7d82a3; --bar-nv: #4a4f6e; --bar-none: #2a2e48;
    --focus: #ffb15c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 35%), 0 12px 32px rgb(0 0 0 / 35%);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 1rem/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-fg); padding: 0.5rem 1rem; z-index: 10; border-radius: var(--radius-sm); }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-weight: 760; margin: 1.4rem 0 0.6rem; }
h2 { font-size: 1.35rem; font-weight: 700; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.05rem; font-weight: 650; margin: 1.4rem 0 0.5rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46rem; margin-top: 0; }
.muted { color: var(--muted); }
.num, td, dl.counts dd, .stat strong { font-variant-numeric: tabular-nums; }
.note { color: var(--muted); font-size: 0.93rem; background: var(--soft); border-radius: var(--radius-sm); padding: 0.65rem 0.9rem; margin: 0.75rem 0; }
.notice { background: var(--accent-soft); border: 1px solid var(--line); padding: 0.85rem 1rem; border-radius: var(--radius-sm); }
.error { border: 2px solid var(--bad); background: var(--bad-soft); color: var(--fg); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
abbr[title] { text-decoration: none; cursor: help; }
main { padding-bottom: 1rem; }
main > section, article > section { scroll-margin-top: 4.5rem; }

/* Header and navigation */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 760; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--fg); }
.brand-mark { width: 1.9rem; height: 1.9rem; flex: none; }
.search { display: flex; gap: 0.4rem; flex: 1 1 16rem; max-width: 28rem; min-width: 0; }
.search input { flex: 1; min-width: 0; border-radius: 999px; padding-left: 1rem; background: var(--soft); border-color: transparent; }
.search input:focus { background: var(--surface); border-color: var(--accent); }
.search button { flex: none; border-radius: 999px; }
.languages { display: flex; gap: 0.15rem; font-size: 0.85rem; font-weight: 600; }
.languages a, .languages span { padding: 0.2rem 0.45rem; border-radius: 6px; text-decoration: none; }
.languages span[aria-current] { background: var(--soft); color: var(--fg); }
.main-nav { border-top: 1px solid var(--line); }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; padding-top: 0.45rem; padding-bottom: 0.45rem; margin: 0 auto; }
.main-nav a { display: block; text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--muted); padding: 0.4rem 0.8rem; border-radius: 999px; }
.main-nav a:hover { color: var(--fg); background: var(--soft); }
.main-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.main-nav .account-link { margin-left: auto; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.9rem 0 0; margin: 0; font-size: 0.88rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.35rem; }

/* Forms and buttons */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.55rem 0.75rem; max-width: 100%; min-height: 2.6rem; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: var(--radius-sm); padding: 0.55rem 1.1rem; min-height: 2.6rem; font-weight: 650; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--accent-strong); color: var(--accent-fg); }
button.secondary, .button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
button.secondary:hover, .button.secondary:hover { background: var(--accent-soft); }
button.danger { background: var(--bad); color: var(--surface); }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); padding: 1rem; border-radius: var(--radius); margin: 1.25rem 0; box-shadow: var(--shadow); }
.filters label { display: flex; flex-direction: column; font-size: 0.85rem; font-weight: 600; color: var(--muted); gap: 0.3rem; min-width: 0; max-width: 100%; }
.filters select { width: 100%; max-width: 22rem; }
.filters input, .filters select { color: var(--fg); font-weight: 400; }
.form { display: flex; flex-direction: column; gap: 0.4rem; max-width: 40rem; }
.form label { font-weight: 600; margin-top: 0.6rem; }
.help { margin: 0; font-size: 0.9rem; color: var(--muted); }
.result-count { font-weight: 600; margin: 1rem 0 0.5rem; }
.more { display: flex; justify-content: center; margin: 1rem 0 0; }
.panel ul { padding-left: 1.2rem; }
.panel li { margin: 0.3rem 0; }

/* Home */
.hero { position: relative; margin: 1.5rem 0 1rem; padding: clamp(1.5rem, 1rem + 3vw, 3rem); border-radius: calc(var(--radius) + 6px); background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, var(--surface) 60%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero h1 { margin-top: 0; max-width: 40rem; }
.hero .tagline { display: inline-block; font-size: 0.85rem; font-weight: 650; color: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.75rem; margin: 0 0 1rem; }
.search-large { flex-direction: column; max-width: 40rem; margin: 1.25rem 0 0.5rem; gap: 0.5rem; }
.search-large label { font-weight: 600; }
.search-large .row { display: flex; gap: 0.5rem; }
.search-large input { flex: 1; min-width: 0; min-height: 3.1rem; font-size: 1.05rem; border-radius: 999px; padding: 0 1.25rem; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.search-large button { min-height: 3.1rem; border-radius: 999px; padding: 0 1.5rem; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; margin: 1.25rem 0; padding: 0; list-style: none; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.7rem; font-weight: 760; letter-spacing: -0.02em; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 0.9rem; }
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; text-decoration: none; color: var(--fg); background: var(--surface); box-shadow: var(--shadow); transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s; }
a.card:hover { color: var(--fg); border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card h2, .card h3 { margin: 0.6rem 0 0.4rem; font-size: 1.12rem; }
.card p { margin: 0; color: var(--muted); }
.card-icon { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.card-icon svg { width: 1.4rem; height: 1.4rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin: 2.2rem 0 0.8rem; }
.section-head h2 { margin: 0; }

/* Chips and badges */
.chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; line-height: 1.2; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--soft); color: var(--fg); text-decoration: none; border: 1px solid transparent; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; padding: 0; list-style: none; }
.position, .outcome, .state { display: inline-flex; gap: 0.3rem; align-items: baseline; white-space: nowrap; font-weight: 650; }
.position small { font-weight: 400; white-space: normal; }
.position-pour, .outcome-adopted, .state-ok { color: var(--ok); }
.position-contre, .outcome-rejected, .state-bad { color: var(--bad); }
.position-abstention, .position-non_votant_explicite, .position-absent_non_etabli, .position-inconnu { color: var(--muted); }
.outcome { font-size: 0.85rem; padding: 0.2rem 0.65rem; border-radius: 999px; }
.outcome-adopted { background: var(--ok-soft); }
.outcome-rejected { background: var(--bad-soft); }
.outcome-large { font-size: 1rem; padding: 0.35rem 0.9rem; }

/* Lists of scrutins and deputies */
.item-list { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; gap: 0.75rem; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.item-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.75rem; align-items: center; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.item-title { font-weight: 600; line-height: 1.45; }
.item-title a { color: var(--fg); text-decoration: none; }
.item-title a:hover { color: var(--accent); text-decoration: underline; }
/*
 * A card with one destination is clickable all over: its link stretches over
 * it, so there is still one link to tab to and to read out. Another link in
 * the card stays above the stretch. A card with two destinations (a group in
 * the search) has no link in its title and stays as it is.
 */
.item, .deputy-card { position: relative; }
.item-title a::after, .deputy-card .who > a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.item-foot a, .item .note a { position: relative; z-index: 1; }
.item:has(.item-title a), .deputy-card { transition: border-color 0.15s, box-shadow 0.15s; }
.item:has(.item-title a):hover, .deputy-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.item:has(.item-title a:focus-visible), .deputy-card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.item-title a:focus-visible, .deputy-card a:focus-visible { outline: none; }
.item-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-top: 0.65rem; font-size: 0.9rem; }
.capitalize::first-letter { text-transform: uppercase; }
.deputy-grid { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.75rem; }
.deputy-card { display: flex; gap: 0.8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; box-shadow: var(--shadow); height: 100%; }
.deputy-card .who { min-width: 0; }
.deputy-card a { font-weight: 650; color: var(--fg); text-decoration: none; }
.deputy-card a:hover { color: var(--accent); text-decoration: underline; }
.deputy-card .where { display: block; font-size: 0.88rem; color: var(--muted); }
.initials { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.scrutin-list, .deputy-list { padding-left: 1.2rem; }
.scrutin-list li, .deputy-list li { margin: 0.35rem 0; }
.names { columns: 15rem; padding-left: 1.2rem; margin: 0.5rem 0; }
.names li { break-inside: avoid; }
.communes { line-height: 1.9; }
.topic-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }

/* Vote bars: decorative, the numbers are always written next to them */
.vote-bar { display: block; width: 100%; height: 0.65rem; border-radius: 999px; overflow: hidden; min-width: 6rem; }
.vote-bar .seg-none { fill: var(--bar-none); }
.vote-bar .seg-pour { fill: var(--bar-for); }
.vote-bar .seg-contre { fill: var(--bar-against); }
.vote-bar .seg-abstention { fill: var(--bar-abst); }
.vote-bar .seg-nv { fill: var(--bar-nv); }
.vote-bar-large { height: 1rem; }
.vote-bar .seg-rate { fill: var(--accent); }
.rate-bar { margin-top: 0.35rem; }
.big-figure { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.2rem); font-weight: 780; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 0.6rem; }
.deputy-grid.pair { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; }
.inline-form label { display: flex; flex-direction: column; font-size: 0.85rem; font-weight: 600; color: var(--muted); gap: 0.3rem; }
.inline-form input { color: var(--fg); font-weight: 400; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.doc { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 1rem; }
.toc { position: sticky; top: 1rem; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.toc p { margin: 0 0 0.5rem; font-weight: 700; color: var(--fg); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.prose { max-width: 46rem; }
.prose > section:first-child h2, .prose > h2:first-child { margin-top: 0; }
/* A page without a lead (the legal notice): the first heading keeps its distance from the title. */
h1 + .prose { margin-top: 1.75rem; }
.prose p, .prose li { line-height: 1.7; }
.account-list { list-style: none; padding: 0; }
.account-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.account-list li:last-child { border-bottom: 0; }
.bar-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0.5rem 0 0; padding: 0; list-style: none; font-size: 0.9rem; }
.bar-legend li { display: inline-flex; align-items: baseline; gap: 0.35rem; }
.bar-legend .zero, .bar-legend .zero .position { color: var(--muted); font-weight: 400; }
.bar-legend strong { font-variant-numeric: tabular-nums; }
.compact-counts { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; font-size: 0.88rem; }
.compact-counts .zero { color: var(--muted); font-weight: 400; }
.group-votes { display: grid; gap: 0.5rem; }
.group-votes-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
/* The group's official colour, beside its name: the outline keeps a pale or dark colour visible on either theme. */
.group-dot { display: inline-block; width: 0.7em; height: 0.7em; margin-right: 0.3em; vertical-align: -0.02em; flex: none; }
.group-dot circle { stroke: var(--fg); stroke-opacity: 0.35; stroke-width: 1; }
.group { white-space: nowrap; }

/* Page heads */
.page-head { margin: 0.5rem 0 1.25rem; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; align-items: center; font-size: 0.9rem; color: var(--muted); font-weight: 500; margin: 1.2rem 0 0; }
.page-head h1 { margin-top: 0.5rem; }
.profile { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 1.25rem 1.5rem; box-shadow: var(--shadow); margin: 1rem 0 1.25rem; }
.profile .initials { width: 4.2rem; height: 4.2rem; font-size: 1.35rem; }
.profile h1 { margin: 0 0 0.35rem; }
.profile .who { flex: 1 1 18rem; min-width: 0; }
.profile p { margin: 0.2rem 0; }
.profile .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; box-shadow: var(--shadow); margin: 0.75rem 0; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.facts li { display: grid; gap: 0.1rem; }
.facts .label { font-size: 0.82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 0.75rem 1.25rem; }
.timeline li::before { content: ""; position: absolute; left: 0.2rem; top: 0.55rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: 0.42rem; top: 1.2rem; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0.75rem 0; }
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; padding: 0.85rem 1rem 0.25rem; font-weight: 650; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 0.65rem 1rem; vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font-size: 0.8rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; background: var(--soft); white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--soft) 55%, transparent); }
td.n, th.n { text-align: right; }
.table-wrap .vote-bar { min-width: 7rem; margin-top: 0.4rem; }

/* Result figures */
dl.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.6rem; margin: 1rem 0 0; }
dl.counts div { background: var(--soft); border-radius: var(--radius-sm); padding: 0.6rem 0.85rem; }
dl.counts dt { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
dl.counts dd { margin: 0; font-size: 1.35rem; font-weight: 750; letter-spacing: -0.01em; }
blockquote { margin: 0.5rem 0; padding: 0.75rem 1rem; border-left: 4px solid var(--accent); background: var(--soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.explanation .badge { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.15rem 0.7rem; }
details { margin: 0.6rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 1rem; }
details[open] { box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 650; }
.meta { padding-left: 1.2rem; }

/* In-page tabs */
.tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 0.25rem; overflow-x: auto; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); padding: 0.5rem 0; margin: 0 0 0.5rem; border-bottom: 1px solid var(--line); }
.tabs a { flex: none; text-decoration: none; font-weight: 600; font-size: 0.93rem; color: var(--muted); padding: 0.4rem 0.85rem; border-radius: 999px; }
.tabs a:hover { background: var(--soft); color: var(--fg); }
.pagination { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: center; margin: 1.5rem 0; }
.pagination a { text-decoration: none; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--accent); }
.follow[aria-pressed="true"] { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
meter { width: 8rem; height: 0.7rem; }

/* Questionnaire and account */
.questionnaire fieldset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; padding: 1rem 1.25rem; box-shadow: var(--shadow); }
.questionnaire legend { padding: 0 0.3rem; font-weight: 650; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choices label { display: inline-flex; gap: 0.45rem; align-items: center; padding: 0.45rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choices input { width: 1.1rem; height: 1.1rem; min-height: 0; margin: 0; accent-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; max-width: 36rem; }
.stack label:has(input[type=checkbox]) { display: flex; gap: 0.5rem; align-items: flex-start; }
.stack input[type=checkbox] { width: 1.2rem; height: 1.2rem; min-height: 0; flex: none; margin-top: 0.2rem; accent-color: var(--accent); }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.2rem 0.5rem 0.2rem 0; }
.notice.error { border: 2px solid var(--bad); }
pre { background: var(--soft); padding: 0.85rem 1rem; border-radius: var(--radius-sm); overflow-x: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

/* Footer */
.site-footer { margin-top: 3.5rem; background: var(--surface); border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; font-size: 0.92rem; color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--fg); margin: 0 0 0.75rem; }
.footer-brand .brand-mark { width: 1.5rem; height: 1.5rem; }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 1rem 0 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--fg); }

@media (max-width: 52rem) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .toc { position: static; }
}
@media (max-width: 40rem) {
  .main-nav ul { flex-wrap: nowrap; overflow-x: auto; }
  .main-nav .account-link { margin-left: 0; }
  .search { flex-basis: 100%; max-width: none; }
  .search-large .row { flex-direction: column; }
  .hero { padding: 1.25rem; }
  .profile { padding: 1rem; }
  .profile .initials { width: 3.2rem; height: 3.2rem; font-size: 1.05rem; }
  th, td { padding: 0.55rem 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  a.card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .filters, .follow, .skip, .tabs { display: none; }
  body { background: #fff; }
  .card, .item, .panel, .table-wrap, .stat, .profile { box-shadow: none; }
}
.group-mark { display: inline-grid; place-items: center; width: 4.2rem; height: 4.2rem; border-radius: 50%; background: var(--soft); }
.group-mark .group-dot { width: 2.6rem; height: 2.6rem; margin: 0; }
