:root {
  color-scheme: light;
  --navy: #173b57;
  --navy-deep: #0f2b41;
  --blue: #2d658b;
  --teal: #26736c;
  --gold: #8a6827;
  --ink: #1d2933;
  --muted: #5d6c77;
  --line: #d4dee5;
  --paper: #fff;
  --soft: #f3f6f8;
  --yes: #176443;
  --no: #a33a35;
  --warn: #7b5a12;
  --focus: #f0a91f;
  --shadow: 0 12px 30px rgba(15, 43, 65, .09);
  --serif: "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; }
a { color: #155b86; text-underline-offset: .18em; }
a:hover { color: var(--navy-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; }
.archive-wrap { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { background: #fff; left: 1rem; padding: .7rem 1rem; position: fixed; top: -100px; z-index: 100; }
.skip-link:focus { top: 1rem; }
.unofficial-bar { align-items: center; background: var(--navy-deep); color: #fff; display: flex; font-size: .8rem; gap: 1rem; justify-content: center; min-height: 30px; padding: .2rem 1rem; }
.unofficial-bar a { color: #fff; }
.unofficial-bar span { font-weight: 800; }
.archive-header { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.archive-header__inner { align-items: center; display: flex; justify-content: space-between; min-height: 76px; }
.archive-brand { align-items: center; color: var(--navy-deep); display: inline-flex; gap: .75rem; text-decoration: none; }
.archive-brand__mark { align-items: center; background: var(--navy); border-radius: 8px; color: #fff; display: flex; height: 44px; justify-content: center; width: 44px; }
.archive-brand__mark svg { fill: currentColor; height: 30px; width: 30px; }
.archive-brand strong, .archive-brand small { display: block; }
.archive-brand strong { font-family: var(--serif); font-size: 1.08rem; line-height: 1.35; }
.archive-brand small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.desktop-nav { align-items: center; display: flex; gap: .2rem; }
.desktop-nav a { border-radius: 7px; color: var(--navy); font-size: .9rem; font-weight: 750; padding: .55rem .65rem; text-decoration: none; }
.desktop-nav a:hover { background: #e8f0f4; }
.mobile-nav { display: none; position: relative; }
.breadcrumbs { font-size: .83rem; padding-block: .8rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { color: var(--muted); content: "/"; margin-left: .35rem; }
.breadcrumbs span { color: var(--muted); }

.page-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 7vw, 5.5rem) 0; }
.page-hero--home { background: linear-gradient(135deg, #eef4f7, #fff 55%, #edf4f2); }
.eyebrow { color: var(--teal); font-size: .82rem; font-weight: 900; letter-spacing: .12em; margin: 0 0 .7rem; text-transform: uppercase; }
h1, h2, h3 { color: var(--navy-deep); font-family: var(--serif); line-height: 1.4; }
h1 { font-size: clamp(2rem, 5vw, 3.65rem); letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .55rem; }
.hero-lead { color: #314754; font-size: clamp(1rem, 2vw, 1.22rem); margin: 1rem 0 0; max-width: 830px; }
.hero-meta { align-items: center; display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.badge { background: #e7eff3; border-radius: 99px; color: var(--navy); display: inline-flex; font-size: .78rem; font-weight: 850; padding: .22rem .7rem; }
.badge--warning { background: #fff3d8; color: #6a4b07; }
.badge--source { background: #e4f1ed; color: #155c4b; }
.section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.section--paper { background: var(--paper); }
.section-heading { align-items: end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1.4rem; }
.section-heading > * { margin-bottom: 0; }
.section-heading p { color: var(--muted); max-width: 680px; }

.search-panel { background: var(--paper); border: 1px solid #bdccd6; border-radius: 14px; box-shadow: var(--shadow); padding: 1rem; }
.search-panel--hero { margin-top: 2rem; max-width: 900px; }
.search-primary { display: grid; gap: .7rem; grid-template-columns: minmax(0, 1fr) auto; }
.search-primary input { border: 2px solid #7892a4; border-radius: 9px; min-height: 58px; padding: .75rem 1rem; width: 100%; }
.button { align-items: center; background: var(--navy); border: 2px solid var(--navy); border-radius: 9px; color: #fff; cursor: pointer; display: inline-flex; font-weight: 850; justify-content: center; min-height: 48px; padding: .65rem 1.15rem; text-decoration: none; }
.button:hover { background: var(--navy-deep); color: #fff; }
.button--secondary { background: #fff; color: var(--navy); }
.button--small { min-height: 40px; padding: .4rem .8rem; }
.filter-grid { display: grid; gap: .9rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1rem; }
.field { display: grid; gap: .25rem; }
.field label { color: var(--navy-deep); font-size: .78rem; font-weight: 850; }
.field input, .field select { background: #fff; border: 1px solid #93a7b4; border-radius: 7px; min-height: 44px; padding: .5rem .65rem; width: 100%; }
.search-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.search-status { background: #edf3f6; border-left: 4px solid var(--blue); margin: 1rem 0; padding: .7rem 1rem; }

.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem; }
.stat-card strong { color: var(--navy); display: block; font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.2; }
.stat-card span { color: var(--muted); font-size: .82rem; font-weight: 750; }
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-card { background: var(--paper); border: 1px solid var(--line); border-radius: 11px; color: inherit; padding: 1.25rem; text-decoration: none; }
.archive-card:hover { border-color: var(--blue); box-shadow: var(--shadow); color: inherit; }
.archive-card p { color: var(--muted); margin: .4rem 0 0; }
.archive-card__meta { color: var(--teal); display: flex; flex-wrap: wrap; font-size: .78rem; font-weight: 800; gap: .45rem; margin-bottom: .45rem; }
.notice { background: #fffaf0; border: 1px solid #e1c989; border-radius: 9px; padding: 1rem; }
.notice--blue { background: #eef5f8; border-color: #b7ceda; }
.notice strong { color: var(--navy-deep); }
.prose { max-width: 850px; }
.prose h2 { border-bottom: 2px solid var(--line); margin-top: 2.5rem; padding-bottom: .4rem; }
.prose h3 { margin-top: 1.7rem; }
.prose li + li { margin-top: .35rem; }

.table-scroll { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
table { border-collapse: collapse; min-width: 760px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: .7rem .75rem; text-align: left; vertical-align: top; }
th { background: #eaf0f3; color: var(--navy-deep); font-size: .8rem; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: #f8fafb; }
.sticky-cell { background: inherit; left: 0; min-width: 180px; position: sticky; z-index: 2; }
th.sticky-cell { background: #eaf0f3; z-index: 3; }
.mobile-result-list { display: none; }
.result-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 1rem; }
.result-card p { margin: .25rem 0; }
.pagination { align-items: center; display: flex; gap: .7rem; justify-content: center; margin-top: 1.2rem; }
.pagination button:disabled { cursor: not-allowed; opacity: .5; }

.matter-header { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(1.2rem, 4vw, 2rem); }
.matter-header h1 { font-size: clamp(1.65rem, 4vw, 2.65rem); }
.matter-number { color: var(--teal); font-weight: 900; }
.fact-explanation-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fact-panel, .explanation-panel { border-radius: 11px; padding: 1.2rem; }
.fact-panel { background: #fff; border: 1px solid var(--line); }
.explanation-panel { background: #f7fbf9; border: 1px solid #b9d5ca; }
.panel-kicker { font-size: .75rem; font-weight: 900; letter-spacing: .08em; margin: 0 0 .5rem; }
.fact-panel .panel-kicker { color: var(--blue); }
.explanation-panel .panel-kicker { color: var(--teal); }
.definition-list { display: grid; grid-template-columns: 160px 1fr; margin: 0; }
.definition-list dt, .definition-list dd { border-bottom: 1px solid var(--line); margin: 0; padding: .65rem 0; }
.definition-list dt { color: var(--muted); font-size: .82rem; font-weight: 800; }
.timeline { border-left: 3px solid #9fb5c3; display: grid; gap: 1.2rem; margin-left: .65rem; padding-left: 1.3rem; }
.decision-event { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 1.2rem; position: relative; }
.decision-event::before { background: var(--navy); border: 3px solid var(--soft); border-radius: 50%; content: ""; height: 13px; left: -1.85rem; position: absolute; top: 1.5rem; width: 13px; }
.count-list { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: .8rem 0; padding: 0; }
.count-list li { background: #edf2f4; border-radius: 6px; font-size: .78rem; font-weight: 800; padding: .2rem .55rem; }
.vote-pill { border: 1px solid currentColor; border-radius: 6px; display: inline-block; font-size: .76rem; font-weight: 850; padding: .12rem .45rem; white-space: nowrap; }
.vote--yes { color: var(--yes); }
.vote--no { color: var(--no); }
.vote--abstain, .vote--absent, .vote--absent_or_abstain { color: var(--warn); }
.vote--chair_not_voting, .vote--unknown { color: #59656d; }
.source-list { display: grid; gap: .8rem; list-style: none; padding: 0; }
.source-list li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.source-list small { color: var(--muted); display: block; overflow-wrap: anywhere; }
.hash { font-family: ui-monospace, monospace; font-size: .7rem; word-break: break-all; }
.year-group { margin-top: 1rem; }
.year-group summary { background: #eaf0f3; border-radius: 7px; color: var(--navy-deep); cursor: pointer; font-weight: 850; padding: .65rem 1rem; }

.coverage-key { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.coverage-status { border-radius: 5px; display: inline-block; font-size: .72rem; font-weight: 850; padding: .12rem .38rem; }
.coverage--confirmed { background: #dff2e9; color: #12583c; }
.coverage--partial, .coverage--located, .coverage--manual_review { background: #fff0c9; color: #6b4b05; }
.coverage--not_confirmed, .coverage--not_started, .coverage--researching { background: #e9ecef; color: #4c5860; }
.compare-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.empty-state { color: var(--muted); padding: 2rem; text-align: center; }
.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

.archive-footer { background: var(--navy-deep); color: #dce7ee; margin-top: 4rem; padding: 3rem 0 1rem; }
.archive-footer a { color: #fff; }
.archive-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr .8fr 1fr; }
.archive-footer strong { color: #fff; font-family: var(--serif); font-size: 1.2rem; }
.archive-footer nav { display: grid; gap: .3rem; }
.archive-footer__source p { margin: 0 0 .5rem; }
.archive-footer__copy { border-top: 1px solid rgba(255,255,255,.2); font-size: .75rem; margin: 2rem 0 0; padding-top: 1rem; text-align: center; }

@media (max-width: 960px) {
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .mobile-nav summary { background: var(--navy); border-radius: 7px; color: #fff; cursor: pointer; font-weight: 800; list-style: none; padding: .55rem .8rem; }
  .mobile-nav nav { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; min-width: 240px; padding: .5rem; position: absolute; right: 0; top: calc(100% + .45rem); }
  .mobile-nav nav a { color: var(--navy); font-weight: 750; padding: .55rem; text-decoration: none; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-footer__grid { grid-template-columns: 1fr 1fr; }
  .archive-footer__source { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .archive-wrap { width: min(100% - 1.2rem, 1180px); }
  .unofficial-bar { align-items: flex-start; flex-direction: column; gap: 0; }
  .archive-header__inner { min-height: 66px; }
  .archive-brand__mark { height: 38px; width: 38px; }
  .archive-brand strong { font-size: .92rem; }
  .archive-brand small { display: none; }
  .page-hero { padding-block: 2.2rem; }
  h1 { font-size: 2rem; }
  .search-primary { grid-template-columns: 1fr; }
  .search-primary .button { width: 100%; }
  .filter-grid, .stat-grid, .card-grid, .fact-explanation-grid, .compare-grid, .archive-footer__grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: .9rem; }
  .desktop-result-table { display: none; }
  .mobile-result-list { display: grid; gap: .75rem; }
  .definition-list { grid-template-columns: 1fr; }
  .definition-list dt { border-bottom: 0; padding-bottom: 0; }
  .definition-list dd { padding-top: .1rem; }
  .timeline { margin-left: .3rem; padding-left: 1rem; }
  .decision-event::before { left: -1.55rem; }
  .archive-footer__source { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .unofficial-bar, .archive-header, .archive-footer, .button { display: none !important; } body { background: #fff; } .section { padding: 1rem 0; } }
