/* ==========================================================================
   Dr. Jitendra Singh — Public Record
   Design system: Science + Governance + Public Service + Institutional Heritage
   ========================================================================== */

:root {
  --indigo: #182235;
  --indigo-2: #212d45;
  --indigo-3: #2b3854;
  --copper: #A86B45;
  --copper-ink: #87522f;
  --copper-soft: #d9b79c;
  --mineral: #476B7A;
  --mineral-ink: #3b5a67;
  --mineral-soft: #c9d8dc;
  --ivory: #F4F0E7;
  --paper: #FBF9F4;
  --parchment: #ebe4d4;
  --slate: #59636B;
  --charcoal: #1C2025;
  --saffron: #C58A42;
  --line: rgba(28, 32, 37, .14);
  --line-strong: rgba(28, 32, 37, .28);
  --line-light: rgba(244, 240, 231, .16);

  --f-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
  --shadow: 0 1px 2px rgba(24, 34, 53, .06), 0 8px 28px -12px rgba(24, 34, 53, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 116px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--ivory); color: var(--charcoal);
  font: 400 1.0625rem/1.68 var(--f-sans); font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--mineral-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--copper-ink); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--indigo); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.5rem); font-weight: 450; }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.45rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + .45vw, 1.45rem); }
h4 { font-size: 1.08rem; font-family: var(--f-sans); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
strong { font-weight: 650; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
abbr[title] { text-decoration: underline dotted; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--copper-soft); color: var(--indigo); }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--saffron); color: var(--indigo); padding: 10px 16px; font-weight: 600; border-radius: var(--radius); }
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(860px + var(--gutter) * 2); }
.wrap--wide { max-width: calc(1440px + var(--gutter) * 2); }
.section { padding: clamp(56px, 7vw, 104px) 0; position: relative; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--paper { background: var(--paper); }
.section--parchment { background: var(--parchment); }
.section--dark { background: var(--indigo); color: rgba(244, 240, 231, .86); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--ivory); }
.section--dark a { color: var(--copper-soft); }
.section--dark a:hover { color: #fff; }
.section--mineral { background: var(--mineral); color: rgba(255, 255, 255, .9); }
.section--mineral h2, .section--mineral h3 { color: #fff; }
.section--charcoal { background: var(--charcoal); color: rgba(244, 240, 231, .84); }
.section--charcoal h2, .section--charcoal h3 { color: var(--ivory); }
.rule-top { border-top: 1px solid var(--line); }

.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5-7 { grid-template-columns: 5fr 7fr; }
.g-7-5 { grid-template-columns: 7fr 5fr; }
.g-4-8 { grid-template-columns: 4fr 8fr; }
.g-8-4 { grid-template-columns: 8fr 4fr; }
.g-3-9 { grid-template-columns: 3fr 9fr; }
.align-center { align-items: center; }
.align-start { align-items: start; }
@media (max-width: 1024px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .g-2, .g-5-7, .g-7-5, .g-4-8, .g-8-4, .g-3-9 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: 1rem; }
.measure { max-width: 68ch; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mb-2 { margin-bottom: 2rem; }

/* ---------- Typographic devices ---------- */
.eyebrow {
  font: 500 .74rem/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--copper-ink); display: inline-flex; align-items: center; gap: .7em; margin: 0 0 1.1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section--dark .eyebrow, .section--charcoal .eyebrow, .phero--dark .eyebrow { color: var(--copper-soft); }
.section--mineral .eyebrow { color: #f1dfcf; }
.folio { font: 500 .72rem/1 var(--f-mono); letter-spacing: .16em; color: var(--slate); text-transform: uppercase; }
.lede { font: 400 clamp(1.12rem, 1.02rem + .4vw, 1.32rem)/1.6 var(--f-serif); color: var(--slate); max-width: 62ch; }
.section--dark .lede, .phero--dark .lede { color: rgba(244, 240, 231, .78); }
.mono { font-family: var(--f-mono); }
.small { font-size: .88rem; }
.muted { color: var(--slate); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--slate); }
.section--dark .section-head p { color: rgba(244, 240, 231, .72); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; align-items: start; } }
.drop::first-letter { float: left; font: 400 3.6em/.82 var(--f-serif); margin: .06em .1em 0 0; color: var(--copper); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em; min-height: 46px; padding: 0 1.3em;
  background: var(--indigo); color: var(--ivory); border: 1px solid var(--indigo); border-radius: var(--radius);
  font: 600 .9rem/1 var(--f-sans); letter-spacing: .03em; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--copper); border-color: var(--copper); color: #fff; }
.btn--ghost { background: transparent; color: var(--indigo); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--indigo); color: var(--ivory); border-color: var(--indigo); }
.section--dark .btn--ghost, .phero--dark .btn--ghost { color: var(--ivory); border-color: var(--line-light); }
.section--dark .btn--ghost:hover { background: var(--ivory); color: var(--indigo); }
.btn svg { width: 16px; height: 16px; }
.link-arrow { display: inline-flex; align-items: center; gap: .45em; font: 600 .9rem/1.3 var(--f-sans); text-decoration: none; color: var(--indigo); border-bottom: 1px solid var(--copper); padding-bottom: 3px; }
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.section--dark .link-arrow { color: var(--ivory); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

/* ---------- Site status bar ---------- */
.statusbar { background: var(--charcoal); color: rgba(244, 240, 231, .72); font: 400 .72rem/1.4 var(--f-mono); letter-spacing: .04em; }
.statusbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.statusbar b { color: var(--copper-soft); font-weight: 500; }
@media (max-width: 760px) { .statusbar .sb-right { display: none; } }

/* ---------- Header / masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 100; background: rgba(251, 249, 244, .96); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.masthead__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--indigo); min-width: 0; }
.brand__seal {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center; position: relative;
  border: 1px solid var(--copper); color: var(--copper-ink); font: 500 1rem/1 var(--f-serif); letter-spacing: .02em;
}
.brand__seal::after { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(168, 107, 69, .35); }
.brand__name { display: block; font: 500 1.28rem/1.1 var(--f-serif); letter-spacing: -.005em; white-space: nowrap; }
.brand__sub { display: block; font: 400 .66rem/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-top: 3px; }
.masthead__meta { display: flex; align-items: center; gap: 18px; font: 400 .72rem/1.3 var(--f-mono); color: var(--slate); letter-spacing: .06em; }
.masthead__meta .dot { width: 7px; height: 7px; border-radius: 50%; background: #5c8f6e; box-shadow: 0 0 0 3px rgba(92, 143, 110, .18); display: inline-block; margin-right: 6px; vertical-align: 1px; }

.nav { border-top: 1px solid var(--line); }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; }
.nav__item { margin: 0; position: static; }
.nav__link {
  display: flex; align-items: center; gap: 5px; height: 46px; padding: 0 2px; background: none; border: 0; cursor: pointer;
  font: 500 .82rem/1 var(--f-sans); letter-spacing: .02em; color: var(--charcoal); text-decoration: none; white-space: nowrap; position: relative;
}
.nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav__link:hover, .nav__item.is-open > .nav__link { color: var(--indigo); }
.nav__link:hover::after, .nav__item.is-open > .nav__link::after, .nav__link[aria-current="page"]::after, .nav__item.is-current > .nav__link::after { transform: scaleX(1); }
.nav__link[aria-current="page"], .nav__item.is-current > .nav__link { color: var(--indigo); font-weight: 650; }
.nav__link .chev { width: 9px; height: 9px; transition: transform .2s; opacity: .6; }
.nav__item.is-open > .nav__link .chev { transform: rotate(180deg); }

.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(24, 34, 53, .35);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
}
.nav__item.is-open > .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--ease); }
.mega__inner { display: grid; grid-template-columns: minmax(220px, 3fr) 9fr; gap: 48px; padding-top: 32px; padding-bottom: 36px; }
.mega__intro h3 { font-size: 1.35rem; margin-bottom: .4em; }
.mega__intro p { font-size: .9rem; color: var(--slate); margin: 0; }
.mega__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 28px; }
.mega__links a { display: block; padding: 12px 0 12px 14px; border-left: 1px solid var(--line); text-decoration: none; color: var(--indigo); transition: border-color .2s, background .2s; }
.mega__links a:hover, .mega__links a:focus-visible { border-left-color: var(--copper); background: rgba(168, 107, 69, .06); }
.mega__links a[aria-current="page"] { border-left: 2px solid var(--copper); }
.mega__links b { display: block; font: 600 .92rem/1.3 var(--f-sans); }
.mega__links span { display: block; font-size: .8rem; line-height: 1.45; color: var(--slate); margin-top: 3px; }

.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); background: transparent; border-radius: var(--radius); cursor: pointer; font: 600 .78rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--indigo); }
.menu-btn .bars { width: 18px; height: 12px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after, .menu-btn .bars span { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; }
.menu-btn .bars::before { top: 0; } .menu-btn .bars span { top: 5px; } .menu-btn .bars::after { bottom: 0; }

@media (max-width: 1199px) {
  :root { --header-h: 69px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .masthead__meta { display: none; }
}
@media (max-width: 420px) {
  .brand__name { font-size: 1.1rem; }
  .brand__seal { width: 36px; height: 36px; font-size: .88rem; }
  .menu-btn .lbl { display: none; }
}

/* ---------- Mobile drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 300; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(24, 34, 53, .55); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--indigo); color: var(--ivory);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s var(--ease); overscroll-behavior: contain;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line-light); min-height: 69px; }
.drawer__head .brand { color: var(--ivory); }
.drawer__head .brand__sub { color: rgba(244, 240, 231, .6); }
.drawer__close { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-light); background: transparent; color: var(--ivory); border-radius: var(--radius); cursor: pointer; }
.drawer__close svg { width: 18px; height: 18px; }
.drawer__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 20px 32px; }
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__list > li { margin: 0; border-bottom: 1px solid var(--line-light); }
.drawer__list a, .drawer__acc { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; padding: 0; background: none; border: 0; text-align: left; color: var(--ivory); text-decoration: none; font: 500 1.08rem/1.3 var(--f-serif); cursor: pointer; }
.drawer__list a[aria-current="page"] { color: var(--copper-soft); }
.drawer__acc svg { width: 14px; height: 14px; transition: transform .25s; opacity: .7; }
.drawer__acc[aria-expanded="true"] svg { transform: rotate(45deg); }
.drawer__sub { list-style: none; margin: 0; padding: 0 0 12px 14px; border-left: 1px solid var(--copper); display: none; }
.drawer__sub.is-open { display: block; }
.drawer__sub li { margin: 0; }
.drawer__sub a { min-height: 44px; font: 400 .95rem/1.3 var(--f-sans); color: rgba(244, 240, 231, .82); }
.drawer__foot { padding: 16px 20px; border-top: 1px solid var(--line-light); font: 400 .74rem/1.5 var(--f-mono); color: rgba(244, 240, 231, .6); }
body.no-scroll { overflow: hidden; }

/* ---------- Breadcrumb ---------- */
.crumbs { font: 400 .74rem/1.4 var(--f-mono); letter-spacing: .06em; color: var(--slate); margin-bottom: 1.6rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--copper-ink); text-decoration: underline; }
.phero--dark .crumbs { color: rgba(244, 240, 231, .6); }

/* ---------- Page hero (base + variants) ---------- */
.phero { position: relative; padding: clamp(40px, 6vw, 88px) 0 clamp(44px, 6vw, 80px); overflow: hidden; border-bottom: 1px solid var(--line); isolation: isolate; }
.phero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.phero__grid--single { grid-template-columns: minmax(0, 1fr); }
.phero h1 { margin-bottom: .35em; max-width: 20ch; }
.phero .lede { margin-bottom: 0; }
.phero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 1.8rem; align-items: center; }
.phero--dark { background: var(--indigo); color: rgba(244, 240, 231, .85); border-bottom-color: transparent; }
.phero--dark h1 { color: var(--ivory); }
.phero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.phero__bg svg { width: 100%; height: 100%; }
@media (max-width: 860px) { .phero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; } }

.bg-grid {
  background-image:
    linear-gradient(rgba(71, 107, 122, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 107, 122, .09) 1px, transparent 1px),
    linear-gradient(rgba(71, 107, 122, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 107, 122, .05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.bg-grid-dark {
  background-image:
    linear-gradient(rgba(244, 240, 231, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 240, 231, .05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.bg-ruled { background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(71, 107, 122, .10) 31px 32px); }
.bg-paper { background-color: var(--paper); }

/* ---------- Verification & source devices ---------- */
.verified { display: inline-flex; align-items: center; gap: 8px; font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mineral-ink); padding: 7px 12px; border: 1px solid rgba(71, 107, 122, .4); border-radius: 40px; background: rgba(255, 255, 255, .5); }
.verified::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5c8f6e; box-shadow: 0 0 0 3px rgba(92, 143, 110, .2); }
.verified--hist { color: var(--copper-ink); border-color: rgba(168, 107, 69, .45); }
.verified--hist::before { background: var(--copper); box-shadow: 0 0 0 3px rgba(168, 107, 69, .2); border-radius: 1px; }
.phero--dark .verified, .section--dark .verified { background: rgba(255, 255, 255, .05); color: #b9d0d6; border-color: rgba(185, 208, 214, .35); }
.phero--dark .verified--hist, .section--dark .verified--hist { color: var(--copper-soft); border-color: rgba(217, 183, 156, .4); }

.src { display: block; margin-top: .9rem; font: 400 .74rem/1.55 var(--f-mono); letter-spacing: .02em; color: var(--slate); }
.src::before { content: "SOURCE"; display: inline-block; margin-right: 8px; padding: 1px 6px; border: 1px solid var(--line-strong); font-size: .64rem; letter-spacing: .12em; vertical-align: 1px; }
.src a { color: inherit; text-decoration: underline; text-decoration-color: rgba(89, 99, 107, .5); word-break: break-word; }
.src a:hover { color: var(--copper-ink); }
.section--dark .src, .phero--dark .src { color: rgba(244, 240, 231, .6); }
.section--dark .src::before { border-color: var(--line-light); }
.ext::after { content: "\2197"; font-size: .85em; margin-left: 2px; }

.tag { display: inline-block; font: 600 .64rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px 4px; border-radius: 2px; vertical-align: middle; white-space: nowrap; }
.tag--policy { background: #e2ebee; color: #2f4e5a; }
.tag--impl { background: #e9e3f1; color: #4a3d63; }
.tag--stmt { background: #f5e4d6; color: #7a4527; }
.tag--outcome { background: #e0ede3; color: #2f5a3c; }
.tag--hist { background: #ece6d8; color: #5b4c33; }
.tag--role { background: var(--indigo); color: var(--ivory); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .8rem; }

.legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--paper); }
.legend > div { padding: 18px 20px; border-right: 1px solid var(--line); }
.legend > div:last-child { border-right: 0; }
.legend p { margin: .6rem 0 0; font-size: .86rem; color: var(--slate); line-height: 1.5; }
@media (max-width: 860px) { .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } .legend > div:nth-child(2) { border-right: 0; } .legend > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 480px) { .legend { grid-template-columns: 1fr; } .legend > div { border-right: 0; border-bottom: 1px solid var(--line); } .legend > div:last-child { border-bottom: 0; } }

.notice { border-left: 3px solid var(--copper); background: rgba(168, 107, 69, .07); padding: 18px 22px; font-size: .94rem; color: var(--charcoal); }
.notice p:last-child { margin-bottom: 0; }
.notice--mineral { border-left-color: var(--mineral); background: rgba(71, 107, 122, .08); }
.section--dark .notice { background: rgba(255, 255, 255, .05); color: rgba(244, 240, 231, .85); }

/* ---------- Figures (faces always fully visible: contain) ---------- */
.fig { margin: 0; position: relative; }
.fig__frame { position: relative; background: var(--parchment); overflow: hidden; }
.fig__frame img { width: 100%; height: 100%; object-fit: contain; }
.fig--natural .fig__frame img { height: auto; }
.fig figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: 12px; font: 400 .8rem/1.5 var(--f-sans); color: var(--slate); }
.fig figcaption .fno { flex: none; font: 500 .68rem/1.5 var(--f-mono); letter-spacing: .12em; color: var(--copper-ink); text-transform: uppercase; }
.section--dark .fig figcaption, .phero--dark .fig figcaption { color: rgba(244, 240, 231, .66); }
.section--dark .fig figcaption .fno, .phero--dark .fig figcaption .fno { color: var(--copper-soft); }
.fig--bracket .fig__frame::before, .fig--bracket .fig__frame::after { content: ""; position: absolute; width: 26px; height: 26px; z-index: 2; pointer-events: none; }
.fig--bracket .fig__frame::before { top: 8px; left: 8px; border-top: 1.5px solid var(--copper); border-left: 1.5px solid var(--copper); }
.fig--bracket .fig__frame::after { bottom: 8px; right: 8px; border-bottom: 1.5px solid var(--copper); border-right: 1.5px solid var(--copper); }
.fig--offset { padding: 0 14px 14px 0; }
.fig--offset::before { content: ""; position: absolute; top: 14px; left: 14px; right: 0; bottom: 14px; border: 1px solid var(--copper); z-index: -1; }
.fig--offset figcaption { margin-top: 26px; }

/* ---------- Quote ---------- */
.quote { margin: 0; padding: clamp(24px, 3vw, 40px) 0 0; border-top: 1px solid var(--line-strong); position: relative; }
.quote::before { content: "\201C"; position: absolute; top: -.05em; left: -.04em; font: 400 5rem/1 var(--f-serif); color: var(--copper); opacity: .35; }
.quote blockquote { margin: 0 0 1rem; padding-left: clamp(0px, 3vw, 40px); font: 400 clamp(1.25rem, 1.05rem + .8vw, 1.75rem)/1.45 var(--f-serif); color: var(--indigo); font-style: italic; }
.quote figcaption { padding-left: clamp(0px, 3vw, 40px); font: 400 .8rem/1.6 var(--f-mono); color: var(--slate); letter-spacing: .02em; }
.quote figcaption b { color: var(--charcoal); font-weight: 600; font-family: var(--f-sans); letter-spacing: 0; }
.section--dark .quote { border-top-color: var(--line-light); }
.section--dark .quote blockquote { color: var(--ivory); }
.section--dark .quote figcaption { color: rgba(244, 240, 231, .6); }
.section--dark .quote figcaption b { color: var(--ivory); }

/* ---------- Ledger (archival rows) ---------- */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.ledger > li { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 240px); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); margin: 0; }
.ledger__date { font: 500 .78rem/1.5 var(--f-mono); color: var(--copper-ink); letter-spacing: .04em; padding-top: 3px; }
.ledger__body h3, .ledger__body h4 { margin: 0 0 .35em; }
.ledger__body h3 { font-size: 1.18rem; }
.ledger__body p { margin: 0 0 .5em; font-size: .96rem; }
.ledger__src { font: 400 .74rem/1.55 var(--f-mono); color: var(--slate); padding-top: 3px; word-break: break-word; }
.ledger__src a { color: inherit; }
.section--dark .ledger { border-top-color: var(--line-light); }
.section--dark .ledger > li { border-bottom-color: var(--line-light); }
.section--dark .ledger__date { color: var(--copper-soft); }
.section--dark .ledger__src { color: rgba(244, 240, 231, .55); }
@media (max-width: 860px) {
  .ledger > li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* ---------- Data table ---------- */
.dtable { width: 100%; border-collapse: collapse; font-size: .94rem; }
.dtable caption { text-align: left; font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); padding-bottom: 12px; }
.dtable th, .dtable td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable thead th { font: 600 .7rem/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); border-bottom: 1px solid var(--line-strong); }
.dtable td.num { font-family: var(--f-mono); font-size: .88rem; white-space: nowrap; }
@media (max-width: 860px) {
  .dtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dtable tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .dtable td { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 12px; padding: 5px 0; border: 0; }
  .dtable td::before { content: attr(data-label); font: 600 .66rem/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
  .dtable td.num { white-space: normal; }
}

/* ---------- Key figures ---------- */
.kfig { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.kfig > div { padding: 26px 22px 22px 0; border-bottom: 1px solid var(--line); }
.kfig > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.kfig__n { display: block; font: 400 clamp(2rem, 1.6rem + 1.4vw, 2.9rem)/1 var(--f-serif); color: var(--indigo); letter-spacing: -.02em; }
.kfig__n small { font-size: .45em; letter-spacing: 0; margin-left: 3px; color: var(--copper-ink); }
.kfig__l { display: block; margin-top: 10px; font-size: .9rem; line-height: 1.45; color: var(--charcoal); }
.kfig__s { display: block; margin-top: 8px; font: 400 .68rem/1.5 var(--f-mono); color: var(--slate); letter-spacing: .02em; }
.kfig__s a { color: inherit; }
.section--dark .kfig { border-top-color: var(--line-light); }
.section--dark .kfig > div { border-color: var(--line-light); }
.section--dark .kfig__n { color: var(--ivory); }
.section--dark .kfig__n small { color: var(--copper-soft); }
.section--dark .kfig__l { color: rgba(244, 240, 231, .85); }
.section--dark .kfig__s { color: rgba(244, 240, 231, .55); }
@media (max-width: 1024px) { .kfig { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kfig > div:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 480px) { .kfig { grid-template-columns: minmax(0, 1fr); } .kfig > div + div { padding-left: 0; border-left: 0; } }

/* ---------- Portfolio register ---------- */
.register { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
.reg { position: relative; padding: 26px 24px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); text-decoration: none; color: inherit; display: flex; flex-direction: column; min-height: 230px; transition: background .25s; }
a.reg:hover { background: #fff; }
.reg__no { font: 500 .7rem/1 var(--f-mono); letter-spacing: .14em; color: var(--copper-ink); }
.reg__cap { margin-top: 18px; font: 600 .66rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mineral-ink); }
.reg h3 { margin: 6px 0 10px; font-size: 1.28rem; }
.reg p { font-size: .9rem; color: var(--slate); margin: 0 0 1rem; line-height: 1.55; }
.reg .link-arrow { margin-top: auto; align-self: flex-start; font-size: .82rem; }
.reg--ic { background: var(--indigo); color: rgba(244, 240, 231, .82); }
.reg--ic h3 { color: var(--ivory); }
.reg--ic p { color: rgba(244, 240, 231, .7); }
.reg--ic .reg__no { color: var(--copper-soft); }
.reg--ic .reg__cap { color: #b9d0d6; }
.reg--ic .link-arrow { color: var(--ivory); }
a.reg--ic:hover { background: var(--indigo-2); }
@media (max-width: 1024px) { .register { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .register { grid-template-columns: minmax(0, 1fr); } .reg { min-height: 0; } }

/* ---------- Generic cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); padding: clamp(20px, 2.4vw, 30px); position: relative; }
.card h3 { font-size: 1.22rem; }
.card p:last-child { margin-bottom: 0; }
.card--line { background: transparent; border: 0; border-top: 2px solid var(--indigo); padding: 22px 0 0; }
.card--line.copper { border-top-color: var(--copper); }
.card--line.mineral { border-top-color: var(--mineral); }
.section--dark .card { background: var(--indigo-2); border-color: var(--line-light); }
.section--dark .card--line { background: transparent; border-top-color: var(--copper); }

/* ---------- Dossier layout (sticky index + content) ---------- */
.dossier { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .88rem; }
.toc__t { font: 600 .68rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--slate); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--charcoal); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; font: 500 .7rem/1 var(--f-mono); color: var(--copper-ink); white-space: pre; }
.toc a:hover, .toc a.is-active { border-left-color: var(--copper); color: var(--indigo); }
.dossier__body > section { padding-bottom: clamp(36px, 4vw, 56px); margin-bottom: clamp(36px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.dossier__body > section:last-child { border-bottom: 0; margin-bottom: 0; }
.dossier__body h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }
@media (max-width: 960px) {
  .dossier { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { border: 1px solid var(--line-strong); border-radius: 30px; padding: 7px 12px; margin: 0; font-size: .8rem; }
  .toc a::before { display: none; }
}

/* ---------- Filters ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; }
.filterbar__label { font: 600 .68rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-right: 8px; }
.chip { min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); background: transparent; border-radius: 30px; cursor: pointer; font: 500 .82rem/1 var(--f-sans); color: var(--charcoal); transition: all .2s; }
.chip:hover { border-color: var(--indigo); }
.chip[aria-pressed="true"] { background: var(--indigo); color: var(--ivory); border-color: var(--indigo); }
.section--dark .chip { color: var(--ivory); border-color: var(--line-light); }
.section--dark .chip[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); }
.filter-count { font: 400 .76rem/1 var(--f-mono); color: var(--slate); margin-left: auto; }
[data-cat].is-hidden { display: none !important; }
.filter-empty { display: none; padding: 30px 0; color: var(--slate); font-style: italic; }
.filter-empty.is-shown { display: block; }

/* ---------- Timeline (museum style) ---------- */
.tl { position: relative; list-style: none; margin: 0; padding: 0; }
.tl::before { content: ""; position: absolute; top: 0; bottom: 0; left: 150px; width: 1px; background: var(--line-strong); }
.tl > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 44px; margin: 0; padding: 0 0 44px; position: relative; }
.tl__year { font: 400 clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem)/1 var(--f-serif); color: var(--indigo); text-align: right; padding-right: 26px; letter-spacing: -.02em; }
.tl__year small { display: block; font: 500 .7rem/1.4 var(--f-mono); letter-spacing: .08em; color: var(--copper-ink); margin-top: 8px; }
.tl__node { position: absolute; left: 144px; top: 10px; width: 13px; height: 13px; background: var(--ivory); border: 2px solid var(--copper); transform: rotate(45deg); }
.tl__card { padding-top: 2px; }
.tl__card h3 { font-size: 1.22rem; margin-bottom: .35em; }
.tl__card p { margin-bottom: .5em; }
.tl__ctx { font-size: .92rem; color: var(--slate); }
.section--dark .tl::before { background: var(--line-light); }
.section--dark .tl__year { color: var(--ivory); }
.section--dark .tl__node { background: var(--indigo); }
.section--dark .tl__ctx { color: rgba(244, 240, 231, .66); }
@media (max-width: 700px) {
  .tl::before { left: 6px; }
  .tl > li { grid-template-columns: minmax(0, 1fr); padding-left: 32px; }
  .tl__year { text-align: left; padding: 0 0 10px; }
  .tl__node { left: 0; top: 8px; }
}

/* ---------- Accordion ---------- */
.acc { border-top: 1px solid var(--line-strong); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: 500 clamp(1.05rem, 1rem + .3vw, 1.22rem)/1.4 var(--f-serif); color: var(--indigo); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font: 300 1.2rem/1 var(--f-sans); color: var(--copper-ink); transition: transform .25s; }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc .acc__body { padding: 0 0 24px; max-width: 72ch; }
.acc .acc__body p:last-child { margin-bottom: 0; }

/* ---------- Home hero ---------- */
.hero { position: relative; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate; }
.hero__inner { display: grid; grid-template-columns: 72px minmax(0, 5.2fr) minmax(0, 6.8fr); gap: clamp(24px, 3.5vw, 56px); align-items: center; padding-top: clamp(36px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 72px); }
.hero__rail { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; align-items: center; border-right: 1px solid var(--line); padding-right: 20px; }
.hero__rail span { writing-mode: vertical-rl; transform: rotate(180deg); font: 500 .68rem/1 var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--slate); }
.hero__rail i { flex: 1; width: 1px; margin: 16px 0; background: linear-gradient(var(--copper), transparent); }
.hero__title { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.4rem); line-height: 1.02; font-weight: 400; margin: 0 0 .3em; letter-spacing: -.025em; }
.hero__title span { display: block; font-size: .42em; letter-spacing: .02em; font-weight: 400; font-style: italic; color: var(--copper-ink); margin-bottom: .25em; }
.hero__strap { font: 500 .8rem/1.5 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mineral-ink); margin-bottom: 1.6rem; }
.hero__strap b { color: var(--copper); font-weight: 500; margin: 0 .5em; }
.hero__roles { list-style: none; padding: 0; margin: 0 0 1.4rem; border-top: 1px solid var(--line-strong); }
.hero__roles li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 10px 0; margin: 0; border-bottom: 1px solid var(--line); font-size: .93rem; line-height: 1.4; }
.hero__roles li b { font-weight: 600; color: var(--indigo); }
.hero__roles .n { font: 500 .7rem/1.6 var(--f-mono); color: var(--copper-ink); }
.hero__visual { position: relative; }
.hero__frame { position: relative; background: #d6e6ea; aspect-ratio: 1000 / 666; }
.hero__frame img { width: 100%; height: 100%; object-fit: contain; }
.hero__frame::before { content: ""; position: absolute; inset: -14px -14px 14px 14px; border: 1px solid var(--copper); z-index: -1; }
.hero__ticks { position: absolute; left: 0; right: 0; bottom: -34px; display: flex; justify-content: space-between; font: 400 .66rem/1 var(--f-mono); color: var(--slate); letter-spacing: .1em; }
.hero__svg { position: absolute; inset: 0; z-index: -1; }
.hero__cap { margin-top: 48px; display: flex; justify-content: space-between; gap: 12px; font: 400 .74rem/1.5 var(--f-mono); color: var(--slate); }
@media (max-width: 1100px) { .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hero__rail { display: none; } }
@media (max-width: 860px) { .hero__inner { grid-template-columns: minmax(0, 1fr); } .hero__visual { order: -1; max-width: 640px; margin-right: 14px; } }

/* ---------- Photo layouts ---------- */
.photo-strip { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.gallery-grid { columns: 3 280px; column-gap: 18px; }
.gallery-item { break-inside: avoid; margin: 0 0 18px; background: var(--paper); border: 1px solid var(--line); }
.gallery-item button { display: block; width: 100%; padding: 0; border: 0; background: var(--parchment); cursor: zoom-in; }
.gallery-item img { width: 100%; height: auto; transition: opacity .3s; }
.gallery-item button:hover img { opacity: .9; }
.gallery-item figcaption { padding: 12px 14px 14px; font-size: .84rem; line-height: 1.5; color: var(--charcoal); }
.gallery-item figcaption .mono { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--copper-ink); margin-bottom: 4px; }

.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(15, 20, 30, .94); display: none; align-items: center; justify-content: center; padding: 64px 16px 90px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__cap { position: absolute; left: 16px; right: 16px; bottom: 20px; text-align: center; color: rgba(244, 240, 231, .85); font-size: .88rem; max-width: 760px; margin: 0 auto; }
.lightbox__btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #fff; border-radius: 50%; cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .18); }
.lightbox__btn svg { width: 18px; height: 18px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 60px; transform: none; } .lightbox { padding-bottom: 130px; } }

/* ---------- Speech / entry cards ---------- */
.entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); }
.entry { padding: 26px 28px 26px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.entry:nth-child(even) { padding: 26px 0 26px 28px; border-left: 1px solid var(--line); }
.entry__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font: 400 .74rem/1.4 var(--f-mono); color: var(--slate); margin-bottom: 10px; }
.entry__meta time { color: var(--copper-ink); font-weight: 500; }
.entry h3 { font-size: 1.18rem; margin-bottom: .45em; }
.entry p { font-size: .95rem; margin-bottom: .6em; }
.entry .src { margin-top: auto; padding-top: 8px; }
.entry blockquote { margin: .4rem 0 .8rem; padding-left: 14px; border-left: 2px solid var(--copper); font: italic 400 1.02rem/1.5 var(--f-serif); color: var(--indigo); }
@media (max-width: 860px) {
  .entries { grid-template-columns: minmax(0, 1fr); }
  .entry, .entry:nth-child(even) { padding: 24px 0; border-left: 0; }
}

/* ---------- Document shelf ---------- */
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.doc { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); padding: 22px 22px 20px; text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s; min-height: 200px; }
.doc::before { content: ""; position: absolute; top: 0; right: 0; width: 26px; height: 26px; background: linear-gradient(225deg, var(--ivory) 50%, var(--parchment) 50%); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
a.doc:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.doc__type { font: 600 .64rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mineral-ink); }
.doc h3 { font-size: 1.08rem; margin: 12px 0 8px; line-height: 1.3; }
.doc p { font-size: .86rem; color: var(--slate); margin: 0 0 12px; line-height: 1.5; }
.doc__foot { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; font: 400 .7rem/1.4 var(--f-mono); color: var(--slate); border-top: 1px dashed var(--line-strong); padding-top: 10px; }
@media (max-width: 1024px) { .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .docs { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Books ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px; align-items: end; }
.book { position: relative; aspect-ratio: 2 / 3; padding: 22px 18px 18px 26px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ivory); box-shadow: 6px 8px 0 -2px rgba(24, 34, 53, .14); overflow: hidden; }
.book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: rgba(0, 0, 0, .22); box-shadow: 1px 0 0 rgba(255, 255, 255, .15); }
.book h3 { color: inherit; font-size: 1.28rem; line-height: 1.2; }
.book .mono { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.book--a { background: var(--indigo); }
.book--b { background: var(--mineral); }
.book--c { background: var(--copper); }
.book--d { background: var(--charcoal); }

/* ---------- Diagram / SVG helpers ---------- */
.diagram { width: 100%; height: auto; }
.orbit-anim { transform-origin: center; animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Home specific: responsibilities board ---------- */
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.board > * { grid-column: span 4; }
.board .wide { grid-column: span 8; }
.board .full { grid-column: 1 / -1; }
@media (max-width: 1024px) { .board > *, .board .wide { grid-column: span 6; } }
@media (max-width: 640px) { .board > *, .board .wide { grid-column: 1 / -1; } }

.domain { position: relative; overflow: hidden; min-height: 300px; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--ivory); text-decoration: none; background: var(--indigo); isolation: isolate; }
.domain:hover { color: var(--ivory); }
.domain h3 { color: var(--ivory); font-size: 1.5rem; margin-bottom: .3em; }
.domain p { color: rgba(244, 240, 231, .78); font-size: .92rem; margin: 0 0 1rem; max-width: 46ch; }
.domain .link-arrow { color: var(--ivory); align-self: flex-start; }
.domain__art { position: absolute; inset: 0; z-index: -1; opacity: .9; transition: transform .8s var(--ease); }
.domain:hover .domain__art { transform: scale(1.04); }
.domain--mineral { background: var(--mineral); }
.domain--copper { background: #7c4d31; }
.domain--charcoal { background: var(--charcoal); }
.domain__k { position: absolute; top: 24px; left: 28px; font: 500 .7rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(244, 240, 231, .7); }

/* ---------- Split editorial ---------- */
.spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 520px; }
.spread__media { position: relative; background: var(--charcoal); display: flex; align-items: center; justify-content: center; padding: clamp(20px, 3vw, 40px); }
.spread__media img { max-height: 560px; width: auto; max-width: 100%; object-fit: contain; }
.spread__text { padding: clamp(40px, 6vw, 88px) clamp(24px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 860px) { .spread { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact-card { background: var(--indigo); color: var(--ivory); padding: clamp(28px, 4vw, 48px); position: relative; overflow: hidden; }
.contact-card h2 { color: var(--ivory); }
.contact-line { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-light); align-items: baseline; }
.contact-line .k { font: 500 .68rem/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--copper-soft); }
.contact-line a, .contact-line span.v { font: 400 clamp(1.1rem, 1rem + .5vw, 1.4rem)/1.3 var(--f-serif); color: var(--ivory); text-decoration: none; word-break: break-word; }
.contact-line a:hover { color: var(--copper-soft); text-decoration: underline; }
@media (max-width: 480px) { .contact-line { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ---------- Footer ---------- */
.footer { background: var(--indigo); color: rgba(244, 240, 231, .74); font-size: .92rem; position: relative; overflow: hidden; }
.footer a { color: rgba(244, 240, 231, .86); text-decoration: none; }
.footer a:hover { color: var(--copper-soft); text-decoration: underline; }
.footer__top { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.4fr)) minmax(0, 3.2fr); gap: 36px; padding-top: 64px; padding-bottom: 48px; }
.footer .brand { color: var(--ivory); }
.footer .brand__sub { color: rgba(244, 240, 231, .55); }
.footer h2 { font: 600 .68rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--copper-soft); margin: 6px 0 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 0 0 9px; }
.footer__about { font-size: .86rem; line-height: 1.6; margin-top: 18px; color: rgba(244, 240, 231, .62); max-width: 40ch; }
.footer__contact p { margin: 0 0 8px; }
.footer__contact .who { font: 500 1.05rem/1.3 var(--f-serif); color: var(--ivory); margin-bottom: 12px; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.social a, .social span { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-light); border-radius: 50%; color: var(--ivory); transition: all .2s; }
.social a:hover { background: var(--copper); border-color: var(--copper); color: #fff; text-decoration: none; }
.social span { opacity: .45; cursor: default; }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.footer__bottom { border-top: 1px solid var(--line-light); padding-top: 22px; padding-bottom: 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font: 400 .74rem/1.6 var(--f-mono); color: rgba(244, 240, 231, .55); letter-spacing: .02em; }
.footer__bottom a { color: rgba(244, 240, 231, .8); }
.footer__status { border-top: 1px solid var(--line-light); padding-top: 18px; padding-bottom: 18px; font-size: .78rem; line-height: 1.6; color: rgba(244, 240, 231, .55); }
.lock-btn { background: none; border: 1px solid var(--line-light); color: rgba(244, 240, 231, .7); border-radius: 30px; padding: 4px 12px; font: inherit; cursor: pointer; }
.lock-btn:hover { border-color: var(--copper-soft); color: #fff; }
@media (max-width: 1100px) { .footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer__brandcol { grid-column: 1 / -1; } }
@media (max-width: 640px) { .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__contact { grid-column: 1 / -1; } }
@media (max-width: 400px) { .footer__top { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pager (next / previous) ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.pager a { display: block; padding: 32px 0; text-decoration: none; color: var(--indigo); }
.pager a + a { text-align: right; border-left: 1px solid var(--line); padding-left: 24px; }
.pager small { display: block; font: 500 .68rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-bottom: 10px; }
.pager span { font: 400 clamp(1.15rem, 1rem + .6vw, 1.5rem)/1.3 var(--f-serif); }
.pager a:hover span { color: var(--copper-ink); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .statusbar, .masthead, .footer, .drawer, .filterbar { display: none !important; }
  body { background: #fff; }
}

/* Hero line-art recedes behind text on narrow screens */
@media (max-width: 860px) { .phero__bg { opacity: .35; } }
@media (min-width: 1200px) and (max-width: 1365px) { .nav__link { font-size: .76rem; letter-spacing: 0; gap: 3px; } }
.kfig--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .kfig--3 > div:nth-child(3) { padding-left: 22px; border-left: 1px solid var(--line); } }
@media (max-width: 700px) { .kfig--3 { grid-template-columns: minmax(0, 1fr); } .kfig--3 > div + div { padding-left: 0; border-left: 0; } }
/* charcoal sections share dark-surface component styling */
.section--charcoal .tl::before { background: var(--line-light); }
.section--charcoal .tl__year { color: var(--ivory); }
.section--charcoal .tl__node { background: var(--charcoal); }
.section--charcoal .tl__ctx { color: rgba(244, 240, 231, .7); }
.section--charcoal .src { color: rgba(244, 240, 231, .6); }
.section--charcoal a { color: var(--copper-soft); }
.section--charcoal .section-head p { color: rgba(244, 240, 231, .72); }
.section--dark .entry, .section--dark .entries { border-color: var(--line-light); }
.section--dark .entry__meta { color: rgba(244, 240, 231, .6); }
.section--dark .entry__meta time { color: var(--copper-soft); }
.section--dark .entry blockquote { color: var(--ivory); }
.section--dark .dtable th, .section--dark .dtable td { border-color: var(--line-light); }

/* ---------- Programme matrix (policy / implementation / statement / outcome) ---------- */
.matrix { border-top: 2px solid var(--indigo); }
.matrix__head, .matrix__row { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(4, minmax(0, 1fr)); }
.matrix__head { position: sticky; top: var(--header-h); z-index: 5; background: var(--ivory); border-bottom: 1px solid var(--line-strong); }
.matrix__head > span { padding: 14px 14px 14px 0; font: 600 .7rem/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.matrix__head i { font-style: normal; }
.matrix__row { border-bottom: 1px solid var(--line); }
.matrix__row > div { padding: 20px 16px 20px 0; font-size: .88rem; line-height: 1.55; }
.matrix__row > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.matrix__row h3 { font-size: 1.12rem; margin-bottom: .35em; }
.matrix__row [role="rowheader"] a { font: 500 .74rem/1 var(--f-mono); letter-spacing: .06em; }
.matrix__row [role="cell"] a { font: 500 .7rem/1 var(--f-mono); white-space: nowrap; }
.matrix__row [role="cell"] a::after { content: " \2197"; }
@media (max-width: 1024px) {
  .matrix__head { display: none; }
  .matrix__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 18px 0; }
  .matrix__row > div, .matrix__row > div + div { padding: 10px 14px 10px 0; border-left: 0; }
  .matrix__row [role="rowheader"] { grid-column: 1 / -1; }
  .matrix__row [role="cell"]::before { content: attr(data-k); display: block; font: 600 .64rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--copper-ink); margin-bottom: 4px; }
}
@media (max-width: 560px) { .matrix__row { grid-template-columns: minmax(0, 1fr); } }
/* Ledgers nested in a grid column: source moves beneath the entry */
.grid .ledger > li { grid-template-columns: 124px minmax(0, 1fr); gap: 6px 20px; }
.grid .ledger__src { grid-column: 2; }
@media (max-width: 860px) { .grid .ledger > li { grid-template-columns: minmax(0, 1fr); } .grid .ledger__src { grid-column: auto; } }

/* ---------- Election result bars & constituency segments ---------- */
.vote { margin-top: 14px; }
.vote__row { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 5px; }
.vote__row b { font: 500 .78rem/1.4 var(--f-mono); color: var(--charcoal); white-space: nowrap; }
.vote__bar { height: 8px; background: rgba(28, 32, 37, .07); }
.vote__bar i { display: block; height: 100%; background: var(--indigo); }
.segs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
.segs li { margin: 0; padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .92rem; background: var(--ivory); }
.segs b { display: block; font: 500 .68rem/1.4 var(--f-mono); color: var(--copper-ink); letter-spacing: .08em; }
@media (max-width: 600px) { .segs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.legend--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .legend--3 { grid-template-columns: minmax(0, 1fr); } .legend--3 > div { border-right: 0 !important; border-bottom: 1px solid var(--line); } .legend--3 > div:last-child { border-bottom: 0; } }
.dtable tbody th[scope="row"] { width: 190px; font: 600 .7rem/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
@media (max-width: 860px) {
  .dtable tbody th[scope="row"] { display: block; width: auto; padding: 0 0 2px; border: 0; }
  .dtable td:not([data-label]) { display: block; }
}

/* ---------- Journey chapters ---------- */
.chapters { border-top: 1px solid var(--line-strong); }
.chapter { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding: clamp(36px, 5vw, 64px) 0; border-bottom: 1px solid var(--line); }
.chapter__n { font: 400 clamp(3.5rem, 2.5rem + 4vw, 6.5rem)/.9 var(--f-serif); color: transparent; -webkit-text-stroke: 1px var(--copper); letter-spacing: -.02em; }
.chapter__body h2 { margin-top: .5rem; }
@media (max-width: 700px) { .chapter { grid-template-columns: minmax(0, 1fr); gap: 8px; } .chapter__n { font-size: 3.2rem; } }
.honours { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.honours li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 18px 0; margin: 0; border-bottom: 1px solid var(--line-light); font: 400 1.2rem/1.4 var(--f-serif); color: var(--ivory); }
.honours span { font: 500 .7rem/1.9 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--copper-soft); }
@media (max-width: 480px) { .honours li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.tl__cat { margin-bottom: 8px; color: var(--copper-ink); }
.section--dark .tl__cat, .section--charcoal .tl__cat { color: var(--copper-soft); }
.section--dark .tl__card h3 { color: var(--ivory); }
/* Entries: gap-based columns so filtering never breaks the alternation */
.entries { column-gap: 56px; }
.entry, .entry:nth-child(even) { padding: 26px 0; border-left: 0; }

/* ---------- Quote wall ---------- */
.quotewall { columns: 2 380px; column-gap: 56px; }
.quotewall .quote { break-inside: avoid; margin-bottom: 44px; display: block; }
.quotewall .quote:nth-child(3n+1) blockquote { font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem); }
.chip--dark { color: var(--ivory); border-color: var(--line-light); }
.chip--dark:hover { border-color: var(--copper-soft); }
.chip--dark[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); color: #fff; }

/* ---------- Contact form ---------- */
.contact-card { isolation: isolate; }
.cform .field { margin-bottom: 18px; }
.cform label { display: block; font: 600 .7rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-bottom: 6px; }
.cform input, .cform select, .cform textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); font: 400 1rem/1.4 var(--f-sans); color: var(--charcoal); }
.cform textarea { resize: vertical; min-height: 130px; }
.cform input:focus, .cform select:focus, .cform textarea:focus { outline: 2px solid var(--saffron); outline-offset: 1px; border-color: var(--indigo); }
.cform [aria-invalid="true"] { border-color: #b3462f; }
.cform__err { color: #a33a24; font-size: .9rem; min-height: 1.2em; margin: 0 0 12px; }

/* ---------- Home journey steps ---------- */
.steps { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--indigo); }
.steps li { margin: 0; padding: 14px 12px 0 0; position: relative; }
.steps li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--copper); transform: rotate(45deg); }
.steps b { display: block; font: 500 .8rem/1.3 var(--f-mono); color: var(--copper-ink); margin: 8px 0 4px; }
.steps span { display: block; font-size: .86rem; line-height: 1.4; }
@media (max-width: 700px) { .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: 2px solid var(--indigo); } .steps li { padding: 0 0 16px 20px; } .steps li::before { top: 4px; left: -7px; } .steps b { margin-top: 0; } }

.dtable td, .dtable th { overflow-wrap: anywhere; }
