/* ============================================================
   vikassunda.com — main.css
   Design system: "Parchment & Oxblood"
   Editorial / archival visual language.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Ground */
  --parchment:      #F4EFE4;
  --parchment-2:    #EBE3D2;
  --paper:          #FBF8F1;

  /* Ink */
  --ink:            #17150F;
  --ink-2:          #2A2620;
  --muted:          #5E574B;
  --muted-on-dark:  #B3AA99;

  /* Accents (used sparingly) */
  --oxblood:        #6E2233;
  --oxblood-deep:   #521A26;
  --copper:         #A56A3C;   /* decorative / large type only (3.9:1) */
  --copper-deep:    #8A5530;   /* safe for small text on light (5.4:1) */
  --copper-light:   #D9A273;   /* safe for small text on dark (8.1:1) */

  /* Lines */
  --rule:           rgba(23, 21, 15, 0.16);
  --rule-soft:      rgba(23, 21, 15, 0.09);
  --rule-on-dark:   rgba(244, 239, 228, 0.20);

  /* Type */
  --serif: "Fraunces", "Hoefler Text", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Rhythm */
  --gutter:   clamp(20px, 5vw, 72px);
  --maxw:     1360px;
  --maxw-text: 68ch;
  --section-y: clamp(58px, 7.4vw, 116px);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.6s;

  --nav-h: 74px;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `clip`, never `hidden`: `hidden` would turn body into a scroll
     container and stop the sticky header from sticking. */
  overflow-x: clip;
  /* Very faint archival grain — CSS only, no image request. */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(165, 106, 60, 0.045), transparent 42%),
    radial-gradient(circle at 84% 78%, rgba(110, 34, 51, 0.038), transparent 46%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
svg { display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; }

::selection { background: var(--oxblood); color: var(--parchment); }

/* ---------- 3. Accessibility helpers ---------- */
.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;
}

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 999;
  background: var(--ink);
  color: var(--parchment);
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}
.on-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--copper-light); }

/* ---------- 4. Layout primitives ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--wide { max-width: 1560px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(42px, 5vw, 76px); }

.band-dark {
  background: var(--ink);
  color: var(--parchment);
}
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: var(--parchment); }

.band-alt { background: var(--parchment-2); }

/* Hairline rules */
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule--soft { background: var(--rule-soft); }
.band-dark .rule { background: var(--rule-on-dark); }

/* ---------- 5. Type scale ---------- */
.display-xl {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 7.6vw, 6.6rem);
  line-height: 0.98;
  font-weight: 300;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
}

.display-l {
  font-family: var(--serif);
  font-size: clamp(2.15rem, 4.6vw, 3.9rem);
  line-height: 1.06;
  font-weight: 300;
  letter-spacing: -0.024em;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 96;
}

.display-m {
  font-family: var(--serif);
  font-size: clamp(1.62rem, 2.7vw, 2.4rem);
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: -0.018em;
}

.display-s {
  font-family: var(--serif);
  font-size: clamp(1.24rem, 1.7vw, 1.5rem);
  line-height: 1.32;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.85em;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--copper);
  flex: none;
}
.band-dark .eyebrow { color: var(--copper-light); }
.band-dark .eyebrow::before { background: var(--copper-light); }

.lede {
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 60ch;
}
.band-dark .lede { color: var(--parchment); opacity: 0.92; }

.prose { max-width: var(--maxw-text); color: var(--ink-2); }
.prose p + p { margin-top: 0; }
.band-dark .prose { color: var(--parchment); opacity: 0.9; }

.muted { color: var(--muted); }
.band-dark .muted { color: var(--muted-on-dark); }

.meta {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.band-dark .meta { color: var(--muted-on-dark); }

/* Numeral marker used across pages */
.numeral {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1;
  font-weight: 300;
  color: var(--copper);
  font-variant-numeric: lining-nums;
  display: block;
}

/* ---------- 6. Links & buttons ---------- */
.link-underline {
  display: inline-block;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.link-underline:hover { border-color: var(--oxblood); color: var(--oxblood); }
.band-dark .link-underline { border-color: var(--rule-on-dark); }
.band-dark .link-underline:hover { border-color: var(--copper-light); color: var(--copper-light); }

.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65em;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.arrow-link::after { content: "\2192"; font-size: 1.05em; transition: transform 0.3s var(--ease); }
.arrow-link:hover { color: var(--oxblood-deep); border-color: var(--oxblood); }
.arrow-link:hover::after { transform: translateX(5px); }
.band-dark .arrow-link { color: var(--copper-light); border-color: var(--rule-on-dark); }
.band-dark .arrow-link:hover { color: var(--parchment); border-color: var(--copper-light); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 52px;
  padding: 0 30px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--parchment);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { background: var(--oxblood); border-color: var(--oxblood); color: var(--parchment); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }
.band-dark .btn--ghost { color: var(--parchment); border-color: var(--rule-on-dark); }
.band-dark .btn--ghost:hover { background: var(--parchment); color: var(--ink); border-color: var(--parchment); }

/* ---------- 7. Header / sticky navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 239, 228, 0.82);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--parchment); }
}
.site-header.is-scrolled {
  background: rgba(244, 239, 228, 0.96);
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 24px rgba(23, 21, 15, 0.07);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-h);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .wordmark__suffix {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--copper-deep);
  transform: translateY(-0.35em);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  list-style: none;
}

.nav-list a {
  position: relative;
  display: block;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.25s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--oxblood);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}
.nav-list a:hover { color: var(--oxblood); }
.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--oxblood); }
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-tail { display: flex; align-items: center; gap: 18px; }

.nav-signout {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--rule);
  padding: 9px 14px;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav-signout:hover { color: var(--oxblood); border-color: var(--oxblood); }

/* Menu toggle (mobile) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  min-width: 46px;
  padding: 0 6px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav-toggle__bars { position: relative; width: 22px; height: 12px; flex: none; }
.nav-toggle__bars span {
  position: absolute; left: 0; right: 0; height: 1.5px;
  background: currentColor;
  transition: transform 0.34s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 10.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile panel */
.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--ink);
  color: var(--parchment);
  padding: calc(var(--nav-h) + 32px) var(--gutter) 40px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease), visibility 0.34s;
}
.nav-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.nav-panel__list { list-style: none; }
.nav-panel__list li { border-bottom: 1px solid var(--rule-on-dark); }
.nav-panel__list li:first-child { border-top: 1px solid var(--rule-on-dark); }
.nav-panel__list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 2px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--parchment);
}
.nav-panel__list a[aria-current="page"] { color: var(--copper-light); }
.nav-panel__list .idx {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--copper-light);
  flex: none;
  min-width: 2.4em;
}
.nav-panel__foot {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--muted-on-dark);
}
.nav-panel__foot a { color: var(--parchment); }

body.nav-open { overflow: hidden; }

/* ---------- 8. Figures & image treatment ---------- */
/* Default: never crop. The frame adapts to the photograph. */
.figure { margin: 0; }
.figure img {
  width: 100%;
  height: auto;
  background: var(--parchment-2);
}
.figure figcaption {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--muted);
  max-width: 46ch;
  padding-left: 14px;
  border-left: 1px solid var(--copper);
}
.band-dark .figure figcaption { color: var(--muted-on-dark); }

/* Framed plate: a paper mount around the photograph, archival style */
.plate {
  background: var(--paper);
  padding: clamp(12px, 1.6vw, 20px);
  border: 1px solid var(--rule-soft);
  box-shadow: 0 18px 46px -30px rgba(23, 21, 15, 0.5);
}
.band-dark .plate {
  background: rgba(244, 239, 228, 0.055);
  border-color: var(--rule-on-dark);
  box-shadow: none;
}

/* Tinted mat behind smaller photographs so they sit deliberately */
.mat {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(18px, 3vw, 44px);
  background: linear-gradient(160deg, var(--parchment-2), rgba(165, 106, 60, 0.10));
}
.mat > * { width: 100%; }

.img-cap { max-width: 100%; }

/* ---------- 9. Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }
.reveal[data-delay="3"] { transition-delay: 0.27s; }
/* If JS never runs, content must still be visible. */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding-block: clamp(56px, 7vw, 96px) 30px;
  border-top: 3px solid var(--oxblood);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.footer-mark {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.footer-blurb {
  color: var(--muted-on-dark);
  font-size: 0.94rem;
  max-width: 34ch;
}

.footer-head {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper-light);
  margin: 0 0 18px;
}

.footer-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-list a {
  font-size: 0.95rem;
  color: var(--parchment);
  opacity: 0.86;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.footer-list a:hover { opacity: 1; color: var(--copper-light); }

.footer-contact { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.footer-contact li { font-size: 0.95rem; }
.footer-contact .name {
  font-family: var(--serif);
  font-size: 1.14rem;
  letter-spacing: 0.01em;
}
.footer-contact a {
  border-bottom: 1px solid var(--rule-on-dark);
  padding-bottom: 2px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
  word-break: break-word;
}
.footer-contact a:hover { color: var(--copper-light); border-color: var(--copper-light); }

/* Social */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin-top: 26px;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--rule-on-dark);
  border-radius: 50%;
  color: var(--parchment);
  transition: background 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease), transform 0.28s var(--ease);
}
.social a:hover {
  background: var(--copper-light);
  border-color: var(--copper-light);
  color: var(--ink);
  transform: translateY(-2px);
}
.social svg { width: 17px; height: 17px; fill: currentColor; }

.footer-base {
  margin-top: clamp(42px, 5vw, 68px);
  padding-top: 26px;
  border-top: 1px solid var(--rule-on-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 28px;
  font-size: 0.83rem;
  color: var(--muted-on-dark);
}
.footer-base a { color: var(--parchment); border-bottom: 1px solid var(--rule-on-dark); padding-bottom: 1px; }
.footer-base a:hover { color: var(--copper-light); border-color: var(--copper-light); }

/* ---------- 11. Page masthead (shared, varied by page via modifiers) ---------- */
.masthead { padding-block: clamp(56px, 8vw, 116px) clamp(36px, 5vw, 64px); }
.masthead__index {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--copper-deep);
  display: block;
  margin-bottom: 22px;
}
.masthead__title { margin-bottom: 26px; }
.masthead__rule { margin-top: clamp(36px, 5vw, 60px); }

/* ---------- 12. Small shared components ---------- */
.pill-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pill-note::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--oxblood);
  border-radius: 50%;
  flex: none;
}
.band-dark .pill-note { border-color: var(--rule-on-dark); color: var(--muted-on-dark); }
.band-dark .pill-note::before { background: var(--copper-light); }

/* Source note — separates verified record from editorial framing */
.source-note {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  border-left: 2px solid var(--copper);
  padding-left: 16px;
  max-width: 62ch;
}
.band-dark .source-note { color: var(--muted-on-dark); border-left-color: var(--copper-light); }
.source-note a { border-bottom: 1px solid var(--rule); }
.source-note a:hover { color: var(--oxblood); border-color: var(--oxblood); }

/* Ledger rows — used on work / journey / contact */
.ledger { border-top: 1px solid var(--rule); }
.ledger__row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 8px clamp(20px, 4vw, 56px);
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--rule);
}
.ledger__key {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-deep);
  padding-top: 0.5em;
}
.band-dark .ledger { border-top-color: var(--rule-on-dark); }
.band-dark .ledger__row { border-bottom-color: var(--rule-on-dark); }
.band-dark .ledger__key { color: var(--copper-light); }

/* Two-column editorial text */
.cols-2 {
  column-count: 2;
  column-gap: clamp(28px, 4vw, 62px);
  column-rule: 1px solid var(--rule-soft);
}
.cols-2 p { break-inside: avoid-column; }

/* Big pull statement */
.pull {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.1vw, 2.55rem);
  line-height: 1.24;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
}
.band-dark .pull { color: var(--parchment); }
.pull em { font-style: italic; color: var(--oxblood); }
.band-dark .pull em { color: var(--copper-light); }

/* Drop cap for magazine openings */
.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.15em;
  line-height: 0.82;
  font-weight: 300;
  padding: 0.06em 0.14em 0 0;
  color: var(--oxblood);
}

/* ---------- 13. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 14. Print ---------- */
@media print {
  .site-header, .nav-panel, .site-footer, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 15. No-JavaScript notice (session gate fallback) ---------- */
.js-required {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 8vh clamp(22px, 6vw, 72px);
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
}
.js-required h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 300;
}
.js-required p { max-width: 52ch; margin: 0; color: var(--muted); }
.js-required a { color: var(--oxblood); border-bottom: 1px solid currentColor; }

/* A figure whose photograph failed to load collapses cleanly
   instead of leaving a broken frame in the composition. */
.is-missing { display: none; }

/* ---------- 16. QA corrections ---------- */

/* Sign-out sits on the ink footer and in the dark menu panel; the
   light-theme values it inherited did not meet contrast there. */
.band-dark .nav-signout,
.site-footer .nav-signout,
.nav-panel .nav-signout {
  color: var(--muted-on-dark);
  border-color: var(--rule-on-dark);
}
.band-dark .nav-signout:hover,
.site-footer .nav-signout:hover,
.nav-panel .nav-signout:hover {
  color: var(--ink);
  background: var(--copper-light);
  border-color: var(--copper-light);
}

/* Anchor targets must clear the sticky header. */
[id] { scroll-margin-top: calc(var(--nav-h) + 28px); }

/* Underlines inside notes read better as text decoration than as a
   box border, which sat on the descenders. */
.source-note a,
.margin-note a {
  border-bottom: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--copper);
}
.source-note a:hover, .margin-note a:hover { color: var(--oxblood); text-decoration-color: var(--oxblood); }
.band-dark .source-note a { text-decoration-color: var(--copper-light); }
.band-dark .source-note a:hover { color: var(--copper-light); }

/* Two consecutive sections on the same ground stacked their full
   padding and read as dead space. */
.section--flush-top { padding-top: clamp(18px, 2.4vw, 40px); }
.section--flush-bottom { padding-bottom: clamp(18px, 2.4vw, 40px); }

/* The header sits above the open menu panel; its translucent ground
   would otherwise tint against the dark panel behind it. */
body.nav-open .site-header {
  background: var(--parchment);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: var(--rule);
}
