/* =========================================================
   Sayan Ghosh: portfolio styles
   Layout: a kinetic masthead with a split-flap departures
   board, then the work by publication (Forbes, The Diplomat,
   The Hindu, The Times of India, The Indian Express) in brand
   colour blocks with each story's key figure set behind it,
   a searchable archive, the career as a railway line with
   station signs, a guide for readers outside India and contact.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand colours */
  --obsidian: #0B0C10;
  --vermilion: #FF3366;
  --marigold: #FFB800;
  --cobalt: #2D5BFF;
  --cobalt-deep: #142A8C;
  --newsprint: #F4F1EA;
  --white: #FFFFFF;

  /* Light theme: high-contrast editorial light */
  --bg: #F4F1EA;
  --surface: #FFFCF6;
  --surface-2: #EAE5D9;
  --ink: #0B0C10;
  --ink-2: #4A4B53;
  --rule: #D2CCBF;
  --vermilion-ink: #C70F45;
  --cobalt-ink: #1F47D6;
  --on-vermilion: #0B0C10;
  --on-marigold: #0B0C10;
  --on-cobalt: #FFFFFF;
  --invert-accent: #FFB800;
  --grid-line: rgba(11, 12, 16, 0.055);
  --glow-1: rgba(255, 51, 102, 0.16);
  --glow-2: rgba(45, 91, 255, 0.14);
  --glass: rgba(244, 241, 234, 0.8);
  --glass-border: rgba(11, 12, 16, 0.14);
  --shadow: 0 24px 48px -30px rgba(11, 12, 16, 0.5);
  --focus: #1F47D6;
  --grain-opacity: 0.07;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* The departures board is always lit at night */
  --board: #0E1015;
  --board-2: #1B1E26;
  --flap-top: #2A2E38;
  --flap-bottom: #1F222B;
  --flap-ink: #F4F1EA;

  /* Type: an expressive display serif, a geometric sans and a mono for data */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid type scale */
  --fs-2xs: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --fs-xs: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --fs-sm: clamp(0.875rem, 0.85rem + 0.12vw, 0.95rem);
  --fs-base: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
  --fs-md: clamp(1.1rem, 1.04rem + 0.3vw, 1.28rem);
  --fs-lg: clamp(1.3rem, 1.16rem + 0.7vw, 1.75rem);
  --fs-xl: clamp(1.6rem, 1.3rem + 1.5vw, 2.6rem);
  --fs-2xl: clamp(2rem, 1.45rem + 2.7vw, 3.9rem);
  --fs-hero: clamp(3.6rem, 1rem + 13vw, 14rem);

  /* Fluid spacing scale */
  --sp-3xs: clamp(0.25rem, 0.23rem + 0.1vw, 0.3rem);
  --sp-2xs: clamp(0.375rem, 0.34rem + 0.18vw, 0.5rem);
  --sp-xs: clamp(0.5rem, 0.45rem + 0.25vw, 0.75rem);
  --sp-s: clamp(0.75rem, 0.66rem + 0.45vw, 1.125rem);
  --sp-m: clamp(1rem, 0.86rem + 0.7vw, 1.5rem);
  --sp-l: clamp(1.5rem, 1.22rem + 1.4vw, 2.5rem);
  --sp-xl: clamp(2rem, 1.5rem + 2.5vw, 4rem);
  --sp-2xl: clamp(3.5rem, 2.4rem + 5.5vw, 8rem);
  --inset: clamp(0rem, -1.25rem + 3.5vw, 3rem);

  --radius-s: clamp(0.6rem, 0.55rem + 0.2vw, 0.75rem);
  --radius-l: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* Dark theme: neon newsroom dark, for a dark system setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0C10;
    --surface: #14161D;
    --surface-2: #1D2029;
    --ink: #F4F1EA;
    --ink-2: #B8B4AA;
    --rule: #2C303B;
    --vermilion-ink: #FF5A83;
    --cobalt-ink: #8AA5FF;
    --invert-accent: #C70F45;
    --grid-line: rgba(244, 241, 234, 0.05);
    --glow-1: rgba(255, 51, 102, 0.22);
    --glow-2: rgba(45, 91, 255, 0.26);
    --glass: rgba(20, 22, 29, 0.76);
    --glass-border: rgba(244, 241, 234, 0.14);
    --shadow: 0 24px 48px -26px rgba(0, 0, 0, 0.9);
    --focus: #FFB800;
    --grain-opacity: 0.09;
    color-scheme: dark;
  }
}

/* Dark theme, chosen with the toggle */
:root[data-theme="dark"] {
  --bg: #0B0C10;
  --surface: #14161D;
  --surface-2: #1D2029;
  --ink: #F4F1EA;
  --ink-2: #B8B4AA;
  --rule: #2C303B;
  --vermilion-ink: #FF5A83;
  --cobalt-ink: #8AA5FF;
  --invert-accent: #C70F45;
  --grid-line: rgba(244, 241, 234, 0.05);
  --glow-1: rgba(255, 51, 102, 0.22);
  --glow-2: rgba(45, 91, 255, 0.26);
  --glass: rgba(20, 22, 29, 0.76);
  --glass-border: rgba(244, 241, 234, 0.14);
  --shadow: 0 24px 48px -26px rgba(0, 0, 0, 0.9);
  --focus: #FFB800;
  --grain-opacity: 0.09;
  color-scheme: dark;
}

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

html {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}

/* Paper grain over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
}

/* Wide screens: ambient glow and faint grid lines */
@media (min-width: 90em) {
  body {
    background-image:
      radial-gradient(62rem 40rem at 6% -8%, var(--glow-1), transparent 62%),
      radial-gradient(54rem 42rem at 100% 36%, var(--glow-2), transparent 64%),
      linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: auto, auto, 120px 120px, 120px 120px;
    background-attachment: fixed;
  }
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }

::selection { background: var(--marigold); color: var(--obsidian); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: -8rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: var(--sp-xs) var(--sp-m);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: calc(var(--sp-xs) + env(safe-area-inset-top, 0px)); }

/* Page column: the side gutter clears notches and side bars */
.wrap {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.frame { padding-inline: var(--inset); }

.icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Words that open a quick explanation for readers outside India */
.term {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  cursor: help;
}
.term:hover { text-decoration-style: solid; }
.term[aria-expanded="true"] { text-decoration-style: solid; text-decoration-color: var(--vermilion); }

/* ---------- 3. Masthead ---------- */
.masthead { position: relative; z-index: 40; }

.masthead .frame {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  padding-block: var(--sp-s);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  min-height: 48px;
  margin-right: auto;
  color: inherit;
  text-decoration: none;
}

/* Two little split-flap tiles */
.brand-mark { display: inline-flex; gap: 2px; flex: none; }
.brand-mark span {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.5em;
  height: 1.95em;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--flap-top) 0 50%, var(--flap-bottom) 50% 100%);
  color: var(--marigold);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 800;
}
.brand-mark span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 0.5px);
  height: 1px;
  background: rgba(0, 0, 0, 0.7);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: var(--fs-sm); font-weight: 800; }
.brand-line { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-2); }

.topnav { display: none; }
.topnav ul { display: flex; gap: var(--sp-3xs); list-style: none; }
.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: var(--sp-s);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.topnav a:hover { background: var(--surface-2); }
.topnav a[aria-current="location"] { background: var(--ink); color: var(--bg); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2xs);
  min-width: 48px;
  min-height: 48px;
  padding-inline: var(--sp-s);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.theme-toggle[aria-pressed="true"] .icon { fill: currentColor; }

/* ---------- 4. Hero ---------- */
.hero { padding-block: var(--sp-l) var(--sp-xl); }

/* How this site was made: the first line of the opening, in the same style as the reader's note below */
.made-note {
  max-width: 46rem;
  margin-bottom: var(--sp-m);
  padding-left: var(--sp-s);
  border-left: 3px solid var(--marigold);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--ink-2);
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xs) var(--sp-m);
}

.dateline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2xs);
  padding: var(--sp-2xs) var(--sp-s);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.35;
}
.status-dot {
  width: 0.6em;
  height: 0.6em;
  flex: none;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 0 0.3em var(--glow-1);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 0.55em transparent; }
}

.hero-name {
  margin-top: var(--sp-m);
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.04em;
  font-optical-sizing: auto;
}

/* Each line clips its letters so they can rise into place */
.hero-name .line {
  display: block;
  overflow: clip;
  padding-block: 0.1em 0.22em;
  margin-block: -0.1em -0.22em;
}
.hero-name .line + .line { padding-left: clamp(0rem, -6rem + 20vw, 24rem); }

.hero-name .ch {
  display: inline-block;
  animation: set-in 1s var(--ease-out) both;
  animation-delay: calc(var(--i) * 55ms + 80ms);
}

@keyframes set-in {
  from { transform: translateY(110%) rotate(6deg); }
  to { transform: none; }
}

.hero-body {
  display: grid;
  gap: var(--sp-l);
  margin-top: var(--sp-l);
}
.hero-copy { min-width: 0; }

.hero-motto {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-style: italic;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero-bio {
  max-width: 40rem;
  margin-top: var(--sp-s);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink-2);
}

/* What he is looking for and when he can start, said plainly for UK employers */
.hero-avail {
  max-width: 40rem;
  margin-top: var(--sp-s);
  padding-left: var(--sp-s);
  border-left: 3px solid var(--vermilion);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin-top: var(--sp-m);
}

.hero-hint {
  max-width: 38rem;
  margin-top: var(--sp-m);
  padding-left: var(--sp-s);
  border-left: 3px solid var(--marigold);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--ink-2);
}
/* One short, quiet link: a solid marigold line set low, clear of the letters */
.hint-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--marigold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-skip-ink: none;
}
.hint-link:hover { text-decoration-color: var(--vermilion); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2xs);
  min-height: 48px;
  padding: var(--sp-2xs) var(--sp-m);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--vermilion); border-color: var(--vermilion); color: var(--on-vermilion); }

/* ---------- 5. The split-flap departures board ---------- */
.board {
  container-type: inline-size;
  position: relative;
  align-self: end;
  min-width: 0;
  padding: clamp(0.9rem, 0.6rem + 1.4vw, 1.75rem);
  border-radius: var(--radius-l);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--board-2) 0%, var(--board) 62%),
    var(--board);
  color: var(--flap-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5),
    0 34px 70px -34px rgba(11, 12, 16, 0.8);
}

/* Small screws in the corners, like a real board */
.board::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0, #3A3F4B 0 2.5px, transparent 3px) top left / 8px 8px no-repeat,
    radial-gradient(circle at 100% 0, #3A3F4B 0 2.5px, transparent 3px) top right / 8px 8px no-repeat,
    radial-gradient(circle at 0 100%, #3A3F4B 0 2.5px, transparent 3px) bottom left / 8px 8px no-repeat,
    radial-gradient(circle at 100% 100%, #3A3F4B 0 2.5px, transparent 3px) bottom right / 8px 8px no-repeat;
}

.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.7rem;
  padding-inline: 0.2rem;
}

.board-label {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--marigold);
}

.board-clock { display: inline-flex; align-items: center; gap: 0.6rem; }

.departures { display: grid; gap: 0.35rem; list-style: none; }

.dep {
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.3rem 0.45rem;
  margin-inline: -0.25rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-size: clamp(9px, calc(100cqi / 25.5), 21px);
  transition: background-color 0.2s ease;
}
.dep:hover { background: rgba(255, 255, 255, 0.06); }
.dep:hover .flaps--status .flap { color: var(--vermilion); }
.dep:focus-visible { outline-color: var(--marigold); }

.flaps {
  display: inline-flex;
  gap: 0.09em;
  font-family: var(--font-mono);
  font-weight: 800;
  line-height: 1;
  white-space: pre;
}
.flaps--status { margin-left: auto; color: var(--marigold); }
.flaps--clock { font-size: clamp(11px, calc(100cqi / 30), 17px); color: var(--marigold); }

.flap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 0.8em;
  height: 1.34em;
  border-radius: 0.13em;
  background: linear-gradient(180deg, var(--flap-top) 0 50%, var(--flap-bottom) 50% 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
  perspective: 12em;
}
/* The hinge across the middle */
.flap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 0.5px);
  height: 1px;
  background: rgba(0, 0, 0, 0.75);
}
.flap-leaf {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50%;
  overflow: hidden;
  background: var(--flap-top);
  transform-origin: 50% 100%;
  opacity: 0;
  backface-visibility: hidden;
}
.flap-leaf > span { display: grid; place-items: center; height: 200%; }

.board-foot {
  margin-top: 0.75rem;
  padding-inline: 0.2rem;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: #9A968C;
}

/* A narrow board drops the second column so the names stay legible */
@container (max-width: 25rem) {
  .flaps--status { display: none; }
  .dep { font-size: calc(100cqi / 16.2); }
}

/* ---------- 6. Marquee bands ---------- */
.band {
  overflow: clip;
  background: var(--ink);
  color: var(--bg);
}
.band--marigold { background: var(--marigold); color: var(--on-marigold); }

.marquee { overflow: clip; padding-block: var(--sp-s); }
.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: var(--sp-l);
  padding-right: var(--sp-l);
}
.marquee-item {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee-item:nth-child(4n + 3) { font-style: italic; font-weight: 400; }
.band--marigold .marquee-item { font-family: var(--font-sans); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.sep {
  width: 0.55em;
  height: 0.55em;
  flex: none;
  background: var(--vermilion);
  transform: rotate(45deg);
}
.band--marigold .sep { background: var(--on-marigold); border-radius: 50%; transform: none; }

/* ---------- 7. Sections ---------- */
.section { padding-top: var(--sp-2xl); scroll-margin-top: var(--sp-m); }
.outlet-sec { padding-top: var(--sp-xl); }

.section-head {
  display: grid;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-l);
}
.section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-xs) var(--sp-m);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
}
.section-deck {
  max-width: 46rem;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink-2);
}

/* Each publication opens with its name and a line for readers outside India */
.outlet-head {
  --dot: var(--ink);
  display: grid;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-m);
  padding-top: var(--sp-m);
  border-top: 2px solid var(--ink);
}
#forbes .outlet-head { --dot: var(--marigold); }
#diplomat .outlet-head { --dot: var(--cobalt); }
#toi .outlet-head { --dot: var(--vermilion); }
#hindu .outlet-head { --dot: var(--ink); }
#express .outlet-head { --dot: var(--marigold); }

.outlet-title {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-style: italic;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.02em;
}
.outlet-title::before {
  content: "";
  width: 0.42em;
  height: 0.42em;
  flex: none;
  border-radius: 50%;
  background: var(--dot);
  transform: translateY(-0.05em);
}
.outlet-about {
  max-width: 46rem;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- 8. Cards: tilt, glow border, whole-card link ---------- */
.card {
  --card-bg: var(--surface);
  --card-fg: var(--ink);
  --card-border: var(--rule);
  --glow-hot: var(--vermilion);
  --glow-a: transparent;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-l);
  color: var(--card-fg);
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    radial-gradient(24rem circle at var(--mx, 50%) var(--my, 50%), var(--glow-a), transparent 66%) border-box,
    linear-gradient(var(--card-border), var(--card-border)) border-box;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out), box-shadow 0.3s ease;
}
.card.is-tilting {
  --glow-a: var(--glow-hot);
  box-shadow: var(--shadow);
  transition: transform 0.12s linear, box-shadow 0.3s ease;
}

/* A soft light that follows the pointer inside the card */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(30rem circle at var(--mx, 50%) var(--my, 50%), var(--glow-1), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card.is-tilting::before { opacity: 1; }

.stretched { color: inherit; text-decoration: none; }
.stretched::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 1;
  border-radius: var(--radius-l);
}
.stretched:focus-visible { outline: none; }
.stretched:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 4px; }
.card:hover .stretched { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.above { position: relative; z-index: 2; }

/* The figure each story turned on, set behind the words */
.card-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.bgstat,
.bgword {
  position: absolute;
  right: -0.04em;
  bottom: -0.17em;
  font-family: var(--font-display);
  font-size: clamp(7rem, 4rem + 9vw, 13rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  /* Hollow figures: the fill is clear and the outline takes the card's ink.
     (Making `color` transparent would blank the outline too.) */
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px currentColor;
  opacity: 0.2;
  font-variant-numeric: lining-nums;
  transition: transform 1.2s var(--ease-out);
}
.card:hover .card-bg .bgstat,
.card:hover .card-bg .bgword { transform: translateX(-0.06em); }
.bgword { font-style: italic; text-transform: uppercase; letter-spacing: -0.02em; opacity: 0.14; }

.outlet {
  display: inline-flex;
  align-items: center;
  min-height: 2em;
  padding-inline: 0.8em;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-style: italic;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}
.outlet--on-marigold { background: var(--obsidian); color: var(--white); }
.outlet--diplomat { background: var(--cobalt); color: var(--on-cobalt); }
.outlet--forbes { background: var(--marigold); color: var(--on-marigold); }
.outlet--toi { background: var(--vermilion); color: var(--on-vermilion); }
.outlet--hindu { background: var(--ink); color: var(--bg); }
.outlet--other { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

.read-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 48px;
  font-size: var(--fs-sm);
  font-weight: 800;
}
.read-cue .icon { transition: transform 0.3s var(--ease-out); }
.card:hover .read-cue .icon { transform: translate(3px, -3px); }

.byline { font-size: var(--fs-sm); font-weight: 700; }

.behind {
  display: grid;
  gap: 0.15rem;
  padding-top: var(--sp-xs);
  border-top: 1.5px dashed currentColor;
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.behind-label {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.behind b { font-family: var(--font-display); font-size: 1.15em; font-weight: 800; }

.spot-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3xs) var(--sp-m);
  margin-top: auto;
  padding-top: var(--sp-xs);
  border-top: 1.5px solid currentColor;
}

.sub-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* ---------- 9. The Forbes story, opening Selected works ---------- */
.feature {
  --card-bg: var(--marigold);
  --card-fg: var(--on-marigold);
  --card-border: var(--marigold);
  --glow-hot: var(--vermilion);
  gap: var(--sp-m);
  min-height: clamp(28rem, 18rem + 22vw, 44rem);
  padding: clamp(1.5rem, 1rem + 2.6vw, 3.75rem);
}
.bgstat--feature {
  right: -0.06em;
  bottom: -0.2em;
  font-size: clamp(15rem, 5rem + 34vw, 48rem);
  -webkit-text-stroke-width: 3px;
  opacity: 0.17;
}
.feature-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2xs) var(--sp-m);
}
.feature-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.feature-grid {
  display: grid;
  gap: var(--sp-l);
  align-items: end;
  margin-top: auto;
}
.feature-main { display: grid; gap: var(--sp-s); min-width: 0; }
.feature-title {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.1rem + 4.6vw, 6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
  font-optical-sizing: auto;
}
.feature-summary { max-width: 40rem; font-size: var(--fs-md); line-height: 1.5; }
.behind--feature {
  align-self: end;
  padding-top: var(--sp-s);
  border-top: 2px solid currentColor;
  font-size: var(--fs-base);
}

/* ---------- 10. The Diplomat ---------- */
.dip-grid,
.hindu-grid,
.express-grid,
.toi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-m);
}

.spot { gap: var(--sp-s); padding: var(--sp-l); }
.spot-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.spot-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.spot--big .spot-title { font-size: var(--fs-2xl); }
.spot-summary { max-width: 42rem; font-size: var(--fs-base); line-height: 1.55; }
.spot-method { max-width: 42rem; font-size: var(--fs-sm); line-height: 1.5; }

.spot--cobalt { --card-bg: var(--cobalt); --card-fg: var(--on-cobalt); --card-border: var(--cobalt); --glow-hot: var(--marigold); }
.spot--ink-cobalt { --card-bg: var(--cobalt-deep); --card-fg: var(--white); --card-border: var(--cobalt-deep); --glow-hot: var(--marigold); }
.spot--paper-cobalt { --card-border: var(--cobalt); --glow-hot: var(--cobalt); }
.spot--paper-cobalt .card-bg { color: var(--cobalt-ink); }
.spot--ink { --card-bg: var(--ink); --card-fg: var(--bg); --card-border: var(--ink); --glow-hot: var(--vermilion); }
.spot--paper-ink { --card-border: var(--ink); }
.spot--paper-ink .card-bg { color: var(--vermilion-ink); }
.spot--clipboard { --card-bg: var(--surface-2); --card-border: var(--rule); }
.spot--ink-cobalt .spot-method { opacity: 0.92; }
.spot--ink-cobalt .bgword { font-size: clamp(6rem, 2rem + 12vw, 16rem); }

/* ---------- 11. The Times of India ---------- */
.page-card {
  --card-bg: var(--vermilion);
  --card-fg: var(--on-vermilion);
  --card-border: var(--vermilion);
  --glow-hot: var(--marigold);
  overflow: visible;
}
.page-card--marigold { --card-bg: var(--marigold); --card-fg: var(--on-marigold); --card-border: var(--marigold); --glow-hot: var(--vermilion); }
.page-card--wide { --card-bg: var(--surface); --card-fg: var(--ink); --card-border: var(--vermilion); }
/* A wide chart panel rather than a page: on phones the frame shows its opening chart,
   and from tablet width up the whole strip sits above the words */
.page-card--strip { --card-bg: var(--surface); --card-fg: var(--ink); --card-border: var(--marigold); }
.page-card--strip .page-shot { aspect-ratio: 16 / 9; }
.page-card--strip .page-img { object-position: 0 50%; }

/* A newspaper page: the real scan where it loads, a drawn page where it can't */
.page-shot {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--radius-l) - 2px) calc(var(--radius-l) - 2px) 0 0;
  background: var(--newsprint);
  color: var(--vermilion-ink);
}
.page-mock {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#0B0C10, #0B0C10) 6% 9% / 88% 6px no-repeat,
    linear-gradient(#0B0C10, #0B0C10) 6% 13% / 88% 1px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), rgba(11, 12, 16, 0.12) calc(20% - 1px) 20%),
    #F4F1EA;
}
.page-mock .bgstat {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -42%);
  font-size: clamp(4rem, 2.6rem + 5vw, 8.5rem);
  color: #C70F45;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  opacity: 1;
}
.page-mock .bgstat--words { font-size: clamp(3rem, 2rem + 4vw, 6.5rem); letter-spacing: -0.03em; }
.card:hover .page-mock .bgstat { transform: translate(-50%, -42%) scale(1.04); }

.page-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  transition: opacity 0.6s ease, transform 0.9s var(--ease-out);
}
.js .page-img { opacity: 0; }
.js .page-img.is-loaded { opacity: 1; }
.page-img.is-broken { display: none; }
.card:hover .page-img.is-loaded { transform: scale(1.04); }

.page-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-xs);
  padding: var(--sp-m) var(--sp-l) var(--sp-l);
}
.page-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-card--lead .page-title { font-size: var(--fs-2xl); }
.page-summary { max-width: 40rem; line-height: 1.55; }
.page-source { font-size: var(--fs-xs); line-height: 1.45; }
.page-body .read-cue { margin-top: auto; }

/* Election pages and the data column, in a sideways reel */
.reel-block { margin-top: var(--sp-xl); }
.reel-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-s);
  margin-bottom: var(--sp-m);
}
.reel-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 750;
  line-height: 1.1;
}
.reel-deck { max-width: 40rem; margin-top: var(--sp-3xs); font-size: var(--fs-sm); color: var(--ink-2); }
.reel-nav { display: flex; gap: var(--sp-2xs); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.icon-btn:disabled { border-color: var(--rule); color: var(--rule); cursor: default; }

.reel {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: var(--sp-2xs) var(--sp-s);
  border-radius: var(--radius-l);
}
.reel::-webkit-scrollbar { display: none; }

.reel-track {
  display: flex;
  gap: var(--sp-m);
  width: max-content;
  list-style: none;
}

.clip {
  gap: var(--sp-xs);
  width: min(78vw, 20.5rem);
  padding: 0 0 var(--sp-m);
  scroll-snap-align: start;
  --card-border: var(--rule);
  --glow-hot: var(--vermilion);
}
.page-shot--clip { aspect-ratio: 16 / 10; margin-bottom: var(--sp-2xs); }
.clip > :not(.page-shot) { padding-inline: var(--sp-m); }
.clip-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.clip .behind { margin-inline: var(--sp-m); padding-inline: 0; border-top-color: var(--rule); }
.clip-meta { font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-2); }

.reel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-xs) var(--sp-m);
  margin-top: var(--sp-xs);
}
.reel-progress {
  flex: 1 1 12rem;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--rule);
}
.reel-progress span {
  display: block;
  height: 100%;
  background: var(--vermilion);
  transform-origin: left center;
  transform: scaleX(var(--p, 0.15));
  transition: transform 0.2s linear;
}
.aside-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* ---------- 11b. The Hindu: explainers, film and television, the data desk ---------- */
.desk-block + .desk-block { margin-top: var(--sp-xl); }
.desk-head { margin-bottom: var(--sp-m); }
.desk-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 750;
  line-height: 1.1;
}
.desk-deck { max-width: 40rem; margin-top: var(--sp-3xs); font-size: var(--fs-sm); color: var(--ink-2); }

.explainer-grid,
.screen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-m);
}

/* The two explainers open the section, so they get more room */
.explainer { min-height: clamp(19rem, 13rem + 14vw, 27rem); }
.explainer .spot-title { font-size: clamp(1.8rem, 1.25rem + 2.3vw, 3.1rem); }
.explainer .bgword { font-size: clamp(5rem, 2rem + 8vw, 10rem); opacity: 0.16; }

/* Data Point stories lead the data desk, a step up from the round-up below them */
.datapoint { min-height: clamp(17rem, 12rem + 10vw, 23rem); }
.datapoint .spot-title { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.35rem); }
.datapoint .bgword,
.datapoint .bgstat { font-size: clamp(4.5rem, 2rem + 7vw, 9rem); opacity: 0.16; }

/* A news report sitting with the explainers: the weight of a Data Point card, not an explainer's */
.report { min-height: clamp(15rem, 11rem + 8vw, 20rem); }
.report .spot-title { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.35rem); }
.report .bgword { font-size: clamp(4.5rem, 2rem + 7vw, 9rem); opacity: 0.16; }

/* The Times of India: stories first, then graphics */
.toi-grid + .desk-head { margin-top: var(--sp-xl); }

/* A line from the review, set like a pull quote */
.pull {
  margin: 0;
  padding-left: var(--sp-s);
  border-left: 3px solid var(--vermilion);
}
.pull p {
  max-width: 34rem;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
}

.clipping-text { font-weight: 500; line-height: 1.35; }
.clipping-text b { font-weight: 800; }
.more-reviews { font-size: var(--fs-sm); line-height: 1.55; }
.more-reviews a { font-weight: 700; }

/* ---------- 12. The Indian Express ---------- */
.express-grid > :only-child { grid-column: 1 / -1; }
.clippings { display: grid; gap: var(--sp-2xs); margin-top: auto; list-style: none; }
.clipping {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  min-height: 56px;
  padding: var(--sp-xs) var(--sp-s);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 0 var(--rule);
  /* A torn bottom edge, like a cutting */
  clip-path: polygon(0 0, 100% 0, 100% 86%, 96% 100%, 91% 88%, 85% 100%, 79% 89%, 73% 100%, 67% 88%, 61% 100%, 55% 89%, 49% 100%, 43% 88%, 37% 100%, 31% 89%, 25% 100%, 19% 88%, 13% 100%, 7% 89%, 0 100%);
  transition: transform 0.25s var(--ease-out), background-color 0.2s ease;
}
.clipping:hover { transform: translateX(4px) rotate(-0.4deg); background: var(--bg); }
.clipping:focus-visible { clip-path: none; }
.clipping-no {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--vermilion-ink);
}

/* ---------- 13. Archive ---------- */
.archive-tools {
  display: grid;
  gap: var(--sp-s);
  margin-bottom: var(--sp-m);
}

.field-label { font-size: var(--fs-sm); font-weight: 700; }

.search { position: relative; display: flex; align-items: center; margin-top: var(--sp-3xs); }
.search .icon {
  position: absolute;
  left: var(--sp-s);
  color: var(--ink-2);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--sp-s) 0 calc(var(--sp-s) + 2em);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 600;
}
.search input::placeholder { color: var(--ink-2); font-weight: 500; opacity: 1; }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2xs); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 48px;
  padding-inline: var(--sp-s);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.archive-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
}

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: dense;
  gap: var(--sp-m);
  list-style: none;
}

.entry { gap: var(--sp-xs); padding: var(--sp-m); }
.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2xs) var(--sp-s);
}
.entry-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.entry--feature .entry-title { font-size: var(--fs-xl); }
.entry-summary { font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-2); }
.entry-credit { font-size: var(--fs-xs); font-weight: 700; }
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3xs);
  margin-top: auto;
  padding-top: var(--sp-xs);
  list-style: none;
}
.tag {
  padding: 0.2em 0.65em;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
}
.entry-links { display: grid; gap: var(--sp-3xs); list-style: none; }
.entry-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 48px;
  font-size: var(--fs-sm);
  font-weight: 800;
  text-decoration: none;
}
.entry-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.entry-link .icon { transition: transform 0.3s var(--ease-out); }
.entry-link:hover .icon { transform: translate(3px, -3px); }

.empty {
  display: grid;
  gap: var(--sp-xs);
  justify-items: start;
  padding: var(--sp-l);
  border: 2px dashed var(--rule);
  border-radius: var(--radius-l);
}
.empty-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; overflow-wrap: anywhere; }
.noscript-note { font-size: var(--fs-sm); color: var(--ink-2); }

/* ---------- 14. Journey ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-xs);
  margin-bottom: var(--sp-xl);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: var(--sp-3xs);
  min-width: 0;
  padding: var(--sp-m);
  border-radius: var(--radius-l);
}
.stat dt { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.stat dd {
  font-family: var(--font-mono);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
/* Each counter is a solid block in one of the brand colours */
.stat:nth-child(1) { background: var(--vermilion); color: var(--on-vermilion); }
.stat:nth-child(2) { background: var(--cobalt); color: var(--on-cobalt); }
.stat:nth-child(3) { background: var(--marigold); color: var(--on-marigold); }
.stat:nth-child(4) { background: var(--ink); color: var(--bg); }
/* An odd tile out on a two-column phone grid takes the full row */
.stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

.legend { display: flex; flex-wrap: wrap; gap: var(--sp-xs); margin-bottom: var(--sp-l); }
.legend-key {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.legend-key::before {
  content: "";
  width: 1.6em;
  height: 1em;
  border-radius: 0.35em;
  background: var(--surface);
  border: 1.5px solid var(--ink-2);
}
.legend-key--data::before { background: transparent; border: 1.5px dashed var(--cobalt-ink); }

/* The railway line */
.timeline {
  --rail: 0.9rem;
  position: relative;
  display: grid;
  gap: var(--sp-xl);
  list-style: none;
}
.timeline::before,
.timeline-fill {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
}
/* Two rails and their sleepers */
.timeline::before {
  left: calc(var(--rail) - 0.6rem);
  width: 1.2rem;
  background:
    linear-gradient(90deg, var(--ink-2) 0 2px, transparent 2px calc(100% - 2px), var(--ink-2) calc(100% - 2px)),
    repeating-linear-gradient(180deg, transparent 0 9px, var(--rule) 9px 13px);
  opacity: 0.55;
}
.timeline-fill {
  left: calc(var(--rail) - 2px);
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--vermilion), var(--marigold) 55%, var(--cobalt));
  transform-origin: top center;
  transform: scaleY(var(--progress, 1));
}

.tl-item {
  position: relative;
  display: grid;
  gap: var(--sp-s);
  padding-left: calc(var(--rail) * 2 + var(--sp-s));
}
.tl-node {
  position: absolute;
  top: 1.1rem;
  left: calc(var(--rail) - 0.7rem);
  width: 1.4rem;
  height: 1.4rem;
  border: 3px solid var(--ink-2);
  border-radius: 50%;
  background: var(--bg);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.tl-item.is-active .tl-node {
  border-color: var(--vermilion);
  background: var(--vermilion);
  box-shadow: 0 0 0 0.45rem var(--glow-1);
}

/* Station signs: yellow boards in Indian scripts, a bilingual one for Wales */
.sign {
  position: relative;
  display: inline-grid;
  justify-items: center;
  align-self: start;
  justify-self: start;
  gap: 0.05rem;
  min-width: min(100%, 11rem);
  max-width: 100%;
  margin-bottom: 1.2rem;
  padding: 0.5rem 1rem 0.55rem;
  border: 3px solid var(--obsidian);
  border-radius: 3px;
  background: var(--marigold);
  color: var(--obsidian);
  box-shadow: 0 0 0 3px var(--marigold), 0 14px 24px -14px rgba(11, 12, 16, 0.6);
  text-align: center;
  transition: transform 0.4s var(--ease-out);
}
.tl-item.is-active .sign { transform: rotate(-1.2deg); }
.sign::before,
.sign::after {
  content: "";
  position: absolute;
  bottom: calc(-1.2rem - 6px);
  width: 6px;
  height: 1.2rem;
  border-radius: 0 0 2px 2px;
  background: var(--ink-2);
}
.sign::before { left: 22%; }
.sign::after { right: 22%; }

.sign-line {
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
}
.sign-line:lang(bn) { font-family: "Noto Sans Bengali", "Kohinoor Bangla", "Bangla Sangam MN", "Nirmala UI", sans-serif; }
.sign-line:lang(hi),
.sign-line:lang(mr) { font-family: "Noto Sans Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", sans-serif; }
.sign-line:lang(ta) { font-family: "Noto Sans Tamil", "Tamil Sangam MN", "Nirmala UI", sans-serif; }
.sign-line:lang(cy) { font-family: var(--font-sans); font-weight: 800; }
.sign-en {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sign--cymru {
  border-color: var(--white);
  background: var(--cobalt);
  color: var(--white);
  box-shadow: 0 0 0 3px var(--cobalt), 0 14px 24px -14px rgba(11, 12, 16, 0.6);
}
.sign--remote {
  border: 2px dashed var(--ink-2);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.sign--remote::before,
.sign--remote::after { display: none; }
.sign--remote .sign-line {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sign--remote .sign-en { font-size: var(--fs-sm); letter-spacing: 0.04em; }

.tl-lanes { display: grid; gap: var(--sp-xs); }

.lane {
  min-width: 0;
  padding: var(--sp-s) var(--sp-m);
  border-radius: var(--radius-s);
}
.lane--desk { border: 1.5px solid var(--rule); background: var(--surface); }
.lane--data { border: 1.5px dashed var(--cobalt-ink); }
.lane-label {
  margin-bottom: var(--sp-3xs);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--ink-2);
}
.lane--data .lane-label { color: var(--cobalt-ink); }
.lane-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lane-org { margin-top: var(--sp-3xs); font-size: var(--fs-sm); font-weight: 700; }
.lane p:not(.lane-label):not(.lane-org) { margin-top: var(--sp-3xs); font-size: var(--fs-sm); line-height: 1.55; }
.lane--blank { display: none; }

.tl-item--now .lane--desk { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.tl-item--now .lane--desk .lane-label { color: var(--bg); }

/* ---------- 15. Guide for readers outside India ---------- */
.guide-groups {
  display: grid;
  gap: var(--sp-l);
}
.guide-group-title {
  margin-bottom: var(--sp-xs);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vermilion-ink);
}
.gloss { display: grid; gap: var(--sp-xs); }
.gloss-entry {
  padding: var(--sp-s) var(--sp-m);
  border: 1.5px solid var(--rule);
  border-left: 5px solid var(--marigold);
  border-radius: var(--radius-s);
  background: var(--surface);
  scroll-margin-top: 7rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.gloss-entry:target,
.gloss-entry.is-flash {
  border-color: var(--vermilion);
  box-shadow: 0 0 0 4px var(--glow-1);
}
.gloss-term {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.2;
}
.gloss-def {
  margin-top: 0.25rem;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--ink-2);
}

/* The quick explanation that opens from a dotted term */
.gloss-pop {
  position: absolute;
  z-index: 70;
  width: min(22rem, calc(100vw - 32px));
  padding: var(--sp-s) var(--sp-m);
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: var(--fs-sm);
  line-height: 1.5;
  animation: pop-in 0.22s var(--ease-out);
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.gloss-pop-term { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; line-height: 1.2; }
.gloss-pop-def { margin-top: 0.25rem; }
.gloss-pop-more { margin-top: 0.45rem; font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700; color: var(--invert-accent); }

/* ---------- 16. Contact ---------- */
.contact-panel {
  display: grid;
  gap: var(--sp-l);
  padding: var(--sp-l);
  border-radius: var(--radius-l);
  background: var(--ink);
  color: var(--bg);
}
.contact-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.025em;
}
.contact-intro { max-width: 36rem; margin-top: var(--sp-s); font-size: var(--fs-md); line-height: 1.5; }
.contact-grid { display: grid; gap: var(--sp-m); }
.contact-card {
  display: grid;
  gap: var(--sp-2xs);
  align-content: start;
  min-width: 0;
  padding: var(--sp-m);
  border: 1.5px solid currentColor;
  border-radius: var(--radius-s);
}
.contact-label { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700; }
.contact-value {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.9rem + 0.8vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--sp-xs); margin-top: var(--sp-2xs); }
.contact-panel .btn { border-color: var(--bg); color: var(--bg); }
.contact-panel .btn--solid { background: var(--bg); color: var(--ink); }
.contact-panel .btn--solid:hover { background: var(--vermilion); border-color: var(--vermilion); color: var(--on-vermilion); }
.copy-status { min-height: 1.5em; font-size: var(--fs-xs); }

/* ---------- 17. Footer ---------- */
.site-foot { padding-block: var(--sp-xl); }
.site-foot .frame {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-xs) var(--sp-l);
  padding-top: var(--sp-m);
  /* A rule that lines up with the content edge, not the gutter */
  background: linear-gradient(var(--rule), var(--rule)) center top / calc(100% - 2 * var(--inset)) 1.5px no-repeat;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.site-foot .mono { font-family: var(--font-mono); }

/* ---------- 18. Floating dock (phones) ---------- */
.dock {
  position: fixed;
  z-index: 50;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-3xs);
  padding: var(--sp-3xs);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
}
.dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 48px;
  min-height: 52px;
  border-radius: 18px;
  color: var(--ink);
  font-size: var(--fs-2xs);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.dock a:active { transform: scale(0.96); }
.dock a[aria-current="location"] { background: var(--ink); color: var(--bg); }

main { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }

/* ---------- 19. Custom cursor (mouse only) ---------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 85;
  display: none;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
html.has-cursor .cursor { display: block; }
.cursor.is-hidden { opacity: 0; }
.cursor-dot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--vermilion);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out), border-radius 0.35s var(--ease-out);
}
.cursor-label {
  color: var(--on-vermilion);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0;
  transition: opacity 0.2s ease;
}
/* Over a story it becomes a READ tile, like a flap on the board */
.cursor.is-read .cursor-dot {
  width: 84px;
  height: 48px;
  margin: -24px 0 0 -42px;
  border-radius: 10px;
  background: linear-gradient(180deg, #FF4D7A 0 50%, var(--vermilion) 50% 100%);
}
.cursor.is-read .cursor-label { opacity: 1; }

/* ---------- 20. Tablet: 768px and up ---------- */
@media (min-width: 48em) {
  .masthead {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: 41;
    height: env(safe-area-inset-top, 0px);
    background: var(--bg);
  }
  .topnav { display: block; }
  .toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .dock { display: none; }
  main { padding-bottom: 0; }
  .section { scroll-margin-top: 6rem; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:last-child:nth-child(odd) { grid-column: auto; }
  .dip-grid,
  .toi-grid,
  .express-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hindu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hindu-grid > :first-child { grid-column: 1 / -1; }
  .explainer-grid,
  .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .datapoint-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .explainer-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dip-b { grid-column: 1 / -1; }
  .page-card--wide,
  .page-card--strip { grid-column: 1 / -1; }
  .page-card--strip .page-shot { aspect-ratio: 2945 / 607; }
  .page-card--strip .page-img { object-position: 50% 50%; }
  .clip { width: 21rem; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry--feature { grid-column: span 2; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .guide-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 21. Laptop: 1024px and up ---------- */
@media (min-width: 64em) {
  .toggle-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
  .hero-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: end; }
  .outlet-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: end; column-gap: var(--sp-l); }
  .feature-grid { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); column-gap: var(--sp-xl); }

  .dip-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .dip-a { grid-column: 1 / span 5; grid-row: 1; }
  .dip-b { grid-column: 6 / -1; grid-row: 1 / span 2; }
  .dip-c { grid-column: 1 / span 5; grid-row: 2; }

  .page-card--wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  }
  .page-card--wide .page-shot {
    aspect-ratio: auto;
    min-height: 100%;
    border-radius: calc(var(--radius-l) - 2px) 0 0 calc(var(--radius-l) - 2px);
  }

  .hindu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hindu-grid > :first-child { grid-column: auto; }
  .screen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-grid > :last-child:nth-child(odd) { grid-column: auto; }
  /* With a fourth card, the film block settles into two by two */
  .screen-grid:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .express-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

  .archive-tools { grid-template-columns: minmax(16rem, 26rem) minmax(0, 1fr); align-items: end; column-gap: var(--sp-l); }
  .archive-count { grid-column: 1 / -1; }
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .tl-item { grid-template-columns: 13rem minmax(0, 1fr); column-gap: var(--sp-l); }
  .tl-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-m); align-items: start; }
  .lane--blank { display: block; visibility: hidden; }
  .sign { margin-bottom: 0; }

  .contact-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; padding: var(--sp-xl); }
}

/* ---------- 22. Large monitors: 1600px and up ---------- */
@media (min-width: 100em) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .guide-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- 22b. Motion: headlines set, pages print, numbers tick, cards land ----------
   Every rule here needs .motion, which theme.js adds only when the reader hasn't asked
   for reduced motion. The hidden starting states also need a class that script.js adds,
   so if the script never runs, nothing stays hidden. Print is untouched. */
.set-word { display: inline-block; white-space: nowrap; }
.set-ch { display: inline-block; }

@media screen {
  /* The motto is stamped a word at a time, once the name has set */
  .motion .hero-motto .stamp {
    display: inline-block;
    animation: stamp 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both;
    animation-delay: calc(650ms + var(--i) * 230ms);
  }
  .motion .hero-bio,
  .motion .hero-avail,
  .motion .hero-actions,
  .motion .hero-hint { animation: rise 0.8s var(--ease-out) both; }
  .motion .hero-bio { animation-delay: 0.85s; }
  .motion .hero-avail { animation-delay: 0.95s; }
  .motion .hero-actions { animation-delay: 1s; }
  .motion .hero-hint { animation-delay: 1.15s; }

  /* The SG tiles in the masthead flip like the departures board under the pointer */
  .motion .brand:hover .brand-mark span { animation: flap-turn 0.6s var(--ease-out) both; }
  .motion .brand:hover .brand-mark span + span { animation-delay: 0.08s; }

  /* Headings: the rule over each publication draws across, its dot drops in,
     the name sets letter by letter, and desk names are inked in from the left */
  .motion .reveal .set-ch { opacity: 0; }
  .motion .reveal.is-in .set-ch {
    animation: set-rise 0.75s var(--ease-out) both;
    animation-delay: calc(var(--i) * 26ms + 140ms);
  }
  .motion .outlet-head.reveal { position: relative; border-top-color: transparent; }
  .motion .outlet-head.reveal::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left center;
  }
  .motion .outlet-head.reveal.is-in::before { animation: rule-draw 0.9s var(--ease-out) both; }
  .motion .outlet-head.reveal .outlet-title::before { transform: translateY(-0.05em) scale(0); }
  .motion .outlet-head.reveal.is-in .outlet-title::before { animation: dot-drop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both; }
  .motion .reveal .outlet-about,
  .motion .reveal .section-deck,
  .motion .reveal .section-count,
  .motion .reveal .desk-deck,
  .motion .reveal .reel-deck { opacity: 0; }
  .motion .reveal.is-in .outlet-about,
  .motion .reveal.is-in .section-deck,
  .motion .reveal.is-in .section-count,
  .motion .reveal.is-in .desk-deck,
  .motion .reveal.is-in .reel-deck { animation: rise 0.7s var(--ease-out) 0.4s both; }
  .motion .reveal .desk-title,
  .motion .reveal .reel-title { clip-path: inset(-0.2em 100% -0.3em 0); }
  .motion .reveal.is-in .desk-title,
  .motion .reveal.is-in .reel-title { animation: ink-in 0.85s cubic-bezier(0.65, 0, 0.35, 1) both; }

  /* Cards land like papers dealt onto a desk, each with a slight turn that settles.
     The individual translate, rotate and scale properties leave transform free for the tilt. */
  .motion .land { opacity: 0; }
  .motion .land.is-in { animation: land 0.85s var(--ease-out) var(--d, 0ms) both; }
  .motion .reel .land { --land-y: 0px; --land-rotate: 0deg; --land-scale: 0.9; }

  /* Newspaper pages come off the press: a roller runs down the page in newsprint black,
     then the colour registers */
  .motion .page-shot .page-img.is-loaded { clip-path: inset(0 0 100% 0); }
  .motion .page-shot.is-printed .page-img.is-loaded {
    animation:
      press 1.2s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--d, 0ms) + 200ms) both,
      register 0.9s ease calc(var(--d, 0ms) + 1250ms) both;
  }
  .motion .page-shot.is-printed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    height: 0.7rem;
    border-radius: 0 0 0.35rem 0.35rem;
    background: linear-gradient(180deg, var(--marigold), var(--vermilion));
    box-shadow: 0 0.4rem 1rem rgba(11, 12, 16, 0.35);
    pointer-events: none;
    animation: roller 1.2s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--d, 0ms) + 200ms) both;
  }

  /* Station signs settle as the line reaches them; a chosen beat springs;
     the big hollow figures drift as their cards pass through the window */
  .motion .tl-item.is-active .sign { animation: arrive 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .motion .chip[aria-pressed="true"] { animation: spring 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .motion .card-bg .bgstat,
  .motion .card-bg .bgword { translate: calc(var(--drift, 0) * 1em) 0; }
}

/* With a mouse, a page scrolls slowly under the pointer so a reader can run an eye down it */
@media screen and (hover: hover) and (pointer: fine) {
  .motion .page-card .page-img.is-loaded,
  .motion .clip .page-img.is-loaded {
    transition: opacity 0.6s ease, transform 0.9s var(--ease-out), object-position 1.2s var(--ease-out);
  }
  .motion .page-card:not(.page-card--strip):hover .page-img.is-loaded,
  .motion .clip:hover .page-img.is-loaded {
    object-position: 50% 100%;
    transition: opacity 0.6s ease, transform 0.9s var(--ease-out), object-position 6s cubic-bezier(0.45, 0, 0.55, 1);
  }
}

@keyframes stamp {
  from { opacity: 0; transform: scale(1.7) rotate(-7deg); }
  55% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.9rem); }
  to { opacity: 1; transform: none; }
}
@keyframes flap-turn {
  0% { transform: none; }
  45% { transform: perspective(200px) rotateX(-90deg); }
  55% { transform: perspective(200px) rotateX(90deg); }
  100% { transform: none; }
}
@keyframes set-rise {
  from { opacity: 0; transform: translateY(0.6em) rotate(8deg); }
  to { opacity: 1; transform: none; }
}
@keyframes rule-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes dot-drop {
  from { transform: translateY(-0.05em) scale(0); }
  to { transform: translateY(-0.05em) scale(1); }
}
@keyframes ink-in {
  from { clip-path: inset(-0.2em 100% -0.3em 0); }
  to { clip-path: inset(-0.2em -0.2em -0.3em 0); }
}
@keyframes land {
  from {
    opacity: 0;
    translate: 0 var(--land-y, 2.4rem);
    rotate: var(--land-rotate, var(--tilt, 0deg));
    scale: var(--land-scale, 1);
  }
  55% { opacity: 1; }
  to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
}
@keyframes press {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes register {
  from { filter: grayscale(1) contrast(1.2); }
  to { filter: none; }
}
@keyframes roller {
  0% { top: -0.35rem; opacity: 1; }
  88% { opacity: 1; }
  100% { top: calc(100% - 0.35rem); opacity: 0; }
}
@keyframes arrive {
  0% { transform: translateY(-0.7rem) rotate(-1.2deg); }
  60% { transform: translateY(0.15rem) rotate(-1.2deg); }
  100% { transform: rotate(-1.2deg); }
}
@keyframes spring {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.07); }
  100% { transform: none; }
}

/* ---------- 23. Motion and contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .card, .chip, .lane, .stat, .contact-card, .sign, .board, .clipping { border: 2px solid CanvasText; }
  .chip[aria-pressed="true"] { outline: 3px solid Highlight; }
  .flap { forced-color-adjust: none; }
  body::after { display: none; }
}
