/* =====================================================================
   THE PUBLIC LEDGER — design system for baijayantpanda.com
   main.css : tokens, base, components, page compositions
   responsive.css : breakpoint adjustments
   ===================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-var.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --graphite: #181A1B;
  --carbon: #252A2D;
  --teal: #275C61;
  --petrol: #183F43;
  --terracotta: #B65D45;
  --terracotta-ink: #9A4731;   /* AA-safe text variant on light */
  --ochre: #C59A55;
  --cream: #F1EBDD;
  --paper: #FBFAF6;
  --grey: #DDE2E1;
  --ink: #202426;
  --slate: #667174;
  --slate-ink: #515C5F;        /* AA-safe small text on cream */
  --white: #FFFFFF;

  --rule: rgba(32, 36, 38, .16);
  --rule-strong: rgba(32, 36, 38, .42);
  --rule-dark: rgba(241, 235, 221, .16);
  --grid-line: rgba(39, 92, 97, .085);
  --grid-line-dark: rgba(221, 226, 225, .07);

  --f-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-sans: "IBM Plex Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1360px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Gate: protected pages stay hidden until auth.js approves ---------- */
html[data-gate="protected"]:not(.is-authed) body { visibility: hidden; }

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-sans); font-size: 16px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--petrol); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
abbr[title] { text-decoration: none; border-bottom: 1px dotted currentColor; }
::selection { background: var(--ochre); color: var(--graphite); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 1px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--ochre); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--graphite); color: var(--paper); padding: 10px 16px;
  font: 500 13px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--paper); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout primitives ---------- */
.sheet { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sheet--narrow { max-width: 880px; }
.sheet--mid { max-width: 1120px; }
.section { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); position: relative; }
.section--tight { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px); }
.surface-cream { background: var(--cream); }
.surface-grey { background: var(--grey); }
.surface-paper { background: var(--paper); }
.surface-graphite { background: var(--graphite); color: var(--cream); }
.surface-carbon { background: var(--carbon); color: var(--cream); }
.surface-petrol { background: var(--petrol); color: var(--cream); }
.on-dark a { color: var(--ochre); }
.on-dark a:hover { color: var(--cream); }

/* Blueprint grid backgrounds */
.bp-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.bp-grid--dark {
  background-image:
    linear-gradient(var(--grid-line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-dark) 1px, transparent 1px);
  background-size: 32px 32px;
}
/* Ruled ledger paper */
.ruled {
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(39, 92, 97, .10) 31px 32px);
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--f-display); font-weight: 400; letter-spacing: -.01em; line-height: .94;
  font-size: clamp(56px, 9.2vw, 152px);
}
.h1 { font-family: var(--f-display); font-size: clamp(42px, 6vw, 88px); line-height: 1; letter-spacing: -.01em; }
.h2 { font-family: var(--f-display); font-size: clamp(32px, 4vw, 56px); line-height: 1.05; letter-spacing: -.005em; }
.h3 { font-family: var(--f-display); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; }
.h4 { font-family: var(--f-sans); font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; }
.lede { font-family: var(--f-display); font-size: clamp(22px, 2.3vw, 31px); line-height: 1.3; color: var(--ink); max-width: 34ch; }
.on-dark .lede, .lede.on-dark { color: var(--cream); }
.serif { font-family: var(--f-display); }
.italic { font-style: italic; }
.prose { max-width: 66ch; }
.prose p { font-size: 17px; line-height: 1.72; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.small { font-size: 14px; line-height: 1.55; }
.muted { color: var(--slate-ink); }
.on-dark .muted { color: rgba(241, 235, 221, .72); }
em.term { font-style: normal; font-family: var(--f-mono); font-size: .86em; letter-spacing: .02em; }

/* Mono label / metadata */
.label, .meta {
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; line-height: 1.4;
  letter-spacing: .12em; text-transform: uppercase; color: var(--slate-ink);
}
.on-dark .label, .on-dark .meta { color: rgba(241, 235, 221, .7); }
.label--accent { color: var(--terracotta-ink); }
.on-dark .label--accent { color: var(--ochre); }

/* Document number: § 03.1 */
.docno {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta-ink);
}
.docno::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.on-dark .docno { color: var(--ochre); }

/* ---------- SIGNATURE: Public Record Marker ---------- */
.record-marker {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--rule-strong); padding: 0; margin: 0; list-style: none;
}
.record-marker > span, .record-marker > li { padding: 6px 10px; line-height: 1.3; }
.record-marker > span + span, .record-marker > li + li { border-left: 1px solid var(--rule-strong); }
.record-marker > span:first-child, .record-marker > li:first-child {
  background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; gap: 7px;
}
.record-marker > span:first-child::before, .record-marker > li:first-child::before {
  content: ""; width: 7px; height: 7px; border: 1.5px solid var(--ochre); transform: rotate(45deg);
}
.on-dark .record-marker, .record-marker.on-dark { color: var(--cream); border-color: rgba(241, 235, 221, .32); }
.on-dark .record-marker > span + span { border-color: rgba(241, 235, 221, .32); }
.on-dark .record-marker > span:first-child { background: var(--cream); color: var(--graphite); }

/* ---------- Status tags ---------- */
.tag {
  display: inline-block; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px 2px; border: 1px solid currentColor;
  line-height: 1.4; white-space: nowrap;
}
.tag--current { color: var(--white); background: var(--teal); border-color: var(--teal); }
.tag--historical { color: var(--slate-ink); }
.tag--view { color: var(--teal); }
.tag--action { color: var(--terracotta-ink); }
.tag--policy { color: var(--petrol); background: rgba(39, 92, 97, .08); }
.tag--analysis { color: var(--slate-ink); border-style: dashed; }
.tag--news { color: var(--ink); }
.tag--official { color: var(--white); background: var(--petrol); border-color: var(--petrol); }
.tag--opinion { color: var(--terracotta-ink); border-style: dashed; }
.on-dark .tag--historical { color: rgba(241, 235, 221, .75); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 22px;
  font-family: var(--f-mono); font-size: 12.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.on-dark .btn--ghost { color: var(--cream); border-color: rgba(241, 235, 221, .5); }
.on-dark .btn--ghost:hover { background: var(--cream); color: var(--graphite); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-line {
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px; transition: background-size .35s var(--ease), color .2s;
}
.link-line:hover { color: var(--teal); background-size: 40% 1px; }
.on-dark .link-line { color: var(--cream); }
.on-dark .link-line:hover { color: var(--ochre); }

.src {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--slate-ink);
}
.src a { color: inherit; }
.src a:hover { color: var(--teal); }
.on-dark .src { color: rgba(241, 235, 221, .66); }

/* =====================================================================
   MASTHEAD — sticky navigation
   ===================================================================== */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 250, 246, .94);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .3s var(--ease);
}
.masthead.is-scrolled { box-shadow: 0 1px 0 var(--rule), 0 10px 30px -20px rgba(24, 26, 27, .35); }
.masthead__bar {
  display: flex; align-items: center; gap: 24px; height: var(--header-h);
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand__mark {
  width: 36px; height: 36px; display: grid; place-items: center; position: relative;
  font-family: var(--f-display); font-size: 19px; color: var(--paper); background: var(--petrol);
}
.brand__mark::after { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(197, 154, 85, .7); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--f-display); font-size: 22px; letter-spacing: -.005em; }
.brand__sub { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--slate-ink); margin-top: 3px; }

.quicknav { margin-left: auto; }
.quicknav ul { display: flex; list-style: none; gap: 2px; }
.quicknav a {
  display: block; padding: 8px 10px; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none;
  position: relative; white-space: nowrap;
}
.quicknav a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 1px; background: var(--terracotta);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.quicknav a:hover::after, .quicknav a[aria-current="page"]::after { transform: scaleX(1); }
.quicknav a[aria-current="page"] { color: var(--terracotta-ink); }

.section-flag {
  display: none; margin-left: auto; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--slate-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.section-flag b { color: var(--terracotta-ink); font-weight: 500; }

.index-toggle {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 16px; flex-shrink: 0;
  background: var(--ink); color: var(--paper); border: 0;
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.index-toggle:hover { background: var(--teal); }
.index-toggle__icon { width: 18px; height: 12px; position: relative; }
.index-toggle__icon span { position: absolute; left: 0; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .2s, width .3s var(--ease); }
.index-toggle__icon span:nth-child(1) { top: 0; width: 18px; }
.index-toggle__icon span:nth-child(2) { top: 5px; width: 12px; }
.index-toggle__icon span:nth-child(3) { top: 10px; width: 18px; }
.index-toggle[aria-expanded="true"] .index-toggle__icon span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.index-toggle[aria-expanded="true"] .index-toggle__icon span:nth-child(2) { opacity: 0; }
.index-toggle[aria-expanded="true"] .index-toggle__icon span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Full site index panel (primary navigation) */
.site-index {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--graphite); color: var(--cream);
  max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid rgba(197, 154, 85, .35);
}
.site-index[hidden] { display: none; }
.site-index.is-open { animation: indexIn .38s var(--ease) both; }
@keyframes indexIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.site-index__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gutter) 48px;
  display: grid; grid-template-columns: 1fr 2.4fr; gap: 48px;
}
.site-index__aside { display: flex; flex-direction: column; gap: 20px; }
.site-index__title { font-family: var(--f-display); font-size: 40px; line-height: 1; color: var(--paper); }
.site-index__list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; counter-reset: idx; }
.site-index__list li { border-top: 1px solid var(--rule-dark); }
.site-index__list a {
  display: grid; grid-template-columns: 34px 1fr; align-items: baseline; gap: 6px; padding: 12px 0;
  color: var(--cream); text-decoration: none; font-size: 15px; transition: color .2s, padding .3s var(--ease);
}
.site-index__list a .n { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: rgba(241, 235, 221, .5); }
.site-index__list a:hover { color: var(--ochre); padding-left: 6px; }
.site-index__list a[aria-current="page"] { color: var(--ochre); }
.site-index__list a[aria-current="page"] .n { color: var(--ochre); }
.site-index__list a[aria-current="page"]::after { content: " ●"; font-size: 9px; vertical-align: middle; }
.logout {
  align-self: flex-start; background: none; border: 1px solid rgba(241, 235, 221, .35); color: var(--cream);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 9px 14px;
}
.logout:hover { border-color: var(--ochre); color: var(--ochre); }
body.index-open { overflow: hidden; }

/* =====================================================================
   PAGE HEAD (shared chapter opener; varied per page by modifiers)
   ===================================================================== */
.crumbs { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-ink); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--rule-strong); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--teal); }
.crumbs [aria-current] { color: var(--ink); }
.on-dark .crumbs { color: rgba(241, 235, 221, .6); }
.on-dark .crumbs [aria-current] { color: var(--cream); }

.chapter-head { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(40px, 5vw, 72px); position: relative; }
.chapter-head__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 64px); }

/* ---------- Plate: image frame with registration marks ---------- */
.plate { position: relative; margin: 0; --mat: clamp(10px, 1.4vw, 18px); }
.plate__frame {
  position: relative; background: var(--cream); padding: var(--mat);
  border: 1px solid var(--rule);
}
.plate__frame img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: transparent; }
.plate__frame--fixed { aspect-ratio: var(--ar, 4 / 3); }
.plate__frame--fixed img { position: absolute; inset: clamp(10px, 1.4vw, 18px); width: calc(100% - 2 * clamp(10px, 1.4vw, 18px)); height: calc(100% - 2 * clamp(10px, 1.4vw, 18px)); }
.plate__frame::before, .plate__frame::after,
.plate__frame > .reg::before, .plate__frame > .reg::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--ink); border-style: solid; pointer-events: none; z-index: 2;
}
.plate__frame::before { top: -7px; left: -7px; border-width: 1px 0 0 1px; }
.plate__frame::after { bottom: -7px; right: -7px; border-width: 0 1px 1px 0; }
.plate__frame > .reg { position: absolute; inset: 0; pointer-events: none; }
.plate__frame > .reg::before { top: -7px; right: -7px; border-width: 1px 1px 0 0; }
.plate__frame > .reg::after { bottom: -7px; left: -7px; border-width: 0 0 1px 1px; }
.plate--dark .plate__frame { background: var(--carbon); border-color: rgba(241, 235, 221, .14); }
.plate--dark .plate__frame::before, .plate--dark .plate__frame::after,
.plate--dark .plate__frame > .reg::before, .plate--dark .plate__frame > .reg::after { border-color: var(--ochre); }
.plate figcaption {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline;
  margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: var(--slate-ink);
}
.plate figcaption .label { color: var(--terracotta-ink); }
.plate--dark figcaption, .on-dark .plate figcaption { color: rgba(241, 235, 221, .74); }
.plate--dark figcaption .label, .on-dark .plate figcaption .label { color: var(--ochre); }

/* ---------- Margin note ---------- */
.margin-note {
  font-size: 13.5px; line-height: 1.55; color: var(--slate-ink);
  border-left: 1px solid var(--terracotta); padding: 2px 0 2px 14px;
}
.margin-note .label { display: block; margin-bottom: 6px; color: var(--terracotta-ink); }
.on-dark .margin-note { color: rgba(241, 235, 221, .75); border-color: var(--ochre); }
.on-dark .margin-note .label { color: var(--ochre); }

/* ---------- Ledger table (generic) ---------- */
.ledger { width: 100%; font-size: 15px; }
.ledger caption { text-align: left; padding-bottom: 12px; }
.ledger th {
  text-align: left; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--slate-ink); padding: 10px 16px 10px 0; border-bottom: 1px solid var(--ink); vertical-align: bottom;
}
.ledger td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.5; }
.ledger tr:last-child td { border-bottom-color: var(--rule-strong); }
.ledger .num { font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.on-dark .ledger th { color: rgba(241, 235, 221, .66); border-bottom-color: rgba(241, 235, 221, .6); }
.on-dark .ledger td { border-bottom-color: var(--rule-dark); }

/* ---------- Source list / footnotes ---------- */
.sources { list-style: none; counter-reset: src; display: grid; gap: 10px; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 34px 1fr; font-size: 13.5px; line-height: 1.5; color: var(--slate-ink); }
.sources li::before { content: "[" counter(src) "]"; font-family: var(--f-mono); font-size: 11.5px; color: var(--terracotta-ink); padding-top: 2px; }
.sources a { color: var(--ink); word-break: break-word; }
.on-dark .sources li { color: rgba(241, 235, 221, .72); }
.on-dark .sources a { color: var(--cream); }
.on-dark .sources li::before { color: var(--ochre); }
sup.fn { font-family: var(--f-mono); font-size: 10.5px; line-height: 0; }
sup.fn a { text-decoration: none; color: var(--terracotta-ink); padding: 0 1px; }

.editorial-note {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  border: 1px solid var(--rule-strong); padding: 18px 20px; font-size: 14px; line-height: 1.55; color: var(--slate-ink); background: var(--paper);
}
.editorial-note .label { color: var(--ink); padding-top: 2px; }
.on-dark .editorial-note { background: transparent; border-color: rgba(241, 235, 221, .3); color: rgba(241, 235, 221, .78); }
.on-dark .editorial-note .label { color: var(--cream); }

/* ---------- Filter / search controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.chip {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 12px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); min-height: 36px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search {
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--ink); min-width: min(320px, 100%);
}
.search svg { flex-shrink: 0; color: var(--slate); }
.search input { border: 0; background: transparent; padding: 10px 0; width: 100%; font-size: 15px; }
.search input::placeholder { color: var(--slate); }
.search input:focus-visible { outline: none; }
.search:focus-within { border-bottom-color: var(--terracotta); box-shadow: 0 1px 0 var(--terracotta); }
.result-count { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-ink); }
.empty-state { padding: 32px 0; color: var(--slate-ink); font-style: italic; font-family: var(--f-display); font-size: 22px; }
.is-filtered-out { display: none !important; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { background: var(--graphite); color: var(--cream); position: relative; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; padding-top: 72px; padding-bottom: 56px; }
.footer__brand .brand__name { font-size: 40px; color: var(--paper); display: block; line-height: 1; }
.footer__brand p { color: rgba(241, 235, 221, .7); font-size: 14px; max-width: 42ch; margin-top: 16px; }
.footer h2 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ochre); margin-bottom: 18px; font-weight: 500; }
.footer__links { list-style: none; columns: 2; column-gap: 24px; }
.footer__links li { break-inside: avoid; }
.footer__links a { display: inline-block; padding: 5px 0; color: rgba(241, 235, 221, .82); text-decoration: none; font-size: 14px; }
.footer__links a:hover { color: var(--ochre); }
.footer__contact { font-style: normal; font-size: 15px; line-height: 1.8; }
.footer__contact a { color: var(--cream); text-decoration: none; border-bottom: 1px solid rgba(241, 235, 221, .3); }
.footer__contact a:hover { color: var(--ochre); border-color: var(--ochre); }
.footer__contact .who { font-family: var(--f-display); font-size: 24px; color: var(--paper); display: block; margin-bottom: 4px; }
.social { display: flex; gap: 8px; list-style: none; margin-top: 22px; flex-wrap: wrap; }
.social a {
  width: 42px; height: 42px; display: grid; place-items: center; color: var(--cream);
  border: 1px solid rgba(241, 235, 221, .25); transition: background .2s, color .2s, border-color .2s;
}
.social a:hover { background: var(--ochre); color: var(--graphite); border-color: var(--ochre); }
.social svg { width: 17px; height: 17px; }
.footer__base {
  border-top: 1px solid var(--rule-dark); padding-top: 20px; padding-bottom: 28px;
  display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: rgba(241, 235, 221, .62);
}
.footer__base a { color: rgba(241, 235, 221, .85); }
.footer__base a:hover { color: var(--ochre); }
.footer__ledger {
  font-family: var(--f-display); font-size: clamp(64px, 14vw, 220px); line-height: .8; color: transparent;
  -webkit-text-stroke: 1px rgba(241, 235, 221, .11); white-space: nowrap; user-select: none; pointer-events: none;
  margin-bottom: -.12em; letter-spacing: -.02em;
}

/* =====================================================================
   REVEAL ANIMATION (progressive — content visible without JS)
   ===================================================================== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-img .plate__frame img { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease) .1s; }
.js .reveal-img.is-in .plate__frame img { clip-path: inset(0 0 0 0); }
.draw path, .draw line, .draw polyline, .draw circle, .draw rect { stroke-dasharray: var(--len, 1200); stroke-dashoffset: 0; }
.js .draw:not(.is-in) path, .js .draw:not(.is-in) line, .js .draw:not(.is-in) polyline, .js .draw:not(.is-in) circle.drawn, .js .draw:not(.is-in) rect.drawn { stroke-dashoffset: var(--len, 1200); }
.js .draw path, .js .draw line, .js .draw polyline, .js .draw circle.drawn, .js .draw rect.drawn { transition: stroke-dashoffset 2.2s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-img .plate__frame img { clip-path: none; }
  .js .draw path, .js .draw line, .js .draw polyline, .js .draw circle.drawn, .js .draw rect.drawn { stroke-dashoffset: 0 !important; }
}

/* =====================================================================
   PAGE COMPOSITIONS
   ===================================================================== */

/* ---------------- HOME : public ledger opening ---------------- */
.home-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--ink); }
.home-hero__blueprint { position: absolute; inset: 0; pointer-events: none; color: var(--teal); }
.home-hero__blueprint svg { width: 100%; height: 100%; }
.home-hero__grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px);
  align-items: end; padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(40px, 5vw, 72px);
}
.home-hero__meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: clamp(28px, 4vw, 56px); }
.home-hero__title { margin-bottom: clamp(24px, 3vw, 40px); }
.home-hero__title .display { display: block; }
.home-hero__title .display span { display: block; }
.home-hero__title .display span:last-child { padding-left: .42em; font-style: italic; color: var(--petrol); }
.home-hero__role { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; max-width: 22ch; }
.home-hero__party { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--slate-ink); }
.home-hero__party::before { content: ""; width: 40px; height: 1px; background: var(--terracotta); }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vw, 44px); }
.home-hero__plate { position: relative; }
.home-hero__plate .plate__frame { background: var(--grey); }
.home-hero__plate .coord { position: absolute; font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--slate-ink); }
.home-hero__plate .coord--t { top: -26px; left: 0; }
.home-hero__plate .coord--r { right: -12px; top: 50%; writing-mode: vertical-rl; transform: translateX(100%); }

.fact-strip { border-bottom: 1px solid var(--ink); background: var(--paper); }
.fact-strip dl { display: grid; grid-template-columns: .8fr 1fr .8fr .9fr 1.5fr; margin: 0; }
.fact-strip dl > div { padding: 22px 20px 24px; border-left: 1px solid var(--rule); }
.fact-strip dl > div:first-child { border-left: 0; padding-left: 0; }
.fact-strip dt { margin-bottom: 10px; }
.fact-strip dd { margin: 0; font-family: var(--f-display); font-size: clamp(19px, 1.7vw, 24px); line-height: 1.15; }
.fact-strip dd small { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--terracotta-ink); margin-top: 6px; }
.fact-strip .verified { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); padding: 10px 0; }

.record-ledger { list-style: none; border-top: 1px solid var(--ink); }
.record-ledger__head, .record-ledger li {
  display: grid; grid-template-columns: 70px 150px minmax(0, 1fr) 200px; gap: 24px; align-items: baseline;
}
.record-ledger__head { padding: 10px 0; border-bottom: 1px solid var(--ink); }
.record-ledger li { padding: 22px 0; border-bottom: 1px solid var(--rule); transition: background .3s; }
.record-ledger li:hover { background: linear-gradient(90deg, rgba(197, 154, 85, .12), transparent 70%); }
.record-ledger .entry { font-family: var(--f-mono); font-size: 11px; color: var(--slate-ink); letter-spacing: .08em; }
.record-ledger .year { font-family: var(--f-display); font-size: clamp(34px, 3.4vw, 50px); line-height: .9; color: var(--petrol); }
.record-ledger .what h3 { font-family: var(--f-display); font-size: clamp(21px, 1.9vw, 27px); line-height: 1.2; margin-bottom: 6px; }
.record-ledger .what p { font-size: 15px; color: var(--slate-ink); margin: 0; max-width: 60ch; }
.record-ledger .ref { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--slate-ink); line-height: 1.5; }
.record-ledger li.is-current .year { color: var(--terracotta-ink); }

.current-file { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.current-file__list { list-style: none; border-top: 1px solid rgba(241, 235, 221, .5); }
.current-file__list li { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; padding: 22px 0; border-bottom: 1px solid var(--rule-dark); }
.current-file__list h3 { font-family: var(--f-display); font-size: clamp(22px, 2vw, 28px); line-height: 1.2; color: var(--paper); }
.current-file__list p { grid-column: 1 / -1; margin: 0; color: rgba(241, 235, 221, .74); font-size: 15px; }

.contents-dir { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 80px); list-style: none; }
.contents-dir li { border-bottom: 1px solid var(--rule); }
.contents-dir a {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 16px 0;
  text-decoration: none; color: var(--ink);
}
.contents-dir .n { font-family: var(--f-mono); font-size: 12px; color: var(--terracotta-ink); }
.contents-dir .t { font-family: var(--f-display); font-size: clamp(22px, 2vw, 28px); line-height: 1.15; }
.contents-dir .d { display: block; font-family: var(--f-sans); font-size: 13.5px; color: var(--slate-ink); margin-top: 4px; }
.contents-dir .go { font-family: var(--f-mono); font-size: 16px; color: var(--slate); transition: transform .3s var(--ease), color .2s; }
.contents-dir a:hover .t { color: var(--teal); }
.contents-dir a:hover .go { transform: translateX(6px); color: var(--terracotta); }

.home-field { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: clamp(24px, 4vw, 64px); align-items: start; }

/* ---------------- ABOUT : biographical dossier ---------------- */
.dossier-head { background: var(--cream); border-bottom: 1px solid var(--ink); }
.dossier-tab {
  display: inline-flex; gap: 14px; align-items: center; background: var(--ink); color: var(--paper);
  padding: 8px 16px 8px 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%); padding-right: 30px;
}
.dossier-head__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; align-items: end; }
.dossier-idcard { border: 1px solid var(--ink); background: var(--paper); }
.dossier-idcard dl { margin: 0; }
.dossier-idcard div { display: grid; grid-template-columns: 120px 1fr; border-bottom: 1px solid var(--rule); }
.dossier-idcard div:last-child { border-bottom: 0; }
.dossier-idcard dt { padding: 12px 14px; border-right: 1px solid var(--rule); }
.dossier-idcard dd { margin: 0; padding: 12px 14px; font-size: 14.5px; line-height: 1.4; }
.dossier-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }
.dossier-toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.dossier-toc ol { list-style: none; border-left: 1px solid var(--rule); }
.dossier-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; color: var(--slate-ink); text-decoration: none; }
.dossier-toc a:hover, .dossier-toc a.is-active { color: var(--ink); border-left-color: var(--terracotta); }
.dossier-section { padding: 0 0 clamp(48px, 6vw, 80px); margin-bottom: clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h) + 24px); }
.dossier-section:last-child { border-bottom: 0; margin-bottom: 0; }
.dossier-section__head { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; margin-bottom: 28px; }
.dossier-section__head .n { font-family: var(--f-mono); font-size: 13px; color: var(--terracotta-ink); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin: 0 0 28px; }
.fields div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); }
.fields div:nth-child(odd) { border-right: 1px solid var(--rule); }
.fields div:nth-child(even) { padding-left: 16px; }
.fields dt { margin-bottom: 6px; }
.fields dd { margin: 0; font-size: 15.5px; line-height: 1.45; }
.fields .wide { grid-column: 1 / -1; border-right: 0 !important; padding-left: 0 !important; }
.exhibit-pair { margin: 36px 0 8px; }

/* ---------------- EARLY LIFE : archival document ---------------- */
.archive-page { background: var(--cream); }
.archive-sheet {
  background: var(--paper); max-width: 980px; margin: 0 auto; position: relative;
  padding: clamp(28px, 6vw, 88px) clamp(20px, 7vw, 104px) clamp(40px, 6vw, 88px);
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -40px rgba(24, 26, 27, .45);
  border: 1px solid var(--rule);
}
.archive-sheet::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: clamp(12px, 3.5vw, 52px); width: 1px; background: rgba(182, 93, 69, .35);
}
.archive-header { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 36px; }
.archive-stamp {
  display: inline-block; border: 2px solid var(--terracotta); color: var(--terracotta-ink); padding: 8px 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  line-height: 1.5; text-align: center;
}
.archive-title { font-family: var(--f-display); font-size: clamp(44px, 6.4vw, 92px); line-height: .95; margin-bottom: 28px; }
.archive-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.archive-photo { background: var(--white); padding: 12px 12px 44px; box-shadow: 0 16px 30px -20px rgba(0, 0, 0, .5); position: relative; margin: 0; }
.archive-photo img { width: 100%; aspect-ratio: 7 / 8; object-fit: contain; background: #f4f4f2; }
.archive-photo figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--slate-ink); }
.archive-photo::before, .archive-photo::after { content: ""; position: absolute; width: 70px; height: 22px; background: rgba(197, 154, 85, .45); top: -10px; }
.archive-photo::before { left: 18px; }
.archive-photo::after { right: 18px; }
.dropcap::first-letter { font-family: var(--f-display); float: left; font-size: 5.2em; line-height: .78; padding: 6px 12px 0 0; color: var(--petrol); }
.archive-entry { border-top: 1px solid var(--rule-strong); padding-top: 28px; margin-top: 40px; }
.archive-entry__head { display: flex; gap: 16px; align-items: baseline; margin-bottom: 16px; flex-wrap: wrap; }
.not-documented { border: 1px dashed var(--rule-strong); padding: 18px 20px; font-size: 14.5px; color: var(--slate-ink); background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(221, 226, 225, .45) 10px 11px); }

/* ---------------- PROFESSIONAL JOURNEY : engineering timeline ---------------- */
.eng-hero { background: var(--graphite); color: var(--cream); position: relative; overflow: hidden; }
.eng-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; }
.eng-diagram { color: var(--ochre); margin-top: 56px; overflow-x: auto; }
.eng-diagram svg { min-width: 880px; width: 100%; height: auto; }
.spec-sheet { border: 1px solid var(--ink); }
.spec-sheet__head { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--ink); background: var(--grey); }
.spec-row { display: grid; grid-template-columns: 90px 240px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.spec-row:last-child { border-bottom: 0; }
.spec-row > * { padding: 20px 18px; }
.spec-row > * + * { border-left: 1px solid var(--rule); }
.spec-row .code { font-family: var(--f-mono); font-size: 12px; color: var(--terracotta-ink); }
.spec-row h3 { font-family: var(--f-display); font-size: 24px; line-height: 1.15; }
.spec-row p { margin: 0 0 .6em; font-size: 15px; }
.spec-row p:last-child { margin: 0; }

/* ---------------- PARLIAMENT : legislative archive ---------------- */
.tenure { margin-top: 40px; }
.tenure__scale { position: relative; height: 28px; border-bottom: 1px solid var(--ink); margin-left: 170px; }
.tenure__tick { position: absolute; bottom: 0; transform: translateX(-50%); font-family: var(--f-mono); font-size: 10.5px; color: var(--slate-ink); padding-bottom: 8px; }
.tenure__tick::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 1px; height: 6px; background: var(--ink); }
.tenure__row { display: grid; grid-template-columns: 170px 1fr; align-items: center; border-bottom: 1px solid var(--rule); min-height: 58px; }
.tenure__row .who { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-ink); padding-right: 12px; }
.tenure__track { position: relative; height: 58px; background-image: linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: calc(100% / 13) 100%; }
.tenure__bar {
  position: absolute; top: 16px; height: 26px; background: var(--petrol); color: var(--paper);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden;
}
.tenure__bar--rs { background: var(--teal); }
.tenure__bar--gap { background: transparent; color: var(--slate-ink); border: 1px dashed var(--rule-strong); }
.tenure__bar--now { background: var(--terracotta); }
.volumes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.volume { padding: 28px 28px 32px 0; border-right: 1px solid var(--rule); }
.volume + .volume { padding-left: 28px; }
.volume:last-child { border-right: 0; padding-right: 0; }
.volume__no { font-family: var(--f-display); font-size: 72px; line-height: .9; color: var(--petrol); margin: 12px 0 10px; }
.volume ol { list-style: none; margin-top: 18px; border-top: 1px solid var(--rule); }
.volume li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; line-height: 1.45; }
.volume li .num { font-family: var(--f-mono); font-size: 12px; color: var(--terracotta-ink); }
.work-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--ink); }
.work-kind { padding: 22px; border-right: 1px solid var(--rule); }
.work-kind:last-child { border-right: 0; }
.work-kind h3 { font-family: var(--f-display); font-size: 24px; margin: 10px 0 8px; }
.work-kind p { font-size: 14px; color: var(--slate-ink); margin: 0; }
.parl-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

/* ---------------- COMMITTEE WORK : report interface ---------------- */
.report-cover { background: var(--petrol); color: var(--cream); position: relative; overflow: hidden; }
.report-cover__sheet {
  border: 1px solid rgba(241, 235, 221, .35); padding: clamp(24px, 5vw, 64px); position: relative; text-align: center;
  max-width: 1040px; margin: 0 auto;
}
.report-cover__sheet::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(197, 154, 85, .35); pointer-events: none; }
.report-cover__house { font-family: var(--f-mono); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ochre); }
.report-cover__title { font-family: var(--f-display); font-size: clamp(38px, 5.6vw, 84px); line-height: 1; margin: 24px auto 20px; max-width: 16ch; color: var(--paper); }
.report-cover__rule { width: 120px; height: 1px; background: var(--ochre); margin: 28px auto; }
.report-cover dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 32px 0 0; border-top: 1px solid rgba(241, 235, 221, .25); text-align: left; }
.report-cover dl div { padding: 18px 18px 0 0; }
.report-cover dl div + div { padding-left: 18px; border-left: 1px solid rgba(241, 235, 221, .25); }
.report-cover dd { margin: 6px 0 0; font-family: var(--f-display); font-size: 22px; line-height: 1.2; color: var(--paper); }
.report-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 80px); }
.paras { counter-reset: para; list-style: none; }
.paras > li { counter-increment: para; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.paras > li::before { content: "1." counter(para); font-family: var(--f-mono); font-size: 12.5px; color: var(--terracotta-ink); padding-top: 3px; }
.paras.ch2 > li::before { content: "2." counter(para); }
.paras p { margin: 0 0 .5em; font-size: 16px; }
.paras p:last-child { margin: 0; }
.tor { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; border-top: 3px solid var(--ink); background: var(--cream); padding: 22px; }
.tor ol { padding-left: 1.2em; font-size: 14px; line-height: 1.55; }
.tor li { margin-bottom: 10px; }
.flow { color: var(--teal); overflow-x: auto; }
.flow svg { min-width: 760px; width: 100%; height: auto; }
.committee-table td:first-child { width: 110px; }
.committee-table .c-name { font-family: var(--f-display); font-size: 21px; line-height: 1.2; display: block; }
.committee-table .c-role { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-ink); }

/* ---------------- KENDRAPARA : constituency dossier ---------------- */
.geo-hero { background: var(--cream); border-bottom: 1px solid var(--ink); overflow: hidden; }
.geo-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; }
.geo-map { position: relative; color: var(--teal); }
.geo-map svg { width: 100%; height: auto; }
.geo-map text { font-family: var(--f-mono); }
.geo-coords { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: 32px; }
.geo-coords div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); }
.geo-coords div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
.geo-coords dd { margin: 4px 0 0; font-family: var(--f-display); font-size: 22px; }
.segments { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule); }
.segments li { padding: 18px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.segments .n { font-family: var(--f-mono); font-size: 11px; color: var(--terracotta-ink); display: block; margin-bottom: 6px; }
.segments .nm { font-family: var(--f-display); font-size: 24px; line-height: 1.1; }
.landscape-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(241, 235, 221, .45); }
.landscape-notes article { padding: 28px 28px 8px 0; }
.landscape-notes article + article { padding-left: 28px; border-left: 1px solid var(--rule-dark); }
.landscape-notes h3 { font-family: var(--f-display); font-size: 28px; line-height: 1.1; color: var(--paper); margin: 12px 0; }
.landscape-notes p { font-size: 15px; color: rgba(241, 235, 221, .78); }
.q-list { list-style: none; border-top: 1px solid var(--ink); }
.q-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 180px; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.q-list .q-meta { font-family: var(--f-mono); font-size: 11.5px; line-height: 1.6; color: var(--slate-ink); }
.q-list h3 { font-family: var(--f-display); font-size: 24px; line-height: 1.2; margin-bottom: 6px; }
.q-list p { font-size: 15px; margin: 0; color: var(--slate-ink); }

/* ---------------- POLICY : research journal ---------------- */
.journal-mast { border-bottom: 3px double var(--ink); }
.journal-mast__row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--ink); }
.journal-mast__row .label:last-child { text-align: right; }
.journal-mast__name { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 30px); font-style: italic; text-align: center; }
.journal-title { text-align: center; padding: clamp(40px, 6vw, 88px) 0 clamp(32px, 4vw, 56px); }
.journal-title .h1 { max-width: 18ch; margin: 18px auto 20px; }
.abstract { display: grid; grid-template-columns: 160px 1fr; gap: 24px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 24px 0; max-width: 980px; margin: 0 auto; }
.abstract p { font-family: var(--f-display); font-size: 21px; line-height: 1.45; margin: 0; }
.legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); }
.legend div { padding: 18px; border-right: 1px solid var(--rule); }
.legend div:last-child { border-right: 0; }
.legend p { font-size: 13.5px; color: var(--slate-ink); margin: 10px 0 0; }
.journal-cols { columns: 2; column-gap: 56px; column-rule: 1px solid var(--rule); }
.journal-cols p { font-size: 16px; line-height: 1.7; }
.theme { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 44px); padding: 36px 0; border-top: 1px solid var(--ink); }
.theme__no { font-family: var(--f-display); font-size: 56px; line-height: .9; color: var(--teal); }
.theme h3 { font-family: var(--f-display); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; margin-bottom: 12px; }
.theme__evidence { list-style: none; border-left: 1px solid var(--rule); padding-left: 24px; }
.theme__evidence li { padding: 0 0 16px; }
.theme__evidence li:last-child { padding-bottom: 0; }
.theme__evidence p { margin: 8px 0 4px; font-size: 15px; }
.fig { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; }

/* ---------------- PUBLIC ISSUES : issue archive ---------------- */
.issue-archive { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.issue-tabs { border-right: 1px solid var(--ink); background: var(--cream); }
.issue-tabs [role="tablist"] { display: flex; flex-direction: column; }
.issue-tab {
  display: grid; grid-template-columns: 38px 1fr; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 18px 18px; font-size: 15px; color: var(--ink); gap: 4px; align-items: baseline; transition: background .2s;
}
.issue-tab .n { font-family: var(--f-mono); font-size: 11px; color: var(--slate-ink); }
.issue-tab:hover { background: rgba(255, 255, 255, .55); }
.issue-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.issue-tab[aria-selected="true"] .n { color: var(--ochre); }
.issue-panel { padding: clamp(24px, 4vw, 48px); }
.issue-panel[hidden] { display: none; }
.issue-panel h2 { margin-bottom: 20px; }
.issue-fields { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-top: 1px solid var(--rule-strong); }
.issue-fields dt { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.issue-fields dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; line-height: 1.6; }
.issue-fields dd p:last-child { margin: 0; }
.no-js .issue-panel[hidden] { display: block; }
.no-js .issue-tabs { display: none; }

/* ---------------- SOCIAL INITIATIVES : documentary ---------------- */
.doc-open { background: var(--graphite); color: var(--cream); overflow: hidden; }
.doc-open__statement { font-family: var(--f-display); font-size: clamp(38px, 5.4vw, 80px); line-height: 1.02; max-width: 17ch; color: var(--paper); }
.doc-open__statement em { color: var(--ochre); }
.reel { counter-reset: reel; list-style: none; }
.reel > li { counter-increment: reel; display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--ink); position: relative; }
.reel > li::before {
  content: "FRAME " counter(reel, decimal-leading-zero); font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; color: var(--terracotta-ink);
}
.reel h3 { font-family: var(--f-display); font-size: clamp(28px, 3vw, 42px); line-height: 1.08; }
.reel .body p { font-size: 16px; }
.nutri-graphic { color: var(--teal); }
.nutri-graphic svg { width: 100%; height: auto; }

/* ---------------- INTERNATIONAL : global engagement map ---------------- */
.globe-head { background: var(--petrol); color: var(--cream); overflow: hidden; }
.coord-plot { color: var(--ochre); margin-top: 40px; }
.coord-plot svg { width: 100%; height: auto; }
.coord-plot text { font-family: var(--f-mono); }
.engagement-log { list-style: none; }
.engagement { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-top: 1px solid var(--ink); }
.engagement__date { padding: 24px 24px 24px 0; border-right: 1px solid var(--rule); }
.engagement__date .d { font-family: var(--f-display); font-size: 30px; line-height: 1; display: block; margin-top: 8px; }
.engagement__body { padding: 24px 0 32px 32px; }
.engagement__body h3 { font-family: var(--f-display); font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; margin-bottom: 18px; }
.engagement dl.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--rule); }
.kv dt { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); }
.kv dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.55; }

/* ---------------- SPEECHES : transcript archive ---------------- */
.transcript-list { list-style: none; }
.transcript { display: grid; grid-template-columns: 160px minmax(0, 1fr) 200px; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.transcript__time { font-family: var(--f-mono); font-size: 12px; line-height: 1.6; color: var(--slate-ink); }
.transcript__time b { display: block; font-weight: 500; color: var(--ink); font-size: 13px; }
.transcript h3 { font-family: var(--f-display); font-size: clamp(22px, 2vw, 28px); line-height: 1.2; margin-bottom: 8px; }
.transcript p { font-size: 15px; margin: 0 0 8px; }
.transcript blockquote { margin: 12px 0 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--ochre); font-family: var(--f-display); font-size: 20px; line-height: 1.4; font-style: italic; }
.transcript__side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.speech-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.waveform { color: var(--teal); height: 60px; margin-top: 28px; }
.waveform svg { width: 100%; height: 100%; }

/* ---------------- WRITINGS : publishing layout ---------------- */
.book-feature { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.biblio { border-top: 2px solid var(--ink); }
.biblio div { display: grid; grid-template-columns: 140px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.biblio dt { padding: 12px 12px 12px 0; }
.biblio dd { margin: 0; padding: 12px 0; font-size: 15px; }
.book-title { font-family: var(--f-display); font-size: clamp(48px, 6.4vw, 96px); line-height: .95; letter-spacing: -.01em; }
.book-title em { color: var(--terracotta-ink); }
.contents-page { list-style: none; border-top: 1px solid var(--ink); }
.contents-page li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.contents-page .t { font-family: var(--f-display); font-size: clamp(21px, 1.9vw, 26px); line-height: 1.25; }
.contents-page .t a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--ochre), var(--ochre)) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.contents-page .t a:hover { background-size: 100% 1px; }
.contents-page .pub { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-ink); white-space: nowrap; }
.contents-page .sum { grid-column: 1 / -1; font-size: 14.5px; color: var(--slate-ink); margin: 0; max-width: 80ch; }
.writing-cols { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }

/* ---------------- DOCUMENTS : repository ---------------- */
.repo-head { background: var(--grey); border-bottom: 1px solid var(--ink); }
.repo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); margin-top: 40px; }
.repo-stats div { padding: 16px 16px 16px 0; }
.repo-stats div + div { padding-left: 16px; border-left: 1px solid var(--rule-strong); }
.repo-stats dd { margin: 6px 0 0; font-family: var(--f-display); font-size: 36px; line-height: 1; }
.doc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc-table { min-width: 900px; }
.doc-table .d-title { font-weight: 500; line-height: 1.4; display: block; margin-bottom: 4px; }
.doc-table .d-note { font-size: 13px; color: var(--slate-ink); }
.doc-table td:last-child, .doc-table th:last-child { padding-right: 0; }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-actions a, .doc-actions span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border: 1px solid var(--ink); text-decoration: none; color: var(--ink); white-space: nowrap; }
.doc-actions a:hover { background: var(--ink); color: var(--paper); }
.doc-actions span { border-style: dashed; color: var(--slate-ink); border-color: var(--rule-strong); }

/* ---------------- MEDIA : newsroom ---------------- */
.newsroom-mast { border-bottom: 1px solid var(--ink); padding-bottom: 20px; }
.newsroom-mast__name { font-family: var(--f-display); font-size: clamp(56px, 10vw, 150px); line-height: .85; letter-spacing: -.02em; }
.newsroom-mast__bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 10px 0; margin-top: 18px; }
.news-front { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: 0; border-bottom: 1px solid var(--ink); }
.news-front > * { padding: 28px 24px 32px; border-right: 1px solid var(--rule); }
.news-front > *:first-child { padding-left: 0; }
.news-front > *:last-child { border-right: 0; padding-right: 0; }
.news-item h3 { font-family: var(--f-display); font-size: 23px; line-height: 1.2; margin: 10px 0 8px; }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--teal); text-decoration: underline; }
.news-item p { font-size: 14.5px; color: var(--slate-ink); margin: 0 0 8px; }
.news-item .byline { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--slate-ink); }
.news-item--lead h3 { font-size: clamp(30px, 3vw, 42px); line-height: 1.08; }
.news-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--ink); }
.news-section__name { font-family: var(--f-display); font-size: 34px; line-height: 1; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.news-grid .news-item { padding: 0 0 22px; border-bottom: 1px solid var(--rule); margin-bottom: 22px; }

/* ---------------- GALLERY : immersive archive ---------------- */
.gallery-page { background: var(--graphite); color: var(--cream); }
.gallery-head { padding-top: clamp(48px, 7vw, 104px); padding-bottom: clamp(32px, 4vw, 56px); }
.g-row { display: grid; gap: clamp(16px, 2.4vw, 32px); margin-bottom: clamp(40px, 6vw, 88px); align-items: end; }
.g-row--wide { grid-template-columns: minmax(0, 1fr); }
.g-row--a { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.g-row--b { grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); align-items: start; }
.g-row--c { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.g-item { margin: 0; }
.g-item button { display: block; width: 100%; padding: 0; border: 0; background: var(--carbon); position: relative; cursor: zoom-in; }
.g-item img { width: 100%; height: auto; object-fit: contain; }
.g-item button::after { content: "⤢"; position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; display: grid; place-items: center; background: rgba(24, 26, 27, .75); color: var(--cream); font-size: 16px; opacity: 0; transition: opacity .25s; }
.g-item button:hover::after, .g-item button:focus-visible::after { opacity: 1; }
.g-item figcaption { display: grid; grid-template-columns: 76px 1fr; gap: 10px; margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: rgba(241, 235, 221, .78); }
.g-item figcaption .label { color: var(--ochre); }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(15, 16, 17, .96); display: grid; grid-template-rows: auto 1fr auto; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; color: var(--cream); gap: 12px; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 12px 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__cap { color: rgba(241, 235, 221, .82); font-size: 14px; text-align: center; max-width: 80ch; margin: 0 auto; }
.lightbox button { background: transparent; border: 1px solid rgba(241, 235, 221, .35); color: var(--cream); min-width: 44px; min-height: 44px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 0 14px; }
.lightbox button:hover { border-color: var(--ochre); color: var(--ochre); }
.lightbox__nav { display: flex; gap: 8px; }

/* ---------------- CONTACT : minimal communication ---------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
.slip { border: 1px solid var(--ink); background: var(--cream); position: sticky; top: calc(var(--header-h) + 28px); }
.slip__head { padding: 14px 20px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.slip dl { margin: 0; }
.slip dl div { padding: 18px 20px; border-bottom: 1px solid var(--rule); }
.slip dl div:last-child { border-bottom: 0; }
.slip dd { margin: 6px 0 0; font-family: var(--f-display); font-size: clamp(22px, 2.1vw, 28px); line-height: 1.2; word-break: break-word; }
.slip dd a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--terracotta), var(--terracotta)) 0 100% / 100% 1px no-repeat; }
.slip dd a:hover { color: var(--teal); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 28px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.field label .req { color: var(--terracotta-ink); }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 10px 0 12px; font-size: 17px; border-radius: 0;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 170px; resize: vertical; border: 1px solid var(--ink); padding: 14px; background: var(--paper); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 2px 0 var(--teal); }
.field textarea:focus-visible { box-shadow: 0 0 0 2px var(--teal); }
.field [aria-invalid="true"] { border-color: var(--terracotta); }
.field .hint { font-size: 12.5px; color: var(--slate-ink); }
.field .error { font-size: 13px; color: var(--terracotta-ink); min-height: 0; font-weight: 500; }
.field .error:empty { display: none; }
.form-status { grid-column: 1 / -1; padding: 18px 20px; border: 1px solid var(--ink); font-size: 15px; line-height: 1.55; }
.form-status[hidden] { display: none; }
.form-status--ok { border-color: var(--teal); background: rgba(39, 92, 97, .07); }
.form-status--warn { border-color: var(--terracotta); background: rgba(182, 93, 69, .06); }
.form-status--error { border-color: var(--terracotta); background: rgba(182, 93, 69, .06); }
.form-status strong { display: block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn[disabled] { opacity: .6; cursor: progress; }

.news-item h3.is-desc a { font-style: italic; color: var(--slate-ink); }
.desc-flag { display: block; margin-top: 6px; font-family: var(--f-mono); font-style: normal; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-ink); }
.parl-split--57 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.tenure__bar .s { display: none; }
.diagram-scroll-hint { display: none; font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-ink); margin: 0 0 8px; }
.on-dark .diagram-scroll-hint { color: rgba(241, 235, 221, .66); }

/* ---------- Aligned image rows: equal heights, no crop, no letterbox ----------
   Each item grows in proportion to its aspect ratio (--a = width / height).
   The flex-basis absorbs the frame mat + border so photo heights match exactly. */
.plate-row { display: flex; gap: clamp(20px, 3vw, 40px); align-items: flex-start; }
.plate-row > .plate { flex: var(--a, 1.5) 1 calc(2 * var(--mat) + 2px); min-width: 0; }
.g-flex { display: flex; gap: clamp(16px, 2.4vw, 32px); align-items: flex-start; margin-bottom: clamp(40px, 6vw, 88px); }
.g-flex > .g-item { flex: var(--a, 1.5) 1 0; min-width: 0; }
.g-row--c > .g-flex { margin-bottom: 0; }
