/* L-DPT project page.
   Pointcept family look (Inter, slate headings, blue accent, purple author links, alternating bands,
   fixed blurred nav, dark footer) plus one departure: a near-black "darkroom" stage for imagery.
   Spectral colours are reserved for depth; chart series use the paper's Fig. 2 green (DPT) / blue (L-DPT). */

:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --fg: #1f2937;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --chip: #f3f4f6;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff4ff;
  --author: #6d28d9;
  --logo: #5e4fa2;
  --warn-bg: #fff7ed;
  --warn-fg: #9a3412;
  --warn-line: #fed7aa;
  --stage: #0b0f14;
  --stage-2: #151b24;
  --stage-fg: #e5e7eb;
  --stage-muted: #94a3b8;
  --stage-line: #2a3342;
  --dpt-bar: #a9d18e;
  --dpt-line: #548235;
  --ldpt-bar: #8faadc;
  --ldpt-line: #203864;
  --footer: #1f2937;
  --footer-fg: #e5e7eb;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --wrap: 1200px;
  --text-w: 760px;
  --nav-h: 56px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --bg-alt: #111722; --fg: #f3f4f6; --text: #d1d5db; --muted: #9ca3af; --line: #253042;
    --chip: #1a2230; --accent: #60a5fa; --accent-strong: #93c5fd; --accent-soft: #14213a; --author: #b69cff; --logo: #7b6cc9;
    --warn-bg: #2a1a10; --warn-fg: #fdba74; --warn-line: #5b3416;
    --stage: #05070a; --stage-2: #10151d; --stage-line: #222b38;
    --dpt-bar: #7fae63; --dpt-line: #a8db86; --ldpt-bar: #6f8cc4; --ldpt-line: #b9cdf5;
    --footer: #070a0f; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117; --bg-alt: #111722; --fg: #f3f4f6; --text: #d1d5db; --muted: #9ca3af; --line: #253042;
  --chip: #1a2230; --accent: #60a5fa; --accent-strong: #93c5fd; --accent-soft: #14213a; --author: #b69cff; --logo: #7b6cc9;
  --warn-bg: #2a1a10; --warn-fg: #fdba74; --warn-line: #5b3416;
  --stage: #05070a; --stage-2: #10151d; --stage-line: #222b38;
  --dpt-bar: #7fae63; --dpt-line: #a8db86; --ldpt-bar: #6f8cc4; --ldpt-line: #b9cdf5;
  --footer: #070a0f; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ------------------------------------------------------------ base */
/* metric-matched fallback so the Inter swap does not reflow the page */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 107%; ascent-override: 90%; descent-override: 22.4%; line-gap-override: 0%; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--font); font-feature-settings: "cv11", "ss01";
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { color: var(--fg); margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.band { padding-block: 88px; }
.band.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
@media (max-width: 720px) { .band { padding-block: 60px; } }

.section-head { max-width: var(--text-w); display: grid; gap: 12px; margin-bottom: 36px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.section-head h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; letter-spacing: -.015em; }
.section-head p { font-size: 17px; color: var(--text); }
.note { font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------ nav */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60;
  background: var(--bg);
}
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { flex: none; white-space: nowrap; display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--fg); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 22px; height: 22px; flex: none; }
.brand .lg-l { fill: var(--logo); }
.nav-links { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; white-space: nowrap;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--fg); background: var(--chip); }
.theme-btn {
  flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  color: var(--fg); display: grid; place-items: center; cursor: pointer;
}
.theme-btn svg { width: 17px; height: 17px; }
.nav-links a:focus-visible, .seg button:focus-visible { outline-offset: -2px; }
@media (max-width: 860px) {
  .nav .wrap { gap: 10px; }
  .nav-links { mask-image: linear-gradient(90deg, #000 82%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); padding-right: 24px; }
  .nav-links a { font-size: 13px; padding: 6px 8px; }
}

/* ------------------------------------------------------------ hero */
.hero { padding-block: 48px 72px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; grid-template-columns: minmax(0, 1fr); }
/* the stage is 3:4, so its width is capped by the viewport height to keep the controls above the fold */
@media (min-width: 1000px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, clamp(380px, calc((100svh - 220px) * .75), 540px)); gap: 56px; } }
.hero-text { display: grid; gap: 20px; align-content: start; }
/* phones: title, claim and authors, then the photo, then buttons and lede */
@media (max-width: 999px) {
  .hero { padding-top: 28px; }
  .hero .wrap { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
  .hero-text { display: contents; }
  .venue { order: 1; } .hero h1 { order: 2; } .claim { order: 3; } .hero-authors { order: 4; }
  .hero-fig { order: 5; margin-top: 6px !important; } .hero-text > .buttons { order: 6; } .lede { order: 7; }
  /* stacked: keep the 3:4 stage (and its controls) within one screen height */
  .hero-fig { width: 100%; max-width: max(320px, calc((100svh - 150px) * .75)); align-self: center; }
}
.venue { justify-self: start; align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; letter-spacing: -.02em; }
.claim { font-size: clamp(21px, 2.4vw, 27px); font-weight: 600; color: var(--fg); letter-spacing: -.01em; line-height: 1.3; }
.claim em { font-style: normal; color: var(--accent); }
.authors { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 16px; }
.authors a, .authors span { color: var(--author); text-decoration: none; font-weight: 500; }
.authors a:hover { text-decoration: underline; }
.authors sup { color: var(--muted); font-weight: 400; margin-left: 1px; }
.affils { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 16px; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; font: 600 14px var(--font); text-decoration: none;
  color: var(--fg); background: var(--chip); border: 1px solid var(--line); padding: 8px 15px; border-radius: 999px;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { color: var(--fg); border-color: var(--muted); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover { color: var(--bg); opacity: .9; }
.btn[aria-disabled="true"] { cursor: default; opacity: .62; }
.btn[aria-disabled="true"]:hover { border-color: var(--line); }
.btn .soon { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 17.5px; max-width: 60ch; }

/* ------------------------------------------------------------ darkroom stage + zoom stage */
.stage { background: var(--stage); color: var(--stage-fg); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); border: 1px solid var(--stage-line); }
.zs {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: #000;
  touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
.zs img.poster, .zs canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.zs img.poster { object-fit: cover; }
.zs img.poster.depth { clip-path: inset(0 0 0 50%); }
.zs.live img.poster { visibility: hidden; }
.zs-mp {
  position: absolute; left: 10px; bottom: 10px; font: 700 13px var(--font); padding: 4px 8px; border-radius: 5px;
  background: rgba(5, 7, 10, .62); color: #fff; pointer-events: none; transition: opacity .3s;
}
.zs-mp.off { opacity: 0; }
.zs canvas { display: block; }
.zs-tag {
  position: absolute; top: 10px; font: 600 11px/1 var(--font); letter-spacing: .04em; padding: 5px 8px; border-radius: 5px;
  background: rgba(5, 7, 10, .62); color: #f3f4f6; pointer-events: none;
}
.zs-tag.l { left: 10px; } .zs-tag.r { right: 10px; }
.zs-cap {
  position: absolute; left: 6%; right: 6%; bottom: 2.5%; text-align: center; pointer-events: none;
  font: 500 clamp(19px, 2.6vw, 28px)/1.15 var(--hand); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
  opacity: 0; transition: opacity .5s;
}
.zs-cap.on { opacity: 1; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 4px 2px; }
.sbtn {
  font: 600 13px var(--font); color: var(--stage-fg); background: var(--stage-2); border: 1px solid var(--stage-line);
  padding: 7px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.sbtn:hover { border-color: var(--stage-muted); }
.sbtn.primary { background: #f3f4f6; color: #0b0f14; border-color: #f3f4f6; }
/* selected chips are outlined; only actions are solid */
.sbtn[aria-pressed="true"] { background: transparent; color: #fff; border-color: #f3f4f6; box-shadow: inset 0 0 0 1px #f3f4f6; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.stage :focus-visible { outline-color: #fdae61; }
.hud { flex: 1 1 220px; text-align: right; font: 12px/1.45 var(--mono); color: var(--stage-muted); font-variant-numeric: tabular-nums; }
.hud b { color: var(--stage-fg); font-weight: 500; }

/* ------------------------------------------------------------ TL;DR */
.tldr { padding-block: 0 80px; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.stat {
  display: grid; gap: 6px; align-content: start; padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s;
  grid-template-rows: auto 1fr auto;
}
.stat:hover { border-color: var(--accent); color: inherit; }
.stat .big { font-size: 30px; font-weight: 800; color: var(--fg); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .big small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.stat .go { font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 4px; }
.thesis { margin-top: 36px; text-align: center; font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; color: var(--fg); letter-spacing: -.01em; }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat p { display: none; }
  .stat .big { font-size: 21px; }
  .stat .big small { display: block; font-size: 12px; }
}

/* ------------------------------------------------------------ compare (Fig. 3 rebuilt) */
.cmp { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2.9fr); align-items: stretch; }
.cmp-h { font-size: 13px; font-weight: 700; color: var(--stage-fg); text-align: center; padding: 4px 2px 2px; line-height: 1.3; }
.cmp-h span { display: block; font-weight: 500; color: var(--stage-muted); font-size: 12px; }
.cmp-h.ours { color: #93c5fd; }
.tile { position: relative; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; background: #000; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .mp, .cmp-big .mp {
  position: absolute; right: 5px; bottom: 5px; font: 700 11px var(--font); color: #fff; background: rgba(5, 7, 10, .62);
  padding: 2px 6px; border-radius: 4px;
}
.tile .who { display: none; }
.tile .box, .cmp-big .box { position: absolute; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); pointer-events: none; }
.tile .box.dim, .cmp-big .box.dim { border-style: dashed; opacity: .55; }
.cmp-big { position: relative; grid-row: 2 / span 3; grid-column: 5; border-radius: 4px; overflow: hidden; background: #000; }
.cmp-big img { width: 100%; height: 100%; object-fit: cover; }
.tile.na, .cell.na-card {
  display: grid; place-items: center; text-align: center; padding: 10px; font-size: 12.5px; color: var(--stage-fg); line-height: 1.4;
  background: repeating-linear-gradient(135deg, #1a2230 0 8px, #0b0f14 8px 16px);
}
.cmp-mobile-bar { display: none; }
.cmp [data-mp="100"]:not(.cmp-big) { display: none; }
@media (max-width: 899px) {
  .cmp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp-h, .cmp-big { display: none; }
  .cmp .tile { display: none; }
  .cmp .tile.sel, .cmp [data-mp="100"].tile.sel { display: block; }
  .cmp .tile.na.sel { display: grid; }
  .tile .who {
    display: block; position: absolute; left: 5px; top: 5px; font: 600 11px var(--font); color: #fff;
    background: rgba(5, 7, 10, .62); padding: 2px 6px; border-radius: 4px;
  }
  .cmp-mobile-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
}

.closer { display: grid; gap: 12px; padding: 4px 2px 0; }
.cmp-wrap { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--stage-line); }
.cmp-title { color: var(--stage-fg); font-size: 15px; font-weight: 700; margin: 0 0 10px 2px; }
.closer-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.closer-head h3 { color: var(--stage-fg); font-size: 17px; font-weight: 700; margin-right: auto; }
.closer-head h3 span { font-weight: 400; color: var(--stage-muted); }
.toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--stage-fg); cursor: pointer; }
.toggle input { accent-color: #93c5fd; width: 15px; height: 15px; margin: 0; }
.closer-scroll { overflow-x: auto; }
.closer-grid {
  display: grid; gap: 6px; min-width: 640px;
  grid-template-columns: 88px repeat(4, minmax(0, 1fr));
}
.closer-grid .rh { align-self: center; font-size: 12.5px; font-weight: 700; color: var(--stage-fg); line-height: 1.3; }
.closer-grid .rh span { display: block; font-weight: 400; color: var(--stage-muted); font-size: 11.5px; }
.closer-grid .ch { text-align: center; font: 700 12.5px var(--font); color: var(--stage-fg); line-height: 1.3; }
.closer-grid .ch span { display: block; font-weight: 400; color: var(--stage-muted); font-size: 11.5px; }
.closer-grid .ch[data-col="ldpt"] { color: #93c5fd; }
.cell { position: relative; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: #000; }
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell .px {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font: 11px var(--mono); color: #e5e7eb;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75));
}
.cell .px b { font-weight: 600; display: none; }
@media (max-width: 720px) {
  .closer-grid { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .closer-grid .rh, .closer-grid .rh-h, .closer-grid [data-col="rgb"], .closer-grid [data-col="dav2"] { display: none; }
  .cell .px b { display: inline; }
}

/* ------------------------------------------------------------ scenes */
.scene-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.scene-tab {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: 600 13.5px var(--font); cursor: pointer; text-align: left;
}
.scene-tab img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.scene-tab small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.scene-tab[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
@media (max-width: 720px) {
  .scene-tabs { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px; }
  .scene-tabs::-webkit-scrollbar { display: none; }
  .scene-tab { flex: none; scroll-snap-align: start; }
}
.scene-body { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .scene-body { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; } }
.viewer { position: relative; margin: 0 auto; width: 100%; border-radius: 8px; overflow: hidden; background: #000; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.viewer { aspect-ratio: 4 / 3; }
.viewer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.viewer .divider { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.viewer .divider::after {
  content: "↔"; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: #0b0f14; display: grid; place-items: center; font-size: 15px;
}
.viewer .hot {
  position: absolute; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}
.viewer .hot::before { content: ""; position: absolute; inset: -8px; }
.viewer .hot[aria-pressed="true"] { border-color: #93c5fd; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 0 4px rgba(147, 197, 253, .4); }
.viewer .train {
  position: absolute; right: 2.5%; bottom: 2.5%; background: rgba(229, 231, 235, .38); border: 1px solid rgba(255, 255, 255, .55);
  pointer-events: none;
}
.viewer .train span {
  position: absolute; right: 115%; bottom: 0; white-space: nowrap; font: 500 17px/1 var(--hand); color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
}
.viewer .mpbadge { position: absolute; left: 10px; bottom: 9px; font: 700 13px var(--font); color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); pointer-events: none; }
.loupe { display: grid; gap: 12px; }
.loupe-pair { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.loupe-pair figure { margin: 0; display: grid; gap: 5px; }
.loupe-pair img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #000; }
.loupe-pair figcaption { font-size: 12px; color: var(--stage-muted); }
.loupe h3 { color: var(--stage-fg); font-size: 15px; }
.loupe p { font-size: 13px; color: var(--stage-muted); line-height: 1.55; }
.loupe .boxes { display: flex; gap: 6px; flex-wrap: wrap; }
/* what comes from the decoder design vs what the training data bounds */
.scope { margin-top: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 18px 20px; display: grid; gap: 12px; }
.scope h3 { font-size: 17px; }
.scope-cols { display: grid; gap: 14px 28px; }
.scope-cols > div { display: grid; gap: 4px; align-content: start; }
.scope-cols > div + div { border-top: 1px solid var(--line); padding-top: 14px; }
@media (min-width: 720px) {
  .scope-cols { grid-template-columns: 1fr 1fr; }
  .scope-cols > div + div { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 28px; }
}
.scope .k { font: 600 12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.scope-cols > div + div .k { color: var(--muted); }
.scope p { font-size: 14.5px; color: var(--text); }

/* ------------------------------------------------------------ efficiency */
.eff { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .eff { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.chart-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 16px 16px 10px; }
.chart-card svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 6px; }
.chart-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 2px 2px; font-size: 13px; color: var(--muted); }
.chart-controls input[type="range"] { flex: 1 1 200px; accent-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: 600 12.5px var(--font); padding: 5px 11px; border: 0; background: var(--bg); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.readout { display: grid; gap: 12px; }
.readout-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg); display: grid; gap: 10px; }
.readout-card h3 { font-size: 15px; }
.ro-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; font-size: 14px; align-items: baseline; font-variant-numeric: tabular-nums; }
.ro-row .k { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ro-row .m { display: flex; align-items: center; gap: 7px; }
.ro-row .m i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.ro-ratio { font-size: 13.5px; color: var(--fg); font-weight: 600; }
.provisional {
  display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--warn-fg); background: var(--warn-bg);
  border: 1px solid var(--warn-line); padding: 3px 9px; border-radius: 999px;
}
.axis text { fill: var(--muted); font: 11px var(--font); }
.axis line, .axis path { stroke: var(--line); }
.axis-title { fill: var(--muted); font: 600 11.5px var(--font); }
.gridline { stroke: var(--line); stroke-width: 1; }
.ann { fill: var(--muted); font: 11px var(--font); }
.ann-strong { fill: var(--fg); font: 600 11.5px var(--font); }

/* ------------------------------------------------------------ method */
.method-toggle { margin-bottom: 14px; }
.diagram-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 18px; overflow-x: auto; }
.diagram-card svg { width: 100%; min-width: 760px; height: auto; display: block; }
.dg text { font: 12.5px var(--font); fill: var(--text); }
.dg .t-strong { font-weight: 700; fill: var(--fg); }
.dg .t-muted { fill: var(--muted); font-size: 11.5px; }
.dg .box { fill: var(--bg-alt); stroke: var(--line); stroke-width: 1.2; }
.dg .box-acc { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.dg .attn { fill: #e2efd9; stroke: #6c9a50; stroke-width: 1; }
.dg .sel { fill: #dbe7f8; stroke: #2f5597; stroke-width: 1; }
.dg .arrow { stroke: var(--muted); stroke-width: 1.4; fill: none; }
.dg .grow { fill: var(--dpt-bar); stroke: var(--dpt-line); stroke-width: 1; opacity: .85; }
.dg .ah { fill: var(--muted); }
:root[data-theme="dark"] .dg .attn, :root[data-theme="dark"] .dg .sel { fill-opacity: .25; }
/* the diagrams build up left to right the first time they are seen and when toggled (js/method.js adds .anim / .play) */
.dg.anim .st { opacity: 0; }
.dg.anim.play .st { animation: dg-in .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 120ms); }
.dg.anim.play .draw { stroke-dasharray: 1; animation: dg-draw .6s ease-out both; animation-delay: calc(var(--i) * 120ms); }
.dg.anim.play .long .draw { animation-duration: 1.25s; }  /* the latent stream reaches each stage as its blocks arrive */
@keyframes dg-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes dg-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dg .attn, :root:not([data-theme="light"]) .dg .sel { fill-opacity: .25; } }
.cards3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 18px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--bg); display: grid; gap: 8px; align-content: start; }
.card h3 { font-size: 16px; }
.card p { font-size: 14.5px; color: var(--text); }
.card .k { font: 600 12px var(--font); color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.recipe { margin-top: 28px; display: grid; gap: 12px; }
.recipe > h3 { font-size: 18px; }
.recipe-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.recipe-card svg.rx { width: 100%; max-width: 360px; height: auto; display: block; margin: 2px 0 6px; }
.rx text { font: 11px var(--font); fill: var(--text); }
.rx .rx-tick { fill: var(--muted); }
.rx-sky { fill: var(--bg-alt); }
.rx-crop { fill: none; stroke: var(--fg); stroke-width: 1.2; stroke-dasharray: 4 3; }
.rx-frame { fill: var(--bg-alt); stroke: var(--line); }
.rx-dot { fill: var(--accent); }
.rx-axis, .rx-arrow { stroke: var(--muted); stroke-width: 1.2; fill: none; }
.rx-ahp { fill: var(--muted); }
/* drawn inside <use>, so plain colours that read on both themes */
.rx-leaf { fill: #6c9a50; } .rx-leaf2 { fill: #87b26a; } .rx-trunk { fill: #8b6b4a; } .rx-sun { fill: #fdae61; }
.rx-ground { stroke: #9ca3af; stroke-width: 2; }
.sub-h { font-size: 18px; margin-bottom: 12px; }
.two { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); margin-top: 28px; }
.abl { display: grid; gap: 10px; }
.abl-row { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 13.5px; }
.abl-row .bar { height: 10px; border-radius: 3px; background: var(--line); position: relative; }
.abl-row .bar span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--muted); }
.abl-row.best .bar span { background: var(--accent); }
.abl-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 600; }

/* ------------------------------------------------------------ tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-alt); }
tbody tr:last-child td { border-bottom: 0; }
tr.grp td { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-alt); letter-spacing: .02em; }
tr.ours td { background: var(--accent-soft); }
tr.ours td:first-child { font-weight: 700; color: var(--fg); }
td.best { font-weight: 800; color: var(--fg); }
td .cost { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; width: 100%; }
td .cost i { display: inline-block; height: 8px; border-radius: 2px; background: var(--muted); opacity: .55; }
tr.ours td .cost i { background: var(--accent); opacity: 1; }
.frz { font-size: 11px; color: var(--muted); margin-left: 3px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.tab { font: 600 14px var(--font); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.tabs-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.tabs-row .tabs { margin-bottom: 0; }
.tabs-row .seg { margin-left: auto; }
@media (max-width: 720px) {
  #t-depth th:nth-child(2), #t-depth td:nth-child(2) { display: none; }
  #t-depth td:first-child, #t-depth th:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); }
  #t-depth tr.ours td:first-child { background: var(--accent-soft); }
  #t-depth tr.grp td:first-child { position: static; }
}
.panel-note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ------------------------------------------------------------ release + cite */
.release { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rel { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--bg); display: grid; gap: 8px; align-content: start; color: inherit; text-decoration: none; }
a.rel[href]:hover { border-color: var(--accent); color: inherit; }
.rel h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.rel p { font-size: 14px; color: var(--muted); }
.status { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.status.live { background: #dcfce7; color: #166534; }
.zoo { margin-top: 18px; }
.gate { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.cite { position: relative; }
.cite pre {
  margin: 0; padding: 20px; border-radius: 12px; background: var(--stage); color: #e5e7eb; font-size: 13.5px; line-height: 1.6; overflow-x: auto;
}
.copy-btn { position: absolute; top: 10px; right: 10px; }
.copy-btn.sbtn { padding: 5px 11px; font-size: 12px; }

footer { background: var(--footer); color: var(--footer-fg); padding-block: 28px; font-size: 14px; }
footer .wrap { display: grid; gap: 18px; }
footer p { color: #cbd5e1; max-width: 90ch; line-height: 1.6; }
footer a { color: #93c5fd; }
footer .fine { font-size: 12.5px; color: #94a3b8; }

/* chart series (efficiency) */
.s-dpt-bar { fill: var(--dpt-bar); }
.s-ldpt-bar { fill: var(--ldpt-bar); }
.s-dpt-line { stroke: var(--dpt-line); stroke-width: 2; }
.s-ldpt-line { stroke: var(--ldpt-line); stroke-width: 2; }
.s-dpt-dot { fill: var(--bg); stroke: var(--dpt-line); stroke-width: 2; }
.s-ldpt-dot { fill: var(--bg); stroke: var(--ldpt-line); stroke-width: 2; }
.cursor { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; }
