/*
 * Moonquakers landing page.
 * Visual language borrows from the local Cohere design document: stark editorial white,
 * deep green-black product bands, rounded cards, tight monumental display type,
 * hairline rules, and restrained accent color.
 */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/assets/Fraunces/Fraunces-VariableFont_SOFT,WONK,opsz,wght-d2f54c0c.ttf") format("truetype");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/assets/Fraunces/Fraunces-Italic-VariableFont_SOFT,WONK,opsz,wght-d674caf7.ttf") format("truetype");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/space-grotesk/SpaceGrotesk-Regular-6314b4bf.ttf") format("truetype");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/space-grotesk/SpaceGrotesk-Medium-ae3c5b54.ttf") format("truetype");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/space-grotesk/SpaceGrotesk-SemiBold-702df1df.ttf") format("truetype");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/space-grotesk/SpaceGrotesk-Bold-83543eaf.ttf") format("truetype");
}

:root {
  --mq-primary: #17171c;
  --mq-black: #000000;
  --mq-ink: #212121;
  --mq-green: #003c33;
  --mq-navy: #071829;
  --mq-canvas: #ffffff;
  --mq-stone: #eeece7;
  --mq-pale-green: #edfce9;
  --mq-pale-blue: #f1f5ff;
  --mq-hairline: #d9d9dd;
  --mq-hairline-faint: #ebebfb;
  --mq-muted: #75758a;
  --mq-coral: #ff7759;
  --mq-blue: #1863dc;
  --mq-radius-sm: 8px;
  --mq-radius-md: 16px;
  --mq-radius-lg: 22px;
  --mq-radius-xl: 30px;
  --mq-shadow: 0 24px 80px rgb(0 0 0 / 14%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--mq-ink);
  background: var(--mq-canvas);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.moon-landing h1,
.moon-landing h2,
.moon-landing h3 {
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.mq-mark {
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.mq-announcement {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 8px 18px;
  background: var(--mq-black);
  color: white;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mq-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--mq-hairline);
}

.mq-mark,
.mq-nav a {
  color: var(--mq-ink);
  text-decoration: none;
}

.mq-mark { font-size: 22px; }
.mq-nav-links { display: flex; gap: 24px; font-size: 14px; }
.mq-nav-links a:hover { color: var(--mq-blue); }

.mq-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: clamp(48px, 8vw, 100px) clamp(18px, 5vw, 80px);
}

.mq-kicker {
  margin: 0 0 18px;
  color: var(--mq-coral);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mq-hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(64px, 11vw, 136px);
  line-height: 0.92;
}

.mq-lede {
  max-width: 720px;
  margin: 28px 0 0;
  color: #616161;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.36;
}

.mq-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.mq-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}
.mq-button:hover { transform: translateY(-2px); }
.mq-button-primary { color: white; background: var(--mq-primary); }
.mq-button-secondary { color: var(--mq-ink); border: 1px solid var(--mq-hairline); }

.mq-orbit-card {
  position: relative;
  min-height: min(72vw, 560px);
  border-radius: var(--mq-radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgb(237 252 233 / 100%) 0 14%, transparent 15%),
    radial-gradient(circle at 20% 20%, rgb(255 119 89 / 22%), transparent 28%),
    radial-gradient(circle at 80% 78%, rgb(24 99 220 / 22%), transparent 30%),
    var(--mq-stone);
  box-shadow: var(--mq-shadow);
}

.mq-orbit-card::before,
.mq-orbit-card::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgb(23 23 28 / 16%);
  border-radius: 50%;
  animation: mq-spin 22s linear infinite;
}
.mq-orbit-card::after { inset: 26%; animation-duration: 16s; animation-direction: reverse; }

.mq-orbit-core,
.mq-orbit-card span {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.mq-orbit-core {
  width: 132px;
  height: 132px;
  left: calc(50% - 66px);
  top: calc(50% - 66px);
  color: white;
  background: var(--mq-green);
  font-size: 22px;
}

.mq-orbit-card span {
  left: calc(var(--x) - 48px);
  top: calc(var(--y) - 20px);
  min-width: 96px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--mq-hairline);
  animation: mq-float 2600ms ease-in-out infinite;
  animation-delay: calc(var(--i) * -260ms);
}

.mq-map-band {
  margin: 0 clamp(12px, 3vw, 36px) 0;
  padding: clamp(48px, 7vw, 80px);
  border-radius: var(--mq-radius-lg);
  color: white;
  background: var(--mq-green);
}

.mq-section-heading { max-width: 920px; margin-bottom: 36px; }
.mq-section-heading p.mq-kicker, .mq-article-page p.mq-kicker { margin-bottom: 0px; font-size: 18px; }
.mq-section-heading h2,
.mq-archive h2 {
  max-width: 670px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
}

.mq-map-shell {
  display: grid;
  grid-template-columns: 240px minmax(320px, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.mq-panel,
.mq-detail-card {
  padding: 24px;
  border-radius: var(--mq-radius-sm);
  color: var(--mq-ink);
  background: white;
}

.mq-panel-label {
  margin: 0 0 14px;
  color: var(--mq-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mq-filter-grid { display: grid; gap: 8px; }
.mq-filter-grid button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--mq-hairline);
  border-radius: 999px;
  color: var(--mq-ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.mq-filter-grid button.is-active { color: white; background: var(--mq-primary); border-color: var(--mq-primary); }
.mq-hint { color: #616161; font-size: 14px; line-height: 1.45; }

.mq-graph {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: var(--mq-radius-md);
  background:
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px),
    radial-gradient(circle at 50% 30%, rgb(255 255 255 / 12%), transparent 36%),
    #071829;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.mq-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.mq-lines path {
  fill: none;
  stroke: rgb(237 252 233 / 38%);
  stroke-width: 2;
  stroke-dasharray: 8 12;
  animation: mq-dash 18s linear infinite;
}

.mq-node {
  position: absolute;
  z-index: 2;
  width: min(170px, 28vw);
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--mq-radius-sm);
  color: white;
  background: rgb(255 255 255 / 9%);
  backdrop-filter: blur(16px);
  text-align: left;
  cursor: pointer;
  transform: translate(-50%, -50%);
  animation: mq-rise 540ms cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--delay);
}
.mq-node span { display: block; color: var(--mq-coral); font-size: 13px; margin-bottom: 4px; }
.mq-node strong { font-weight: 500; line-height: 1.15; }
.mq-node:hover,
.mq-node.is-selected { border-color: var(--mq-coral); background: rgb(255 119 89 / 20%); }
.mq-node.is-muted { opacity: 0.18; pointer-events: none; }

.mq-detail-card h3 { margin: 0 0 12px; font-size: 32px; line-height: 1.05; }
.mq-detail-card p:not(.mq-panel-label) { color: #616161; line-height: 1.5; }
.mq-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.mq-detail-tags span { padding: 6px 10px; border-radius: 999px; background: var(--mq-pale-blue); font-size: 12px; }

.mq-issues { padding: clamp(64px, 9vw, 120px) clamp(18px, 5vw, 80px); }
.mq-section-heading-inline { display: grid; grid-template-columns: 240px 1fr; gap: 32px; max-width: none; }
.mq-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 46px; }
.mq-card-grid article {
  min-height: 280px;
  padding: 24px;
  border: 1px solid var(--mq-hairline);
  border-radius: var(--mq-radius-sm);
  background: white;
}
.mq-card-grid article:nth-child(even) { background: var(--mq-stone); }
.mq-card-grid span { color: var(--mq-coral); }
.mq-card-grid h3 { margin: 56px 0 12px; font-size: 32px; line-height: 1; }
.mq-card-grid p { color: #616161; line-height: 1.5; }

.mq-archive {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 32px;
  margin: 0 clamp(12px, 3vw, 36px) 36px;
  padding: clamp(40px, 7vw, 80px);
  border-radius: var(--mq-radius-lg);
  background: var(--mq-primary);
  color: white;
}
.mq-archive p { max-width: 680px; color: rgb(255 255 255 / 72%); font-size: 18px; line-height: 1.5; }
.mq-archive code { color: white; }

@keyframes mq-spin { to { transform: rotate(360deg); } }
@keyframes mq-float { 50% { transform: translateY(-10px); } }
@keyframes mq-dash { to { stroke-dashoffset: -240; } }
@keyframes mq-rise {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)) scale(.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 1100px) {
  .mq-hero-grid,
  .mq-map-shell,
  .mq-archive { grid-template-columns: 1fr; }
  .mq-panel { order: -1; }
  .mq-detail-card { order: 3; }
  .mq-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .mq-nav { align-items: flex-start; gap: 16px; flex-direction: column; }
  .mq-nav-links { width: 100%; justify-content: space-between; }
  .mq-hero-grid { padding-top: 40px; }
  .mq-orbit-card { min-height: 420px; }
  .mq-orbit-card span { min-width: 82px; font-size: 13px; }
  .mq-map-band { padding: 32px 14px; margin-inline: 0; border-radius: 0; }
  .mq-graph { min-height: 620px; }
  .mq-node { width: 142px; font-size: 13px; }
  .mq-section-heading-inline,
  .mq-card-grid { grid-template-columns: 1fr; }
  .mq-archive { margin-inline: 0; border-radius: 0; }
}

.mq-detail-link {
  display: inline-flex;
  margin-top: 22px;
  padding: 10px 16px;
  border-radius: 999px;
  color: white;
  background: var(--mq-primary);
  text-decoration: none;
}

.mq-dossier {
  min-height: 100vh;
  background: var(--mq-canvas);
}

.mq-dossier-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(18px);
}

.mq-dossier-hero {
  padding: clamp(56px, 9vw, 120px) clamp(18px, 5vw, 80px) clamp(40px, 6vw, 80px);
}

.mq-dossier-hero h1 {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(72px, 14vw, 180px);
  line-height: 0.86;
}

.mq-dossier-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(36px, 5vw, 64px);
  background: var(--mq-hairline);
  border: 1px solid var(--mq-hairline);
}

.mq-dossier-facts div {
  padding: 20px;
  background: white;
}

.mq-dossier-facts span,
.mq-source-list span {
  display: block;
  margin-bottom: 10px;
  color: var(--mq-coral);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mq-dossier-facts strong { font-size: 18px; font-weight: 500; }

.mq-dossier-grid > div.mq-dossier-grid-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 14px;
  padding: 0;
}

div.mq-dossier-grid-inner .mq-timeline-deck {
    margin-top: 5px;
}

.mq-article-page .mq-dossier-grid {
    padding: clamp(50px, 8vw, 100px) 50px;
    background: rgba(255, 250, 247, 1);
}

.mq-article-page .mq-dossier-grid .mq-section-heading {
    margin-bottom: 16px;
}

.mq-dossier-card {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--mq-hairline);
  border-radius: var(--mq-radius-sm);
  background: var(--mq-stone);
}

.mq-dossier-card-large {
  grid-row: span 2;
  color: white;
  background: var(--mq-green);
  border-color: transparent;
}

.mq-dossier-card h2,
.mq-dossier-section h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.mq-dossier-card p,
.mq-dossier-timeline p {
  color: #616161;
  font-size: 17px;
  line-height: 1.55;
}

.mq-dossier-card-large p,
.mq-dossier-card-large .mq-source-note { color: rgb(255 255 255 / 76%); }

.mq-dossier-card-large p.summary { font-size: 20px; }

.mq-dossier-card blockquote {
  margin: 30px 0;
  font-family: 'Fraunces';
  padding-left: 24px;
  border-left: 3px solid var(--mq-coral);
  font-size: clamp(21px, 1.7vw, 31px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 400;
/*  font-style: italic;*/
  line-height: 1.4;
  letter-spacing: -.5px;
}

.mq-dossier-section {
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 80px);
  border-top: 1px solid var(--mq-hairline-faint);
}

.mq-dossier-section > div {
  max-width: 1400px;
  margin: 0 auto;
}


.mq-dossier-timeline {
  display: grid;
  gap: 0;
  max-width: 1100px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--mq-hairline);
}

.mq-dossier-timeline li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--mq-hairline);
}

.mq-dossier-timeline time {
  color: var(--mq-coral);
  letter-spacing: 0.04em;
}

.mq-dossier-timeline h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.05;
}

.mq-dossier-timeline p { margin: 0; }

.mq-source-library {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 32px;
  color: white;
  background: var(--mq-primary);
}

.mq-source-list {
  display: grid;
  gap: 10px;
}

.mq-source-list a {
  display: block;
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: var(--mq-radius-sm);
  color: white;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.mq-source-list a:hover {
  transform: translateY(-2px);
  border-color: var(--mq-coral);
}

.mq-source-list strong { font-size: 18px; font-weight: 500; }

@media (max-width: 900px) {
  .mq-dossier-facts,
  .mq-dossier-grid,
  .mq-source-library { grid-template-columns: 1fr; }
  .mq-dossier-timeline li { grid-template-columns: 1fr; gap: 8px; }
}

.mq-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px clamp(18px, 5vw, 80px);
  border-bottom: 1px solid var(--mq-hairline);
  color: var(--mq-muted);
  font-size: 14px;
}
.mq-breadcrumb a { color: var(--mq-ink); text-decoration: none; }
.mq-breadcrumb a:hover { color: var(--mq-blue); }

.mq-card-link {
  display: inline-flex;
  margin-top: 20px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.mq-briefing { background: var(--mq-pale-blue); }
.mq-briefing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mq-briefing-grid article {
  padding: 24px;
  border: 1px solid var(--mq-hairline-faint);
  border-radius: var(--mq-radius-sm);
  background: white;
}
.mq-briefing-grid span { color: var(--mq-coral); }
.mq-briefing-grid h3 { margin: 28px 0 12px; font-size: 30px; line-height: 1; }
.mq-briefing-grid p { color: #616161; line-height: 1.5; }

.mq-dossier-timeline a { color: var(--mq-blue); text-decoration-thickness: 1px; text-underline-offset: 4px; }

.mq-source-group { display: grid; gap: 10px; }
.mq-source-group + .mq-source-group { margin-top: 22px; }
.mq-source-group h3 {
  margin: 0 0 4px;
  color: rgb(255 255 255 / 76%);
  font-size: 15px;
  font-weight: 500;
}

.mq-reading-page { background: var(--mq-stone); }
.mq-reading {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 100px) clamp(18px, 4vw, 48px);
  background: white;
}
.mq-reading h1 {
  margin: 0;
  font-size: clamp(56px, 9vw, 112px);
  line-height: 0.92;
}
.mq-reading h2 {
  margin: 54px 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}
.mq-reading p,
.mq-reading li {
  color: #4f4f58;
  font-size: 18px;
  line-height: 1.62;
}
.mq-reading blockquote {
  margin: 34px 0;
  padding: 28px;
  border-left: 4px solid var(--mq-coral);
  border-radius: 0 var(--mq-radius-sm) var(--mq-radius-sm) 0;
  background: var(--mq-pale-green);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.mq-reading-list { padding-left: 22px; }
.mq-reading-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 46px; }

@media (max-width: 900px) {
  .mq-briefing-grid { grid-template-columns: 1fr; }
}

.mq-main-article {
  max-width: 1040px;
  margin: 0 auto clamp(56px, 8vw, 104px);
  padding: clamp(34px, 6vw, 72px) clamp(18px, 5vw, 64px);
/*  border-top: 1px solid var(--mq-hairline);*/
  border-bottom: 1px solid var(--mq-hairline);
  padding-top: 0;
}

.mq-article-page .mq-main-article {
    margin: 0 auto;
    border-bottom: none;
  }


h2 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.mq-article-deck {
  max-width: 860px;
  margin: 26px 0 54px;
  color: #4f4f58;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.35;
}

.mq-article-page .mq-main-article p.mq-article-deck:last-of-type {
    max-width: 100%;
    margin: 26px 0 24px;
/*    color: #4f4f58;*/
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.35;
  }


.mq-main-article section {
  display: grid;
  gap: 14px;
  padding: 34px 0;
  border-top: 1px solid var(--mq-hairline);
}

.mq-main-article h3 {
  max-width: 860px;
  margin: 0 0 4px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.mq-main-article p {
  max-width: 820px;
  margin: 0;
/*  color: #4f4f58;*/
  font-size: 19px;
  line-height: 1.68;
}

.mq-main-article .mq-evidence-line {
  max-width: 900px;
  margin-top: 8px;
  padding: 14px 16px;
  border-left: 3px solid var(--mq-coral);
  background: var(--mq-stone);
  color: #3f3f46;
  font-size: 15px;
  line-height: 1.55;
}

.mq-main-article a { color: var(--mq-blue); text-underline-offset: 4px; }

.mq-receipt-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
  margin-top: 12px;
}
.mq-receipt-row-single { grid-template-columns: minmax(0, 0.75fr); }
.mq-receipt-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--mq-hairline);
  border-radius: var(--mq-radius-md);
  background: white;
  box-shadow: 0 18px 52px rgb(0 0 0 / 8%);
}
.mq-receipt-thumb {
  position: relative;
  min-height: 220px;
  background: var(--mq-stone);
  color: white;
  text-decoration: none;
}
.mq-receipt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.75) contrast(1.08);
}
.mq-receipt-thumb span {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgb(0 0 0 / 72%);
  font-size: 20px;
}
.mq-receipt-copy { padding: 20px; }
.mq-receipt-copy h4 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.mq-main-article .mq-receipt-copy p { font-size: 15px; line-height: 1.5; }
.mq-main-article .mq-receipt-copy .mq-panel-label { color: var(--mq-coral); font-size: 11px; line-height: 1.2; }
.mq-main-article .mq-receipt-copy .mq-receipt-caption { margin-top: 10px; color: var(--mq-muted); font-size: 13px; }
.mq-receipt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mq-receipt-actions a {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--mq-hairline);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
}

.mq-visual-timeline-section {
  margin-top: 28px;
  max-width: 1040px;
  margin: 0 auto;
/*  padding-top: clamp(44px, 7vw, 84px);*/
  padding-bottom: clamp(44px, 7vw, 84px);
/*  border-top: 1px solid var(--mq-hairline);*/
}
p.mq-timeline-deck {
  max-width: 912px;
  color: #616161;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  margin-top: 20px;
}
.mq-visual-timeline {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.mq-visual-timeline::before {
  content: "";
  position: absolute;
  left: 164px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--mq-coral), var(--mq-blue), var(--mq-green));
}
.mq-visual-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.mq-timeline-marker {
  position: sticky;
  top: 96px;
  padding-top: 18px;
  text-align: right;
}
.mq-timeline-marker time {
  display: block;
  color: var(--mq-coral);
  font-size: 16px;
  letter-spacing: 0.04em;
}
.mq-timeline-marker span {
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--mq-stone);
  color: var(--mq-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mq-visual-timeline-item::before {
  content: "";
  position: absolute;
  left: 156px;
  top: 24px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--mq-blue);
  box-shadow: 0 0 0 1px var(--mq-hairline);
}
.mq-visual-timeline-item.is-kinderhook::before { background: var(--mq-coral); }
.mq-timeline-card {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--mq-hairline);
  border-radius: var(--mq-radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgb(255 119 89 / 10%), transparent 32%),
    white;
}
.mq-timeline-card h3 {
  margin: 0 0 10px;
  font-size: clamp(16px, 3.08vw, 33px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.mq-timeline-card p { max-width: 820px; font-size: 17px; line-height: 1.55; }
.mq-timeline-parties {
  display: grid;
  grid-template-columns: minmax(0, .1fr) minmax(201px, 0.9fr);
  gap: 6px;
  margin: 0;
  padding: 5px 16px;
  border-left: 3px solid var(--mq-coral);
  background: var(--mq-stone);
}
.mq-timeline-parties dt {
    color: var(--mq-coral);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 23px;
}
.mq-timeline-parties dd { margin: 0; color: #4f4f58; line-height: 1.3; }
.mq-timeline-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.mq-timeline-docs a {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--mq-hairline);
  border-radius: var(--mq-radius-sm);
  color: var(--mq-ink);
  background: rgb(241 245 255 / 55%);
  text-decoration: none;
}
.mq-timeline-docs img {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  filter: saturate(0.75);
}
.mq-timeline-docs span { font-size: 13px; line-height: 1.25; }

@media (max-width: 900px) {
  .mq-receipt-row,
  .mq-receipt-row-single { grid-template-columns: 1fr; }
  .mq-receipt-card { grid-template-columns: 1fr; }
  .mq-receipt-thumb { min-height: 260px; }
  .mq-visual-timeline::before { left: 9px; }
  .mq-visual-timeline-item { grid-template-columns: 1fr; gap: 10px; padding-left: 34px; }
  .mq-visual-timeline-item::before { left: 0; }
  .mq-timeline-marker { position: static; text-align: left; padding-top: 0; }
}

.mq-timeline-ribbon-section {
  margin-top: 48px;
  padding: clamp(24px, 4.5vw, 48px);
  border-radius: var(--mq-radius-md);
  color: white;
  background:
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgb(255 119 89 / 20%), transparent 28%),
    radial-gradient(circle at 80% 65%, rgb(237 252 233 / 12%), transparent 30%),
    #071829;
  background-size: 42px 42px, 42px 42px, auto, auto;
  overflow: visible;
}

.mq-timeline-ribbon-section .mq-section-heading { margin-bottom: 24px; }
.mq-timeline-ribbon-section h2 { color: white; }
.mq-timeline-ribbon-section .mq-timeline-deck { color: rgb(255 255 255 / 72%); }

.mq-ribbon-scroll {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 190px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 36px 8px 28px;
  scrollbar-color: var(--mq-coral) rgb(255 255 255 / 12%);
}

.mq-ribbon-scroll::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 58px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgb(237 252 233 / 40%), transparent);
  pointer-events: none;
}

.mq-ribbon-node {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 178px;
  padding: 13px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--mq-radius-sm);
  color: white;
  background: rgb(255 255 255 / 9%);
  backdrop-filter: blur(16px);
  text-decoration: none;
  animation: mq-rise-soft 520ms cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--delay);
}

.mq-ribbon-node::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 18px;
  width: 13px;
  height: 13px;
  border: 2px solid #071829;
  border-radius: 999px;
  background: rgb(237 252 233);
  box-shadow: 0 0 0 4px rgb(237 252 233 / 20%);
}

.mq-ribbon-node.is-kinderhook { background: rgb(255 119 89 / 16%); border-color: rgb(255 119 89 / 52%); }
.mq-ribbon-node.is-kinderhook::before { background: var(--mq-coral); box-shadow: 0 0 0 4px rgb(255 119 89 / 24%); }
.mq-ribbon-node:hover { transform: translateY(-4px); border-color: var(--mq-coral); }

.mq-ribbon-date { color: var(--mq-coral); font-size: 13px; letter-spacing: 0.04em; }
.mq-ribbon-node strong { font-size: 17px; line-height: 1.05; font-weight: 500; }
.mq-ribbon-node img { width: 100%; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid rgb(255 255 255 / 16%); }
.mq-ribbon-track { justify-self: start; margin-top: auto; padding: 4px 8px; border-radius: 999px; background: rgb(255 255 255 / 12%); color: rgb(255 255 255 / 76%); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

.mq-ribbon-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(320px, 80vw);
  padding: 14px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: var(--mq-radius-sm);
  color: var(--mq-ink);
  background: white;
  box-shadow: var(--mq-shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.mq-ribbon-tip b,
.mq-ribbon-tip small,
.mq-ribbon-tip em { display: block; }
.mq-ribbon-tip small { margin: 5px 0 8px; color: var(--mq-muted); font-size: 12px; font-style: normal; }
.mq-ribbon-tip em { color: #4f4f58; font-size: 13px; font-style: normal; line-height: 1.45; }
.mq-ribbon-node:hover .mq-ribbon-tip,
.mq-ribbon-node:focus-visible .mq-ribbon-tip { opacity: 1; transform: translateY(0); }

@keyframes mq-rise-soft {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 700px) {
  .mq-ribbon-scroll { grid-auto-columns: minmax(138px, 74vw); }
  .mq-ribbon-tip { display: none; }
}

/* Kinderhook2 article-body redesign: compact floated receipt cards. */

.mq-article-page .mq-main-article > .mq-kicker {
  color: var(--mq-coral);
}
.mq-article-page .mq-main-article section {
  display: block;
  max-width: 912px;
  margin: 0 auto;
  padding: 34px 0 0;
  border-top: 0;
}

.mq-article-page section.mq-kh-pattern {
  max-width: 100%;
  margin-top: 30px;
}

.mq-article-page section.mq-kh-pattern .mq-kh-pattern-heading > p {
  max-width: 50%;
}

.mq-article-page .mq-kh-pattern-heading { gap: 10px; }
.mq-article-page .mq-main-article section::after {
  content: "";
  display: table;
  clear: both;
}
.mq-article-page h3 { margin-bottom: 10px; }
.mq-article-page .mq-timeline-lab-stage h3 { margin-bottom: 0px; }
.mq-article-page p { margin-bottom: 18px; }
.mq-article-page p:last-of-type { margin-bottom: 0; }

#timeline-lab, #story { height: 1px; font-size: 1px; overflow: hidden; display: block; clear: both; width: 100%; position: relative; top: -50px; }

.mq-article-page .mq-receipt {
  position: relative;
  display: block;
  width: 220px;
  overflow: hidden;
  border-radius: 12px;
  color: white;
  background: #1a1a1c;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px -12px rgb(0 0 0 / 18%);
  isolation: isolate;
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.mq-article-page .mq-receipt--left { float: left; margin: 6px 28px 18px 0; shape-outside: margin-box; }
.mq-article-page .mq-receipt--right { float: right; margin: 6px 0 18px 28px; shape-outside: margin-box; }
.mq-article-page .mq-receipt--wide { width: 320px; }
.mq-article-page .mq-receipt:hover,
.mq-article-page .mq-receipt:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 16px 36px -16px rgb(0 0 0 / 28%);
}
.mq-article-page .mq-receipt-image {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  background: var(--mq-stone);
  filter: brightness(.86) saturate(.95);
  transition: filter 350ms ease, transform 600ms ease;
}
.mq-article-page .mq-receipt--wide .mq-receipt-image { aspect-ratio: 4 / 3; }
.mq-article-page .mq-receipt:hover .mq-receipt-image,
.mq-article-page .mq-receipt:focus-within .mq-receipt-image {
  filter: brightness(.5) saturate(.85);
  transform: scale(1.03);
}
.mq-article-page .mq-receipt-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(rgba(137, 109, 75, 0.49), rgba(97, 72, 43, 0.49) 32%, rgba(29, 20, 10, 0.85) 69.75%, rgba(0, 0, 0, 0.94));
  transition: background 300ms ease;
}
.mq-article-page .mq-receipt:hover .mq-receipt-scrim,
.mq-article-page .mq-receipt:focus-within .mq-receipt-scrim {
  background: linear-gradient(rgba(135, 107, 75, 0.37), rgba(35, 23, 10, 0.64) 42%, rgba(17, 11, 4, 0.79) 71.43%, rgba(0, 0, 0, 0.92));
}
.mq-article-page .mq-receipt > .mq-receipt-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 14px;
  color: white;
  pointer-events: none;
}
.mq-article-page .mq-receipt-kicker {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 3px;
  color: #ff8b75;
  background: rgb(0 0 0 / 54%);
  backdrop-filter: blur(4px);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.1px;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgb(0 0 0 / 60%);
  text-transform: uppercase;
}
.mq-article-page .mq-receipt-title {
  margin: 0;
  color: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.15px;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgb(0 0 0 / 70%);
}
.mq-article-page .mq-receipt .mq-receipt-desc {
  display: -webkit-box;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: rgb(255 255 255 / 92%);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  text-shadow: 0 1px 4px rgb(0 0 0 / 70%);
  transform: translateY(6px);
  transition: max-height 350ms cubic-bezier(.22,.61,.36,1), margin-top 350ms cubic-bezier(.22,.61,.36,1), opacity 280ms cubic-bezier(.22,.61,.36,1) 40ms, transform 350ms cubic-bezier(.22,.61,.36,1);
}
.mq-article-page .mq-receipt:hover .mq-receipt-desc,
.mq-article-page .mq-receipt:focus-within .mq-receipt-desc {
  max-height: 7em;
  margin-top: 6px;
  opacity: 1;
  transform: translateY(0);
}
.mq-article-page .mq-receipt-pip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(4px);
  font-size: 12px;
  line-height: 1;
  transition: background 200ms ease, transform 200ms ease;
}
.mq-article-page .mq-receipt:hover .mq-receipt-pip { background: var(--mq-coral); transform: scale(1.1); }
.mq-article-page .mq-receipt-link {
  position: absolute;
  inset: 0;
  z-index: 4;
  text-decoration: none;
}
.mq-article-page .mq-receipt-link:focus-visible { outline: 2px solid var(--mq-coral); outline-offset: -2px; }

@media (max-width: 700px) {
  .mq-article-page .mq-receipt,
  .mq-article-page .mq-receipt--wide { width: 150px; }
  .mq-article-page .mq-receipt--left { margin: 4px 14px 12px 0; }
  .mq-article-page .mq-receipt--right { margin: 4px 0 12px 14px; }
  .mq-article-page .mq-receipt-title { font-size: 12.5px; }
  .mq-article-page .mq-receipt .mq-receipt-desc { -webkit-line-clamp: 2; font-size: 11px; }
  .mq-article-page .mq-receipt > .mq-receipt-caption { padding: 10px; }
}

/* Kinderhook temporary timeline graph lab. */
.mq-article-page-timeline-lab {
  background: #f7f5ef;
}

.mq-timeline-lab-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 86px) clamp(18px, 4vw, 40px) 34px;
}

.mq-timeline-lab-hero h1 {
  max-width: 920px;
  margin: 0;
  color: var(--mq-ink);
  font-size: clamp(56px, 8vw, 104px);
  line-height: .92;
  letter-spacing: -.055em;
}

section.mq-timeline-lab-stage {
  max-width: 1210px;
  margin: 0 auto 72px;
  padding: clamp(32px, 4vw, 74px) clamp(32px, 3vw, 34px);
  border: 1px solid rgb(7 24 41 / 12%);
  border-radius: 0;
  color: white;
  background:
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgb(255 119 89 / 20%), transparent 28%),
    radial-gradient(circle at 86% 32%, rgb(237 252 233 / 10%), transparent 34%),
    #071829;
  background-size: 42px 42px, 42px 42px, auto, auto;
  box-shadow: 0 26px 80px rgb(0 0 0 / 11%);
}

.mq-timeline-lab-heading {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(280px, .55fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 20px;
}

.mq-article-page .mq-timeline-lab-heading .mq-kicker { margin-bottom: 10px; }

.mq-timeline-lab-heading h2 {
  max-width: 720px;
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: white;
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.045em;
}

.mq-timeline-lab-heading > p {
  margin: 0 0 6px;
  color: rgb(255 255 255 / 72%);
  font-size: 15px;
  line-height: 1.55;
}

.mq-kh-at-a-glance-wrapper {
    position: relative;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 20px;
    background:
      radial-gradient(circle at 48% 52%, rgb(255 255 255 / 9%), transparent 38%),
      linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(255 255 255 / 0%));
}

/* Vertical year-tick lines that span the entire wrapper, threading
   through both .mq-kh-timeways and .mq-kh-graph. Drawn as a separate
   SVG so it isn't clipped to the warped chart. */
.mq-kh-tick-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.mq-kh-tick-overlay-line {
  stroke: rgb(255 255 255 / 22%);
  stroke-width: 1;
}

/* Hover-only tooltip for warped markers — sibling of the warped chart
   so it can position above markers without being clipped. */
.mq-kh-warped-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(7, 24, 41, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 9px 13px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: rgb(255 255 255 / 86%);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity .15s ease;
  z-index: 10;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.mq-kh-warped-tooltip.is-visible { opacity: 1; }
.mq-kh-warped-tooltip strong {
  color: white;
  font-weight: 500;
  display: block;
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}
.mq-kh-warped-tooltip em {
  color: var(--mq-coral, #ff7759);
  font-style: normal;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Sit nodes above the tick overlay. */
.mq-kh-timeways,
.mq-kh-graph { position: relative; z-index: 1; }

.mq-kh-graph {
  position: relative;
  height: 380px;
  overflow: hidden;
}

.mq-kh-lines path {
  stroke: rgb(237 252 233 / 28%);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 7 12;
  filter: drop-shadow(0 0 10px rgb(237 252 233 / 14%));
}

.mq-kh-lines path.is-primary {
  stroke: rgb(255 119 89 / 70%);
  stroke-width: 3.2;
  stroke-dasharray: none;
}

.mq-kh-lines path.is-memory { stroke: rgb(237 252 233 / 42%); }
.mq-kh-lines path.is-baseline { stroke: rgb(24 99 220 / 54%); }
.mq-kh-lines path.is-pressure { stroke: rgb(255 255 255 / 30%); }

.mq-kh-span {
  position: absolute;
  inset: auto 18px 14px;
  display: grid;
  grid-template-columns: .7fr 1fr 1.3fr 1fr;
  gap: 12px;
  color: rgb(255 255 255 / 40%);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  pointer-events: none;
}

.mq-kh-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 154px;
  min-height: 108px;
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 14px;
  color: white;
  background: rgb(255 255 255 / 9%);
  backdrop-filter: blur(18px);
  transform: translate(-50%, -50%);
  animation: mq-rise 520ms cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--delay);
  transition: border-color 170ms ease, background 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.mq-kh-node--small {
  width: 132px;
  min-height: 88px;
}

.mq-kh-node--large {
  width: 178px;
  min-height: 124px;
  background: rgb(255 119 89 / 15%);
  border-color: rgb(255 119 89 / 42%);
}

.mq-kh-node:hover,
.mq-kh-node:focus-visible {
  z-index: 8;
  border-color: var(--mq-coral);
  background: rgb(255 119 89 / 22%);
  box-shadow: 0 18px 54px rgb(0 0 0 / 30%);
  outline: none;
  transform: translate(-50%, -54%);
}

.mq-kh-node-date {
  display: block;
  margin-bottom: 7px;
  color: var(--mq-coral);
  font-size: 12px;
  letter-spacing: .04em;
}

.mq-kh-node h3 {
  margin: 0;
  color: white;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.mq-kh-node--small h3 { font-size: 14px; }
.mq-kh-node--large h3 { font-size: 18px; }

.mq-kh-node-summary {
  margin: 8px 0 0;
  color: rgb(255 255 255 / 68%);
  font-size: 11.5px;
  line-height: 1.3;
}

.mq-kh-node--small .mq-kh-node-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mq-kh-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: min(310px, 72vw);
  padding: 14px 15px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 12px;
  color: var(--mq-ink);
  background: white;
  box-shadow: 0 24px 80px rgb(0 0 0 / 28%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.mq-kh-tooltip b {
  display: block;
  margin-bottom: 6px;
  color: var(--mq-ink);
  font-size: 14px;
  line-height: 1.2;
}

.mq-kh-tooltip p {
  margin: 0;
  color: #4f4f58;
  font-size: 13px;
  line-height: 1.45;
}

.mq-kh-node:hover .mq-kh-tooltip,
.mq-kh-node:focus-visible .mq-kh-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mq-kh-node--artifact,
.mq-kh-node--claim { border-color: rgb(255 119 89 / 46%); }
.mq-kh-node--memory { border-color: rgb(237 252 233 / 36%); }
.mq-kh-node--reversal,
.mq-kh-node--finality { border-color: rgb(24 99 220 / 56%); }

.mq-kh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  color: rgb(255 255 255 / 68%);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.mq-kh-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mq-kh-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--mq-coral);
  box-shadow: 0 0 0 4px rgb(255 119 89 / 14%);
}

.mq-kh-legend i.is-claim { background: #ff8b75; }
.mq-kh-legend i.is-memory { background: #edfce9; box-shadow: 0 0 0 4px rgb(237 252 233 / 12%); }
.mq-kh-legend i.is-reversal { background: var(--mq-blue); box-shadow: 0 0 0 4px rgb(24 99 220 / 16%); }

@media (max-width: 900px) {
  .mq-timeline-lab-heading { grid-template-columns: 1fr; }
  .mq-kh-graph { height: 520px; }
  .mq-kh-node { width: 138px; }
  .mq-kh-node--large { width: 154px; }
  .mq-kh-node-summary { display: none; }
  .mq-kh-span { display: none; }
}

/* ============================================================
     GROUP 1 — REPLACES existing rules at lines 1469–1500
                of application.css.

     DELETE lines 1469–1500 and replace with the block below.
     These existing rules made .mq-kh-timeways an absolute-pinned
     pill bar and gave .mq-kh-timeway a 32px-tall pill shape
     with overflow:hidden — that layout doesn't accommodate
     a 320px-tall warped chart with labels above the curve.
     ============================================================ */

  /* The graph container: holds the scatter network only.
     Height tuned so the empty top/bottom strips read as comfortable
     breathing room rather than excess padding. Node --y values are
     spread across 20–79% to fit the new compact frame. */
  .mq-kh-graph {
    position: relative;
    height: 380px;
    overflow: visible;
    padding-top: 0;
  }

  /* Sits above .mq-kh-graph in normal flow. The warped chart is the
     only timeway now, so margin-bottom is the visual gap between the
     year-tick row and the first card row. */
  .mq-kh-timeways {
    position: relative;
    inset: auto;
    z-index: 1;
    display: block;
    grid-template-columns: none;
    gap: 0;
    pointer-events: auto;
    margin-bottom: 8px;
  }

  /* Base timeway: now a transparent block, not a pill.
     The pill border-radius/background/overflow-hidden are
     dropped because labels and leader lines need to extend
     above the SVG bounds. */
  .mq-kh-timeway {
    position: relative;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  /* The river variant kept its old layout — preserved here in
     case it's still rendered elsewhere on the site. */
  .mq-kh-timeway--river {
    display: grid;
    grid-template-columns: .6fr 1.2fr 1.4fr .8fr;
    align-items: center;
    padding-inline: 14px;
    min-height: 32px;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 999px;
    background: rgb(255 255 255 / 7%);
    overflow: hidden;
  }

.mq-kh-timeway span {
  z-index: 2;
  color: rgb(255 255 255 / 78%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgb(0 0 0 / 55%);
}

.mq-kh-timeway svg {
  position: absolute;
  inset: -4px 8px auto;
  width: calc(100% - 16px);
  height: 42px;
}

.mq-kh-timeway .river-fill { fill: rgb(255 119 89 / 28%); }
.mq-kh-timeway .river-line {
  fill: none;
  stroke: #ffdd7a;
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 7px rgb(255 221 122 / 50%));
}

.mq-kh-timeway--ruler {
  display: flex;
  align-items: center;
  padding-left: 14px;
  background:
    linear-gradient(90deg, rgb(255 221 122 / 70%), rgb(255 119 89 / 62%), rgb(24 99 220 / 62%));
}

.mq-kh-timeway--ruler::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 2px;
  background: rgb(255 255 255 / 70%);
  transform: translateY(-50%);
}

.mq-kh-timeway--ruler i {
  position: absolute;
  left: var(--left);
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 0 0 3px rgb(7 24 41 / 36%);
  transform: translate(-50%, -50%);
}

.mq-kh-node {
  width: 128px;
  min-height: 72px;
  padding: 10px 11px;
  overflow: visible;
  transform-origin: center top;
  transition:
    width 180ms ease,
    min-height 180ms ease,
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}

.mq-kh-node--small {
  width: 116px;
  min-height: 66px;
}

.mq-kh-node--large {
  width: 148px;
  min-height: 82px;
}

.mq-kh-node-date {
  margin-bottom: 6px;
  font-size: 11px;
}

.mq-kh-node h3 { font-size: 14px; }
.mq-kh-node--small h3 { font-size: 12.5px; }
.mq-kh-node--large h3 { font-size: 15.5px; }

.mq-kh-node-summary,
.mq-kh-node-detail {
  display: block;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(5px);
  transition: max-height 190ms ease, margin-top 190ms ease, opacity 160ms ease, transform 190ms ease;
}

.mq-kh-node-summary {
  color: rgb(255 255 255 / 76%);
  font-size: 11.5px;
  line-height: 1.32;
}

.mq-kh-node-detail {
  color: rgb(255 255 255 / 60%);
  font-size: 11px;
  line-height: 1.36;
}

.mq-kh-node:hover,
.mq-kh-node:focus-visible,
.mq-kh-node.is-active {
  width: 140px;
  min-height: 154px;
  z-index: 8;
  border-color: var(--mq-coral);
  background: rgb(255 119 89 / 22%);
  box-shadow: 0 18px 54px rgb(0 0 0 / 30%);
  transform: translate(-50%, -50%) scaleX(1.08);
}

.mq-kh-node--small:hover,
.mq-kh-node--small:focus-visible,
.mq-kh-node--small.is-active {
  width: 128px;
  min-height: 144px;
}

.mq-kh-node--large:hover,
.mq-kh-node--large:focus-visible,
.mq-kh-node--large.is-active {
  width: 160px;
  min-height: 166px;
}

.mq-kh-node:hover .mq-kh-node-summary,
.mq-kh-node:focus-visible .mq-kh-node-summary,
.mq-kh-node.is-active .mq-kh-node-summary,
.mq-kh-node:hover .mq-kh-node-detail,
.mq-kh-node:focus-visible .mq-kh-node-detail,
.mq-kh-node.is-active .mq-kh-node-detail {
  max-height: 7.5em;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

.mq-kh-tooltip { display: none; }
.mq-kh-span { display: none; }

@media (max-width: 900px) {
  .mq-kh-timeways { grid-template-columns: 1fr; }
  .mq-kh-timeway--ruler { display: none; }
  .mq-kh-node-summary,
  .mq-kh-node-detail { display: none; }
}

/* ============================================================
     GROUP 3 — REPLACES tablet rules at lines 1656–1672 of
                application.css.

     The mobile/tablet override block was tuned for the absolute-
     pinned river. With .mq-kh-timeways now in flow, the block
     simplifies considerably.
     ============================================================ */

  @media (max-width: 880px) {
    .mq-kh-timeways {
      inset: auto;
      grid-template-columns: 1fr;
      pointer-events: auto;
    }
    .mq-kh-timeway {
      min-height: 0;
      overflow: visible;
    }
    .mq-kh-timeway--river {
      display: block;
      padding-inline: 0;
      min-height: 46px;
    }
    .mq-kh-timeway--ruler { display: none; }
  }


.mq-kh-time-labels {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 3px;
  height: 14px;
  pointer-events: none;
}

.mq-kh-time-labels::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  height: 1px;
  background: linear-gradient(90deg, rgb(144 213 255 / 0%), rgb(144 213 255 / 58%), rgb(144 213 255 / 0%));
}

.mq-kh-time-labels span {
  position: absolute;
  left: var(--t);
  bottom: 0;
  color: rgb(144 213 255 / 82%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  text-shadow: 0 0 8px rgb(24 99 220 / 65%);
}

.mq-kh-time-labels span::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 1px;
  height: 8px;
  background: rgb(144 213 255 / 42%);
}

.mq-kh-time-labels span:first-child { transform: translateX(0); }
.mq-kh-time-labels span:last-child { transform: translateX(-100%); }

.mq-kh-time-dot {
  position: absolute;
  left: calc(18px + (100% - 36px) * var(--t) / 100);
  top: 18px;
  z-index: 6;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: 999px;
  background: rgb(144 213 255 / 84%);
  box-shadow: 0 0 0 4px rgb(144 213 255 / 14%), 0 0 14px rgb(144 213 255 / 46%);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: width 160ms ease, height 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mq-kh-time-dot--artifact,
.mq-kh-time-dot--claim { background: var(--mq-coral); box-shadow: 0 0 0 4px rgb(255 119 89 / 18%), 0 0 16px rgb(255 119 89 / 48%); }
.mq-kh-time-dot--memory { background: #edfce9; box-shadow: 0 0 0 4px rgb(237 252 233 / 14%), 0 0 16px rgb(237 252 233 / 42%); }
.mq-kh-time-dot--reversal,
.mq-kh-time-dot--finality { background: #90d5ff; box-shadow: 0 0 0 4px rgb(144 213 255 / 18%), 0 0 18px rgb(144 213 255 / 58%); }

.mq-kh-time-dot:hover,
.mq-kh-time-dot:focus-visible {
  width: 18px;
  height: 18px;
  background: white;
  box-shadow: 0 0 0 6px rgb(144 213 255 / 24%), 0 0 26px rgb(144 213 255 / 86%);
  outline: none;
}

.mq-kh-graph:has(.mq-kh-node[data-event="plate-scripture"]:hover) .mq-kh-time-dot[data-event="plate-scripture"],
.mq-kh-graph:has(.mq-kh-node[data-event="plate-scripture"]:focus-visible) .mq-kh-time-dot[data-event="plate-scripture"],
.mq-kh-graph:has(.mq-kh-node[data-event="discovery"]:hover) .mq-kh-time-dot[data-event="discovery"],
.mq-kh-graph:has(.mq-kh-node[data-event="discovery"]:focus-visible) .mq-kh-time-dot[data-event="discovery"],
.mq-kh-graph:has(.mq-kh-node[data-event="translation-expected"]:hover) .mq-kh-time-dot[data-event="translation-expected"],
.mq-kh-graph:has(.mq-kh-node[data-event="translation-expected"]:focus-visible) .mq-kh-time-dot[data-event="translation-expected"],
.mq-kh-graph:has(.mq-kh-node[data-event="clayton-claim"]:hover) .mq-kh-time-dot[data-event="clayton-claim"],
.mq-kh-graph:has(.mq-kh-node[data-event="clayton-claim"]:focus-visible) .mq-kh-time-dot[data-event="clayton-claim"],
.mq-kh-graph:has(.mq-kh-node[data-event="public-mockery"]:hover) .mq-kh-time-dot[data-event="public-mockery"],
.mq-kh-graph:has(.mq-kh-node[data-event="public-mockery"]:focus-visible) .mq-kh-time-dot[data-event="public-mockery"],
.mq-kh-graph:has(.mq-kh-node[data-event="facsimile-memory"]:hover) .mq-kh-time-dot[data-event="facsimile-memory"],
.mq-kh-graph:has(.mq-kh-node[data-event="facsimile-memory"]:focus-visible) .mq-kh-time-dot[data-event="facsimile-memory"],
.mq-kh-graph:has(.mq-kh-node[data-event="fugate-humbug"]:hover) .mq-kh-time-dot[data-event="fugate-humbug"],
.mq-kh-graph:has(.mq-kh-node[data-event="fugate-humbug"]:focus-visible) .mq-kh-time-dot[data-event="fugate-humbug"],
.mq-kh-graph:has(.mq-kh-node[data-event="testing-reversal"]:hover) .mq-kh-time-dot[data-event="testing-reversal"],
.mq-kh-graph:has(.mq-kh-node[data-event="testing-reversal"]:focus-visible) .mq-kh-time-dot[data-event="testing-reversal"],
.mq-kh-graph:has(.mq-kh-node[data-event="modern-reframing"]:hover) .mq-kh-time-dot[data-event="modern-reframing"],
.mq-kh-graph:has(.mq-kh-node[data-event="modern-reframing"]:focus-visible) .mq-kh-time-dot[data-event="modern-reframing"] {
  width: 18px;
  height: 18px;
  background: white;
  box-shadow: 0 0 0 6px rgb(144 213 255 / 24%), 0 0 26px rgb(144 213 255 / 86%);
}

.mq-kh-graph:has(.mq-kh-time-dot[data-event="plate-scripture"]:hover) .mq-kh-node[data-event="plate-scripture"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="plate-scripture"]:focus-visible) .mq-kh-node[data-event="plate-scripture"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="discovery"]:hover) .mq-kh-node[data-event="discovery"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="discovery"]:focus-visible) .mq-kh-node[data-event="discovery"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="translation-expected"]:hover) .mq-kh-node[data-event="translation-expected"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="translation-expected"]:focus-visible) .mq-kh-node[data-event="translation-expected"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="clayton-claim"]:hover) .mq-kh-node[data-event="clayton-claim"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="clayton-claim"]:focus-visible) .mq-kh-node[data-event="clayton-claim"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="public-mockery"]:hover) .mq-kh-node[data-event="public-mockery"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="public-mockery"]:focus-visible) .mq-kh-node[data-event="public-mockery"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="facsimile-memory"]:hover) .mq-kh-node[data-event="facsimile-memory"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="facsimile-memory"]:focus-visible) .mq-kh-node[data-event="facsimile-memory"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="fugate-humbug"]:hover) .mq-kh-node[data-event="fugate-humbug"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="fugate-humbug"]:focus-visible) .mq-kh-node[data-event="fugate-humbug"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="testing-reversal"]:hover) .mq-kh-node[data-event="testing-reversal"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="testing-reversal"]:focus-visible) .mq-kh-node[data-event="testing-reversal"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="modern-reframing"]:hover) .mq-kh-node[data-event="modern-reframing"],
.mq-kh-graph:has(.mq-kh-time-dot[data-event="modern-reframing"]:focus-visible) .mq-kh-node[data-event="modern-reframing"] {
  z-index: 8;
  border-color: var(--mq-coral);
  background: rgb(255 119 89 / 22%);
  box-shadow: 0 18px 54px rgb(0 0 0 / 30%);
  outline: none;
  width: 140px;
  min-height: 154px;
  transform: translate(-50%, -50%) scaleX(1.08);
}

.mq-kh-graph:has(.mq-kh-time-dot[data-event="plate-scripture"]:hover) .mq-kh-node[data-event="plate-scripture"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="plate-scripture"]:hover) .mq-kh-node[data-event="plate-scripture"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="discovery"]:hover) .mq-kh-node[data-event="discovery"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="discovery"]:hover) .mq-kh-node[data-event="discovery"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="translation-expected"]:hover) .mq-kh-node[data-event="translation-expected"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="translation-expected"]:hover) .mq-kh-node[data-event="translation-expected"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="clayton-claim"]:hover) .mq-kh-node[data-event="clayton-claim"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="clayton-claim"]:hover) .mq-kh-node[data-event="clayton-claim"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="public-mockery"]:hover) .mq-kh-node[data-event="public-mockery"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="public-mockery"]:hover) .mq-kh-node[data-event="public-mockery"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="facsimile-memory"]:hover) .mq-kh-node[data-event="facsimile-memory"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="facsimile-memory"]:hover) .mq-kh-node[data-event="facsimile-memory"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="fugate-humbug"]:hover) .mq-kh-node[data-event="fugate-humbug"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="fugate-humbug"]:hover) .mq-kh-node[data-event="fugate-humbug"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="testing-reversal"]:hover) .mq-kh-node[data-event="testing-reversal"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="testing-reversal"]:hover) .mq-kh-node[data-event="testing-reversal"] .mq-kh-node-detail,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="modern-reframing"]:hover) .mq-kh-node[data-event="modern-reframing"] .mq-kh-node-summary,
.mq-kh-graph:has(.mq-kh-time-dot[data-event="modern-reframing"]:hover) .mq-kh-node[data-event="modern-reframing"] .mq-kh-node-detail {
  max-height: 7.5em;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

.mq-kh-legend { display: none; }

/* Make timeline event handles legible over the river line. */
.mq-kh-time-dot {
  top: 23px;
  width: 12px;
  height: 12px;
  border: 2px solid rgb(7 24 41 / 82%);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 24%), 0 0 18px rgb(144 213 255 / 58%);
}

.mq-kh-time-dot--artifact,
.mq-kh-time-dot--claim { box-shadow: 0 0 0 3px rgb(255 255 255 / 22%), 0 0 18px rgb(255 119 89 / 62%); }
.mq-kh-time-dot--memory { box-shadow: 0 0 0 3px rgb(255 255 255 / 20%), 0 0 18px rgb(237 252 233 / 50%); }
.mq-kh-time-dot--reversal,
.mq-kh-time-dot--finality { box-shadow: 0 0 0 3px rgb(255 255 255 / 22%), 0 0 20px rgb(144 213 255 / 72%); }

/* Fix timeline dot positioning: use event percentage directly and clamp inside rail. */
.mq-kh-time-dot {
  left: clamp(18px, var(--t), calc(100% - 18px));
}

/* Weighted semantic timeline pass: expanded eventful spans, smaller centered dots. */
.mq-kh-time-dot {
  top: 18px;
  width: 6px;
  height: 6px;
  border-width: 1px;
  left: clamp(12px, var(--t), calc(100% - 12px));
  box-shadow: 0 0 0 2px rgb(255 255 255 / 20%), 0 0 12px rgb(144 213 255 / 56%);
}

.mq-kh-time-dot--artifact,
.mq-kh-time-dot--claim { box-shadow: 0 0 0 2px rgb(255 255 255 / 18%), 0 0 13px rgb(255 119 89 / 62%); }
.mq-kh-time-dot--memory { box-shadow: 0 0 0 2px rgb(255 255 255 / 18%), 0 0 13px rgb(237 252 233 / 52%); }
.mq-kh-time-dot--reversal,
.mq-kh-time-dot--finality { box-shadow: 0 0 0 2px rgb(255 255 255 / 18%), 0 0 14px rgb(144 213 255 / 72%); }

.mq-kh-time-dot:hover,
.mq-kh-time-dot:focus-visible,
.mq-kh-graph:has(.mq-kh-node[data-event="plate-scripture"]:hover) .mq-kh-time-dot[data-event="plate-scripture"],
.mq-kh-graph:has(.mq-kh-node[data-event="plate-scripture"]:focus-visible) .mq-kh-time-dot[data-event="plate-scripture"],
.mq-kh-graph:has(.mq-kh-node[data-event="discovery"]:hover) .mq-kh-time-dot[data-event="discovery"],
.mq-kh-graph:has(.mq-kh-node[data-event="discovery"]:focus-visible) .mq-kh-time-dot[data-event="discovery"],
.mq-kh-graph:has(.mq-kh-node[data-event="translation-expected"]:hover) .mq-kh-time-dot[data-event="translation-expected"],
.mq-kh-graph:has(.mq-kh-node[data-event="translation-expected"]:focus-visible) .mq-kh-time-dot[data-event="translation-expected"],
.mq-kh-graph:has(.mq-kh-node[data-event="clayton-claim"]:hover) .mq-kh-time-dot[data-event="clayton-claim"],
.mq-kh-graph:has(.mq-kh-node[data-event="clayton-claim"]:focus-visible) .mq-kh-time-dot[data-event="clayton-claim"],
.mq-kh-graph:has(.mq-kh-node[data-event="public-mockery"]:hover) .mq-kh-time-dot[data-event="public-mockery"],
.mq-kh-graph:has(.mq-kh-node[data-event="public-mockery"]:focus-visible) .mq-kh-time-dot[data-event="public-mockery"],
.mq-kh-graph:has(.mq-kh-node[data-event="facsimile-memory"]:hover) .mq-kh-time-dot[data-event="facsimile-memory"],
.mq-kh-graph:has(.mq-kh-node[data-event="facsimile-memory"]:focus-visible) .mq-kh-time-dot[data-event="facsimile-memory"],
.mq-kh-graph:has(.mq-kh-node[data-event="fugate-humbug"]:hover) .mq-kh-time-dot[data-event="fugate-humbug"],
.mq-kh-graph:has(.mq-kh-node[data-event="fugate-humbug"]:focus-visible) .mq-kh-time-dot[data-event="fugate-humbug"],
.mq-kh-graph:has(.mq-kh-node[data-event="testing-reversal"]:hover) .mq-kh-time-dot[data-event="testing-reversal"],
.mq-kh-graph:has(.mq-kh-node[data-event="testing-reversal"]:focus-visible) .mq-kh-time-dot[data-event="testing-reversal"],
.mq-kh-graph:has(.mq-kh-node[data-event="modern-reframing"]:hover) .mq-kh-time-dot[data-event="modern-reframing"],
.mq-kh-graph:has(.mq-kh-node[data-event="modern-reframing"]:focus-visible) .mq-kh-time-dot[data-event="modern-reframing"] {
  width: 14px;
  height: 14px;
  background: white;
  box-shadow: 0 0 0 5px rgb(144 213 255 / 24%), 0 0 24px rgb(144 213 255 / 86%);
}

.mq-kh-timeway--river::after {
  content: "weighted scale: dense years expanded";
  position: absolute;
  right: 16px;
  top: 5px;
  z-index: 3;
  color: rgb(255 255 255 / 54%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Timeline rail alignment correction. */
.mq-kh-timeway--river::after { content: none; }

.mq-kh-time-labels {
  left: 24px;
  right: 24px;
}

.mq-kh-time-dot {
  left: calc(24px + (100% - 48px) * var(--t) / 100);
}

.mq-kh-time-labels span:first-child { transform: translateX(-50%); }
.mq-kh-time-labels span:last-child { transform: translateX(-50%); }

/* Correct weighted dot placement after rail alignment: var(--t) is already a percentage. */
.mq-kh-time-dot {
  left: clamp(24px, var(--t), calc(100% - 24px));
}

/* Density-wave timeway: dots ride the yellow path. */
.mq-kh-timeway svg {
  inset: 0 8px auto;
  height: 46px;
}

.mq-kh-timeway .river-fill {
  fill: rgb(255 119 89 / 18%);
}

.mq-kh-timeway .river-line {
  stroke: #ffdf65;
  stroke-width: 2.6;
}

.mq-kh-time-dot {
  top: var(--ty, 50%);
}

/* Soften density-wave transitions and pin dots to the visible stroke. */
.mq-kh-timeway .river-fill { fill: rgb(255 119 89 / 10%); }
.mq-kh-timeway .river-line {
  stroke-width: 2.2;
  filter: drop-shadow(0 0 5px rgb(255 221 122 / 40%));
}
.mq-kh-time-dot {
  top: var(--ty, 52%);
}

/* Dot coordinates now use the same SVG x/y scale as the river-line path. */
.mq-kh-timeway svg {
  inset: 0 0 auto;
  width: 100%;
  height: 42px;
}
.mq-kh-time-dot {
  top: var(--ty, 57.1%);
}

/* Timeline reset: dots now live in the same SVG coordinate system as the yellow line. */
.mq-kh-time-svg {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 42px;
  overflow: visible;
}

.mq-kh-time-svg .river-fill {
  fill: rgb(255 119 89 / 8%);
}

.mq-kh-time-svg .river-line {
  fill: none;
  stroke: #ffdf65;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgb(255 221 122 / 42%));
}

.mq-kh-time-svg .mq-kh-time-dot {
  position: static;
  padding: 0;
  border: 0;
  fill: #90d5ff;
  stroke: rgb(7 24 41 / 82%);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  cursor: pointer;
  filter: drop-shadow(0 0 4px rgb(144 213 255 / 72%));
  transition: r 160ms ease, fill 160ms ease, filter 160ms ease, transform 160ms ease;
}

.mq-kh-time-svg .mq-kh-time-dot--artifact,
.mq-kh-time-svg .mq-kh-time-dot--claim { fill: var(--mq-coral); filter: drop-shadow(0 0 5px rgb(255 119 89 / 70%)); }
.mq-kh-time-svg .mq-kh-time-dot--memory { fill: #edfce9; filter: drop-shadow(0 0 5px rgb(237 252 233 / 58%)); }
.mq-kh-time-svg .mq-kh-time-dot--reversal,
.mq-kh-time-svg .mq-kh-time-dot--finality { fill: #90d5ff; }

.mq-kh-time-svg .mq-kh-time-dot:hover {
  fill: white;
  filter: drop-shadow(0 0 9px rgb(144 213 255 / 92%));
  transform: scale(2.15);
}

/* Embedded Kinderhook graph timeline: override article text/section rules. */
.mq-article-page .section.mq-timeline-lab-stage {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mq-article-page .mq-timeline-lab-stage .mq-timeline-lab-heading h2,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node h3 {
  max-width: auto;
  margin: 0;
  color: white;
}

.mq-article-page .mq-timeline-lab-stage .mq-kh-node h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.mq-article-page .mq-timeline-lab-stage .mq-kh-node--small h3 { font-size: 12.5px; }
.mq-article-page .mq-timeline-lab-stage .mq-kh-node--large h3 { font-size: 15.5px; }

.mq-article-page .mq-timeline-lab-stage p,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node-summary,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node-detail {
  max-width: none;
  margin: 0;
}

.mq-article-page .mq-timeline-lab-stage .mq-kh-node-summary {
  color: rgb(255 255 255 / 76%);
  font-size: 11.5px;
  line-height: 1.32;
}

.mq-article-page .mq-timeline-lab-stage .mq-kh-node-detail {
  color: rgb(255 255 255 / 60%);
  font-size: 11px;
  line-height: 1.36;
}

.mq-article-page .mq-timeline-lab-stage .mq-kh-node-summary,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(5px);
}

.mq-article-page .mq-timeline-lab-stage .mq-kh-node:hover .mq-kh-node-summary,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node:focus-visible .mq-kh-node-summary,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node.is-active .mq-kh-node-summary,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node:hover .mq-kh-node-detail,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node:focus-visible .mq-kh-node-detail,
.mq-article-page .mq-timeline-lab-stage .mq-kh-node.is-active .mq-kh-node-detail {
  max-height: 7.5em;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

.mq-article-page .mq-timeline-lab-stage a {
  color: inherit;
  text-underline-offset: 2px;
}

/* Full-bleed embedded Kinderhook graph timeline with responsive gutters. */
.mq-article-page section.mq-timeline-lab-stage {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  max-width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: max(20px, calc((100vw - 1210px) / 2 + 24px));
  padding-right: max(20px, calc((100vw - 1210px) / 2 + 24px));
}

/* ============================================================
     GROUP 2 — REPLACES the entire user-added block at lines
                2090–2150 of application.css ("D3 Kinderhook
                timeline integrations" + "Local D3 rendering
                repair").

     DELETE lines 2090–2150 and replace with the block below.
     ============================================================ */

  /* ----- Component A: Warped at-a-glance timeline ----- */

  /* Host. Sized in pixels by the JS controller — no CSS sizing
     here so the JS-set width/height attributes win. Padding zeroed
     so the host's height === the SVG's height (~100px). */
  .mq-kh-timeway--warped {
    position: relative;
    width: 100%;
    padding: 0;
  }
  .mq-kh-timeway--warped .mq-kh-time-svg {
    position: relative;
    inset: auto;
    display: block;
    overflow: visible;
  }

  /* Calendar tick LABELS only — the strokes live in the wrapper-level
     overlay (.mq-kh-tick-overlay) so they extend past the warped
     chart's bounds. */
  .mq-kh-timeway--warped .mq-kh-warped-tick-label {
    fill: rgb(255 255 255 / 74%);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
  }

  /* Spline (glow + main line) */
  .mq-kh-timeway--warped .mq-kh-warped-glow {
    fill: none;
    stroke: var(--mq-coral, #ff7759);
    stroke-width: 8;
    opacity: 0.32;
    filter: blur(8px);
  }
  .mq-kh-timeway--warped .mq-kh-warped-line {
    fill: none;
    stroke: #ffd166;       /* warm amber for the main spline */
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Markers — class is .mq-kh-warped-marker (NOT .mq-kh-time-dot)
     so the existing legacy rules at the bare .mq-kh-time-dot
     selector (lines 1830/1850/1985 of application.css) don't
     apply to these SVG circles. Fill is set inline by the JS
     so it wins specificity contests. */
  .mq-kh-timeway--warped .mq-kh-warped-marker {
    cursor: pointer;
    transition: r .15s ease, filter .15s ease;
  }
  .mq-kh-timeway--warped .mq-kh-warped-marker:focus,
  .mq-kh-timeway--warped .mq-kh-warped-marker:hover,
  .mq-kh-timeway--warped .mq-kh-warped-marker.is-active {
    r: 10;
    outline: none;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 12px rgb(255 119 89 / 85%));
  }

  /* Cross-highlight is wired via JS (`.is-active` class on both
     .mq-kh-warped-marker and .mq-kh-node, see kinderhook_charts.js).
     The earlier :has(...) rules were brittle — Safari treats
     :has(.node:hover) .svg-circle inconsistently, and :has() can
     style but not trigger the JS-side tooltip positioning. JS
     toggling .is-active works reliably in every browser. */

  /* Pending events (catalogued but no acquired primary source) — the
     SVG marker fill/stroke is set inline by JS (transparent + dashed
     stroke). On the graph card, dashed border + reduced opacity make
     the gap legible without removing the card from the layout. */
  .mq-kh-graph .mq-kh-node.is-pending {
    border-style: dashed;
    border-color: rgb(255 255 255 / 36%);
    background: rgb(255 255 255 / 4%);
    opacity: 0.78;
  }
  .mq-kh-graph .mq-kh-node.is-pending::after {
    content: "Source pending";
    position: absolute;
    left: 8px;
    bottom: 6px;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 52%);
    pointer-events: none;
  }
  .mq-kh-graph .mq-kh-node.is-pending:hover,
  .mq-kh-graph .mq-kh-node.is-pending:focus-visible,
  .mq-kh-graph .mq-kh-node.is-pending.is-active {
    opacity: 1;
  }
  /* Pattern-view dot pending styling matches the warped marker's
     hollow / dashed look (fills/strokes set inline by JS). */

  /* Institutional pivot — two-card pre/post layout for the
     Ricks 1962 ↔ Kimball 1981 page. The cards live inside an
     .mq-reading article so type sizes inherit the editorial
     reading-page scale. */
  .mq-pivot-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin: 32px 0;
  }
  .mq-pivot-card {
    padding: 28px 28px 32px;
    border: 1px solid var(--mq-hairline-faint, #ebebfb);
    border-radius: var(--mq-radius-sm, 12px);
    background: rgba(255, 255, 255, 0.65);
  }
  .mq-pivot-card--defense  { border-left: 4px solid var(--mq-coral, #ff7759); }
  .mq-pivot-card--concession { border-left: 4px solid var(--mq-blue, #1863dc); }
  .mq-pivot-card .mq-panel-label {
    color: var(--mq-coral);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px;
  }
  .mq-pivot-card--concession .mq-panel-label { color: var(--mq-blue, #1863dc); }
  .mq-pivot-card h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.18; }
  .mq-pivot-card .mq-source-note { margin: 0 0 16px; }
  .mq-pivot-card blockquote {
    margin: 14px 0;
    padding: 12px 18px;
    border-left: 3px solid var(--mq-hairline-faint, #ebebfb);
    color: var(--mq-ink, #212121);
    font-style: italic;
  }
  .mq-pivot-card .mq-card-link {
    display: inline-block;
    margin-top: 14px;
  }

  /* Publication-arc warped chart — reuses the warped-timeway
     visual language for the parallel CSV-driven page. */
  .mq-publication-arc {
    position: relative;
    width: 100%;
    margin: 32px 0;
    padding: 0 0 40px;
  }
  .mq-publication-arc-svg {
    display: block;
    width: 100%;
    overflow: visible;
  }
  .mq-publication-arc-tick {
    stroke: rgb(0 0 0 / 16%);
    stroke-width: 1;
  }
  .mq-publication-arc-tick-label {
    fill: rgb(0 0 0 / 60%);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .mq-publication-arc-marker {
    cursor: pointer;
    transition: r .15s ease, filter .15s ease;
  }
  .mq-publication-arc-marker:hover,
  .mq-publication-arc-marker:focus,
  .mq-publication-arc-marker.is-active {
    r: 9;
    outline: none;
    filter: drop-shadow(0 0 8px rgb(255 119 89 / 70%));
  }
  .mq-publication-arc-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(7, 24, 41, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 12px 16px;
    color: white;
    font-size: 13px;
    line-height: 1.4;
    max-width: 320px;
    opacity: 0;
    transform: translate(-50%, calc(-100% - 12px));
    transition: opacity .15s ease;
    z-index: 12;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .mq-publication-arc-tooltip.is-visible { opacity: 1; }
  .mq-publication-arc-tooltip strong {
    display: block;
    font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    margin-bottom: 4px;
  }
  .mq-publication-arc-tooltip em {
    color: var(--mq-coral, #ff7759);
    font-style: normal;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
  }

  .mq-publication-arc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 24px 0 0;
    font-size: 12px;
    color: rgb(0 0 0 / 64%);
  }
  .mq-publication-arc-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .mq-publication-arc-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
  }

  /* ----- Component D: Pattern view (decade × category punchcard) ----- */

  .mq-kh-pattern {
    margin-top: 56px;
    padding-top: 30px;
  }
  .mq-kh-pattern-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

.mq-kh-pattern-heading > div {
    width: 100%;
}
.mq-kh-pattern-heading h3 {
    width: 100%;
    font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(20px, 3.8vw, 40px);
    font-weight: 500;
    margin-top: 0;
}

/* Heading typography intentionally inherits from existing site
     rules (.mq-main-article .mq-timeline-lab-stage h3); no font
     overrides here. */
  .mq-kh-pattern-heading h3 em {
    font-style: italic;
    color: var(--mq-coral, #ff7759);
    font-weight: inherit;
  }

.mq-kh-pattern-heading div p {
  max-width: 56ch;
  margin: 0;
  max-width: 80%;
}

.mq-kh-pattern-heading > p {
    color: rgb(255 255 255 / 74%);
    font-size: 14.5px;
    line-height: 1.55;
  }

.mq-kh-pattern-heading p.mq-kicker {
  color: var(--mq-coral, #ff7759);
  margin-bottom: 6px;
}


  /* Frame around the chart */
  .mq-kh-pattern-frame {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 28px 24px 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
  }

  /* Chart host. JS sets the SVG's pixel dimensions via attrs;
     no CSS sizing here. */
  .mq-kh-pattern-chart {
    position: relative;
    width: 100%;
    min-height: 360px;
  }
  .mq-kh-pattern-chart svg {
    display: block;
    /* No width: 100% / height: auto — JS controls dimensions */
  }

  /* Grid cells */
  .mq-kh-pattern-chart .mq-kh-pc-cell {
    fill: rgba(255, 255, 255, 0.018);
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
  }
  .mq-kh-pattern-chart .mq-kh-pc-cell--era {
    fill: rgba(255, 255, 255, 0.035);
  }

  /* Axis labels */
  .mq-kh-pattern-chart .mq-kh-pc-tick-label {
    fill: rgb(255 255 255 / 74%);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }
  .mq-kh-pattern-chart .mq-kh-pc-tick-label--dim {
    fill: rgb(255 255 255 / 32%);
  }
  .mq-kh-pattern-chart .mq-kh-pc-category-label {
    fill: rgb(255 255 255 / 74%);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  /* Markers — class is .mq-kh-pc-marker only (NOT .mq-kh-time-dot)
     for the same reason as Component A. */
  .mq-kh-pattern-chart .mq-kh-pc-marker {
    cursor: pointer;
    transition: r .15s ease, filter .15s ease;
  }
  .mq-kh-pattern-chart .mq-kh-pc-marker:hover,
  .mq-kh-pattern-chart .mq-kh-pc-marker:focus {
    r: 7.5;
    outline: none;
    filter: drop-shadow(0 0 6px rgb(255 255 255 / 50%));
  }

  /* Tiny year micro-label below each dot */
  .mq-kh-pattern-chart .mq-kh-pc-event-year {
    fill: rgb(255 255 255 / 48%);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.4px;
    pointer-events: none;
  }

  /* Tooltip */
  .mq-kh-pattern-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(7, 24, 41, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 9px 13px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: rgb(255 255 255 / 86%);
    opacity: 0;
    transform: translate(-50%, calc(-100% - 12px));
    transition: opacity .15s ease;
    z-index: 10;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 280px;
    white-space: normal;
  }
  .mq-kh-pattern-tooltip.is-visible { opacity: 1; }
  .mq-kh-pattern-tooltip strong {
    color: white;
    font-weight: 500;
    display: block;
    font-family: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    letter-spacing: -0.02em;
    margin-bottom: 3px;
  }
  .mq-kh-pattern-tooltip em {
    color: var(--mq-coral, #ff7759);
    font-style: normal;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }


  /* ----- Responsive (both components) ----- */

  @media (max-width: 720px) {
    .mq-kh-timeway--warped .mq-kh-warped-tick-label { font-size: 10px; }

    .mq-kh-pattern-frame { padding: 20px 12px; }
    .mq-kh-pattern-heading { gap: 16px; }
    .mq-kh-pattern-chart .mq-kh-pc-category-label { font-size: 9.5px; }
    .mq-kh-pattern-chart .mq-kh-pc-tick-label { font-size: 9.5px; }
  }
