.ms {
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --track: -0.035em;

  --rust-50: #FEF3EE; --rust-100: #FDE2D1; --rust-200: #FABEA0; --rust-300: #F59065;
  --rust-400: #EB6235; --rust-500: #C2410C; --rust-600: #9C3409; --rust-700: #7A2A09;
  --navy-50: #F1F5F9; --navy-100: #E2E8F0; --navy-200: #CBD5E1; --navy-300: #94A3B8;
  --navy-400: #64748B; --navy-500: #334155; --navy-600: #1E293B; --navy-700: #0F172A;
  --navy-800: #0A1120;

  
  --secA: #E6A141; --int: #D9662A; --secB: #A8350A; --cil: #0E8F84;
  --secA-dark: #F0B455; --int-dark: #EE8240; --secB-dark: #EB6235;
  --bev: #3B689E; --std: #94A3B8;

  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F6F7F9;
  --text: #1E2A44;
  --ink: #334155;
  --muted: rgba(15, 23, 42, 0.64);
  --faint: rgba(15, 23, 42, 0.42);
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.18);
  --grid: #EEF1F5;
  --link: var(--rust-500);
  --nav: var(--navy-700);

  --ground-dark: #0A1120;
  --on-dark: #F8FAFC;
  --on-dark-muted: #94A3B8;

  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.10), 0 4px 8px rgba(15,23,42,0.06);
  --shadow-xl: 0 24px 64px rgba(15,23,42,0.14), 0 8px 16px rgba(15,23,42,0.08);

  --ease: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --text-w: 680px;
  --wide-w: 1160px;
  --gutter: clamp(16px, 5vw, 64px);
  --radius: 14px;
  
  --nav-h: 60px;
  --hero-top: 60px;
  --hero-left: var(--gutter);        
}
.ms *, .ms *::before, .ms *::after { box-sizing: border-box; }
.ms { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
.ms { scroll-behavior: auto; }
 
}
.ms {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.ms img, .ms canvas, .ms svg { display: block; max-width: 100%; }
.ms button { font: inherit; color: inherit; }
.ms i, .ms em { font-style: italic; }
.ms em { font-style: normal; }
.ms a { color: var(--link); text-decoration: none; }
.ms a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ms .num { font-variant-numeric: tabular-nums; }
.ms ::selection { background: var(--rust-100); }
.ms .topnav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 60px;
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  color: var(--on-dark); background: var(--ground-dark); box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.ms .topnav.solid { background: #fff; color: var(--nav); box-shadow: 0 1px 0 var(--border); }
.ms .topnav .mark { display: flex; align-items: center; gap: 10px; color: inherit; }
.ms .topnav .mark img { height: 26px; width: auto; }
.ms .topnav .mark .on-light { display: none; }
.ms .topnav.solid .mark .on-dark { display: none; }
.ms .topnav.solid .mark .on-light { display: block; }
.ms .topnav nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.ms .topnav nav a {
  color: inherit; font: 500 14px/1 var(--font-body); padding: 9px 12px; border-radius: 8px; opacity: .78; white-space: nowrap;
}
.ms .topnav nav a:hover { opacity: 1; text-decoration: none; background: rgba(148,163,184,0.14); }
.ms .topnav nav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 currentColor; border-radius: 0; }
.ms .topnav nav a.ext::after { content: ' ↗'; }
.ms .progress { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--rust-500); width: 0; }
@media (max-width: 640px) {
.ms .topnav nav a.hide-sm { display: none; }
.ms .topnav { gap: 8px; }
.ms .topnav nav a { padding: 9px 8px; }
 
}
.ms .display, .ms h1, .ms h2, .ms h3, .ms .light { font-family: var(--font-display); letter-spacing: var(--track); }
.ms h1 { font-weight: 300; margin: 0; }
.ms h2 { font-weight: 300; margin: 0; }
.ms h3 { font-weight: 600; letter-spacing: -0.02em; }
.ms .name { font-family: var(--font-display); font-weight: 700; letter-spacing: var(--track); }
.ms .light-line { font-family: var(--font-display); font-weight: 300; letter-spacing: var(--track); color: rgba(30,42,68,0.72); }
.ms .accent { color: var(--rust-500); font-weight: 600; }
.ms .meta { font: 400 13px/1.5 var(--font-body); color: var(--muted); }
.ms .k-secA { color: #B07418; font-weight: 600; }
.ms .k-int { color: #B8501C; font-weight: 600; }
.ms .k-secB { color: var(--secB); font-weight: 600; }
.ms .k-secB-dark { color: var(--secB-dark); font-weight: 600; }
.ms .chip { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--font-body); color: var(--ink); }
.ms .chip::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--navy-300)); }
.ms .hero {
  position: relative; min-height: min(calc(100vh - var(--nav-h) + var(--hero-top)), 980px); background: var(--ground-dark); color: var(--on-dark);
  overflow: hidden; display: flex; align-items: flex-end;
}
.ms .hero { --hero-text: min(720px, 52vw); }
@media (max-width: 900px) {
.ms .hero { --hero-text: calc(100vw - 2 * var(--gutter)); }
 
}
.ms .mosaic-wrap {
  position: absolute; top: var(--hero-top); right: 0; height: calc(100% - var(--hero-top)); width: calc(100% - var(--hero-left) - var(--hero-text) + 120px); max-width: 1000px;
  opacity: 0; transition: opacity 1.6s var(--ease-out);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent 90px, rgba(0,0,0,0.55) 190px, #000 300px); mask-image: linear-gradient(90deg, transparent 0, transparent 90px, rgba(0,0,0,0.55) 190px, #000 300px);
}
.ms .mosaic-wrap.in { opacity: 1; }
.ms .mosaic-wrap img { display: block; width: 100%; height: 100%; }
.ms .mosaic-wrap img { object-fit: cover; object-position: 50% 50%; }
.ms .mosaic-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
.ms .mosaic-wrap { transition: none; }
 
}
@media (max-width: 900px) {
.ms .mosaic-wrap { left: 0; width: 100%; max-width: none; height: auto; top: var(--hero-top); aspect-ratio: 1 / 1;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, transparent 14%, #000 58%); mask-image: linear-gradient(0deg, transparent 0%, transparent 14%, #000 58%); }
.ms .mosaic-wrap img { object-position: 50% 50%; }


}
.ms .hero .fade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,17,32,0.6) 0, rgba(10,17,32,0.4) calc(var(--hero-left) + var(--hero-text)), rgba(10,17,32,0) calc(var(--hero-left) + var(--hero-text) + 240px)),
    linear-gradient(0deg, rgba(10,17,32,0.9) 0%, rgba(10,17,32,0) 22%);
}
.ms .hero .inner { position: relative; z-index: 2; width: 100%; max-width: calc(var(--hero-text) + var(--hero-left) + var(--gutter)); padding: calc(var(--hero-top) + 72px) var(--gutter) 72px var(--hero-left); display: grid; gap: 26px; }
@media (min-width: 901px) {
.ms .hero { align-items: center; }
 
}
@media (max-width: 900px) {
.ms .hero { align-items: flex-end; }
.ms .hero .inner { padding-top: min(88vw, 700px); }
.ms .hero .fade { background: linear-gradient(0deg, rgba(10,17,32,1) 0%, rgba(10,17,32,0.92) 45%, rgba(10,17,32,0) 70%); }
 
}
.ms .hero .kicker { font: 500 13px/1.4 var(--font-body); color: var(--on-dark-muted); display: flex; gap: 14px; flex-wrap: wrap; }
.ms .hero .kicker span + span::before { content: '·'; margin-right: 14px; opacity: .6; }
.ms .hero h1 { font-size: clamp(32px, 3.7vw, 54px); line-height: 1.08; max-width: 13.5em; color: var(--on-dark); }
.ms .hero h1 .accent { color: var(--rust-400); }
.ms .hero .authors { font: 400 14.5px/1.6 var(--font-body); color: var(--on-dark-muted); }
.ms .hero .authors b { color: var(--on-dark); font-weight: 500; }
.ms .hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ms .btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 10px;
  font: 600 14px/1 var(--font-body); border: 1px solid transparent; cursor: pointer;
  transition: background .2s var(--ease), transform .1s var(--ease), border-color .2s var(--ease);
}
.ms .btn:hover { text-decoration: none; }
.ms .btn:active { transform: scale(0.98); }
.ms .btn.white { background: #fff; color: var(--navy-700); }
.ms .btn.white:hover { background: var(--navy-50); }
.ms .btn.ghost { color: var(--on-dark); border-color: rgba(255,255,255,0.22); }
.ms .btn.ghost:hover { border-color: rgba(255,255,255,0.5); }
.ms .btn.navy { background: var(--navy-700); color: #fff; }
.ms .btn.navy:hover { background: var(--navy-600); }
.ms .btn.line { color: var(--navy-700); border-color: var(--border-strong); background: #fff; }
.ms .btn.line:hover { border-color: var(--navy-400); }
.ms .hero .scroll-cue { position: absolute; right: var(--gutter); bottom: 28px; z-index: 2; font: 500 12px/1 var(--font-body); color: var(--on-dark-muted); }
.ms .wrap { width: 100%; max-width: calc(var(--wide-w) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.ms .text { max-width: var(--text-w); }
.ms section.chapter { padding: 104px 0 24px; scroll-margin-top: 0; }
.ms [id] { scroll-margin-top: calc(var(--nav-h) + 12px); }
.ms section.chapter + section.chapter { border-top: 1px solid var(--border); }
.ms .chapter-head { display: grid; gap: 10px; margin-bottom: 40px; max-width: 900px; }
.ms .chapter-head .idx { font: 500 13px/1 var(--font-body); color: var(--muted); }
.ms .chapter-head .name { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; margin: 0; color: var(--navy-700); }
.ms .chapter-head .light-line { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.22; margin: 0; }
.ms .lede { font: 300 21px/1.55 var(--font-display); letter-spacing: -0.01em; color: var(--ink); max-width: 36em; }
.ms .copy p { margin: 0 0 1.1em; color: var(--ink); }
.ms .copy p:last-child { margin-bottom: 0; }
.ms .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.ms .cols.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ms .cols.even { grid-template-columns: 1fr 1fr; }
.ms .cols.t4 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.ms .cols.t4.rev { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.ms .cols.fig-side { gap: 40px; }
@media (max-width: 960px) {
.ms .cols, .ms .cols.rev, .ms .cols.even, .ms .cols.t4, .ms .cols.t4.rev { grid-template-columns: 1fr; gap: 28px; }
 
}
.ms .cols + .cols, .ms .cols + .figs, .ms .figs + .cols, .ms .figs + .figs, .ms .figs + .lead-in, .ms .cols + .lead-in { margin-top: 64px; }
.ms .lead-in + .figs { margin-top: 28px; }
.ms [data-match] { align-items: start; }
.ms .copy h3 { font: 600 22px/1.3 var(--font-display); letter-spacing: -0.02em; margin: 0 0 12px; color: var(--navy-700); }
.ms .stack-lg > * + * { margin-top: 64px; }
.ms .stack > * + * { margin-top: 28px; }
.ms .findings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ms .findings a {
  display: grid; gap: 12px; align-content: start; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); background: #fff; box-shadow: var(--shadow-xs); transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ms .findings a { grid-template-rows: auto auto auto 1fr; }
.ms .findings .go { align-self: end; }
.ms .findings a:hover { text-decoration: none; box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.ms .findings a:hover .t { color: var(--rust-500); }
.ms .findings .n { font: 500 13px/1 var(--font-body); color: var(--muted); }
.ms .findings .t { font: 500 19px/1.3 var(--font-display); letter-spacing: -0.015em; color: var(--navy-700); transition: color .2s; }
.ms .findings .d { font: 400 14.5px/1.55 var(--font-body); color: var(--muted); }
.ms .findings .go { font: 600 13px/1 var(--font-body); color: var(--navy-700); }
@media (max-width: 1000px) {
.ms .findings { grid-template-columns: repeat(2, 1fr); }
 
}
@media (max-width: 560px) {
.ms .findings { grid-template-columns: 1fr; }
 
}
.ms .figs { background: #F1F4F8; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ms .frow { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.ms .fsplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ms .fstack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ms .panel { position: relative; background: #fff; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 12px; padding: 16px 18px 14px; min-width: 0; }
.ms .panel .viewer { border-radius: 8px; }
.ms .panel .controls { margin-bottom: 10px; }
@media (max-width: 960px) {
.ms .frow { grid-template-columns: 1fr; }
.ms .frow > * { grid-column: auto !important; }
.ms .fsplit { grid-template-columns: 1fr; }
 
}
@media (max-width: 900px) {
.ms .figs { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; padding: 14px var(--gutter); }
 
}
.ms .panel-head { display: grid; gap: 4px; margin-bottom: 14px; }
.ms .panel-head .h { font: 600 16px/1.3 var(--font-display); letter-spacing: -0.015em; color: var(--navy-700); margin: 0; }
.ms .panel-head .s { font: 400 13px/1.45 var(--font-body); color: var(--muted); }
.ms .panel-foot { margin-top: 12px; font: 400 12.5px/1.5 var(--font-body); color: var(--muted); }
.ms .panel-foot .src { color: var(--faint); }
.ms .card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-xs); }
.ms .chart { position: relative; width: 100%; }
.ms .chart svg { overflow: visible; max-width: none; }
.ms .chart text { font-family: var(--font-body); font-variant-numeric: tabular-nums; fill: var(--navy-400); font-size: 11.5px; }
.ms .chart .axis path, .ms .chart .axis line { stroke: var(--navy-200); }
.ms .chart .axis text { fill: var(--navy-400); }
.ms .chart .axis-title { fill: var(--ink); font-size: 12px; }
.ms .chart .grid line { stroke: var(--grid); }
.ms .chart .ref { stroke: var(--navy-200); stroke-dasharray: 3 3; }
.ms .chart .lab { fill: var(--ink); font-size: 12px; font-weight: 500; }
.ms .chart .lab.secA { fill: #B07418; }
.ms .chart .lab.secB { fill: var(--secB); }
.ms .chart .lab.int { fill: #B8501C; }
.ms .chart .stat { fill: var(--ink); font-size: 12px; }
.ms .chart .gene { font-style: italic; }
.ms .legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.ms .legend-row .chip { font-weight: 400; color: var(--muted); }
.ms .seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--navy-50); border-radius: 10px; flex-wrap: wrap; }
.ms .seg button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer;
  font: 500 13px/1 var(--font-body); color: var(--navy-500);
}
.ms .seg button:hover { color: var(--navy-700); }
.ms .seg button[aria-pressed="true"] { background: #fff; color: var(--navy-700); box-shadow: var(--shadow-sm); }
.ms .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.ms .controls label { font: 500 12.5px/1 var(--font-body); color: var(--muted); }
.ms select.gene-select, .ms input.gene-input {
  font: 500 13px/1 var(--font-body); padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: var(--navy-700);
}
.ms .tooltip {
  position: fixed; z-index: 80; pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .12s, transform .12s; background: #fff; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 10px 12px; font: 400 12.5px/1.45 var(--font-body); max-width: 280px;
}
.ms .tooltip.on { opacity: 1; transform: none; }
.ms .tooltip .tt-h { font-weight: 600; color: var(--navy-700); margin-bottom: 2px; }
.ms .tooltip .tt-r { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.ms .tooltip .tt-r span:first-child { color: var(--muted); }
.ms .viewer { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: #fff; touch-action: none; }
.ms .viewer.dark { background: var(--ground-dark); }
.ms .viewer canvas { width: 100%; height: 100%; }
.ms .viewer .hud { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.ms .viewer .scalebar { height: 3px; background: var(--navy-700); }
.ms .viewer.dark .scalebar { background: #fff; }
.ms .viewer .scalebar-l { font: 500 11.5px/1 var(--font-body); color: var(--navy-700); }
.ms .viewer.dark .scalebar-l { color: #fff; }
.ms .viewer .zoom-ctl { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.ms .viewer .zoom-ctl button {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.92);
  display: grid; place-items: center; cursor: pointer; color: var(--navy-700); box-shadow: var(--shadow-sm);
}
.ms .viewer .zoom-ctl button:hover { border-color: var(--border-strong); }
.ms .viewer .loading { position: absolute; inset: 0; display: grid; place-items: center; font: 500 13px/1 var(--font-body); color: var(--muted); }
.ms .viewer .note { position: absolute; right: 14px; bottom: 12px; font: 400 11.5px/1.3 var(--font-body); color: var(--muted); pointer-events: none; }
.ms .colorbar { display: grid; gap: 4px; width: 180px; }
.ms .colorbar .bar { height: 8px; border-radius: 4px; }
.ms .colorbar .ends { display: flex; justify-content: space-between; font: 400 11.5px/1 var(--font-body); color: var(--muted); }
.ms .colorbar .t { font: 500 12px/1.2 var(--font-body); color: var(--ink); }
.ms .scrolly { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; }
.ms .scrolly .steps { padding: 18vh 0 30vh; }
.ms .scrolly .step { min-height: 72vh; display: flex; align-items: center; }
.ms .scrolly .step .box { padding: 22px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: opacity .3s, border-color .3s; opacity: .45; }
.ms .scrolly .step.active .box { opacity: 1; border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.ms .scrolly .step h4:last-child { margin-bottom: 0; }
.ms .scrolly .step h4 { margin: 0 0 8px; font: 600 18px/1.3 var(--font-display); letter-spacing: -0.015em; color: var(--navy-700); }
.ms .scrolly .step p { margin: 0; color: var(--ink); font-size: 15.5px; }
.ms .scrolly .sticky { position: sticky; top: calc(var(--nav-h) + 16px); height: calc(100vh - var(--nav-h) - 40px); display: flex; flex-direction: column; gap: 10px; }
.ms .scrolly .sticky .viewer { flex: 1; border: 1px solid var(--border); }
.ms .scrolly .sticky .key { min-height: 40px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
@media (max-width: 960px) {
.ms .scrolly { grid-template-columns: 1fr; }
.ms .scrolly .sticky { top: var(--nav-h); height: 58vh; z-index: 1; }
.ms .scrolly .steps { padding: 0; position: relative; z-index: 2; }
.ms .scrolly .step { min-height: 80vh; align-items: flex-end; }
.ms .scrolly .steps { order: 2; }
.ms .scrolly .sticky { order: 1; }


}
.ms .band-dark { background: var(--ground-dark); color: var(--on-dark); }
.ms .band-dark .light-line { color: rgba(248,250,252,0.72); }
.ms .band-dark .name { color: var(--on-dark); }
.ms .band-dark .meta { color: var(--on-dark-muted); }
.ms .icon7-band { margin-top: 88px; border-radius: 20px; padding: 48px clamp(20px, 4vw, 56px); }
.ms .icon7-band .band-text { max-width: 46em; margin: 0; font: 400 15.5px/1.65 var(--font-body); color: #CBD5E1; }
@media (max-width: 900px) {
.ms .icon7-band { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; padding: 40px var(--gutter); }
 
}
.ms .implications { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border); }
.ms .implications > div { padding: 32px 28px 8px 0; }
.ms .implications > div + div { padding-left: 28px; border-left: 1px solid var(--border); }
.ms .implications .name { font-size: 22px; color: var(--navy-700); }
.ms .implications .light-line { font-size: 18px; line-height: 1.35; margin-top: 6px; }
.ms .implications p { color: var(--ink); font-size: 15px; margin: 14px 0 0; }
@media (max-width: 900px) {
.ms .implications { grid-template-columns: 1fr; }
.ms .implications > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
 
}
.ms footer.site { margin-top: 120px; background: var(--ground-dark); color: var(--on-dark-muted); padding: 72px 0 48px; font-size: 14px; }
.ms footer.site a { color: var(--on-dark); }
.ms footer.site a:hover { color: var(--rust-200); }
.ms footer.site .grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; }
.ms footer.site .tagline { font: 700 22px/1.2 var(--font-display); letter-spacing: var(--track); color: var(--on-dark); margin-top: 18px; }
.ms footer.site h5 { font: 600 14px/1 var(--font-display); color: var(--on-dark); margin: 0 0 14px; }
.ms footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ms footer.site .base { margin-top: 56px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12.5px; }
@media (max-width: 860px) {
.ms footer.site .grid { grid-template-columns: 1fr; }
 
}
.ms .cite-box { position: relative; background: var(--surface-alt); border-radius: var(--radius); padding: 20px 22px; font-size: 14.5px; color: var(--ink); }
.ms .cite-box .copy { position: absolute; right: 12px; top: 12px; }
.ms .cite-box pre { margin: 12px 0 0; white-space: pre-wrap; font: 400 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--navy-500); display: none; }
.ms .cite-box.show-bib pre { display: block; }
.ms .lightbox { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(10,17,32,0.82); padding: 32px; }
.ms .lightbox.on { display: grid; place-items: center; }
.ms .lightbox .sheet {
  background: #fff; border-radius: 16px; width: min(1180px, 100%); max-height: calc(100vh - 64px);
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; overflow: hidden; box-shadow: var(--shadow-xl);
}
.ms .lightbox .img { overflow: auto; background: #fff; cursor: zoom-in; }
.ms .lightbox .img.zoomed { cursor: zoom-out; }
.ms .lightbox .img img { width: 100%; height: auto; }
.ms .lightbox .img.zoomed img { width: 200%; max-width: none; }
.ms .lightbox .side { padding: 28px 26px; overflow: auto; border-left: 1px solid var(--border); font-size: 14px; color: var(--ink); }
.ms .lightbox .side h3 { font: 600 19px/1.3 var(--font-display); margin: 6px 0 14px; color: var(--navy-700); }
.ms .lightbox .side .pl { margin: 0 0 10px; }
.ms .lightbox .side .pl b { color: var(--navy-700); }
.ms .lightbox .close { position: absolute; top: 18px; right: 22px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.12); color: #fff; cursor: pointer; font-size: 20px; }
.ms .lightbox .nav { display: flex; gap: 8px; margin-top: 18px; }
@media (max-width: 860px) {
.ms .lightbox { padding: 0; }
.ms .lightbox .sheet { grid-template-columns: 1fr; max-height: 100vh; height: 100vh; border-radius: 0; grid-template-rows: 1fr auto; }
.ms .lightbox .side { max-height: 40vh; border-left: 0; border-top: 1px solid var(--border); }
 
}
.ms .popover {
  position: absolute; z-index: 90; width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px 16px; font: 400 13px/1.5 var(--font-body); color: var(--ink);
}
.ms .popover .ref + .ref { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.ms .popover .ref .n { color: var(--muted); font-weight: 500; margin-right: 6px; }
.ms .popover .ref a { font-weight: 500; }
.ms .placeholder {
  display: grid; place-items: center; min-height: 220px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  color: var(--muted); font: 400 13px/1.5 var(--font-body); text-align: center; padding: 24px; background: var(--surface-alt);
}
.ms .placeholder img { max-height: 420px; width: auto; margin: 0 auto 10px; border-radius: 6px; }
.ms .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ms .hide { display: none !important; }
.ms .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.ms .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
.ms .reveal { opacity: 1; transform: none; transition: none; }
 
}
.ms .niche-row { padding: 12px 0; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.ms .niche-row .nr-h { font: 600 14px/1.3 var(--font-display); color: var(--navy-700); }
.ms .niche-row .nr-l { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ms .niche-row .nr-l > span:first-child { font: 500 12px/1 var(--font-body); color: var(--muted); width: 112px; }
.ms .gpill { display: inline-block; padding: 4px 10px; border: 1.5px solid var(--c); border-radius: 999px; font-size: 12.5px; color: var(--navy-700); background: #fff; }
.ms .niche-tab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; }
.ms .niche-tab > span:first-child { display: none; }
.ms .niche-tab .nt-c { font: 600 12px/1.2 var(--font-body); color: var(--muted); padding-bottom: 6px; }
.ms .niche-tab .nt-c:nth-of-type(2) { grid-column: 1; }
.ms .niche-tab .nt-g { grid-column: 1 / -1; font: 600 13.5px/1.3 var(--font-display); color: var(--navy-700); padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); }
.ms .niche-tab .nt-p { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; padding: 6px 0 4px; }
.ms .niche-tab .nt-x { color: var(--faint); font-size: 13px; }
.ms .niche-tab .nt-n { grid-column: 1 / -1; font: 400 12px/1.4 var(--font-body); color: var(--muted); }
.ms .niche-tab .gpill { font-size: 11.5px; padding: 3px 8px; }


/* ---------------- under the lab website's header (build/cooklab.py) */
/* the lab's column: 1152 px with 20 px gutters, 48 px from 768 px; the header is 64 px and the paper bar 48 px */
.ms { --nav-h: 113px; --hero-top: 0px; --gutter: 20px; --wide-w: 1056px;
  --hero-left: max(var(--gutter), calc((100% - 1152px) / 2 + var(--gutter)));
  display: block; overflow: visible; overflow-x: clip; }            /* clip, not hidden: sticky elements need the window */
@media (min-width: 768px) { .ms { --gutter: 48px; } }
.ms .hero .inner { padding-top: 64px; }
@media (max-width: 900px) { .ms .hero .inner { padding-top: min(80vw, 640px); } }
.ms.toc-open:not(.toc-rail) .toc { padding-top: 28px; }
.ms ol { list-style: decimal; }
.ms button { cursor: pointer; }
.ms .ms-bar { position: sticky; top: 64px; z-index: 40; background: rgba(255,255,255,0.97); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.ms .ms-bar .wrap { display: flex; align-items: center; gap: 24px; height: 48px; }
.ms .ms-name { font: 600 15px/1 var(--font-display); letter-spacing: -0.01em; color: var(--navy-700); white-space: nowrap; }
.ms .ms-name:hover { text-decoration: none; color: var(--rust-500); }
.ms .ms-bar nav { display: flex; gap: 20px; align-self: stretch; }
.ms .ms-bar nav a { display: flex; align-items: center; font: 500 14px/1 var(--font-body); color: var(--muted); border-bottom: 2px solid transparent; padding-top: 2px; white-space: nowrap; }
.ms .ms-bar nav a:hover { color: var(--navy-700); text-decoration: none; }
.ms .ms-bar nav a[aria-current] { color: var(--navy-700); border-bottom-color: var(--navy-700); }
.ms .ms-slot { display: flex; }
.ms .ms-sp { flex: 1; }
.ms .ms-bar .ext { font: 500 14px/1 var(--font-body); color: var(--navy-700); white-space: nowrap; }
@media (max-width: 760px) { .ms .ms-name, .ms .ms-bar .ext { display: none; } .ms .ms-bar .wrap { gap: 18px; } }
