:root {
  --canvas: #f2f1eb;
  --paper: #ffffff;
  --paper-soft: #f8f8f4;
  --ink: #142019;
  --ink-soft: #3f4d45;
  --muted: #66746c;
  --line: #dce1dc;
  --line-strong: #bdc8c0;
  --green: #075c3d;
  --green-dark: #043d2a;
  --green-soft: #e5f2eb;
  --gold: #b77b13;
  --gold-soft: #fff3d8;
  --red: #a43d3d;
  --red-soft: #fbe9e7;
  --shadow: 0 16px 42px rgba(21, 40, 29, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 9px 14px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
}
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-bar, .nav-bar, #main-content, .site-footer {
  width: min(1320px, calc(100% - 40px));
  margin-inline: auto;
}

.header-bar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 230px minmax(260px, 620px) auto;
  align-items: center;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; width: max-content; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px 3px 11px 3px;
  background: var(--green);
  color: white;
  font: 700 13px/1 Georgia, serif;
  letter-spacing: 0.08em;
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font: 700 19px/1.1 Georgia, "Times New Roman", serif; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.17em; text-transform: uppercase; }

.global-search { display: flex; width: 100%; }
.global-search input, .page-search input, .hero-search input, .list-controls input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.global-search input { height: 44px; padding: 0 16px; border-radius: 9px 0 0 9px; }
.global-search button, .page-search button, .hero-search button, .button {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, border-color 120ms, transform 120ms;
}
.global-search button { height: 44px; padding: 0 20px; border-radius: 0 9px 9px 0; }
.global-search input:focus, .page-search input:focus, .hero-search input:focus, .list-controls input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7, 92, 61, 0.12); }
.global-search button:hover, .page-search button:hover, .hero-search button:hover, .button:hover { background: var(--green-dark); border-color: var(--green-dark); color: white; }

.quiet-button { justify-self: end; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.nav-bar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#navigation { display: flex; align-items: stretch; gap: 28px; height: 46px; }
#navigation a { display: grid; align-items: center; position: relative; color: var(--ink-soft); font-size: 14px; font-weight: 650; text-decoration: none; }
#navigation a:hover, #navigation a[aria-current="page"] { color: var(--green); }
#navigation a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--green); border-radius: 3px 3px 0 0; }
.access-label { color: var(--muted); font-size: 12px; }

#main-content { min-height: calc(100vh - 210px); padding: 42px 0 80px; }
.system-note { margin-bottom: 22px; padding: 10px 14px; border: 1px solid #e5cf9b; border-radius: 9px; background: var(--gold-soft); color: #634507; font-size: 13px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -0.025em; }
h1 { margin-bottom: 16px; font: 700 clamp(34px, 5vw, 62px)/1.03 Georgia, "Times New Roman", serif; }
h2 { margin-bottom: 12px; font: 700 24px/1.18 Georgia, "Times New Roman", serif; }
h3 { font-size: 17px; }
.eyebrow { margin-bottom: 10px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.lede, .hero-lede { color: var(--ink-soft); font-size: 18px; line-height: 1.55; }
.muted, .small-copy { color: var(--muted); }
.small-copy { font-size: 13px; }
.error { color: var(--red); }

.hero {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.7fr);
  min-height: 410px;
  border-radius: 22px;
  background: var(--green-dark);
  color: white;
  box-shadow: var(--shadow);
}
.hero-copy { padding: clamp(38px, 6vw, 76px); }
.hero .eyebrow { color: #9bd1b7; }
.hero h1 { max-width: 760px; font-size: clamp(45px, 6.5vw, 78px); }
.hero-lede { max-width: 720px; color: #d8e7df; font-size: 19px; }
.hero-search { display: flex; max-width: 740px; margin-top: 30px; }
.hero-search input { height: 56px; padding: 0 18px; border: 0; border-radius: 10px 0 0 10px; }
.hero-search button { min-width: 145px; border: 0; border-radius: 0 10px 10px 0; background: #e8b446; color: #2c220b; }
.hero-search button:hover { background: #f1c667; color: #201805; }
.hero-note { margin: 14px 0 0; color: #abc6b8; font-size: 12px; }
.hero-panel { display: flex; flex-direction: column; justify-content: flex-end; padding: 44px 38px; background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)), repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,0.025) 18px 19px); border-left: 1px solid rgba(255,255,255,0.12); }
.hero-panel-number { display: block; font: 700 clamp(52px, 7vw, 88px)/0.95 Georgia, serif; color: #f3c35e; }
.hero-panel strong { margin-top: 12px; font-size: 18px; }
.hero-panel p { margin: 12px 0 0; color: #c7d9cf; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.stat-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; transition: transform 140ms, box-shadow 140ms, border-color 140ms; }
.stat-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); color: var(--ink); }
.stat-card span { display: grid; }
.stat-card strong { font: 700 32px/1 Georgia, serif; }
.stat-card small { margin-top: 7px; color: var(--muted); font-weight: 650; }

.section-block { margin-top: 58px; }
.section-tint { padding: clamp(24px, 4vw, 42px); border-radius: 18px; background: #e8ede9; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; }
.section-heading .eyebrow { margin-bottom: 6px; }
.text-link { font-weight: 750; text-decoration: none; }
.text-link::after { content: " →"; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.record-card { position: relative; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: border-color 140ms, box-shadow 140ms, transform 140ms; }
.record-card:hover { border-color: var(--line-strong); box-shadow: 0 10px 28px rgba(21, 40, 29, 0.07); transform: translateY(-1px); }
.record-card h2 { margin: 7px 0 10px; font: 700 19px/1.3 Georgia, serif; }
.card-title { color: var(--ink); text-decoration: none; }
.card-title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-kicker { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.card-meta { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.card-action { position: relative; z-index: 2; margin-top: 12px; }
.list-stack { display: grid; gap: 10px; }
.list-stack .record-card { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 20px; }
.list-stack .record-card h2 { margin: 0; }
.list-stack .card-meta { margin: 0; }

.badge { display: inline-flex; align-items: center; width: max-content; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-soft); color: var(--ink-soft); font-size: 11px; font-weight: 750; line-height: 1.2; }
.badge-good { border-color: #a4cdb7; background: var(--green-soft); color: #075236; }
.badge-notice { border-color: #dfc27e; background: var(--gold-soft); color: #74500a; }
.badge-danger { border-color: #e2aaaa; background: var(--red-soft); color: #842d2d; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.page-heading-copy { max-width: 900px; min-width: 0; }
.page-heading h1 { overflow-wrap: anywhere; }
.page-heading .lede { max-width: 780px; margin-bottom: 0; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-bottom: 7px; }
.breadcrumbs { display: flex; gap: 9px; max-width: 100%; margin: -10px 0 28px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; }
.breadcrumbs a { flex: none; }
.breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border-radius: 8px; }
.button-secondary { border-color: var(--green); background: transparent; color: var(--green); }
.button-secondary:hover { background: var(--green); }
.button-quiet { border-color: var(--line-strong); background: var(--paper); color: var(--ink-soft); }
.button-quiet:hover { border-color: var(--ink-soft); background: var(--paper-soft); color: var(--ink); }

.list-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.list-controls input { max-width: 440px; height: 44px; padding: 0 14px; border-radius: 9px; }
.result-count { color: var(--muted); font-size: 13px; }
.load-more { display: flex; margin: 28px auto 0; }

.debate-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)); gap: 12px; margin: 0 0 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.debate-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.debate-filters input, .debate-filters select { width: 100%; min-width: 0; height: 44px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; color: var(--ink); outline: none; }
.debate-filters input:focus, .debate-filters select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7, 92, 61, .12); }
.filter-search { grid-column: span 2; }
.filter-actions { display: flex; align-items: end; gap: 8px; }
.debate-result-count { margin: 14px 0; }
.debate-list { display: grid; gap: 12px; }
.debate-card { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 22px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: border-color 140ms, box-shadow 140ms, transform 140ms; }
.debate-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.debate-card-date { display: grid; align-content: start; gap: 5px; }
.debate-card-date time { font: 700 17px/1.25 Georgia, serif; }
.debate-card-date span { color: var(--muted); font-size: 12px; }
.debate-card-context { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; color: var(--muted); font-size: 12px; }
.debate-card h2 { margin: 9px 0 8px; font: 700 21px/1.25 Georgia, serif; }
.debate-summary { max-width: 900px; margin: 0 0 10px; color: var(--ink-soft); }
.debate-card-status { display: flex; flex-direction: column; align-items: end; gap: 7px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { position: relative; z-index: 3; padding: 4px 9px; border: 1px solid #bdd3c6; border-radius: 999px; background: #f0f7f3; color: var(--green); font-size: 11px; font-weight: 700; cursor: pointer; }
.tag:hover { border-color: var(--green); background: var(--green-soft); }
.debate-brief { margin: 0 0 30px; padding: 24px 26px; border-left: 5px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0; background: var(--paper); box-shadow: 0 8px 26px rgba(21,40,29,.05); }
.debate-brief > p:not(.eyebrow) { max-width: 980px; color: var(--ink-soft); font-size: 16px; }

.intelligence-panel { padding: 26px; border-radius: 18px; background: linear-gradient(145deg, #e5efe9, #f7f5ea); }
.intelligence-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.intelligence-card { padding: 18px; border: 1px solid rgba(7,92,61,.18); border-radius: 12px; background: rgba(255,255,255,.88); }
.intelligence-card h3 { margin: 10px 0 6px; }
.intelligence-card p { margin-bottom: 10px; color: var(--ink-soft); }
.intelligence-path { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.legal-basis-panel { margin-top: 0; }
.legal-basis-list { display: grid; gap: 10px; }
.legal-basis-card { padding: 20px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 11px; background: var(--paper); }
.legal-basis-card > div:first-child { display: flex; gap: 7px; }
.legal-basis-card h3 { margin: 11px 0 6px; }
.legal-basis-card p { margin-bottom: 8px; color: var(--ink-soft); }

.page-search { display: flex; max-width: 820px; margin-bottom: 32px; }
.page-search input { height: 52px; padding: 0 16px; border-radius: 9px 0 0 9px; }
.page-search button { padding: 0 24px; border-radius: 0 9px 9px 0; }
.search-results { display: grid; gap: 0; max-width: 980px; }
.search-result { padding: 22px 0; border-bottom: 1px solid var(--line); }
.search-result h2 { margin: 6px 0 9px; }
.search-result h2 a { color: var(--ink); text-decoration: none; }
.search-result p { max-width: 820px; margin-bottom: 10px; color: var(--ink-soft); }
.search-result .citation { color: var(--green); font: 700 14px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.detail-main { min-width: 0; }
.detail-aside { display: grid; gap: 14px; position: sticky; top: 142px; }
.side-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.side-card.wide { max-width: 900px; }
.side-card h2 { font-size: 18px; }
.facts { display: grid; gap: 0; margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(100px, 0.8fr) minmax(120px, 1.2fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.summary-strip { margin: -8px 0 36px; padding: 14px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.summary-strip .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.summary-strip .facts > div { display: block; padding: 8px 18px; border: 0; border-right: 1px solid var(--line); }
.summary-strip .facts > div:first-child { padding-left: 0; }
.summary-strip .facts > div:last-child { border-right: 0; }
.summary-strip dd { margin-top: 4px; }

.reader { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 15px; background: #dfe4e0; box-shadow: var(--shadow); }
.reader-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.reader-toolbar > div:first-child { display: grid; }
.reader-toolbar > div:first-child span { color: var(--muted); font-size: 11px; }
.reader-toolbar select { max-width: 180px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.reader-actions { display: flex !important; grid-auto-flow: column; gap: 7px; }
.reader-actions .button { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.reader-stage { min-height: 720px; padding: 16px; }
.pdf-frame, .html-frame { display: block; width: 100%; height: 76vh; min-height: 680px; border: 0; border-radius: 7px; background: white; }
.document-image { display: block; max-width: 100%; margin: auto; border-radius: 6px; background: white; }
.text-reader { max-height: 76vh; overflow: auto; padding: 32px; border-radius: 7px; background: white; }
.text-reader-heading { align-items: baseline; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; }
.text-reader-heading span { color: var(--muted); font-size: 12px; }
.text-reader pre, .extracted-text pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.extracted-text { padding: 16px 20px; border-top: 1px solid var(--line); background: var(--paper); }
.extracted-text summary { cursor: pointer; color: var(--green); font-weight: 750; }
.extracted-text pre { max-height: 620px; overflow: auto; margin-top: 18px; padding: 22px; background: var(--paper-soft); }
.reader-compact .reader-stage, .reader-compact .pdf-frame, .reader-compact .html-frame { min-height: 620px; }

.source-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.source-list li { display: grid; gap: 3px; }
.source-link { overflow-wrap: anywhere; font-weight: 700; }
.source-list small { color: var(--muted); }
.source-actions { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.source-actions .text-link::after { content: none; }

.timeline { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 7px; width: 1px; background: var(--line-strong); }
.timeline li { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 16px; padding-bottom: 22px; }
.timeline-dot { position: relative; z-index: 1; width: 15px; height: 15px; margin-top: 4px; border: 4px solid var(--paper); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline time { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.timeline p { margin: 5px 0 0; color: var(--muted); }

.transcript { max-width: 900px; }
.transcript article { padding: 22px 0; border-top: 1px solid var(--line); }
.transcript article header { display: flex; justify-content: space-between; gap: 16px; }
.transcript article p { margin: 10px 0 0; white-space: pre-wrap; }

.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.person-card { display: flex; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.person-monogram { flex: 0 0 42px; display: grid; place-items: center; height: 42px; border-radius: 50%; background: var(--green-soft); color: var(--green); font: 700 20px/1 Georgia, serif; }
.person-portrait { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: var(--green-soft); }
.person-card p { margin: 3px 0; color: var(--muted); font-size: 13px; }

.empty-state { padding: 70px 30px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper-soft); text-align: center; }
.empty-state.compact { padding: 34px 24px; }
.empty-state h1, .empty-state h2, .empty-state h3 { margin-bottom: 9px; }
.empty-state p { max-width: 620px; margin: 0 auto 18px; color: var(--muted); }
.data-table { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.data-table article { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.data-table article:last-child { border-bottom: 0; }
.data-table p { margin: 5px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.login-panel { min-height: 62vh; display: grid; place-items: center; }
.login-card { width: min(480px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.login-card h1 { font-size: 38px; }
.login-card > p:not(.eyebrow) { color: var(--muted); }
.login-card form { display: grid; gap: 10px; }
.login-card label { font-weight: 700; }
.login-card input { height: 46px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; }
.login-card button { height: 46px; border: 0; border-radius: 8px; background: var(--green); color: white; font-weight: 700; cursor: pointer; }

.loading-page { display: grid; gap: 13px; padding-top: 30px; }
.loading-line, .loading-card { display: block; border-radius: 8px; background: linear-gradient(90deg, #e2e5e1, #f3f4f1, #e2e5e1); background-size: 240% 100%; animation: shimmer 1.4s infinite; }
.loading-line { width: 38%; height: 24px; }
.loading-line.wide { width: 70%; height: 60px; }
.loading-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.loading-card { height: 190px; }
@keyframes shimmer { to { background-position: -240% 0; } }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }

.collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 10px; }
.collection-primary { display: flex; align-items: center; gap: 10px; width: min(100%, 900px); }
.collection-filter { flex: 1; min-width: 220px; min-height: 48px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.collection-filter:focus { outline: 3px solid rgba(8, 102, 72, .15); border-color: var(--green); }
.collection-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.collection-actions { display: flex; gap: 8px; }
.collection-action { min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); color: var(--green); font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.collection-action:hover, .collection-action[aria-expanded="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.collection-panel { margin: 0 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.collection-panel[hidden] { display: none; }
.collection-filter-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.collection-filter-panel label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.collection-filter-panel select, .collection-filter-panel input { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.collection-panel-actions { display: flex; align-items: end; gap: 8px; grid-column: 1 / -1; }
.collection-sort-panel { display: flex; flex-wrap: wrap; gap: 8px; }
.sort-choice { min-height: 42px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.sort-choice:hover { border-color: var(--green); color: var(--green); }

@media (max-width: 1020px) {
  .header-bar { grid-template-columns: auto 1fr auto; }
  .brand-copy { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-panel { min-height: 180px; border-top: 1px solid rgba(255,255,255,0.12); border-left: 0; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reader-actions .button-quiet:last-child { display: none; }
  .debate-filters { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .filter-search { grid-column: span 2; }
}

@media (max-width: 720px) {
  .header-bar, .nav-bar, #main-content, .site-footer { width: min(100% - 24px, 1320px); }
  .site-header { position: static; }
  .header-bar { min-height: 68px; grid-template-columns: auto 1fr; gap: 12px; }
  .global-search { grid-column: 1 / -1; padding-bottom: 12px; }
  .quiet-button { position: absolute; right: 12px; top: 22px; }
  .nav-bar { overflow-x: auto; }
  #navigation { gap: 22px; }
  .access-label { display: none; }
  #main-content { padding-top: 24px; }
  .hero-copy { padding: 34px 24px; }
  .hero h1 { font-size: 46px; }
  .hero-search { display: grid; gap: 8px; }
  .hero-search input, .hero-search button { width: 100%; border-radius: 9px; }
  .hero-panel { padding: 30px 24px; }
  .stats-grid, .card-grid, .people-grid { grid-template-columns: 1fr; }
  .list-stack .record-card { display: block; }
  .list-stack .record-card h2 { margin: 7px 0 10px; }
  .page-heading { display: block; }
  .page-actions { justify-content: flex-start; margin-top: 18px; }
  .section-heading { align-items: start; }
  .detail-aside { grid-template-columns: 1fr; }
  .reader-toolbar { align-items: stretch; flex-direction: column; }
  .reader-actions { flex-wrap: wrap; }
  .reader-stage { min-height: 480px; padding: 8px; }
  .pdf-frame, .html-frame, .reader-compact .pdf-frame, .reader-compact .html-frame { min-height: 560px; height: 72vh; }
  .summary-strip .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip .facts > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 9px; }
  .site-footer { display: block; }
  .site-footer a { display: inline-block; margin-top: 8px; }
  .debate-filters { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .filter-actions { align-items: stretch; }
  .debate-card { grid-template-columns: 1fr; gap: 12px; }
  .debate-card-status { flex-direction: row; align-items: start; }
  .intelligence-grid { grid-template-columns: 1fr; }
  .collection-toolbar { align-items: stretch; flex-direction: column; }
  .collection-primary { align-items: stretch; flex-direction: column; width: 100%; }
  .collection-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .collection-action { width: 100%; }
  .collection-count { white-space: normal; }
  .collection-filter-panel { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  .global-search button { padding-inline: 13px; }
  .hero h1 { font-size: 39px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 17px; }
  .section-block { margin-top: 42px; }
  .page-heading h1 { font-size: 38px; }
  .collection-filter-panel { grid-template-columns: 1fr; }
  .collection-panel-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

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