:root {
    color-scheme: light;
    --ink: #1d1a16;
    --muted: #675e53;
    --line: #e4ddd1;
    --paper: #fff;
    --canvas: #faf8f4;
    --navy: #2b2620;
    --accent: #9b2c1f;
    --accent-dark: #7a2016;
    --link: #8a2a1c;
    --link-hover: #5f1a10;
    --soft-blue: #f4efe6;
    --soft-amber: #fff4d9;
    --amber-line: #e8cd8a;
    --soft-green: #f3f6ed;
    --green-line: #7e9653;
    --yes: #1f8a5b;
    --no: #c8443a;
    --abstain: #d9a13b;
    --absent: #cfc8bd;
    --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
    font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
a { color: var(--link); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #d08a1c;
    outline-offset: 3px;
}
.intro { margin: 0 0 20px; }
.eyebrow { margin: 0 0 5px; color: #436577; font-size: 12px; font-weight: 750; letter-spacing: .065em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 8px; font: 700 clamp(28px, 3.4vw, 40px)/1.12 var(--serif); letter-spacing: -.02em; }
h2 { font-family: var(--serif); }
.lede { margin: 0; color: var(--muted); font-size: 15px; }
.search-form { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 2px 7px #18394d0b; }
.search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; min-width: 0; border: 1px solid #9eb1bc; border-radius: 5px; padding: 12px 14px; background: #fff; color: var(--ink); font: inherit; font-size: 18px; }
button, .button-link { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border: 0; border-radius: 5px; padding: 9px 18px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button-link:hover { background: var(--accent-dark); color: #fff; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; margin-top: 15px; }
.filters label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.filters input, .filters select { min-height: 38px; border: 1px solid #afbec6; border-radius: 4px; padding: 6px 9px; background: white; color: var(--ink); font: inherit; font-size: 14px; }
.result-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 18px; min-height: 48px; color: var(--muted); font-size: 13px; }
.result-summary span:first-child { color: var(--ink); font-weight: 700; }
.result-summary a { margin-left: auto; font-weight: 700; }
.workspace { display: grid; grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.5fr); align-items: start; gap: 18px; }
.panel { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.results-panel { min-height: 280px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid #e3eaee; }
.panel-heading h2, .panel-heading h3 { margin: 0; font-size: 17px; }
.panel-heading .eyebrow { margin-bottom: 2px; }
.count-badge { display: inline-grid; min-width: 30px; min-height: 30px; place-items: center; border: 1px solid #bdcbd3; border-radius: 50%; color: #36576a; font-size: 13px; font-weight: 700; }
.result-list { margin: 0; padding: 0; list-style: none; }
.result-item { padding: 0; border-bottom: 1px solid #e1e8ec; }
.result-item:last-child { border-bottom: 0; }
.result-item.is-selected { background: var(--soft-blue); box-shadow: inset 4px 0 #1b729b; }
.result-link { display: grid; gap: 5px; padding: 15px 17px 12px 20px; color: var(--ink); text-decoration: none; }
.result-link:hover { background: #f5fafc; color: var(--ink); }
.result-item.is-selected .result-link:hover { background: #e5f1f6; }
.result-kind, .result-locator { color: var(--muted); font-size: 12px; }
.result-kind { color: #315f74; font-weight: 700; }
.result-link strong { font-size: 15px; line-height: 1.35; }
.state-pill, .quality-tag, .mime-tag { display: inline-flex; align-items: center; width: fit-content; min-height: 24px; border: 1px solid #ccd9df; border-radius: 4px; padding: 2px 7px; background: #f5f8f9; color: #3f5a68; font-size: 11px; font-weight: 700; }
.state-success { border-color: #bdcfad; background: #f2f7eb; color: #355426; }
.state-warning, .state-failed, .state-unavailable, .state-unknown { border-color: var(--amber-line); background: var(--soft-amber); color: #665018; }
.case-shortcut { display: block; padding: 0 17px 12px 20px; font-size: 12px; }
.case-shortcut.muted { color: #667a85; }
.evidence-content { padding: 20px 24px 26px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 17px; color: #5d707b; font-size: 12px; }
.breadcrumbs a { font-weight: 650; }
.act-title { margin: 0 0 4px; font-size: clamp(22px, 2.4vw, 29px); line-height: 1.2; letter-spacing: -.025em; }
.source-line, .meta, .fact-line { color: var(--muted); font-size: 13px; }
.source-line { margin: 0 0 15px; }
.notice { margin: 14px 0; border: 1px solid var(--line); border-radius: 5px; padding: 10px 13px; font-size: 13px; }
.notice-warning { border-color: var(--amber-line); background: var(--soft-amber); color: #594719; }
.notice-neutral { border-color: #cbdce5; background: #f1f7fa; color: #345769; }
.interpretation { margin: 0 0 1rem; }
.match-explanation { margin: .85rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--muted); }
.legal-caveat { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.chain { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.chain-step { display: inline-flex; align-items: center; min-height: 34px; border: 1px solid #d0dbe1; border-radius: 4px; padding: 5px 9px; background: #fbfcfd; color: #375a6d; font-size: 12px; text-decoration: none; }
.chain-step.is-current { border-color: #88b0c3; background: var(--soft-blue); color: #164f6b; font-weight: 750; }
.chain-step.is-empty { color: #677a84; }
.citation-block, .original-block, .history-block { margin-top: 20px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.section-heading .eyebrow { margin-bottom: 2px; }
.section-heading h3, .section-heading h2 { margin: 0; font-size: 16px; }
blockquote, .evidence-quote { margin: 0; border-left: 4px solid var(--green-line); padding: 15px 17px; background: var(--soft-green); color: #2c3b29; font: 18px/1.55 Georgia, "Times New Roman", serif; }
.locator-line, .hash-line { margin: 8px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.hash-line code { color: #314f5e; font-size: 11px; }
.empty-quote { margin: 0; border: 1px dashed #c6b673; border-radius: 5px; padding: 12px; background: #fffaf0; color: #64542b; font-size: 13px; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 13px; }
.text-link { font-size: 13px; font-weight: 700; }
.history-list, .version-list, .process-list, .artifact-list { margin: 0; padding: 0; list-style: none; }
.history-list { border-left: 2px solid #d3dfe4; padding-left: 15px; }
.history-list li { display: grid; gap: 3px; margin-bottom: 13px; }
.history-list li:last-child { margin-bottom: 0; }
.history-list span { color: var(--muted); font-size: 12px; }
.coverage-box { margin-top: 17px; border: 1px solid #d6e0e4; border-radius: 5px; padding: 12px 14px; background: #f7f9fa; color: #3b5665; font-size: 13px; }
.coverage-box p { margin: 6px 0 0; }
.coverage-box p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.empty-state { margin: 0; padding: 20px; color: var(--muted); font-size: 14px; }
.empty-state p { margin: 6px 0 0; }
.empty-detail { display: grid; justify-items: start; align-content: center; min-height: 280px; padding: 30px; }
.empty-detail h2 { margin: 8px 0 5px; font-size: 20px; }
.empty-detail p { max-width: 38ch; margin: 0; color: var(--muted); }
.detail-hero { margin: 6px 0 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.detail-hero h1 { margin-bottom: 8px; }
.detail-panel { margin-top: 18px; }
.document-section { padding: 18px; border-bottom: 1px solid #e3eaee; }
.document-section:last-child { border-bottom: 0; }
.document-section h3 { margin-bottom: 12px; font-size: 18px; }
.version-list { display: grid; gap: 12px; }
.version-card { border: 1px solid #d8e2e7; border-radius: 6px; padding: 14px; background: #fcfdfd; }
.version-card.is-selected { border-color: #7ea9bc; box-shadow: inset 3px 0 #1d7297; }
.version-card h4 { margin: 0; font-size: 15px; }
.version-card .meta { margin: 4px 0 0; }
.artifact-list { margin-top: 13px; border-top: 1px solid #e4eaed; }
.artifact-list li { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid #e4eaed; font-size: 13px; }
.artifact-list li:last-child { border-bottom: 0; }
.artifact-list .action-row { margin-top: 5px; }
.artifact-list.doc-list li, .evidence-source-list.doc-list li { display: grid; align-items: start; }
.candidate-panel { border-color: #ddcea0; }
.candidate-card { padding: 15px 18px; border-bottom: 1px solid #eee5cc; }
.candidate-card:last-child { border-bottom: 0; }
.candidate-card p { margin: 6px 0; }
.fact-line { margin: 13px 0; }
.process-list { display: grid; gap: 12px; padding: 16px; }
.process-card { border: 1px solid #d8e2e7; border-radius: 6px; padding: 15px; }
.process-card h3 { margin: 4px 0; font-size: 17px; }
.process-card .meta { margin: 0 0 11px; }
.identifier-list, .review-list, .evidence-source-list, .decision-history { list-style: none; margin: 0; padding: 0; }
.identifier-list > li { display: grid; gap: 7px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.identifier-list > li:last-child { border-bottom: 0; }
.identifier-document { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.identifier-document h3, .identifier-document h4 { margin-bottom: 5px; }
.identifier-document .text-link { display: inline-block; margin: 4px 8px 4px 0; overflow-wrap: anywhere; }
.review-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 18px; }
.review-filters label { display: grid; gap: 4px; }
.review-list { display: grid; gap: 16px; }
.review-content { padding: 18px; }
.review-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review-evidence, .review-decision { margin-top: 18px; }
.evidence-source-list li, .decision-history li { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.source-url { display: block; margin-top: 5px; }
.review-pagination { margin-top: 18px; }
.source-evidence-list { margin: 13px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.metadata-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 17px 0; }
.metadata-grid div { min-width: 0; border: 1px solid #e0e7eb; border-radius: 4px; padding: 10px; }
.metadata-grid dt { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.metadata-grid dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.selector-json { overflow: auto; max-height: 280px; margin: 15px 0 0; border: 1px solid #dbe3e7; border-radius: 5px; padding: 12px; background: #f7f9fa; color: #395361; font-size: 12px; }
.error-page { padding: 32px; }
.error-page h1 { margin-bottom: 10px; }
.error-page .lede { margin-bottom: 18px; }
.detail-mark { color: #7a929e; font-size: 12px; font-weight: 800; letter-spacing: .08em; }

/* Application shell */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: #fffdf9ee; backdrop-filter: blur(6px); }
.site-bar { display: flex; align-items: center; gap: 28px; width: min(1240px, 100%); margin: 0 auto; padding: 12px 24px; }
.brand { flex: none; color: var(--ink); font: 700 21px/1.15 var(--serif); letter-spacing: -.01em; text-decoration: none; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font: 500 12px/1.3 system-ui, sans-serif; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.site-nav a, .more-nav > summary { padding: 8px 10px; border-radius: 6px; color: #3a342c; font-weight: 600; text-decoration: none; cursor: pointer; }
.site-nav a:hover, .more-nav > summary:hover { background: #f1ebe0; color: var(--ink); }
.site-nav a.is-active, .more-nav.is-active > summary { color: var(--accent); box-shadow: inset 0 -2px var(--accent); border-radius: 0; }
.more-nav { position: relative; }
.more-nav > summary { list-style: none; }
.more-nav > summary::-webkit-details-marker { display: none; }
.more-nav > summary::after { content: "▾"; margin-left: 5px; font-size: 12px; }
.more-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; min-width: 200px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; box-shadow: 0 10px 30px #2b26201f; }
.more-menu a { padding: 9px 10px; }
.more-menu a.is-active { box-shadow: none; background: #f6efe4; border-radius: 6px; }
.page-shell { width: min(1240px, 100%); margin: 0 auto; padding: 28px 24px 56px; }
.site-footer { border-top: 1px solid var(--line); padding: 22px 24px 32px; color: var(--muted); font-size: 13px; text-align: center; }
.site-footer p { max-width: 760px; margin: 0 auto 6px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 18px; }
.page-head h1 { margin: 0 auto 0 0; font-size: clamp(28px, 3vw, 36px); }
.page-head .lede { flex-basis: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filter-bar input, .filter-bar select { min-width: 0; min-height: 40px; border: 1px solid #afbec6; border-radius: 6px; padding: 7px 11px; background: #fff; color: var(--ink); font: inherit; }
.filter-bar button { min-height: 40px; padding: 7px 16px; }

/* Cards and dashboard */
.card, .table-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.table-card { overflow-x: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e3eaee; }
.card-head h2 { margin: 0; font-size: 15px; }
.card-head a, .card-foot { font-size: 13px; font-weight: 650; text-decoration: none; }
.card-foot { display: block; padding: 11px 16px; border-top: 1px solid #e3eaee; }
.card-note { margin: 0; padding: 0 16px 12px; color: var(--muted); font-size: 12px; }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); align-items: start; gap: 18px; }
.side-stack { display: grid; gap: 18px; }
.feed { margin: 0; padding: 0; list-style: none; }
.feed-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 16px; border-top: 1px solid #eef2f4; }
.feed-body { display: grid; gap: 2px; min-width: 0; }
.feed-title { color: var(--ink); font-weight: 600; text-decoration: none; }
a.feed-title:hover { color: var(--link); text-decoration: underline; }
.feed-meta { color: var(--muted); font-size: 12px; }
.stage-badge { display: inline-block; width: fit-content; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.stage-new { background: var(--soft-blue); color: #075b83; }
.stage-progress { background: #e6f5f0; color: #0b6b54; }
.stage-late { background: var(--soft-amber); color: #8a5a00; }
.stage-published { background: var(--soft-green); color: #355426; }
.stage-neutral { background: #eef2f5; color: #3b5465; }
.stat-list { margin: 0; padding: 6px 0; list-style: none; }
.stat-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 16px; font-size: 14px; }
.stat-list li > span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-list a { color: var(--ink); text-decoration: none; }
.stat-list a:hover { color: var(--link); }
.inline-alert { margin: 0 16px 12px; border-radius: 8px; padding: 8px 11px; background: #fdecea; color: #7a1b12; font-size: 13px; overflow-wrap: anywhere; }

/* Case list, activity log */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.filter-bar input { flex: 1 1 280px; }
.filter-count { margin-left: auto; color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fbfcfd; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 10px 12px; border-bottom: 1px solid #edf1f3; vertical-align: top; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f7fafc; }
td small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.case-number { font-weight: 700; white-space: nowrap; }
.consultation-table td { min-width: 150px; }
.consultation-table td:first-child { width: 50%; }
@media (max-width: 700px) {
    .consultation-table thead { display: none; }
    .consultation-table tbody tr { display: block; border-bottom: 1px solid var(--line); }
    .consultation-table tbody tr:last-child { border-bottom: 0; }
    .consultation-table td { display: block; width: auto !important; min-width: 0; border-bottom: 0; }
    .consultation-table td + td { padding-top: 0; }
}
.case-title a { color: var(--ink); font-weight: 600; text-decoration: none; }
.case-title a:hover { color: var(--link); text-decoration: underline; }
.case-stage { min-width: 190px; }
.pipeline { display: flex; gap: 3px; }
.pipeline i { width: 18px; height: 7px; border-radius: 3px; background: #e2e8ec; }
.pipeline i.is-done { background: var(--navy); } .pipeline i.is-current { background: #0f8a6c; }
.pipeline-label { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.case-topic-list { display: grid; gap: 3px; margin-top: 6px; font-size: 11px; }
.case-topic-match { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; color: var(--muted); }
.topic-tag { border: 1px solid #c7dce5; border-radius: 10px; padding: 0 7px; background: var(--soft-blue); color: #164f6b; font-weight: 700; text-decoration: none; }
.topic-decision { color: #4c5e68; font-size: 11px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.topic-card { display: grid; gap: 3px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); text-decoration: none; }
.topic-card:hover { border-color: #9dbccc; color: var(--ink); }
.topic-card h2 { margin: 0 0 5px; font-size: 17px; }
.topic-card span { color: var(--muted); font-size: 13px; }
.topic-section { margin-top: 16px; overflow: hidden; }
.topic-items { margin: 0; padding: 0; list-style: none; }
.topic-items > li { padding: 14px 16px; border-top: 1px solid #eef2f4; }
.topic-items > li:first-child { border-top: 0; }
.topic-items h3 { margin: 0; font-size: 14px; }
.topic-items h3 a { color: var(--ink); text-decoration: none; }
.topic-items h3 a:hover { color: var(--link); text-decoration: underline; }
.topic-reason { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.topic-match-value { color: #304c5b; }
.topic-quote { flex-basis: 100%; margin: 2px 0 0; border-left-width: 3px; padding: 7px 10px; font-size: 14px; }
.topic-changes .meta { margin: 4px 0; }
.topic-change-fields { margin: 4px 0; color: #34495a; font-size: 13px; }
.col-date, .nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.error-code { color: #7a1b12; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; font-size: 14px; }

/* Case page */
.case-head { margin-bottom: 18px; }
.case-head h1 { max-width: 60ch; margin: 2px 0 10px; font-size: clamp(21px, 2.2vw, 27px); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.case-summary { max-width: 80ch; margin: 0 0 14px; color: #34495a; }
.stepper { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 760px; margin: 0; padding: 0; list-style: none; }
.stepper li { color: var(--muted); font-size: 11.5px; text-align: center; }
.stepper li::before { content: ""; display: block; height: 6px; margin-bottom: 5px; border-radius: 4px; background: #e2e8ec; }
.stepper li.is-done::before { background: var(--navy); }
.stepper li.is-current { color: #0b6b54; font-weight: 700; }
.stepper li.is-current::before { background: #0f8a6c; }
.timeline { margin: 14px 16px 16px 26px; padding: 0 0 0 16px; border-left: 2px solid var(--line); list-style: none; }
.timeline li { position: relative; display: grid; gap: 1px; padding-bottom: 14px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: -23px; width: 8px; height: 8px; border: 2px solid var(--navy); border-radius: 50%; background: #fff; }
.timeline li.is-current::before { border-color: #0f8a6c; background: #0f8a6c; }
.timeline-date { color: var(--muted); font-size: 12px; }
.timeline-sub { color: var(--muted); font-size: 13px; }
.version-list.timeline, .review-content .timeline { margin: 12px 0 0 10px; }
.decision-history.timeline li { padding: 0 0 14px; border: 0; }
.evidence-link { width: fit-content; color: var(--muted); font-size: 12px; text-decoration: none; }
.evidence-link:hover { color: var(--link); text-decoration: underline; }
.doc-list { margin: 0; padding: 4px 0; list-style: none; }
.doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; border-top: 1px solid #eef2f4; }
.doc-list li:first-child { border-top: 0; }
.doc-list strong { overflow-wrap: anywhere; font-size: 14px; }
.doc-list small { display: block; color: var(--muted); font-size: 12px; }
.artifact-list.doc-list { margin-top: 13px; border-top: 1px solid #e4eaed; }
.button-small { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.case-grid .process-list { padding: 12px 16px 16px; }
.disclosure > summary { cursor: pointer; color: var(--link); font-size: 13px; font-weight: 650; }
.process-card .disclosure { margin-top: 10px; }

/* Search page */
.search-form { padding: 14px; }
.advanced-filters { margin-top: 10px; }
.advanced-filters > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 650; }
.interpretation { margin: 12px 0; padding: 9px 13px; border: 1px solid #cbdce5; border-radius: 6px; background: #f1f7fa; color: #345769; font-size: 13px; }
.interpretation p { margin: 6px 0 0; }
.summary-details { display: inline; }
.summary-details > summary { display: inline; cursor: pointer; }
.coverage-box > summary { cursor: pointer; font-weight: 700; }

@media (max-width: 1100px) {
    .case-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .site-bar { flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; }
    .brand small { display: none; }
    .site-nav { flex-wrap: nowrap; width: 100%; margin: 0 -4px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 88%, transparent); }
    .site-nav a, .more-nav > summary { flex: none; padding: 7px 9px; font-size: 15px; }
    .more-nav { position: static; }
    .more-menu { right: 10px; }
    .page-shell { padding: 18px 16px 40px; }
}
@media (max-width: 560px) {
    .feed-item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .col-date { display: none; }
    .case-stage { min-width: 0; }
    .stepper li { font-size: 0; }
    .stepper li.is-current { font-size: 11px; }
    .page-shell { padding: 14px 10px 32px; }
}
@media (max-width: 860px) {
    .workspace { grid-template-columns: minmax(0, 1fr); }
    .evidence-panel { grid-row: 2; }
    .results-panel { grid-row: 1; }
}
@media (max-width: 560px) {
    :root { font-size: 15px; }
    .search-form { padding: 13px; }
    .search-row { align-items: stretch; flex-direction: column; }
    .search-row input { font-size: 16px; }
    .search-row button { width: 100%; }
    .filters { align-items: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters label:first-child { grid-column: 1 / -1; }
    .filters input, .filters select { width: 100%; }
    .result-summary { align-items: flex-start; flex-direction: column; padding: 10px 0; gap: 3px; }
    .result-summary a { margin-left: 0; margin-top: 4px; }
    .panel-heading { padding: 13px 14px; }
    .evidence-content { padding: 16px 14px 20px; }
    .chain { gap: 5px; }
    .chain-step { font-size: 11px; padding: 4px 7px; }
    blockquote, .evidence-quote { font-size: 17px; padding: 12px; }
    .detail-hero { padding: 17px 15px; }
    .document-section { padding: 14px; }
    .version-card { padding: 12px; }
    .metadata-grid { grid-template-columns: minmax(0, 1fr); }
    .review-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
    a, button { transition: background-color .12s ease, color .12s ease; }
}

/* Citizen views: home, votes, members */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; gap: 32px; padding: 6px 0 26px; border-bottom: 1px solid var(--line); }
.hero h1 { margin: 0 0 10px; font-size: clamp(32px, 4.2vw, 46px); }
.hero p { margin: 0; color: var(--muted); font-size: 18px; }
.hero-search { display: flex; gap: 8px; }
.hero-search input { flex: 1; min-width: 0; min-height: 52px; border: 1px solid #cfc7ba; border-radius: 8px; padding: 12px 16px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; }
.hero-search button { min-height: 52px; padding: 0 22px; border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-block; border: 1px solid #d9d1c4; border-radius: 999px; padding: 5px 12px; background: #fff; color: var(--ink); font-size: 14px; text-decoration: none; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 26px 0 30px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.stat-strip > * { display: grid; gap: 2px; padding: 16px 20px; border-left: 1px solid #efe9df; color: var(--ink); text-decoration: none; }
.stat-strip > :first-child { border-left: 0; }
.stat-strip a:hover { background: #fcf9f4; color: var(--ink); }
.stat-strip strong { font: 700 34px/1.1 var(--serif); letter-spacing: -.01em; }
.stat-strip span { color: var(--muted); font-size: 14px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; gap: 34px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-title h2 { margin: 0; font: 700 25px/1.2 var(--serif); }
.section-title a { font-size: 14px; font-weight: 650; }
.home-side { display: grid; gap: 34px; }
.vote-cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.vote-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px 14px; background: #fff; }
.vote-card h3 { margin: 8px 0 3px; font-size: 17px; line-height: 1.35; }
.vote-card h3 a { color: var(--ink); text-decoration: none; }
.vote-card h3, .case-vote h3 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.vote-card h3 a:hover { color: var(--link); text-decoration: underline; }
.vote-meta { margin: 0 0 11px; color: var(--muted); font-size: 13px; }
.verdict { display: inline-block; border-radius: 4px; padding: 3px 8px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.verdict-pass { background: #e3f3ea; color: #17613f; }
.verdict-fail { background: #fbe6e3; color: #8e2c22; }
.vote-bar { display: flex; height: 10px; overflow: hidden; border-radius: 5px; background: #eee9e1; }
.vote-bar-lg { height: 18px; border-radius: 6px; }
.vote-bar span { display: block; height: 100%; }
.vote-bar .is-yes, .choice-yes::before, .legend .is-yes::before { background: var(--yes); }
.vote-bar .is-no, .choice-no::before, .legend .is-no::before { background: var(--no); }
.vote-bar .is-abstain, .choice-abstain::before, .legend .is-abstain::before { background: var(--abstain); }
.vote-bar .is-absent, .choice-absent::before, .legend .is-absent::before { background: var(--absent); }
.vote-bar .is-present, .legend .is-present::before { background: #9c8f7d; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 7px 0 0; padding: 0; color: var(--muted); font-size: 13px; list-style: none; }
.legend li::before, .choice::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; vertical-align: 0; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.majority-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.plain-list { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; list-style: none; }
.plain-list li { display: grid; gap: 2px; padding: 13px 18px; border-top: 1px solid #efe9df; }
.plain-list li:first-child { border-top: 0; }
.plain-list a { color: var(--ink); font-weight: 650; text-decoration: none; }
.plain-list a:hover { color: var(--link); text-decoration: underline; }
.plain-list small { color: var(--muted); font-size: 13px; }
.funnel { margin: 0; padding: 0; list-style: none; }
.funnel li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 48px; align-items: center; gap: 10px; margin: 7px 0; font-size: 14px; }
.funnel i { display: block; height: 14px; min-width: 2px; border-radius: 3px; background: #d8c9b3; }
.funnel b { text-align: right; font-variant-numeric: tabular-nums; }
.side-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.source-link, .plain-list a.source-link { color: var(--muted); font-size: 12px; font-weight: 400; text-decoration: underline dotted; text-underline-offset: .2em; }
.source-link:hover { color: var(--link); }
.choice { display: inline-flex; align-items: center; white-space: nowrap; font-weight: 650; }
.club-table td, .club-table th { vertical-align: middle; }
.club-table .vote-bar { min-width: 140px; }
.page-intro { margin: 0 0 22px; }
.page-intro .lede { max-width: 70ch; font-size: 17px; }
.filter-bar.is-plain { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.member-card { display: grid; gap: 4px; height: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; background: #fff; color: var(--ink); text-decoration: none; }
.member-card:hover { border-color: #c9b99f; color: var(--ink); }
.member-card strong { font-size: 16px; }
.member-card span { color: var(--muted); font-size: 13px; }
.meter { display: block; height: 6px; overflow: hidden; border-radius: 3px; background: #eee9e1; }
.meter i { display: block; height: 100%; background: var(--yes); }
.big-verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin: 14px 0 6px; }
.big-verdict .verdict { font-size: 14px; padding: 5px 11px; }
.big-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 8px; }
.big-numbers div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.big-numbers strong { display: block; font: 700 30px/1.1 var(--serif); }
.big-numbers span { color: var(--muted); font-size: 13px; }
.card-body { padding: 16px 18px; }
.result-summary .export-menu { margin-left: auto; }
.result-summary .export-menu a { margin-left: 0; font-weight: 600; }
.result-quote { color: #3a342c; font-size: 14px; }
.result-matches { padding: 0 17px 10px 20px; }
.result-matches > summary { cursor: pointer; color: var(--link); font-size: 13px; font-weight: 650; }
@media (max-width: 1000px) {
    .hero, .home-grid { grid-template-columns: minmax(0, 1fr); }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-strip > :nth-child(3) { border-left: 0; }
    .stat-strip > :nth-child(n+3) { border-top: 1px solid #efe9df; }
}
@media (max-width: 560px) {
    .hero p { font-size: 16px; }
    .hero-search { flex-direction: column; }
    .stat-strip strong, .big-numbers strong { font-size: 26px; }
    .big-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vote-card { padding: 14px; }
    .funnel li { grid-template-columns: 96px minmax(0, 1fr) 40px; }
}

/* Votes pages */
.votes-day { margin: 22px 0 10px; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.votes-day:first-child { margin-top: 0; }
.big-verdict p { margin: 0; flex-basis: 100%; color: var(--muted); font-size: 15px; }
.club-mini-bar { min-width: 90px; }

/* Members pages */

/* Case pages */
.case-vote { padding: 14px 16px 16px; border-top: 1px solid #efe9df; }
.case-vote:first-of-type { border-top: 0; }
.case-vote h3 { margin: 0 0 3px; font-size: 16px; line-height: 1.35; }
.case-vote .card-note { padding: 0; margin: 6px 0; }
.case-vote .big-verdict { margin: 8px 0; }
.case-vote .disclosure { margin-top: 10px; }
.current-stage { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; background: var(--soft-blue); }
.current-stage-q { margin: 0 0 3px; color: #345769; font-size: 12px; font-weight: 700; }
.current-stage-a { margin: 0; color: var(--ink); font-size: 15px; }
.card-empty .card-head { border-bottom: 0; }
.card-empty .empty-state { padding: 4px 16px 14px; font-size: 13px; }
.badge-row-tight { margin-top: 4px; gap: 4px; }
.tag { display: inline-block; width: fit-content; border-radius: 10px; padding: 1px 8px; background: #eef2f5; color: #3b5465; font-size: 11px; font-weight: 650; }
.disclosure-inline { margin-bottom: 8px; flex-basis: 100%; }
.disclosure-inline > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 650; }
.disclosure-inline label, .disclosure-inline input { margin-top: 6px; }
.pipeline-empty i { background: #eef2f5; }
.table-card:has(.case-table) { overflow: visible; }
.case-table { border-collapse: separate; border-spacing: 0; }
.case-table thead th { position: sticky; top: 64px; z-index: 1; background: #fbfcfd; }
