/* ==========================================================
   Faulty Memory — single-page blog
   Distill-flavored: warm serif body, light interactivity,
   generous whitespace, dark accent bands for emphasis.
   ========================================================== */

:root {
  --bg: #fbfaf7;
  --bg-tint: #f1eee6;
  --bg-dark: #14171c;
  --ink: #1b1d22;
  --ink-soft: #44494f;
  --ink-quiet: #6b7077;
  --rule: #d9d4c7;
  --accent: #c1462e;       /* warm red */
  --accent-2: #2f5a8c;     /* deep blue */
  --accent-3: #1d6b56;     /* deep green */
  --code-bg: #efece4;

  --serif: "Source Serif 4", Charter, Georgia, "Iowan Old Style", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", "SF Mono", Menlo, monospace;

  --container: 1100px;
  --narrow: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}

a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid rgba(47,90,140,.3); }
a:hover { border-bottom-color: var(--accent-2); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h2 { font-size: 2rem; line-height: 1.18; margin: 0 0 1.2rem; }
h3 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 .6rem; }
h4 { font-size: 1.1rem; margin: 0 0 .4rem; }

p { margin: 0 0 1.1em; }
em { font-style: italic; }
strong { font-weight: 700; }

.container       { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container.narrow{ max-width: var(--narrow); }

/* =========================== TOP NAV =========================== */
.topnav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(251, 250, 247, .82);
  border-bottom: 1px solid var(--rule);
}
.topnav-inner {
  max-width: var(--container); margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans); font-size: 14px;
}
.topnav-brand {
  font-weight: 600; color: var(--ink);
  letter-spacing: -.01em; border-bottom: none;
}
.topnav-brand:hover { color: var(--accent); }
.topnav-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 22px;
}
.topnav-links a {
  color: var(--ink-soft); border-bottom: none;
}
.topnav-links a:hover { color: var(--accent); }
.topnav-links a.is-active { color: var(--accent); }

/* reveal-on-scroll for figures */
figure { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
figure.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  figure { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 720px) {
  .topnav-links { display: none; }
}

/* =========================== HERO =========================== */
.hero {
  position: relative;
  padding: 110px 28px 90px;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(193,70,46,.08), transparent 50%),
    radial-gradient(circle at 90% 100%, rgba(47,90,140,.08), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 920px; margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.022em;
  margin: 0 0 24px;
  font-weight: 700;
}
.hero-title .accent { color: var(--accent); font-style: italic; }
.hero-sub {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 0 36px;
}
.hero-authors {
  display: flex; flex-wrap: wrap; gap: 28px;
  margin: 0 0 32px;
  font-family: var(--sans);
}
.author-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.author-aff  { font-size: 13.5px; color: var(--ink-quiet); }
.hero-links { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: var(--sans); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-quiet);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

.pill {
  display: inline-block;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  border-bottom: none;
  transition: transform .15s ease;
}
.pill:hover { transform: translateY(-1px); border-bottom: none; }
.pill-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink);
}

/* =========================== BANDS =========================== */
.band {
  padding: 90px 0;
  border-bottom: 1px solid var(--rule);
}
.band-tint { background: var(--bg-tint); }
.band-dark {
  background: var(--bg-dark); color: #ecebe7;
  border-bottom-color: #2a2e36;
}
.band-dark h2, .band-dark h3, .band-dark h4 { color: #fbfaf7; }
.band-dark .kicker { color: #f4a584; }
.band-dark a { color: #95b8e3; border-bottom-color: rgba(149,184,227,.4); }
.band-dark .lede { color: #cdc8be; }
.band-dark figcaption { color: #aaa6a0; }

/* TLDR */
.band-tldr {
  padding: 40px 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%);
}
.tldr-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px 38px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 12px 32px -20px rgba(20,23,28,.18);
}
.tldr-label {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.tldr-list {
  margin: 0; padding-left: 1.2em;
  font-size: 1.05rem; color: var(--ink-soft);
}
.tldr-list li { margin-bottom: .55em; }

/* humble disclaimer */
.disclaimer {
  margin: 22px auto 0;
  max-width: 600px;
  padding: 16px 20px;
  border: 1px dashed var(--rule);
  border-radius: 10px;
  background: rgba(255,255,255,.5);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.disclaimer-hero {
  margin: 0 0 28px 0;
  max-width: 660px;
  background: rgba(255,255,255,.55);
  border-color: rgba(193,70,46,.35);
}
.disclaimer-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.disclaimer p { margin: 0; }
.disclaimer a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.disclaimer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* kicker / lede */
.kicker {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.lede {
  font-size: 1.2rem; line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.8em;
}
.band-dark .lede { color: #cdc8be; }

/* =========================== FIGURES =========================== */
figure {
  margin: 24px 0 28px;
  background: transparent;
}
figure img {
  display: block;
  width: 100%; height: auto;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 16px 36px -24px rgba(20,23,28,.25);
  background: #fff;
}
.band-dark figure img {
  background: #1c2027;
  box-shadow: 0 0 0 1px #2a2e36;
}
figcaption {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-quiet);
  margin-top: 14px;
  max-width: 720px;
}
figure.full img { width: 100%; }
figure.full.half { max-width: 640px; margin-left: auto; margin-right: auto; }
.grid-2 {
  display: grid; gap: 28px;
  grid-template-columns: 1fr 1fr;
  margin: 30px 0 10px;
}
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* =========================== CALLOUTS =========================== */
.callout {
  margin: 36px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  background: rgba(193,70,46,.06);
  border-radius: 0 8px 8px 0;
}
.band-dark .callout {
  background: rgba(244,165,132,.08);
  border-left-color: #f4a584;
}
.callout-label {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.band-dark .callout-label { color: #f4a584; }
.callout p:last-child { margin-bottom: 0; }
.callout-finding {
  border-left-color: #f4a584;
  background: rgba(244,165,132,.07);
}

/* =========================== SCHEDULE TOGGLE =========================== */
.schedule-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0 18px;
}
.schedule-btn {
  text-align: left;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  font-family: var(--serif);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.schedule-btn:hover { transform: translateY(-2px); border-color: var(--ink-soft); }
.schedule-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.schedule-btn.is-active .schedule-desc { color: rgba(251,250,247,.78); }
.schedule-key {
  display: block;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.schedule-btn.is-active .schedule-key { color: #f4a584; }
.schedule-desc {
  display: block;
  font-size: 15px; line-height: 1.45;
  color: var(--ink-soft);
}
.schedule-panel { min-height: 60px; margin-top: 6px; }
.schedule-readout {
  font-size: 1.05rem;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  margin: 18px 0 22px;
}
@media (max-width: 760px) {
  .schedule-toggle { grid-template-columns: 1fr; }
}

/* =========================== FAILURE LIST =========================== */
.failure-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-top: 40px;
}
.failure {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.failure-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.failure-num {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: .04em;
  font-feature-settings: "tnum" 1;
  flex: 0 0 auto;
}
.failure-title {
  font-size: 1.7rem;
  margin: 0;
  line-height: 1.1;
}
.failure-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.failure-text { min-width: 0; }
.failure-text p { margin-bottom: 1em; }
.failure-text p:last-child { margin-bottom: 0; }
.failure-evidence {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: .98rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.failure-figure { margin: 0; min-width: 0; }
.failure-figure img {
  max-height: 320px;
  width: 100%;
  object-fit: contain;
  background: #fff;
}
@media (max-width: 880px) {
  .failure-body {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .failure-figure img { max-height: 280px; }
}

/* =========================== REGIMES =========================== */
.regimes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 30px 0 36px;
}
.regime {
  background: rgba(255,255,255,.04);
  border: 1px solid #2a2e36;
  border-radius: 10px;
  padding: 22px 22px;
}
.regime h4 {
  font-family: var(--sans);
  font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.regime p { font-size: .95rem; color: #cdc8be; margin: 0; }
.regime-force h4 { color: #ff8a72; }
.regime-auto  h4 { color: #95b8e3; }
.regime-epi   h4 { color: #9bd6c0; }
@media (max-width: 760px) {
  .regimes { grid-template-columns: 1fr; }
}

.key {
  font-family: var(--mono);
  font-size: .9em;
  background: rgba(244,165,132,.16);
  color: #f4a584;
  padding: 1px 8px;
  border-radius: 4px;
}

/* =========================== MEMORY CARDS =========================== */
.memory-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin: 22px 0 26px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 12px 28px -22px rgba(20,23,28,.18);
}
.band-dark .memory-card {
  background: #1c2027;
  border-color: #2a2e36;
}
.memory-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: #f6f3ec;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .04em;
}
.band-dark .memory-card-head {
  background: #14181f;
  border-bottom-color: #2a2e36;
}
.memory-card-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
}
.memory-card-tag {
  color: var(--ink-quiet);
  font-family: var(--mono);
  font-size: 11.5px;
}
.band-dark .memory-card-tag { color: #aaa6a0; }
.memory-card-body {
  padding: 16px 22px;
  font-size: .98rem;
  line-height: 1.6;
  color: var(--ink);
  font-family: var(--serif);
}
.band-dark .memory-card-body { color: #ecebe7; }
.memory-card-body p { margin: 0 0 .8em; }
.memory-card-body p:last-child { margin-bottom: 0; }
.memory-card-foot {
  padding: 12px 22px 16px;
  background: #fcfaf4;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.band-dark .memory-card-foot {
  background: #161a21;
  border-top-color: #2a2e36;
  color: #aaa6a0;
}
.memory-round {
  display: block;
  margin: 4px 0 4px !important;
}
.memory-round-label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(193,70,46,.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.hl {
  background: rgba(255,222,120,.55);
  padding: 0 2px;
  border-radius: 2px;
}
.band-dark .hl {
  background: rgba(255,222,120,.22);
  color: #ffe89e;
}
.hl-bad {
  background: rgba(193,70,46,.18);
  color: var(--accent);
  padding: 0 4px;
  border-radius: 2px;
  font-weight: 500;
}

/* =========================== CASE STUDIES =========================== */
.case {
  margin: 64px 0;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.case:first-of-type { padding-top: 0; border-top: none; }
.case-head {
  margin-bottom: 18px;
}
.case-num {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.case-title {
  font-size: 1.6rem;
  margin: 0 0 8px;
  line-height: 1.2;
}
.case-sub {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-quiet);
  margin: 0 0 18px;
}
.case-foot {
  margin-top: 18px;
  padding: 14px 20px;
  background: #fff;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: .98rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* =========================== CODE PAIR =========================== */
.code-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0 12px;
}
.code-block {
  background: #1c2027;
  color: #e6e3da;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2a2e36;
}
.code-block.code-good { border-color: #1b7a2d; }
.code-block.code-bad  { border-color: #b22222; }
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #14181f;
  border-bottom: 1px solid #2a2e36;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .04em;
}
.code-tag {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #cdc8be;
}
.code-score {
  font-family: var(--mono);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.score-good { background: rgba(27,122,45,.18); color: #6fdf86; }
.score-bad  { background: rgba(178,34,34,.22); color: #ff8a72; }
.code-block pre {
  margin: 0;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
}
.code-block code { font-family: var(--mono); }
@media (max-width: 880px) {
  .code-pair { grid-template-columns: 1fr; }
}

/* =========================== WORKFLOW LIST =========================== */
.workflow-list { padding: 14px 22px; }
.wf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .95rem;
  line-height: 1.55;
}
.wf-list li {
  padding: 4px 0;
}
.wf-list li.wf-bad {
  background: rgba(193,70,46,.07);
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-left: 2px solid var(--accent);
}
.wf-id {
  display: inline-block;
  width: 3.4em;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-quiet);
}
.wf-bad .wf-id { color: var(--accent); }

/* =========================== TAB BROWSER =========================== */
.tab-browser {
  margin: 22px 0 32px;
}
.tab-browser-wide {
  margin-top: 28px;
}
.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--rule);
}
.tab-btn {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .01em;
  background: transparent;
  border: 1px solid var(--rule);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--ink-soft);
  margin-bottom: -1px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tab-btn:hover {
  color: var(--ink);
  background: rgba(255,255,255,.5);
}
.tab-btn.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.band-tint .tab-btn {
  background: transparent;
}
.band-tint .tab-btn:hover {
  background: rgba(255,255,255,.55);
}
.band-tint .tab-btn.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.tab-panel {
  animation: tab-fade .22s ease;
}
.tab-panel[hidden] { display: none !important; }
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .tab-strip { gap: 6px; }
  .tab-btn { font-size: 12.5px; padding: 8px 12px; }
}

/* =========================== ZOO CARD =========================== */
.zoo-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 16px 36px -24px rgba(20,23,28,.22);
}
.zoo-meta {
  padding: 12px 22px;
  background: #f6f3ec;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-quiet);
  letter-spacing: .02em;
}
.zoo-tag { color: var(--ink-quiet); }
.zoo-body {
  padding: 22px 26px;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
}
.zoo-body p { margin: 0 0 1em; }
.zoo-body p:last-child { margin: 0; }
.zoo-body code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 4px;
}
.zoo-round {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(193,70,46,.08);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: 2px;
}
.zoo-note {
  padding: 16px 26px 20px;
  background: #fcfaf4;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* =========================== DRIFT TRAIL =========================== */
.drift-trail {
  margin: 22px 0 18px;
}
.drift-step {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: start;
}
.drift-stage {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.drift-vote {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-quiet);
  text-transform: none;
  font-family: var(--mono);
}
.drift-content {
  font-family: var(--serif);
  font-size: .98rem;
  line-height: 1.6;
  color: var(--ink);
}
.drift-tag {
  grid-column: 2;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-quiet);
  font-style: italic;
  margin-top: 8px;
}
.drift-arrow {
  text-align: center;
  font-size: 22px;
  color: var(--accent);
  margin: 6px 0;
  line-height: 1;
  font-weight: 700;
}
@media (max-width: 700px) {
  .drift-step { grid-template-columns: 1fr; gap: 8px; }
  .drift-tag { grid-column: 1; }
}

/* =========================== RESULT TABLE =========================== */
.result-table {
  margin: 22px 0;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.result-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
}
.result-table th, .result-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.result-table th {
  background: #f6f3ec;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--ink);
}
.result-table tr:last-child td { border-bottom: none; }
.result-table td:not(:first-child),
.result-table th:not(:first-child) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.delta-bad {
  color: var(--accent);
  font-weight: 600;
}

/* =========================== REFRAME =========================== */
.big-ol-dark li { border-color: #2a2e36; }
.big-ol-dark li::before { color: #f4a584; }
.sub-h {
  font-size: 1.25rem;
  margin: 36px 0 12px;
  letter-spacing: -.01em;
}
.reframe-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reframe-list li {
  background: rgba(255,255,255,.04);
  border-left: 3px solid #f4a584;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 1rem;
  color: #cdc8be;
  line-height: 1.55;
}
.reframe-list li strong { color: #fbfaf7; }

/* =========================== MEMORY GRID =========================== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 22px 0 28px;
}
.memory-grid .memory-card { margin: 0; }
.memory-grid .memory-card-body { font-size: .92rem; line-height: 1.5; }
.memory-grid .memory-card-foot { font-size: 12.5px; }
@media (max-width: 980px) {
  .memory-grid { grid-template-columns: 1fr; }
}

/* =========================== BIG OL =========================== */
.big-ol {
  list-style: none;
  counter-reset: bigol;
  padding: 0;
  margin: 30px 0 0;
}
.big-ol li {
  counter-increment: bigol;
  position: relative;
  padding: 18px 0 18px 60px;
  border-top: 1px solid var(--rule);
}
.big-ol li:last-child { border-bottom: 1px solid var(--rule); }
.big-ol li::before {
  content: counter(bigol, decimal-leading-zero);
  position: absolute; left: 0; top: 18px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: -.02em;
}

/* =========================== CITATIONS / TOOLTIP =========================== */
.cite {
  font-family: var(--sans);
  font-size: 12.5px;
  vertical-align: super;
  line-height: 1;
  color: var(--accent-2);
  border-bottom: none;
  cursor: help;
}
.cite:hover { color: var(--accent); }
.tooltip {
  position: absolute;
  z-index: 100;
  max-width: 320px;
  font-family: var(--sans); font-size: 13px;
  line-height: 1.5;
  background: var(--bg-dark); color: #ecebe7;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.4);
  pointer-events: none;
}
.tooltip[hidden] { display: none; }

/* =========================== BIBTEX =========================== */
.bibtex {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--code-bg);
  color: var(--ink);
  padding: 18px 22px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--rule);
}

/* =========================== FOOTER =========================== */
.site-footer {
  padding: 36px 0 60px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-quiet);
  background: var(--bg-tint);
}

/* =========================== PRINT =========================== */
@media print {
  .topnav, .hero-scroll, .tooltip { display: none; }
  .band { padding: 30px 0; page-break-inside: avoid; }
  body { font-size: 11pt; }
}
