/* Six-Pack of Care — Oxford Editorial */

/* ─── SELF-HOSTED FONTS ─── */
@font-face {
    font-family: "Monlam Bodyig";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/monlam-bodyig-tibetan.woff2") format("woff2");
    unicode-range: U+0F00-0FFF;
}

@font-face {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url("fonts/outfit-latin-ext.woff2") format("woff2");
    unicode-range:
        U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
        U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
        U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Outfit";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url("fonts/outfit-latin.woff2") format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
        U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── CUSTOM PROPERTIES ─── */
:root {
    --oxford-blue: #002147;
    --ink: #0f1923;
    --paper: #faf8f5;
    --warm: #f4f1ec;
    --surface: #fff;
    --card: #f4f1ec;
    --text: #2c3e50;
    --muted: #5f6a7d;
    --heading: #002147;
    --gold: #886d35;
    --gold-light: #c9a961;
    --teal: #2a7f8a;
    --poster-paper: #faf8f5;
    --border: #e0ddd7;
    --shadow: 0 2px 8px rgba(0, 33, 71, 0.06);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.08);
    --serif: "Monlam Bodyig", "Lora", Georgia, serif;
    --sans: "Monlam Bodyig", "Outfit", system-ui, sans-serif;
    --accent-teal: #2a7f8a;
    --accent-blue: #2a7f8a;
    --accent-gradient: linear-gradient(135deg, var(--oxford-blue), #003366);
}

html[data-theme="light"] {
    color-scheme: light;
    --paper: #faf8f5;
    --warm: #f4f1ec;
    --surface: #fff;
    --card: #f4f1ec;
    --text: #2c3e50;
    --muted: #5f6a7d;
    --heading: #002147;
    --gold: #886d35;
    --teal: #2a7f8a;
    --border: #e0ddd7;
    --shadow: 0 2px 8px rgba(0, 33, 71, 0.06);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.08);
    --accent-teal: #2a7f8a;
    --accent-blue: #2a7f8a;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --paper: #111820;
    --warm: #161e28;
    --surface: #1c2535;
    --card: #161e28;
    --text: #b8b4ac;
    --muted: #8a96a8;
    --heading: #e8e4dc;
    --border: rgba(255, 255, 255, 0.1);
    --gold: #c9a961;
    --teal: #4bc3d4;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.4);
    --accent-teal: #4bc3d4;
    --accent-blue: #4bc3d4;
}

/* ─── BASE ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--paper);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* Web fonts blocked (e.g. iOS Lockdown Mode): the system fallback is much
   thinner than Outfit at the same weight, so lift the body copy to a more
   readable weight and drop the antialiasing that renders SF lighter still. */
html.fonts-unavailable body {
    font-weight: 450;
    -webkit-font-smoothing: auto;
}

html.fonts-unavailable {
    --muted: #4c576a;
}

html[data-theme="dark"].fonts-unavailable {
    --muted: #9aa6b8;
}

::selection {
    background: color-mix(in srgb, var(--teal) 20%, transparent);
}

/* ─── LINKS ─── */
a {
    color: var(--teal);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    transition: color 0.2s;
}

a:hover {
    color: var(--gold);
}

/* ─── GLOSSARY GLOSSING ─── */
.gloss {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--gold);
}
.gloss:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.gloss:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

/* ─── HEADER ─── */
header {
    background: var(--oxford-blue);
    color: white;
    padding: 56px 32px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold-light),
        transparent
    );
}

header .brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

header img.oxford-logo {
    max-width: 180px;
    margin: 5px;
    height: 90px;
    opacity: 0.92;
    transition: opacity 0.3s;
}

header img.oxford-logo:hover {
    opacity: 1;
}

.lang-toggle {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 5px 14px;
    border-radius: 3px;
    transition: all 0.2s;
}

.lang-toggle:hover {
    color: white;
    border-color: var(--gold-light);
    background: rgba(255, 255, 255, 0.08);
}

/* ─── PRIMARY NAV ─── */
header nav.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 7px 22px;
    margin: 22px auto 0;
    max-width: 640px;
    line-height: 1.4;
}

header nav.site-nav a {
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 3px 1px;
    border-bottom: 1px solid transparent;
    transition:
        color 0.2s,
        border-color 0.2s;
}

header nav.site-nav a:hover,
header nav.site-nav a:focus-visible {
    color: #fff;
    border-bottom-color: var(--gold-light);
}

header h1 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 12px 0 0 0;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}

header p {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    margin: 8px auto 0;
    line-height: 1.6;
    max-width: 680px;
}

header a {
    color: white;
    text-decoration: none;
}

header .chapter-date {
    margin: 8px auto 0;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--gold-light);
    max-width: 95%;
}

/* Interior pages keep institutional provenance as a frame, not a hero slab. */
.site-header--interior {
    background: var(--paper);
    color: var(--text);
    padding: 22px 0 30px;
    text-align: left;
    overflow: visible;
}

.site-header--interior::after {
    display: none;
}

.site-header__bar,
.site-header__title-block,
.site-header__frame-rule,
.partner-colophon {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 32px;
    padding-left: 32px;
}

.site-header__bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 18px;
}

.site-wordmark {
    display: inline-flex;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    gap: 7px;
    color: var(--heading);
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    white-space: nowrap;
}

.site-mark {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--gold);
    display: block;
}

.site-wordmark__secondary {
    color: var(--teal);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.site-header__nav {
    grid-column: 1 / -1;
    min-width: 0;
    grid-row: 2;
}

.site-header--interior nav.site-nav {
    justify-content: flex-start;
    gap: 5px 16px;
    max-width: none;
    margin: 0;
}

.site-header--interior nav.site-nav a {
    color: var(--heading);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.site-header--interior nav.site-nav a:hover,
.site-header--interior nav.site-nav a:focus-visible {
    color: var(--teal);
    border-bottom-color: var(--teal);
}

.nav-label-short {
    display: none;
}

.site-header__tools {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.site-header--interior .lang-toggle {
    color: var(--heading);
    border-color: color-mix(in srgb, var(--heading) 28%, transparent);
}

.site-header--interior .lang-toggle:hover {
    color: var(--teal);
    background: color-mix(in srgb, var(--teal) 8%, transparent);
    border-color: var(--teal);
}

.site-header--home .site-header__tools {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 0;
}

.site-header__home-tools {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: grid;
    grid-template-columns: max-content max-content;
    align-items: center;
    justify-content: end;
    column-gap: 14px;
    margin: 0;
}

.theme-toggle {
    display: inline-grid;
    place-items: center;
    min-width: 2.35rem;
    min-height: 2.1rem;
    color: currentColor;
    line-height: 0;
    background: color-mix(in srgb, currentColor 8%, transparent);
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
    transition:
        color 0.2s,
        border-color 0.2s,
        background 0.2s;
}

.theme-toggle__icon {
    grid-area: 1 / 1;
    width: 1.2rem;
    height: 1.2rem;
    display: block;
    fill: none;
    stroke: currentColor;
    /* Bolder than the SVG's own 1.6 so the outline crescent reads clearly,
       matching the stroked moon on plurality.net. */
    stroke-width: 2;
}

/* Show the icon of the theme the button switches *to*: moon offers dark,
   sun offers light. Keyed off html[data-theme] (set before first paint in
   <head>) so there is no icon flash. */
.theme-toggle__sun {
    display: none;
}
html[data-theme="dark"] .theme-toggle__moon {
    display: none;
}
html[data-theme="dark"] .theme-toggle__sun {
    display: block;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    color: var(--teal);
    border-color: var(--teal);
    background: color-mix(in srgb, var(--teal) 10%, transparent);
}

.site-header__frame-rule {
    height: 2px;
    margin-top: 18px;
    background: transparent;
}

.site-header__frame-rule::before {
    content: "";
    display: block;
    height: 2px;
    background: var(--heading);
}

.site-header__title-block {
    margin-top: 24px;
}

.site-header__title-block h1 {
    color: var(--heading);
    margin-top: 0;
}

.site-header__title-block h1 span {
    display: block;
    margin-top: 0.45em;
    font-size: 0.72em;
    font-weight: 400;
    color: var(--teal);
}

.site-header--interior p {
    color: var(--muted);
    margin-left: 0;
}

.site-header--interior .chapter-date {
    color: var(--gold);
    margin-left: 0;
}

.partner-colophon {
    position: relative;
    padding: 24px 32px 28px;
    text-align: center;
}

.partner-colophon::before {
    content: "";
    display: block;
    height: 2px;
    margin-bottom: 24px;
    background: var(--heading);
}

.partner-colophon__marks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-bottom: 10px;
}

.partner-logo {
    width: auto;
    height: 36px;
    max-width: 180px;
}

.partner-logo--oxford {
    max-width: 76px;
}

html[data-theme="dark"] .partner-logo {
    filter: invert(1) brightness(1.35) contrast(0.95);
}

html[data-theme="light"] .partner-logo {
    filter: none;
}

.partner-colophon p {
    max-width: 40rem;
    margin: 0 auto;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.72rem;
    line-height: 1.55;
    letter-spacing: 0.04em;
}

/* ─── TABLES ─── */
main table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.92rem;
    overflow-x: auto;
    display: block;
}

main th {
    text-align: left;
    padding: 0.6rem 1rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--gold);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

main td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.5;
}

main td:first-child {
    font-weight: 500;
    white-space: nowrap;
}

main tr:last-child td {
    border-bottom: none;
}

/* Two-column comparison table (e.g. inside-the-kami "the shared design lesson"):
   balance the columns and let both wrap, so a long first cell can't force the
   column wide and trigger horizontal scroll. Overrides the global block/nowrap
   table behaviour for this scoped case only. */
.compare-table table {
    display: table;
    width: 100%;
    table-layout: fixed;
}
.compare-table th:first-child,
.compare-table td:first-child {
    width: 40%;
    white-space: normal;
}
.compare-table td {
    vertical-align: top;
}

/* ─── MAIN CONTENT ─── */
main {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 32px;
    font-family: var(--serif);
    font-size: 1.1rem;
}

main img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

main article {
    max-width: 900px;
    margin: 0 auto;
}

article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 40px;
}

/* ─── SECTIONS ─── */
section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 36px;
    margin-bottom: 32px;
}

/* ─── TYPOGRAPHY ─── */
h2,
h3,
h4 {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--heading);
    letter-spacing: -0.01em;
}

h1 {
    scroll-margin-top: 24px;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2rem);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
    margin-top: 2.5em;
    margin-bottom: 0.8em;
}

/* h3 is the primary structural heading within chapters */
h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2.8em;
    margin-bottom: 0.6em;
    padding-top: 1.5em;
    border-top: 1px solid var(--border);
    scroll-margin-top: 24px;
}

/* First heading right after opening prose — no divider needed */
main > p + h3,
main > p + h2,
main > em + h3,
main > .audio-section + h3,
main > .overview-section + h2,
main > .video-embed + h3 {
    border-top: none;
    padding-top: 0;
    margin-top: 2em;
}

h4 {
    font-size: 1.05rem;
    margin-top: 1.8em;
    margin-bottom: 0.4em;
}
/* FAQ grouping and filter pills */
.faq-filter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 22px;
    padding: 6px;
    border: 1px solid rgba(0, 33, 71, 0.08);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0, 33, 71, 0.06);
}

.faq-filter button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: 600 0.82rem/1.2 var(--sans);
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.faq-filter button:hover,
.faq-filter button:focus-visible,
.faq-filter button[aria-pressed="true"] {
    background: var(--oxford-blue);
    color: #fff;
    transform: translateY(-1px);
}

.faq-filter button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

h4[data-faq-label]::before {
    content: attr(data-faq-label);
    display: inline-flex;
    align-items: center;
    margin: 0 0.65em 0.35em 0;
    padding: 0.28em 0.72em;
    border: 1px solid rgba(136, 109, 53, 0.24);
    border-radius: 999px;
    background: rgba(201, 169, 97, 0.12);
    color: var(--gold);
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
    vertical-align: middle;
}

html[lang^="zh"] h4[data-faq-label]::before {
    letter-spacing: 0.08em;
}

@media (max-width: 640px) {
    .faq-filter {
        width: 100%;
        justify-content: center;
    }

    .faq-filter button {
        padding: 7px 10px;
        font-size: 0.76rem;
    }
}

p {
    margin: 1em 0;
}

/* Blockquotes — for manifesto and inline quotes */
blockquote {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--muted);
    border-left: 2px solid var(--gold);
    padding: 4px 0 4px 24px;
    margin: 2em 0;
    line-height: 1.7;
}

blockquote p {
    margin: 0.5em 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3em 0;
}

ul {
    padding-left: 1.2em;
    margin: 0.8em 0;
}

ol {
    padding-left: 1.4em;
    margin: 0.8em 0;
}

li {
    margin: 0.5em 0;
    line-height: 1.7;
}

li > ul,
li > ol {
    margin: 0.3em 0;
}

/* ─── EMPHASIS ─── */
strong {
    font-weight: 600;
    color: var(--heading);
}

em {
    font-style: italic;
}

:lang(zh) em,
:lang(zh) blockquote {
    font-style: normal;
    font-family: "Kaiti TC", "DFKai-SB", "BiauKai", "STKaiti", cursive;
}

/* ─── INTERVIEW PAGES ─── */
.method-note {
    margin: 0 0 2.5rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--sans);
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--muted);
}

.method-note p {
    margin: 0.35rem 0;
}

body.interview-page h4 a {
    color: inherit;
    text-decoration: none;
}

body.interview-page h4 a:hover {
    color: inherit;
}

body.interview-page hr {
    margin: 2.2rem 0 1.3rem;
}

body.interview-page main p:has(> strong:first-child) strong:first-child {
    font-family: var(--sans);
    font-size: 0.82em;
    letter-spacing: 0.04em;
    color: var(--gold);
}

/* ─── LEAD & CALLOUT ─── */
.lead {
    font-size: 1.05rem;
    color: var(--muted);
}

.callout {
    border-left: 3px solid var(--gold);
    background: var(--warm);
    padding: 20px 24px;
    border-radius: 0 4px 4px 0;
    margin: 1.5em 0;
}

/* ─── TEAM PHOTOS ─── */
.team-photos {
    display: flex;
    justify-content: space-around;
    margin-bottom: 24px;
}

.team-photos a {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-photos p {
    text-align: center;
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading);
}

.team-photos img {
    width: 200px;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.team-photos img:hover {
    transform: scale(1.02);
}

/* ─── AUDIO PLAYER ─── */
.audio-section {
    clear: both;
    margin: 32px 0;
    padding: 20px 24px;
    background: var(--warm);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.audio-section audio {
    width: 100%;
    display: block;
    outline: none;
}

.audio-label {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 0.5rem;
}

.audio-links {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.5rem 0 0;
}

/* ─── TRANSCRIPT SPEAKER TURNS ─── */
main p:has(> strong:first-child) {
    border-top: 1px solid var(--border);
    padding-top: 1.4rem;
    margin-top: 1.6rem;
}

/* ─── VIDEO EMBED ─── */
.video-embed {
    position: relative;
    padding-top: 56.25%;
    margin: 32px 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── OVERVIEW ─── */
.overview-section {
    text-align: center;
    margin: 0 0 40px;
    padding: 0;
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
}

.overview-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--poster-paper);
}

.overview-frame {
    position: relative;
    width: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.overview-frame > img,
.overview-frame .overview-image {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    border-radius: 0;
    border: none;
}

.figure-caption {
    margin-top: 8px;
    margin-bottom: 2em;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--muted);
    text-align: center;
}

p + .figure-caption {
    margin-top: -8px;
}

.figure-caption strong {
    color: var(--heading);
}

/* ─── GRID LAYOUTS ─── */
.metrics,
.tools,
.interfaces,
.glossary {
    display: grid;
    gap: 12px;
}

@media (min-width: 720px) {
    .metrics,
    .tools,
    .interfaces,
    .glossary {
        grid-template-columns: 1fr 1fr;
    }
}

/* ─── NEXT ACTION / NAVIGATION ─── */
.next-action {
    background: var(--oxford-blue);
    color: white;
    padding: 48px 24px;
    margin: 0;
    text-align: center;
    border-radius: 0;
    position: relative;
}

.next-action::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold-light),
        transparent
    );
}

.next-action-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.next-action h2 {
    font-family: var(--serif);
    font-size: 2em;
    margin: 0 0 16px 0;
    color: white;
    border-bottom: none;
}

.next-action p {
    font-size: 1.1em;
    margin: 0 0 32px 0;
    opacity: 0.85;
}

.next-action-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 3px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 0.95em;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.next-action-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: var(--gold-light);
}

.next-action-button .button-text {
    font-family: var(--sans);
}

.next-action-button .button-arrow {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.next-action-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Header manifesto button — override for use inside header */
header .next-action-button {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 10px 24px;
    font-size: 0.85em;
    margin-top: 8px;
}

header .next-action-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold-light);
}

/* ─── FOOTER ─── */
footer {
    text-align: center;
    padding: 48px 32px;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.55);
    margin-top: 0;
    font-size: 0.85em;
    line-height: 1.8;
}

footer a {
    color: var(--gold-light);
    text-decoration: none;
    text-decoration-thickness: 1px;
}

footer a:hover {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ─── SKIP LINK ─── */
/* Skip link: kept in the accessibility tree for screen readers, but never shown
   visually (no on-focus reveal). */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus-visible {
    outline: none;
}

/* ─── FOCUS ─── */
:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 719px) {
    .metrics,
    .tools,
    .interfaces,
    .glossary {
        grid-template-columns: 1fr;
        row-gap: 0;
        column-gap: 0;
    }

    .metrics ul,
    .tools ul,
    .interfaces ul,
    .glossary ul {
        margin: 0;
    }

    header {
        padding: 40px 20px 32px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    main {
        padding: 32px 20px;
    }

    section {
        padding: 24px;
    }

    article {
        padding: 24px;
    }

    .overview-section {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        padding: 0;
    }

    .overview-image {
        border-radius: 0;
        border: none;
    }

    .team-photos {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    footer {
        padding: 40px 20px;
    }

    header nav.site-nav {
        gap: 5px 14px;
        margin-top: 16px;
    }

    header nav.site-nav a {
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }

    .site-header--interior {
        padding-top: 18px;
    }

    .site-header__bar,
    .site-header__title-block,
    .site-header__frame-rule,
    .partner-colophon {
        padding-right: 20px;
        padding-left: 20px;
    }

    .site-header__bar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 12px;
    }

    .site-wordmark {
        font-size: 0.95rem;
    }

    .site-wordmark__secondary {
        display: none;
    }

    .site-mark {
        width: 18px;
        height: 18px;
    }

    .site-header__tools {
        gap: 8px;
    }

    .site-header__nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .site-header--interior nav.site-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0 18px;
        width: max-content;
        min-width: 100%;
        padding-bottom: 2px;
    }

    .nav-label-full {
        display: none;
    }

    .nav-label-short {
        display: inline;
    }

    .site-header--interior nav.site-nav a {
        flex: 0 0 auto;
        font-size: 0.68rem;
        letter-spacing: 0.06em;
        white-space: nowrap;
    }

    .site-header--interior .lang-toggle {
        font-size: 0.66rem;
        letter-spacing: 0.06em;
        padding: 4px 10px;
    }

    .theme-toggle {
        min-width: 2.15rem;
        min-height: 2rem;
        padding: 4px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── CORMORANT GARAMOND (SELF-HOSTED) ─── */
@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("fonts/cormorant-normal-latin-ext.woff2") format("woff2");
    unicode-range:
        U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
        U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
        U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("fonts/cormorant-normal-latin.woff2") format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
        U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Cormorant Garamond";
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url("fonts/cormorant-italic-latin-ext.woff2") format("woff2");
    unicode-range:
        U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
        U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
        U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Cormorant Garamond";
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url("fonts/cormorant-italic-latin.woff2") format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
        U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── PRINT: OXFORD ACADEMIC TREATMENT ─── */
@media print {
    /* --- Reset & hide non-print elements --- */
    .next-action,
    .skip-link,
    .lang-toggle,
    .site-nav,
    .audio-section,
    .video-embed,
    footer {
        display: none !important;
    }

    /* --- Base typography --- */
    body {
        background: white;
        color: #1a1a1a;
        font-family: "Cormorant Garamond", "Lora", Georgia, serif;
        font-size: 10.8pt;
        line-height: 1.52;
        text-rendering: optimizeLegibility;
        font-feature-settings:
            "liga" 1,
            "kern" 1,
            "onum" 1;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    main {
        max-width: 100%;
        padding: 0;
        font-size: inherit;
        font-family: inherit;
    }

    article,
    section {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }

    a {
        color: inherit;
        text-decoration: none;
    }

    a[href]::after {
        content: "";
    }
    a[href^="#"]::after,
    a[href^="/"]::after {
        content: "";
    }

    /* --- Header: Oxford blue title band --- */
    header {
        background: #002147 !important;
        color: white;
        padding: 14mm 12mm 11mm;
        margin: 0 -18mm 0;
        width: calc(100% + 36mm);
        text-align: center;
        overflow: visible;
        border-bottom: none;
        position: relative;
    }

    header::after {
        content: "";
        display: block;
        width: 32mm;
        height: 0.6pt;
        background: #c9a961;
        margin: 7mm auto 0;
    }

    header img,
    header > div {
        display: none !important;
    }

    header > .site-header__title-block {
        display: block !important;
    }

    header > .site-header__title-block h1 {
        color: white;
    }

    header h1 {
        opacity: 1 !important;
        animation: none !important;
        color: white;
        font-family: "Cormorant Garamond", Georgia, serif;
        font-size: 22pt;
        font-weight: 600;
        line-height: 1.12;
        letter-spacing: 0.01em;
        margin: 0;
        text-wrap: balance;
    }

    header p,
    header .chapter-date {
        margin-top: 3mm;
        color: rgba(255, 255, 255, 0.78);
        font-family: var(--sans);
        font-size: 8pt;
        font-weight: 400;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    /* --- Oxford institutional line below header --- */
    header + main::before {
        content: "6-Pack of Care  ·  Oxford Institute for Ethics in AI  ·  Accelerator Fellowship Programme";
        display: block;
        text-align: center;
        font-family: var(--sans);
        font-size: 6.5pt;
        font-weight: 500;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #002147;
        padding: 5mm 0 4mm;
        margin: 0 auto 6mm;
        border-bottom: 0.4pt solid #002147;
        max-width: 34em;
    }

    /* --- Page-break & orphan control --- */
    h2,
    h3,
    h4 {
        break-after: avoid-page;
        page-break-after: avoid;
    }

    p,
    li,
    blockquote {
        orphans: 3;
        widows: 3;
        hyphens: auto;
    }

    /* --- Headings --- */
    h2 {
        font-family: "Cormorant Garamond", Georgia, serif;
        color: #002147;
        border-bottom: 1pt solid #002147;
        padding-bottom: 2mm;
    }

    h3 {
        font-family: "Cormorant Garamond", Georgia, serif;
        color: #002147;
        border-top-color: #c9a961;
    }

    /* --- Horizontal rules: gold ornamental --- */
    hr {
        border: 0;
        height: 0;
        margin: 8mm auto 5mm;
        max-width: 34em;
        text-align: center;
        overflow: visible;
        position: relative;
    }

    hr::before {
        content: "◆";
        display: block;
        font-size: 6pt;
        color: #c9a961;
        letter-spacing: 3mm;
        line-height: 1;
    }

    hr::after {
        content: "";
        display: block;
        width: 50mm;
        height: 0.35pt;
        background: linear-gradient(90deg, transparent, #c9a961, transparent);
        margin: 2mm auto 0;
    }

    /* --- Interview page specifics --- */
    body.interview-page main > * {
        max-width: 34em;
        margin-left: auto;
        margin-right: auto;
    }

    /* Method note: styled as formal abstract */
    body.interview-page .method-note {
        margin: 0 auto 7mm;
        padding: 3mm 4mm 3.5mm;
        border: 0.4pt solid #bbb4a8;
        border-left: 2pt solid #002147;
        background: #f7f5f1;
        font-family: var(--sans);
        font-size: 7.8pt;
        line-height: 1.5;
        color: #444;
    }

    body.interview-page .method-note p {
        margin: 1mm 0;
    }

    body.interview-page .method-note a[href^="http"] {
        text-decoration: underline;
        text-decoration-thickness: 0.4pt;
        text-underline-offset: 1.5pt;
        color: #002147;
    }

    /* Question headings: Oxford blue with gold number accent */
    body.interview-page h4 {
        font-family: "Cormorant Garamond", Georgia, serif;
        font-size: 11.5pt;
        line-height: 1.32;
        font-weight: 700;
        color: #002147;
        margin: 0 0 3.5mm;
        padding: 0 0 0 0;
        text-wrap: balance;
        position: relative;
    }

    /* Style Q1, Q2 etc. labels */
    body.interview-page h4 a[href^="#q"] {
        color: #c9a961;
        font-weight: 700;
        margin-right: 0.2em;
    }

    body.interview-page h4 + p,
    body.interview-page h4 + p + p {
        break-before: avoid-page;
        page-break-before: avoid;
    }

    /* Speaker turn separators */
    body.interview-page main p:has(> strong:first-child) {
        border-top: 0.35pt solid #d4cfc7;
        padding-top: 4mm;
        margin-top: 5mm;
    }

    /* Speaker labels: Oxford blue small-caps */
    body.interview-page main p:has(> strong:first-child) strong:first-child {
        display: inline-block;
        margin-right: 0.5em;
        font-family: var(--sans);
        font-size: 7.5pt;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #002147;
    }

    /* Endorsement / Qualification / Correction labels: differentiated */
    body.interview-page
        main
        p:has(> strong:first-child:not(:only-child))
        strong:first-child {
        padding: 0.5mm 2mm;
        border-radius: 1pt;
    }

    /* Blockquotes in print */
    blockquote {
        border-left: 1.5pt solid #002147;
        padding-left: 5mm;
        color: #333;
        font-style: italic;
    }

    /* Emphasis in print */
    strong {
        color: #002147;
        font-weight: 700;
    }

    em {
        font-style: italic;
    }

    /* --- Footer imprint on last page --- */
    body.interview-page main::after {
        content: "© 2025 Audrey Tang & Caroline Green · Oxford Institute for Ethics in AI · University of Oxford";
        display: block;
        max-width: 34em;
        margin: 10mm auto 0;
        padding: 4mm 0 0;
        border-top: 0.4pt solid #002147;
        font-family: var(--sans);
        font-size: 6pt;
        font-weight: 500;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #002147;
        text-align: center;
    }
}

@page {
    size: A4 portrait;
    margin: 18mm 20mm 22mm;

    @bottom-center {
        content: counter(page);
        font-family: "Cormorant Garamond", Georgia, serif;
        font-size: 8pt;
        color: #002147;
    }

    @top-center {
        content: "Interview with Article Zero";
        font-family: "Outfit", system-ui, sans-serif;
        font-size: 6pt;
        font-weight: 500;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: #886d35;
    }
}

@page :first {
    @top-center {
        content: none;
    }
    @bottom-center {
        content: none;
    }
    margin-top: 0;
}

/* ─── CONFERENCE PAGE ─── */
.conf-intro {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--muted);
    border-left: 3px solid var(--gold);
    padding: 16px 24px;
    background: var(--warm);
    border-radius: 0 4px 4px 0;
    margin: 0 0 2em;
}

.conf-intro p {
    margin: 0.5em 0;
}

.conf-quote {
    display: grid;
    gap: 16px;
    margin: 0;
}

.conf-quote-portrait {
    width: min(144px, 40vw);
    justify-self: center;
}

.conf-quote-portrait img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 2px solid var(--border);
    box-shadow: 0 10px 24px rgba(15, 25, 35, 0.12);
}

.conf-quote blockquote {
    margin: 0;
    padding: 0 0 0 1.2em;
    border: 0;
    font-family: "Cormorant Garamond", var(--serif);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.55;
    color: var(--heading);
    position: relative;
}

:lang(zh) .conf-quote blockquote {
    font-style: normal;
}

.conf-quote blockquote::before {
    content: "\201C";
    position: absolute;
    top: -0.15em;
    left: -0.05em;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3.5rem;
    font-style: normal;
    line-height: 1;
    color: var(--gold);
    opacity: 0.5;
    pointer-events: none;
}

.conf-quote blockquote::after {
    content: "\201D";
    position: absolute;
    bottom: -0.5em;
    right: -0.1em;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3.5rem;
    font-style: normal;
    line-height: 1;
    color: var(--gold);
    opacity: 0.5;
    pointer-events: none;
}

.conf-quote blockquote p {
    margin: 0;
}

.conf-quote blockquote p + p {
    margin-top: 0.75em;
}

.conf-quote figcaption {
    margin-top: 0.85em;
    font-family: var(--sans);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--heading);
    text-align: right;
}

:lang(zh) .conf-quote figcaption {
    letter-spacing: 0.02em;
    text-transform: none;
}

@media (min-width: 640px) {
    .conf-quote {
        grid-template-columns: auto 1fr;
        gap: 20px;
        align-items: start;
    }

    .conf-quote-portrait {
        padding-top: 0.25em;
    }

    .conf-quote-portrait {
        width: 128px;
        justify-self: start;
    }

    .conf-quote--mirror {
        grid-template-columns: 1fr auto;
    }

    .conf-quote--mirror .conf-quote-portrait {
        order: 1;
    }

    .conf-quote--mirror figcaption {
        text-align: left;
    }
}

.conf-quote + .conf-quote {
    margin-top: 1.5em;
}

/* Side-by-side quote pair */
.conf-quotes-pair {
    display: grid;
    gap: 24px;
}

@media (min-width: 640px) {
    .conf-quotes-pair .conf-quote + .conf-quote {
        margin-top: 0;
    }

    .conf-quotes-pair .conf-quote blockquote {
        font-size: 1.1rem;
    }
}

.conf-hosts {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 0 0 2.5em;
    flex-wrap: wrap;
}

.conf-host {
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.conf-host img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    transition:
        border-color 0.3s,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    display: block;
    margin: 0 auto 10px;
}

.conf-host:hover img {
    border-color: var(--gold);
    transform: scale(1.03);
}

.conf-host strong {
    font-family: var(--serif);
    font-size: 1.05rem;
    display: block;
    color: var(--heading);
}

.conf-host span {
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--muted);
}

.conf-detail-with-photo {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.conf-detail-with-photo img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.conf-detail-with-photo .conf-detail-text {
    flex: 1;
    min-width: 0;
}

.conf-panel-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 10px;
}

.conf-panel-photos img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.conf-diagram {
    text-align: center;
    margin: 0 0 2em;
}

.conf-diagram img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.conf-packs-condensed {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0.5em 0 1em;
    font-family: var(--sans);
    font-size: 0.82rem;
}

.conf-packs-condensed a {
    background: var(--warm);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 5px 12px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s;
}

.conf-packs-condensed a:hover {
    border-color: var(--gold);
    color: var(--heading);
}

.conf-packs-condensed a strong {
    color: var(--gold);
    font-weight: 600;
    margin-right: 4px;
}

.conf-goals {
    display: grid;
    gap: 16px;
    margin: 0 0 2.5em;
}

@media (min-width: 720px) {
    .conf-goals {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.conf-goal {
    background: var(--warm);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px;
}

.conf-goal h3 {
    font-size: 1.1rem;
    margin: 0.3em 0 0.4em;
    padding: 0;
    border: none;
}

.conf-goal p {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.conf-goal-num {
    font-family: var(--sans);
    font-size: 2rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
}

/* Agenda timeline */
.conf-agenda {
    --conf-axis: 55px;
    position: relative;
    padding-left: 0;
    margin: 1.5em 0 2em;
}

.conf-agenda::before {
    content: "";
    position: absolute;
    left: calc(var(--conf-axis) - 1px);
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), var(--teal));
    border-radius: 1px;
}

.conf-slot {
    display: flex;
    gap: 24px;
    position: relative;
    padding: 12px 0;
}

.conf-slot::before {
    content: "";
    position: absolute;
    left: var(--conf-axis);
    top: 25px;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--gold);
    transform: translate(-50%, -50%);
    z-index: 1;
}

.conf-time {
    flex: 0 0 44px;
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold);
    text-align: right;
    padding-top: 4px;
    letter-spacing: 0.02em;
}

.conf-detail {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px 20px;
    margin-left: 24px;
    font-family: var(--sans);
}

.conf-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--heading);
    margin-bottom: 4px;
}

.conf-detail .conf-speaker {
    font-size: 0.85rem;
    color: var(--teal);
    line-height: 1.5;
}

.conf-break .conf-detail {
    background: var(--warm);
    border-style: dashed;
    color: var(--gold);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.conf-break::before {
    border-color: var(--gold);
    background: var(--surface);
}

.conf-tool-note {
    text-align: center;
    font-family: var(--sans);
    font-size: 0.82rem;
    color: var(--muted);
    background: var(--warm);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 16px;
    margin: 0 0 2em;
}

/* Mobile adjustments for agenda timeline */
@media (max-width: 719px) {
    .conf-agenda {
        --conf-axis: 39px;
    }

    .conf-time {
        flex: 0 0 28px;
        font-size: 0.75rem;
    }

    .conf-detail {
        margin-left: 16px;
        padding: 12px 16px;
    }
}

/* ─── COMICS GALLERY ─── */
body.comics-page main {
    max-width: 1120px;
    padding-left: 20px;
    padding-right: 20px;
}

.comics-gallery {
    margin: 2em 0;
}

.comics-overview {
    text-align: center;
    max-width: calc((100% - 16px) / 2);
    margin: 0 auto 2.5em;
}

.comics-overview-link {
    display: block;
    text-decoration: none;
}

.comics-overview .figure-caption {
    margin-bottom: 0;
}

.comics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Markdown wraps each card in <p>; flatten so anchors are grid items */
.comics-grid > p {
    display: contents;
    margin: 0;
}

.comics-page-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.comics-page-link:hover,
.comics-page-link:focus-visible {
    border-color: var(--gold-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comics-cell > .comics-page-link {
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.comics-page-link img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    border: none;
}

.comics-page-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    text-align: center;
    background: var(--warm);
}

.comics-page-pack {
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.3;
}

.comics-page-type {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.comics-credit {
    margin-top: 2.5em;
    font-size: 0.9em;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 719px) {
    body.comics-page main {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 520px) {
    .comics-grid {
        grid-template-columns: 1fr;
    }

    .comics-overview {
        max-width: 100%;
    }
}

/* ─── JA COMICS OVERLAY ─── */
.comics-page-link,
.comics-overview-link {
    position: relative;
}

.ja-ov-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: var(--ov-ar, 1437 / 1999);
    container-type: inline-size;
    pointer-events: none;
    z-index: 3;
}

.ja-ov-layer .ov {
    position: absolute;
    box-sizing: border-box;
    overflow: visible;
    font-size: calc(var(--fs, 1cqw) * var(--ov-scale, 1));
}

.ja-ov-layer .ov.rect {
    display: flex;
    align-items: center;
    --ov-scale: 1;
}

.ja-ov-layer .ov.rect > span {
    display: block;
    width: 100%;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.ja-ov-layer .ov.shaped {
    --ov-scale: 1;
}

.ja-ov-layer .ov.shaped > .shaped-text {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.comics-cell {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.comics-cell:hover,
.comics-cell:focus-within {
    border-color: var(--gold-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media print {
    .ja-ov-layer,
    .comics-gallery .comics-page-label {
        display: none !important;
    }
}

/* ─── POLIS REPORT ─── */
.polis-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 1.5em 0 2em;
}

.polis-stat {
    background: var(--warm);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px 16px;
    text-align: center;
}

.polis-stat-num {
    font-family: var(--sans);
    font-size: 2rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.1;
}

.polis-stat-label {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.polis-statement {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px;
    margin: 12px 0;
}

.polis-statement-text {
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 12px;
    color: var(--text);
}

.polis-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
}

.polis-bar-agree {
    background: var(--teal);
}

.polis-bar-disagree {
    background: #c0392b;
}

.polis-bar-labels {
    display: flex;
    gap: 12px;
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 6px;
}

.polis-label-agree {
    color: var(--teal);
    font-weight: 600;
}

.polis-label-disagree {
    color: #c0392b;
    font-weight: 600;
}

.polis-consensus-badge {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
    border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.polis-group-bars {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.polis-group-bar {
    display: grid;
    gap: 4px;
}

.polis-group-bar .polis-bar {
    height: 6px;
}

.polis-group-name {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
}

.polis-group-pct {
    font-family: var(--sans);
    font-size: 0.75rem;
    color: var(--muted);
    text-align: right;
}

.polis-ga {
    color: var(--teal);
}
.polis-gb {
    color: var(--gold);
}
.polis-gc {
    color: var(--heading);
}

.polis-group {
    border-left: 3px solid;
    padding: 20px 24px;
    margin: 16px 0;
    background: var(--warm);
    border-radius: 0 4px 4px 0;
}

.polis-group h4 {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.polis-group-a {
    border-left-color: var(--teal);
}
.polis-group-b {
    border-left-color: var(--gold);
}
.polis-group-c {
    border-left-color: var(--heading);
}

.polis-group ul {
    font-size: 0.92rem;
    padding-left: 1em;
}

.polis-group li {
    margin: 0.3em 0;
    line-height: 1.5;
}

.polis-dot-plot {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 0 4px;
    border-radius: 8px;
}

.polis-beeswarm circle {
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.polis-beeswarm circle:hover {
    opacity: 1;
    filter: brightness(1.2);
}

.polis-source {
    text-align: center;
    margin: 2em 0;
    font-family: var(--sans);
    font-size: 0.85rem;
}

@media (max-width: 719px) {
    .polis-statement {
        padding: 16px;
    }

    .polis-group {
        padding: 16px 20px;
    }
}

/* ─── DARK MODE ─── */

:root[data-theme="dark"] {
    --paper: #111820;
    --warm: #161e28;
    --surface: #1c2535;
    --card: #161e28;
    --text: #b8b4ac;
    --muted: #8a96a8;
    --heading: #e8e4dc;
    --border: rgba(255, 255, 255, 0.1);
    --gold: #c9a961;
    --teal: #4bc3d4;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.4);
    --accent-teal: #4bc3d4;
    --accent-blue: #4bc3d4;
}

html[data-theme="dark"] main th {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}
html[data-theme="dark"] main td {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] main p:has(> strong:first-child) {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] h3 {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] hr {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .faq-filter {
    border-color: rgba(255, 255, 255, 0.08);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .faq-filter button:hover,
html[data-theme="dark"] .faq-filter button:focus-visible,
html[data-theme="dark"] .faq-filter button[aria-pressed="true"] {
    background: var(--teal);
    color: var(--ink);
}

html[data-theme="dark"] .polis-bar-disagree {
    background: #e74c3c;
}

html[data-theme="dark"] .polis-stat {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .polis-stat-num,
html[data-theme="dark"] .polis-stat__value {
    color: var(--heading);
}

html[data-theme="dark"] .polis-gc {
    color: var(--heading);
}

html[data-theme="dark"] .polis-consensus-badge {
    border-color: color-mix(in srgb, var(--teal) 40%, transparent);
}

html[data-theme="dark"] .polis-dot-plot circle[fill="#002147"] {
    fill: #7eb8d0;
}

html[data-theme="dark"] .polis-dot-plot text[fill="#002147"] {
    fill: #7eb8d0;
}

html[data-theme="dark"] .polis-dot-plot circle[stroke="#002147"] {
    stroke: #7eb8d0;
}

html[data-theme="dark"] .callout {
    background: #1a2636;
}

html[data-theme="dark"] .audio-section {
    background: #1a2636;
}

/* Polis care deliberation mirror */
.polis-fullbleed {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    padding: 0 16px 72px;
}

.polis-report {
    max-width: 1180px;
    margin: 0 auto;
    color: var(--text);
    font-family: var(--sans);
}

.polis-eyebrow,
.polis-section__kicker {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.polis-hero {
    margin-top: 8px;
    padding: 32px 0 24px;
}

.polis-hero__copy {
    padding: 36px;
    border: 1px solid color-mix(in srgb, var(--oxford-blue) 10%, transparent);
    border-radius: 28px;
    background:
        radial-gradient(
            circle at top left,
            rgba(42, 127, 138, 0.12),
            transparent 38%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(196, 97, 74, 0.13),
            transparent 28%
        ),
        linear-gradient(145deg, #fffdf9, #f3efe8);
    box-shadow: 0 18px 48px rgba(15, 25, 35, 0.08);
}

.polis-hero__copy h2 {
    margin: 0;
    color: var(--heading);
    font-family: var(--serif);
    font-size: clamp(2rem, 4.8vw, 3.7rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.polis-hero__dek,
.polis-section__heading p,
.polis-side-card p,
.polis-consensus-card p,
.polis-selection-list li,
.polis-method-list li {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.68;
}

.polis-hero__dek {
    max-width: 760px;
    margin: 18px 0 0;
}

.polis-hero__meta,
.polis-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 18px;
}

.polis-hero__meta span,
.polis-inline-meta span,
.polis-inline-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 25, 35, 0.07);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

.polis-pill-nav {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 22px;
    padding: 6px;
    border: 1px solid rgba(15, 25, 35, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 24px rgba(15, 25, 35, 0.08);
    backdrop-filter: blur(14px);
}

.polis-pill-nav a {
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.polis-pill-nav a:hover,
.polis-pill-nav a:focus-visible,
.polis-pill-nav a.is-active {
    background: var(--oxford-blue);
    color: #fff;
    transform: translateY(-1px);
}

.polis-pill-nav a:focus-visible,
.polis-statement-card:focus-visible,
.polis-participant-card:focus-visible,
.polis-point:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.polis-stats-grid,
.polis-consensus-grid,
.polis-two-up,
.polis-method-grid {
    display: grid;
    gap: 18px;
}

.polis-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
}

.polis-stats-grid .polis-stat {
    padding: 18px 16px;
    border: 1px solid rgba(15, 25, 35, 0.06);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 26px rgba(15, 25, 35, 0.05);
}

.polis-stat__value {
    margin: 0;
    color: var(--heading);
    font-family: var(--serif);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1;
}

.polis-stat__label {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.polis-consensus-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
    align-items: start;
    margin-bottom: 32px;
}

.polis-consensus-card,
.polis-side-card,
.polis-visual-card,
.polis-error-card {
    border: 1px solid rgba(15, 25, 35, 0.07);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 20px 46px rgba(15, 25, 35, 0.07);
}

.polis-consensus-card {
    padding: 28px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.9),
            rgba(255, 250, 244, 0.92)
        ),
        radial-gradient(
            circle at top right,
            rgba(196, 97, 74, 0.11),
            transparent 32%
        );
}

.polis-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.polis-consensus-card h3,
.polis-detail-panel h3,
.polis-selection-list h3,
.polis-section__heading h2 {
    margin: 0;
    color: var(--heading);
    font-family: var(--serif);
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.polis-consensus-card h3,
.polis-detail-panel h3 {
    font-size: clamp(1.45rem, 2.8vw, 2.2rem);
}

.polis-section {
    margin-top: 34px;
    padding-top: 16px;
}

.polis-section__heading {
    max-width: 720px;
    margin-bottom: 18px;
}

.polis-section__heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.polis-side-stack {
    display: grid;
    gap: 14px;
}

.polis-side-card {
    padding: 20px 22px;
}

.polis-side-card__kicker {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.polis-side-card__note {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.polis-badge,
.polis-rank-chip,
.polis-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.polis-badge {
    padding: 7px 12px;
    background: rgba(42, 127, 138, 0.1);
    color: var(--teal);
}

.polis-badge--warm {
    background: rgba(196, 97, 74, 0.12);
    color: #9d442f;
}

.polis-rank-chip {
    min-width: 2.2rem;
    justify-content: center;
    padding: 8px 12px;
    background: var(--oxford-blue);
    color: #fff;
}

.polis-status-pill {
    margin: 0 0 10px;
    padding: 9px 14px;
    background: color-mix(in srgb, var(--status-color) 12%, white);
    color: var(--status-color);
}

.polis-metric-pair {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 18px;
}

.polis-metric-pair div {
    padding: 14px 16px;
    border: 1px solid rgba(15, 25, 35, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.polis-metric-pair span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.polis-metric-pair strong {
    display: block;
    margin-top: 5px;
    color: var(--heading);
    font-size: 1.25rem;
}

.polis-group-bars {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.polis-group-bar__label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.polis-group-bar__label strong {
    margin-left: auto;
    color: var(--heading);
}

.polis-group-bar__track,
.polis-mini-bars {
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 25, 35, 0.06);
}

.polis-group-bar__track {
    height: 11px;
}

.polis-group-bar__fill,
.polis-mini-bars__segment {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.polis-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.polis-dot--large {
    width: 13px;
    height: 13px;
}

.polis-history-list,
.polis-method-list,
.polis-link-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.polis-history-list {
    display: grid;
    gap: 12px;
}

.polis-history-list li {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.polis-history-list__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 16px;
    background: rgba(15, 25, 35, 0.05);
    color: var(--heading);
    font-size: 0.8rem;
    font-weight: 700;
}

.polis-history-list strong,
.polis-selection-list strong {
    color: var(--heading);
}

.polis-history-list p,
.polis-selection-list li {
    margin: 4px 0 0;
}

.polis-history-list span:last-child {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.8rem;
}

.polis-two-up {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
}

.polis-card-column {
    display: grid;
    gap: 14px;
}

.polis-card-column--participants {
    column-count: 2;
    column-gap: 14px;
    display: block;
}

.polis-statement-card,
.polis-participant-card {
    width: 100%;
    padding: 18px 18px 16px;
    border: 1px solid rgba(15, 25, 35, 0.06);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(15, 25, 35, 0.05);
    cursor: pointer;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background-color 0.22s ease;
}

.polis-participant-card {
    display: inline-block;
    margin: 0 0 14px;
    break-inside: avoid;
}

.polis-statement-card:hover,
.polis-participant-card:hover,
.polis-statement-card.is-selected,
.polis-participant-card.is-selected {
    transform: translateY(-2px);
    border-color: rgba(42, 127, 138, 0.2);
    box-shadow: 0 18px 34px rgba(15, 25, 35, 0.08);
}

.polis-statement-card.is-selected,
.polis-participant-card.is-selected {
    border-color: rgba(196, 97, 74, 0.22);
}

.polis-statement-card__body,
.polis-selection-list ul,
.polis-participant-card__list p {
    margin: 0;
}

.polis-statement-card__body,
.polis-participant-card__list p,
.polis-participant-card__list span {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.58;
}

.polis-card__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.polis-mini-bars {
    display: flex;
    gap: 2px;
    height: 10px;
    margin-top: 14px;
}

.polis-mini-bars__segment {
    min-width: 0;
}

.polis-sticky-visual {
    position: sticky;
    top: 84px;
}

.polis-visual-card {
    padding: 18px;
}

.polis-plot {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 16px;
    border: 1px solid rgba(15, 25, 35, 0.06);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at top left,
            rgba(42, 127, 138, 0.08),
            transparent 32%
        ),
        linear-gradient(180deg, #fffaf6, #f4efe7);
}

.polis-point {
    cursor: pointer;
}

.polis-point circle,
.polis-point text {
    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        stroke 0.2s ease;
}

.polis-point:hover circle:last-of-type,
.polis-point.is-selected circle:last-of-type {
    stroke: rgba(15, 25, 35, 0.8);
    stroke-width: 2px;
}

.polis-detail-panels {
    min-height: 290px;
}

.polis-detail-panel {
    display: none;
}

.polis-detail-panel.is-selected {
    display: block;
}

.polis-participant-card__identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.polis-vote-strip {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    gap: 4px;
    margin: 14px 0 12px;
}

.polis-vote-strip__cell {
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 25, 35, 0.08);
}

.polis-vote-strip__cell--agree {
    background: rgba(42, 127, 138, 0.72);
}

.polis-vote-strip__cell--pass {
    background: rgba(184, 134, 11, 0.46);
}

.polis-vote-strip__cell--disagree {
    background: rgba(196, 97, 74, 0.7);
}

.polis-participant-card__list {
    display: grid;
    gap: 4px;
    margin-top: 10px;
}

.polis-participant-card__list span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.polis-cluster-ribbon {
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(15, 25, 35, 0.06);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 30px rgba(15, 25, 35, 0.06);
}

.polis-cluster-ribbon p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.polis-cluster-ribbon__bar {
    display: flex;
    overflow: hidden;
    height: 18px;
    border-radius: 999px;
    background: rgba(15, 25, 35, 0.05);
}

.polis-cluster-ribbon__segment {
    height: 100%;
}

.polis-cluster-ribbon__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.84rem;
}

.polis-cluster-ribbon__legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.polis-selection-list {
    margin-top: 14px;
}

.polis-selection-list h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.polis-selection-list ul {
    padding-left: 18px;
}

.polis-selection-list li + li {
    margin-top: 8px;
}

.polis-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.polis-link-list li + li,
.polis-method-list li + li {
    margin-top: 8px;
}

.polis-link-list a {
    font-weight: 600;
}

.polis-error-card {
    max-width: 720px;
    margin: 24px auto 0;
    padding: 32px;
}

@media (max-width: 1080px) {
    .polis-consensus-grid,
    .polis-two-up,
    .polis-method-grid {
        grid-template-columns: 1fr;
    }

    .polis-sticky-visual {
        position: static;
    }

    .polis-card-column--participants {
        column-count: 1;
    }
}

@media (max-width: 820px) {
    .polis-stats-grid,
    .polis-metric-pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .polis-hero__copy {
        padding: 26px 22px;
    }
}

@media (max-width: 640px) {
    .polis-fullbleed {
        padding: 0 12px 56px;
    }

    .polis-pill-nav {
        top: 8px;
        width: 100%;
        justify-content: center;
    }

    .polis-pill-nav a {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .polis-stats-grid,
    .polis-metric-pair,
    .polis-method-grid {
        grid-template-columns: 1fr;
    }

    .polis-consensus-card,
    .polis-side-card,
    .polis-visual-card {
        padding: 18px;
        border-radius: 22px;
    }

    .polis-card__header {
        flex-wrap: wrap;
    }

    .polis-vote-strip {
        gap: 3px;
    }
}

/* ─── POLIS DELIBERATION MIRROR — DARK MODE ─── */

html[data-theme="dark"] .polis-hero__copy {
    background:
        radial-gradient(
            circle at top left,
            rgba(42, 127, 138, 0.15),
            transparent 38%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(196, 97, 74, 0.1),
            transparent 28%
        ),
        linear-gradient(145deg, var(--surface), var(--warm));
    border-color: var(--border);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .polis-hero__meta span,
html[data-theme="dark"] .polis-inline-meta span,
html[data-theme="dark"] .polis-inline-tag {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .polis-pill-nav {
    background: rgba(28, 37, 53, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .polis-pill-nav a {
    color: var(--muted);
}

html[data-theme="dark"] .polis-pill-nav a:hover,
html[data-theme="dark"] .polis-pill-nav a:focus-visible,
html[data-theme="dark"] .polis-pill-nav a.is-active {
    background: var(--teal);
    color: #fff;
}

html[data-theme="dark"] .polis-consensus-card,
html[data-theme="dark"] .polis-side-card,
html[data-theme="dark"] .polis-visual-card,
html[data-theme="dark"] .polis-error-card {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .polis-consensus-card {
    background:
        linear-gradient(180deg, var(--surface), var(--warm)),
        radial-gradient(
            circle at top right,
            rgba(196, 97, 74, 0.08),
            transparent 32%
        );
}

html[data-theme="dark"] .polis-statement-card,
html[data-theme="dark"] .polis-participant-card {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .polis-statement-card:hover,
html[data-theme="dark"] .polis-participant-card:hover {
    border-color: rgba(75, 195, 212, 0.25);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .polis-metric-pair div {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

html[data-theme="dark"] .polis-group-bar__track,
html[data-theme="dark"] .polis-mini-bars {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .polis-cluster-ribbon {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .polis-cluster-ribbon__bar {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .polis-history-list__count {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .polis-badge {
    background: rgba(75, 195, 212, 0.12);
}

html[data-theme="dark"] .polis-badge--warm {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

html[data-theme="dark"] .polis-plot {
    background:
        radial-gradient(
            circle at top left,
            rgba(75, 195, 212, 0.06),
            transparent 32%
        ),
        linear-gradient(180deg, var(--surface), var(--warm));
    border-color: var(--border);
}

html[data-theme="dark"] .polis-vote-strip__cell {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .polis-vote-strip__cell--agree {
    background: rgba(75, 195, 212, 0.65);
}

html[data-theme="dark"] .polis-vote-strip__cell--pass {
    background: rgba(201, 169, 97, 0.4);
}

html[data-theme="dark"] .polis-vote-strip__cell--disagree {
    background: rgba(231, 76, 60, 0.6);
}

html[data-theme="dark"] .polis-stats-grid .polis-stat {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .polis-status-pill {
    background: color-mix(in srgb, var(--status-color) 15%, var(--surface));
}

/* Inline code + terminal-style copy-box for command blocks */
:not(pre) > code {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
        monospace;
    font-size: 0.86em;
    background: color-mix(in srgb, var(--muted) 16%, transparent);
    padding: 0.12em 0.36em;
    border-radius: 4px;
}

.code-block {
    position: relative;
}

pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin: 1.1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

pre code {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
        monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text);
    background: none;
    padding: 0;
    white-space: pre;
}

.copy-btn {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
    font-size: 0.68rem;
    line-height: 1;
    padding: 0.3em 0.6em;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition:
        opacity 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.copy-btn:hover,
.copy-btn:focus-visible {
    opacity: 1;
    color: var(--teal);
    border-color: var(--teal);
}

.copy-btn.copied {
    opacity: 1;
    color: var(--teal);
    border-color: var(--teal);
}

/* Agent bootstrap directive: fine print tucked under the hero; present and machine-readable */
.agent-note {
    text-align: center;
    font-size: 0.6rem;
    line-height: 1.4;
    color: var(--muted);
    opacity: 0.4;
    margin: 0.55rem auto 0;
    padding: 0 1rem;
}

.agent-note a {
    color: inherit;
    text-decoration: underline;
}

/* ─── IN-SHORT SUMMARY CARD ─── */
.in-short {
    margin: 0 0 2em;
    padding: 18px 22px;
    background: var(--warm);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 0 4px 4px 0;
}
.in-short__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: baseline;
    margin: 0 0 0.5em;
}
.in-short__label {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}
.in-short__time {
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--muted);
}
.in-short__body {
    margin: 0;
    font-family: var(--sans);
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text);
}
/* Native heading resets for compact card labels */
.in-short__label,
.in-short__takeaways-label {
    padding: 0;
    border: 0;
}
.in-short__label {
    margin: 0;
}

:lang(zh) .in-short__label {
    letter-spacing: 0.04em;
}

.in-short :is(h2, h3)[id] {
    scroll-margin-top: 24px;
}
.in-short__takeaways {
    margin: 0.9rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}
.in-short__takeaways-label {
    margin: 0 0 0.45rem;
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.in-short__takeaways-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding-left: 1.1em;
    font-family: var(--sans);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
}
.in-short__takeaways-list li {
    margin: 0;
    padding-left: 0.1em;
}
.in-short__takeaways-list li::marker {
    color: var(--gold);
}
:lang(zh) .in-short__takeaways-label {
    letter-spacing: 0.04em;
}

h2[id],
h4[id] {
    scroll-margin-top: 24px;
}

/* ─── ON-THIS-PAGE CONTENTS ─── */
.page-toc {
    margin: 0 0 2.2em;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--sans);
}
.page-toc > summary {
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}
:lang(zh) .page-toc > summary {
    letter-spacing: 0.04em;
}
.page-toc ul {
    margin: 0.8em 0 0.2em;
    padding-left: 1.1em;
    list-style: none;
}
.page-toc li {
    margin: 0.25em 0;
    line-height: 1.4;
}
.page-toc__h3 {
    padding-left: 0.8em;
}
.page-toc__h4 {
    padding-left: 1.6em;
}
.page-toc a {
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.page-toc a:hover {
    color: var(--gold);
}
@media print {
    .page-toc {
        display: none;
    }
}

/* ─── READING PATHS ─── */
.reading-paths {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0.8em 0 1.5em;
}
/* Markdown can inject a stray empty <p> as the first grid child; keep it out
   of the grid so the three cards stay in one clean row. */
.reading-paths > p {
    display: none;
}
@media (max-width: 560px) {
    .reading-paths {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 1080px) {
    .reading-paths {
        width: 820px;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
}
.reading-path {
    background: var(--warm);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px 18px;
}
.reading-path__title {
    font-family: var(--sans);
    font-size: 0.95rem;
    margin: 0 0 0.5em;
    padding: 0;
    border: none;
    color: var(--heading);
}
.reading-path__steps {
    margin: 0;
    padding-left: 1.2em;
    font-size: 0.9rem;
}
.reading-path__steps li {
    margin: 0.3em 0;
    line-height: 1.5;
}

/* ─── CSS-ONLY LQIP (leanrada.com/notes/css-only-lqip/) ─── */
.lqip {
    --lqip-ca: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 18))),
        4
    );
    --lqip-cb: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 16))),
        4
    );
    --lqip-cc: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 14))),
        4
    );
    --lqip-cd: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 12))),
        4
    );
    --lqip-ce: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 10))),
        4
    );
    --lqip-cf: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 8))),
        4
    );
    --lqip-ll: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 6))),
        4
    );
    --lqip-aaa: mod(
        round(down, calc((var(--lqip) + pow(2, 19)) / pow(2, 3))),
        8
    );
    --lqip-bbb: mod(calc(var(--lqip) + pow(2, 19)), 8);
    --lqip-ca-clr: hsl(0 0% calc(var(--lqip-ca) / 3 * 60% + 20%));
    --lqip-cb-clr: hsl(0 0% calc(var(--lqip-cb) / 3 * 60% + 20%));
    --lqip-cc-clr: hsl(0 0% calc(var(--lqip-cc) / 3 * 60% + 20%));
    --lqip-cd-clr: hsl(0 0% calc(var(--lqip-cd) / 3 * 60% + 20%));
    --lqip-ce-clr: hsl(0 0% calc(var(--lqip-ce) / 3 * 60% + 20%));
    --lqip-cf-clr: hsl(0 0% calc(var(--lqip-cf) / 3 * 60% + 20%));
    --lqip-base-clr: oklab(
        calc(var(--lqip-ll) / 3 * 0.6 + 0.2)
            calc(var(--lqip-aaa) / 8 * 0.7 - 0.35)
            calc((var(--lqip-bbb) + 1) / 8 * 0.7 - 0.35)
    );
    --lqip-s10: 2%;
    --lqip-s20: 8%;
    --lqip-s30: 18%;
    --lqip-s40: 32%;
    background-blend-mode:
        hard-light, hard-light, hard-light, hard-light, hard-light, hard-light,
        normal;
    background-image:
        radial-gradient(
            50% 75% at 16.67% 25%,
            var(--lqip-ca-clr),
            rgb(from var(--lqip-ca-clr) r g b / calc(100% - var(--lqip-s10)))
                10%,
            rgb(from var(--lqip-ca-clr) r g b / calc(100% - var(--lqip-s20)))
                20%,
            rgb(from var(--lqip-ca-clr) r g b / calc(100% - var(--lqip-s30)))
                30%,
            rgb(from var(--lqip-ca-clr) r g b / calc(100% - var(--lqip-s40)))
                40%,
            rgb(from var(--lqip-ca-clr) r g b / calc(var(--lqip-s40))) 60%,
            rgb(from var(--lqip-ca-clr) r g b / calc(var(--lqip-s30))) 70%,
            rgb(from var(--lqip-ca-clr) r g b / calc(var(--lqip-s20))) 80%,
            rgb(from var(--lqip-ca-clr) r g b / calc(var(--lqip-s10))) 90%,
            transparent
        ),
        radial-gradient(
            50% 75% at 50% 25%,
            var(--lqip-cb-clr),
            rgb(from var(--lqip-cb-clr) r g b / calc(100% - var(--lqip-s10)))
                10%,
            rgb(from var(--lqip-cb-clr) r g b / calc(100% - var(--lqip-s20)))
                20%,
            rgb(from var(--lqip-cb-clr) r g b / calc(100% - var(--lqip-s30)))
                30%,
            rgb(from var(--lqip-cb-clr) r g b / calc(100% - var(--lqip-s40)))
                40%,
            rgb(from var(--lqip-cb-clr) r g b / calc(var(--lqip-s40))) 60%,
            rgb(from var(--lqip-cb-clr) r g b / calc(var(--lqip-s30))) 70%,
            rgb(from var(--lqip-cb-clr) r g b / calc(var(--lqip-s20))) 80%,
            rgb(from var(--lqip-cb-clr) r g b / calc(var(--lqip-s10))) 90%,
            transparent
        ),
        radial-gradient(
            50% 75% at 83.33% 25%,
            var(--lqip-cc-clr),
            rgb(from var(--lqip-cc-clr) r g b / calc(100% - var(--lqip-s10)))
                10%,
            rgb(from var(--lqip-cc-clr) r g b / calc(100% - var(--lqip-s20)))
                20%,
            rgb(from var(--lqip-cc-clr) r g b / calc(100% - var(--lqip-s30)))
                30%,
            rgb(from var(--lqip-cc-clr) r g b / calc(100% - var(--lqip-s40)))
                40%,
            rgb(from var(--lqip-cc-clr) r g b / calc(var(--lqip-s40))) 60%,
            rgb(from var(--lqip-cc-clr) r g b / calc(var(--lqip-s30))) 70%,
            rgb(from var(--lqip-cc-clr) r g b / calc(var(--lqip-s20))) 80%,
            rgb(from var(--lqip-cc-clr) r g b / calc(var(--lqip-s10))) 90%,
            transparent
        ),
        radial-gradient(
            50% 75% at 16.67% 75%,
            var(--lqip-cd-clr),
            rgb(from var(--lqip-cd-clr) r g b / calc(100% - var(--lqip-s10)))
                10%,
            rgb(from var(--lqip-cd-clr) r g b / calc(100% - var(--lqip-s20)))
                20%,
            rgb(from var(--lqip-cd-clr) r g b / calc(100% - var(--lqip-s30)))
                30%,
            rgb(from var(--lqip-cd-clr) r g b / calc(100% - var(--lqip-s40)))
                40%,
            rgb(from var(--lqip-cd-clr) r g b / calc(var(--lqip-s40))) 60%,
            rgb(from var(--lqip-cd-clr) r g b / calc(var(--lqip-s30))) 70%,
            rgb(from var(--lqip-cd-clr) r g b / calc(var(--lqip-s20))) 80%,
            rgb(from var(--lqip-cd-clr) r g b / calc(var(--lqip-s10))) 90%,
            transparent
        ),
        radial-gradient(
            50% 75% at 50% 75%,
            var(--lqip-ce-clr),
            rgb(from var(--lqip-ce-clr) r g b / calc(100% - var(--lqip-s10)))
                10%,
            rgb(from var(--lqip-ce-clr) r g b / calc(100% - var(--lqip-s20)))
                20%,
            rgb(from var(--lqip-ce-clr) r g b / calc(100% - var(--lqip-s30)))
                30%,
            rgb(from var(--lqip-ce-clr) r g b / calc(100% - var(--lqip-s40)))
                40%,
            rgb(from var(--lqip-ce-clr) r g b / calc(var(--lqip-s40))) 60%,
            rgb(from var(--lqip-ce-clr) r g b / calc(var(--lqip-s30))) 70%,
            rgb(from var(--lqip-ce-clr) r g b / calc(var(--lqip-s20))) 80%,
            rgb(from var(--lqip-ce-clr) r g b / calc(var(--lqip-s10))) 90%,
            transparent
        ),
        radial-gradient(
            50% 75% at 83.33% 75%,
            var(--lqip-cf-clr),
            rgb(from var(--lqip-cf-clr) r g b / calc(100% - var(--lqip-s10)))
                10%,
            rgb(from var(--lqip-cf-clr) r g b / calc(100% - var(--lqip-s20)))
                20%,
            rgb(from var(--lqip-cf-clr) r g b / calc(100% - var(--lqip-s30)))
                30%,
            rgb(from var(--lqip-cf-clr) r g b / calc(100% - var(--lqip-s40)))
                40%,
            rgb(from var(--lqip-cf-clr) r g b / calc(var(--lqip-s40))) 60%,
            rgb(from var(--lqip-cf-clr) r g b / calc(var(--lqip-s30))) 70%,
            rgb(from var(--lqip-cf-clr) r g b / calc(var(--lqip-s20))) 80%,
            rgb(from var(--lqip-cf-clr) r g b / calc(var(--lqip-s10))) 90%,
            transparent
        ),
        linear-gradient(var(--lqip-base-clr), var(--lqip-base-clr));
}

/* ─── GLOSSARY LIST ─── */
.glossary-list {
    margin: 1.5em 0;
}
.glossary-list dt {
    font-family: var(--sans);
    font-weight: 600;
    color: var(--heading);
    margin-top: 1.3em;
    scroll-margin-top: 24px;
}
.glossary-list dd {
    margin: 0.3em 0 0;
    padding-left: 0;
    line-height: 1.6;
}

/* ─── CONCEPT MAP · THE DAY WHEEL ───
   Build-time sundial + station manifest rendered by src/lib/conceptMap.ts
   from _data/concept_map.json. Zero client JS; everything below is
   progressive enhancement over plain readable HTML. */

.cmap {
    --cmap-p6: #a753f6;
    margin-block: 1.5rem;
}

.cmap
    :is(
        .cmap-station,
        .cmap-chip,
        .cmap-field-chip,
        .cmap-badge,
        .cmap-frame-title
    ) {
    --ink: var(--ink-l);
}

html[data-theme="dark"]
    .cmap
    :is(
        .cmap-station,
        .cmap-chip,
        .cmap-field-chip,
        .cmap-badge,
        .cmap-frame-title
    ) {
    --ink: var(--ink-d);
}

html[data-theme="dark"] .cmap {
    --cmap-p6: #a753f6;
}

/* ── the membrane frame: Pack 6 drawn as what it is ── */

.cmap-frame {
    position: relative;
    border: 2px solid var(--cmap-p6);
    border-radius: 12px;
    padding: 1.1rem 1.1rem 0.9rem;
}

.cmap-frame-title {
    display: inline-block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    background: var(--paper);
    padding-inline: 0.55em;
}

.cmap-frame-title:hover {
    text-decoration: underline;
}

.cmap-frame-chips {
    list-style: none;
    margin: 0.6rem 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}

.cmap-frame-chip {
    display: flex;
    align-items: baseline;
    gap: 0.45em;
    font-size: 0.78rem;
    color: var(--text);
    background: var(--paper);
    padding-inline: 0.45em;
}

.cmap-frame-glyph {
    color: var(--cmap-p6);
    font-weight: 700;
}

.cmap-frame-chip--measure a {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: var(--text);
    text-decoration: none;
}

.cmap-frame-chip--measure a:hover {
    text-decoration: underline;
}

/* ── dial + walk ── */

.cmap-dial {
    margin: 0 auto;
    max-width: 440px;
}

.cmap-dial-frame {
    position: relative;
}

.cmap-dial-svg {
    display: block;
    width: 100%;
    height: auto;
}

.cmap-rim {
    fill: none;
    stroke: var(--cmap-p6);
    stroke-width: 2.5;
}

.cmap-horizon {
    stroke: var(--border);
    stroke-width: 1.5;
    stroke-dasharray: 2 7;
}

.cmap-night {
    fill: none;
    stroke: var(--muted);
    stroke-width: 2.5;
    stroke-dasharray: 3 8;
    opacity: 0.75;
}

.cmap-arc {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
    opacity: 0.92;
}

.cmap-cycle-arrow,
.cmap-night-arrow {
    fill: var(--muted);
}

.cmap-chord {
    stroke: var(--muted);
    stroke-width: 2;
    opacity: 0;
}

.cmap-chord--dashed {
    stroke-dasharray: 4 5;
}

.cmap-chip {
    position: absolute;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--hue);
    border-radius: 999px;
    padding: 0.28em 0.7em;
    text-decoration: none;
    white-space: nowrap;
}

.cmap-field-dock {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.cmap-field-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--hue);
    border-radius: 999px;
    padding: 0.28em 0.7em;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.cmap-field-note {
    margin: 0;
    max-width: 13rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.cmap-chip:hover,
.cmap-field-chip:hover {
    background: color-mix(in srgb, var(--hue) 12%, var(--surface));
}

/* ── stations: the readable manifest ── */

.cmap-zone {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    border: 0;
    margin: 1.5rem 0 0.6rem;
    padding: 0;
}

.cmap-walk > .cmap-zone:first-child {
    margin-top: 0;
}

.cmap-station {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--hue);
    border-radius: 6px;
    padding: 0.85rem 1.05rem 0.95rem;
    scroll-margin-top: 5rem;
}

.cmap-phase {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}

.cmap-station-title {
    margin: 0.15rem 0 0.35rem;
    font-family: var(--serif);
    font-size: 1.18rem;
    border: 0;
    padding: 0;
}

.cmap-station-title a {
    color: var(--heading);
    text-decoration: none;
}

.cmap-station-title a:hover {
    text-decoration: underline;
}

.cmap-measure {
    margin: 0;
}

.cmap-measure a {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--text);
    text-decoration: none;
}

.cmap-measure a:hover {
    text-decoration: underline;
}

.cmap-measure-tag {
    display: inline-block;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 0.5em;
    margin-right: 0.55em;
}

.cmap-sends {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.cmap-send {
    display: flex;
    align-items: baseline;
    gap: 0.55em;
    font-size: 0.85rem;
    color: var(--text);
}

.cmap-badge {
    flex: none;
    display: inline-block;
    color: var(--ink);
    font-size: 1.35em;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.cmap-badge-glyph {
    display: inline-block;
    color: var(--ink);
}

.cmap-badge:hover {
    background: color-mix(in srgb, var(--hue) 12%, transparent);
}

.cmap-send--dashed .cmap-badge {
    border: 1.5px dashed var(--ink);
    border-radius: 999px;
    padding: 0.06em;
}

.cmap-hand {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    margin: 0.6rem 0 0.85rem;
    padding-left: 1.05rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.cmap-hand-glyph {
    font-weight: 700;
}

.cmap-hand--night {
    border-block: 1px dashed var(--border);
    padding-block: 0.5rem;
}

.cmap-loop {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.cmap-guard {
    margin: 1.3rem 0 0.8rem;
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--muted);
}

.cmap-legend {
    margin: 0.9rem auto 0;
    max-width: 680px;
    text-align: center;
    font-size: 0.8rem;
}

.cmap-legend a {
    color: var(--muted);
}

.cmap-legend a:hover {
    color: var(--heading);
}

/* ── mobile: walking the day (dawn→sunset rail) ── */

@media (max-width: 719px) {
    .cmap-walk {
        position: relative;
        padding-left: 14px;
    }

    .cmap-walk::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        border-radius: 2px;
        background: linear-gradient(
            180deg,
            #eb573a 0%,
            #f09344 24%,
            #f9dd55 46%,
            #7cc967 64%,
            #6197f8 84%,
            #a753f6 100%
        );
    }

    .cmap-dial {
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 479px) {
    .cmap-chip--cycle {
        padding: 0.3em 0.55em;
    }

    .cmap-chip--cycle .cmap-chip-name {
        font-size: 0;
    }

    .cmap-chip--cycle .cmap-chip-name::before {
        content: attr(data-short);
        font-size: 0.72rem;
    }
}

/* ── desktop: sticky dial beside the walk, full-bleed frame ── */

@media (min-width: 720px) {
    .cmap {
        margin-inline: calc(50% - 50vw);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-inline: 24px;
    }

    .cmap-frame {
        width: min(100%, 1120px);
        padding: 0 2rem 1.2rem;
    }

    .cmap-frame-title {
        position: absolute;
        top: 0;
        left: 1.6rem;
        transform: translateY(-50%);
    }

    .cmap-body {
        display: grid;
        grid-template-columns: minmax(260px, 34%) 1fr;
        gap: 1.6rem 2.2rem;
        align-items: start;
        margin-top: 1.4rem;
    }

    .cmap-dial {
        position: sticky;
        top: 1.5rem;
        max-width: none;
    }

    .cmap-guard {
        margin-bottom: 1.1rem;
    }
}

/* frame chips straddle the border only when there is room for one row */
@media (min-width: 1000px) {
    .cmap-frame-chips {
        position: absolute;
        left: 0;
        right: 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem 1.2rem;
        padding-inline: 2rem;
        pointer-events: none;
    }

    .cmap-frame-chips a {
        pointer-events: auto;
    }

    .cmap-frame-chips--top {
        top: 0;
        transform: translateY(-50%);
        padding-left: 18rem;
    }

    .cmap-frame-chips--bottom {
        bottom: 0;
        transform: translateY(50%);
        justify-content: space-between;
        padding-right: 3rem;
    }

    .cmap-frame-chip {
        pointer-events: auto;
    }
}

/* ── hover/focus illumination: ask a pack what it sends ── */

.cmap:has(#st-p1:is(:hover, :focus-within)) .cmap-arc-1,
.cmap:has(.cmap-chip-1:is(:hover, :focus-visible)) .cmap-arc-1,
.cmap:has(#st-p2:is(:hover, :focus-within)) .cmap-arc-2,
.cmap:has(.cmap-chip-2:is(:hover, :focus-visible)) .cmap-arc-2,
.cmap:has(#st-p3:is(:hover, :focus-within)) .cmap-arc-3,
.cmap:has(.cmap-chip-3:is(:hover, :focus-visible)) .cmap-arc-3,
.cmap:has(#st-p4:is(:hover, :focus-within)) .cmap-arc-4,
.cmap:has(.cmap-chip-4:is(:hover, :focus-visible)) .cmap-arc-4,
.cmap:has(#st-p5:is(:hover, :focus-within)) .cmap-arc-5,
.cmap:has(.cmap-chip-5:is(:hover, :focus-visible)) .cmap-arc-5 {
    stroke-width: 20;
    opacity: 1;
}

.cmap:has(.cmap-chip-1:is(:hover, :focus-visible)) .cmap-chord-1-3,
.cmap:has(.cmap-chip-3:is(:hover, :focus-visible)) .cmap-chord-1-3,
.cmap:has(#st-p1:is(:hover, :focus-within)) .cmap-chord-1-3,
.cmap:has(#st-p3:is(:hover, :focus-within)) .cmap-chord-1-3,
.cmap:has(.cmap-chip-2:is(:hover, :focus-visible)) .cmap-chord-2-4,
.cmap:has(.cmap-chip-4:is(:hover, :focus-visible)) .cmap-chord-2-4,
.cmap:has(#st-p2:is(:hover, :focus-within)) .cmap-chord-2-4,
.cmap:has(#st-p4:is(:hover, :focus-within)) .cmap-chord-2-4 {
    opacity: 0.9;
}

.cmap:has(.cmap-chip-1:is(:hover, :focus-visible)) #st-p1,
.cmap:has(.cmap-chip-2:is(:hover, :focus-visible)) #st-p2,
.cmap:has(.cmap-chip-3:is(:hover, :focus-visible)) #st-p3,
.cmap:has(.cmap-chip-4:is(:hover, :focus-visible)) #st-p4,
.cmap:has(.cmap-chip-5:is(:hover, :focus-visible)) #st-p5 {
    border-color: var(--hue);
    box-shadow: var(--shadow);
}

/* keyboard fallback: entering the dial by Tab wakes it, independent of
   engines whose :has(:focus…) invalidation skips SVG-internal targets */
.cmap-dial-frame:focus-within .cmap-chord {
    opacity: 0.55;
}

.cmap-dial-frame:focus-within .cmap-arc {
    opacity: 1;
}

/* ── dark scheme: lantern-tuned strokes ── */

html[data-theme="dark"] .cmap-arc-1 {
    stroke: #eb573a;
}

html[data-theme="dark"] .cmap-arc-2 {
    stroke: #f09344;
}

html[data-theme="dark"] .cmap-arc-3 {
    stroke: #f9dd55;
}

html[data-theme="dark"] .cmap-arc-4 {
    stroke: #7cc967;
}

html[data-theme="dark"] .cmap-arc-5 {
    stroke: #6197f8;
}

/* ── motion: only ever confirms something the reader did ── */

@media (prefers-reduced-motion: no-preference) {
    .cmap-arc {
        transition:
            stroke-width 0.2s ease,
            opacity 0.2s ease;
    }

    .cmap-chord {
        transition: opacity 0.2s ease;
    }

    .cmap-dial {
        view-transition-name: cmap-dial;
    }

    .cmap-frame {
        view-transition-name: cmap-frame;
    }

    /* the compass fills as you walk the day (Chromium+; others keep the
       fully lit dial) */
    @media (min-width: 720px) {
        @supports (animation-timeline: view()) {
            .cmap {
                timeline-scope: --st1, --st2, --st3, --st4, --st5;
            }

            #st-p1 {
                view-timeline-name: --st1;
            }

            #st-p2 {
                view-timeline-name: --st2;
            }

            #st-p3 {
                view-timeline-name: --st3;
            }

            #st-p4 {
                view-timeline-name: --st4;
            }

            #st-p5 {
                view-timeline-name: --st5;
            }

            .cmap-arc {
                stroke-dasharray: 100;
                stroke-dashoffset: 100;
                animation: cmap-fill linear both;
                animation-range: entry 0% cover 45%;
            }

            .cmap-arc-1 {
                animation-timeline: --st1;
            }

            .cmap-arc-2 {
                animation-timeline: --st2;
            }

            .cmap-arc-3 {
                animation-timeline: --st3;
            }

            .cmap-arc-4 {
                animation-timeline: --st4;
            }

            .cmap-arc-5 {
                animation-timeline: --st5;
            }
        }
    }
}

@keyframes cmap-fill {
    to {
        stroke-dashoffset: 0;
    }
}

/* ─── SEARCH OVERLAY ─── */
:root {
    --pagefind-ui-primary: var(--teal);
    --pagefind-ui-text: var(--text);
    --pagefind-ui-background: var(--surface);
    --pagefind-ui-border: var(--border);
    --pagefind-ui-tag: var(--warm);
    --pagefind-ui-font: var(--sans);
}

.search-toggle {
    display: inline-grid;
    place-items: center;
    min-width: 2.35rem;
    min-height: 2.1rem;
    color: currentColor;
    line-height: 0;
    background: color-mix(in srgb, currentColor 8%, transparent);
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
    transition:
        color 0.2s,
        border-color 0.2s,
        background 0.2s;
}

.search-toggle__icon {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
}

.search-toggle:hover,
.search-toggle:focus-visible {
    color: var(--teal);
    border-color: var(--teal);
    background: color-mix(in srgb, var(--teal) 10%, transparent);
}

.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 24px;
    background: color-mix(in srgb, var(--oxford-blue) 72%, transparent);
    backdrop-filter: blur(4px);
}

.search-overlay.active {
    display: flex;
}

.search-overlay__inner {
    position: relative;
    width: min(92vw, 680px);
    max-height: 72vh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    padding: 20px 22px 18px;
}

.pagefind-ui__filter-panel-label,
.pagefind-ui__filter-panel,
.pagefind-ui__search-clear {
    display: none !important;
}

.search-suggest {
    position: absolute;
    z-index: 2;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-hover);
    max-height: 240px;
    overflow-y: auto;
}

.search-suggest__item {
    padding: 8px 14px;
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

.search-suggest__item--active,
.search-suggest__item:hover {
    background: var(--warm);
    color: var(--heading);
}

.search-overlay .pagefind-ui {
    --pagefind-ui-scale: 0.8;
    --pagefind-ui-primary: var(--teal);
    --pagefind-ui-text: var(--text);
    --pagefind-ui-background: var(--surface);
    --pagefind-ui-border: var(--border);
    --pagefind-ui-tag: var(--warm);
    --pagefind-ui-border-width: 2px;
    --pagefind-ui-border-radius: 8px;
    color: var(--text);
    font-family: var(--pagefind-ui-font);
    width: 100%;
}
/* Pagefind's generated rules carry Svelte scope classes; Fuse needs its own stable shell. */
.pagefind-ui--fuse,
.pagefind-ui--fuse *,
.pagefind-ui--fuse *::before,
.pagefind-ui--fuse *::after {
    box-sizing: border-box;
}

.pagefind-ui--fuse .pagefind-ui__form {
    position: relative;
}

.pagefind-ui--fuse .pagefind-ui__form::before {
    position: absolute;
    z-index: 1;
    top: calc(18px * var(--pagefind-ui-scale));
    left: calc(20px * var(--pagefind-ui-scale));
    width: calc(12px * var(--pagefind-ui-scale));
    height: calc(12px * var(--pagefind-ui-scale));
    border: calc(2px * var(--pagefind-ui-scale)) solid
        color-mix(in srgb, var(--pagefind-ui-text) 70%, transparent);
    border-radius: 50%;
    content: "";
    opacity: 0.7;
    pointer-events: none;
}

.pagefind-ui--fuse .pagefind-ui__form::after {
    position: absolute;
    z-index: 1;
    top: calc(31px * var(--pagefind-ui-scale));
    left: calc(31px * var(--pagefind-ui-scale));
    width: calc(8px * var(--pagefind-ui-scale));
    height: calc(2px * var(--pagefind-ui-scale));
    background: color-mix(in srgb, var(--pagefind-ui-text) 70%, transparent);
    content: "";
    opacity: 0.7;
    pointer-events: none;
    transform: rotate(45deg);
    transform-origin: left center;
}

.pagefind-ui--fuse .pagefind-ui__search-input {
    display: block;
    width: 100%;
    height: calc(64px * var(--pagefind-ui-scale));
    min-width: 0;
    padding: 0 calc(70px * var(--pagefind-ui-scale)) 0
        calc(54px * var(--pagefind-ui-scale));
    color: var(--pagefind-ui-text);
    background: var(--pagefind-ui-background);
    border: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border);
    border-radius: var(--pagefind-ui-border-radius);
    font: inherit;
    font-size: calc(21px * var(--pagefind-ui-scale));
    font-weight: 700;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
}

.pagefind-ui--fuse .pagefind-ui__search-input::placeholder {
    color: currentColor;
    opacity: 0.2;
}

.pagefind-ui--fuse .pagefind-ui__search-input:focus-visible {
    border-color: var(--pagefind-ui-primary);
    outline: calc(2px * var(--pagefind-ui-scale)) solid
        color-mix(in srgb, var(--pagefind-ui-primary) 45%, transparent);
    outline-offset: calc(2px * var(--pagefind-ui-scale));
}

.search-overlay .pagefind-ui .civic-search__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-overlay .pagefind-ui .civic-search__input-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.search-overlay .pagefind-ui .civic-search__submit {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.9rem;
    min-width: 2.9rem;
    height: 51px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--warm);
    color: var(--heading);
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.search-overlay .pagefind-ui .civic-search__submit:hover,
.search-overlay .pagefind-ui .civic-search__submit:focus-visible {
    border-color: var(--teal);
    color: var(--teal);
}

.pagefind-ui--fuse .pagefind-ui__drawer {
    display: block;
    min-width: 0;
}

.pagefind-ui--fuse .pagefind-ui__message:not(:empty) {
    display: flex;
    align-items: center;
    min-height: calc(24px * var(--pagefind-ui-scale));
    margin: 0;
    padding: calc(20px * var(--pagefind-ui-scale)) 0;
    color: var(--pagefind-ui-text);
    font-size: calc(16px * var(--pagefind-ui-scale));
    font-weight: 700;
    overflow-wrap: anywhere;
}

.pagefind-ui--fuse .pagefind-ui__results {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagefind-ui--fuse .pagefind-ui__result {
    display: flex;
    align-items: flex-start;
    gap: min(calc(40px * var(--pagefind-ui-scale)), 3%);
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: calc(30px * var(--pagefind-ui-scale)) 0
        calc(40px * var(--pagefind-ui-scale));
    border-top: solid var(--pagefind-ui-border-width) var(--pagefind-ui-border);
    list-style: none;
}

.pagefind-ui--fuse .pagefind-ui__result:last-child {
    border-bottom: solid var(--pagefind-ui-border-width)
        var(--pagefind-ui-border);
}

.pagefind-ui--fuse .pagefind-ui__result-inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    margin-top: calc(10px * var(--pagefind-ui-scale));
}

.pagefind-ui--fuse .pagefind-ui__result-title {
    display: inline-block;
    max-width: 100%;
    margin: 0;
    color: var(--pagefind-ui-text);
    font-size: calc(21px * var(--pagefind-ui-scale));
    font-weight: 700;
    line-height: 1.35;
}

.pagefind-ui--fuse .pagefind-ui__result-link {
    color: inherit;
    font-family: inherit;
    text-decoration: none;
}

.pagefind-ui--fuse .pagefind-ui__result-link:hover,
.pagefind-ui--fuse .pagefind-ui__result-link:focus-visible {
    color: var(--teal);
    text-decoration: underline;
}

.pagefind-ui--fuse .pagefind-ui__result-nested {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: calc(20px * var(--pagefind-ui-scale));
}

.pagefind-ui--fuse .pagefind-ui__result-nested:first-of-type {
    padding-top: calc(10px * var(--pagefind-ui-scale));
}

.pagefind-ui--fuse .pagefind-ui__result-nested .pagefind-ui__result-link {
    position: relative;
    font-size: 0.9em;
}

.pagefind-ui--fuse
    .pagefind-ui__result-nested
    .pagefind-ui__result-link::before {
    position: absolute;
    top: 0;
    right: calc(100% + 0.1em);
    content: "⤷";
}

.pagefind-ui--fuse .pagefind-ui__result-excerpt {
    display: inline-block;
    min-width: 0;
    margin: calc(4px * var(--pagefind-ui-scale)) 0 0;
    color: var(--muted);
    font-size: calc(16px * var(--pagefind-ui-scale));
    font-weight: 400;
    overflow-wrap: anywhere;
}

.pagefind-ui--fuse .pagefind-ui__result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: calc(20px * var(--pagefind-ui-scale));
    margin: calc(20px * var(--pagefind-ui-scale)) 0 0;
    padding: 0;
    list-style: none;
}

.pagefind-ui--fuse .pagefind-ui__result-tag {
    margin: 0;
    line-height: normal;
    padding: calc(4px * var(--pagefind-ui-scale))
        calc(8px * var(--pagefind-ui-scale));
    border-radius: var(--pagefind-ui-border-radius);
    background: var(--pagefind-ui-tag);
    color: var(--pagefind-ui-text);
    font-size: calc(14px * var(--pagefind-ui-scale));
    overflow-wrap: anywhere;
}

@media (max-width: 420px) {
    .pagefind-ui--fuse .pagefind-ui__result {
        padding: calc(24px * var(--pagefind-ui-scale)) 0
            calc(30px * var(--pagefind-ui-scale));
    }

    .pagefind-ui--fuse .pagefind-ui__result-nested {
        padding-left: calc(16px * var(--pagefind-ui-scale));
    }
}

.pagefind-ui--fuse mark {
    background: color-mix(in srgb, var(--gold-light) 35%, transparent);
    color: inherit;
}

.civic-ask-answer {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    font-family: var(--sans);
    font-size: 0.95rem;
    line-height: 1.65;
}

.civic-ask-answer__body {
    color: var(--text);
}

.civic-ask-answer__body h2,
.civic-ask-answer__body h3 {
    font-family: var(--serif);
    color: var(--heading);
    font-size: 1.05rem;
    margin: 0.75em 0 0.35em;
}

.civic-ask-answer__cursor {
    display: inline-block;
    margin-left: 2px;
    color: var(--teal);
    animation: civic-ask-blink 1s step-end infinite;
}

@keyframes civic-ask-blink {
    50% {
        opacity: 0;
    }
}

.civic-ask-answer__error {
    color: var(--gold);
    margin: 0;
}

.civic-ask-answer__sources {
    margin-top: 12px;
    font-size: 0.85rem;
}

.civic-ask-answer__sources h3 {
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 6px;
}

.civic-ask-answer__sources ol {
    margin: 0;
    padding-left: 1.25rem;
}

.civic-ask-answer .cite a {
    font-size: 0.75em;
    text-decoration: none;
}
/* Ask history chips + Enter hint */
.civic-ask-history {
    width: 100%;
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}
.civic-ask-history[hidden] {
    display: none;
}
.civic-ask-history__hint {
    margin: 0 0 0.4rem;
    color: var(--muted, #777);
}
.civic-ask-history__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.civic-ask-history__chip {
    border: 1px solid var(--border, #e0dcd4);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    background: transparent;
    color: var(--teal, #0d6e6e);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.civic-ask-history__chip:hover,
.civic-ask-history__chip:focus-visible {
    border-color: var(--teal, #0d6e6e);
    outline: none;
}
/* Exact-match badge + English-fallback note (Fuse search results) */
.civic-search__badge {
    font-size: 0.7rem;
    border: 1px solid var(--teal, #0d6e6e);
    color: var(--teal, #0d6e6e);
    border-radius: 4px;
    padding: 0 0.35em;
    margin-left: 0.5em;
    vertical-align: middle;
    white-space: nowrap;
}
.civic-search__en-note {
    list-style: none;
    font-size: 0.85rem;
    color: var(--muted, #777);
    margin: 0.75rem 0 0.25rem;
}
