:root {
  --bg: #0b0d12;
  --bg-2: #11141b;
  --card: #151922;
  --line: #262c38;
  --line-2: #323a4a;
  --ink: #e9ecf2;
  --ink-2: #aab2c2;
  --ink-3: #727b8e;
  --accent: #7cc4ff;
  --accent-ink: #06121f;
  --good: #5fd39a;
  --r: #ff5a5f;
  --g: #3ddc84;
  --b: #4d7cff;
  --m1: #8fa3bf; --m2: #4fd1d9; --m3: #c9ced8; --m4: #ffcc4d; --m5: #b48cff;
  --radius: 11.9px;
  /* same stack as eigendexplore.github.io: SF Pro where available, Inter otherwise. All px sizes are 0.85x of the original design (page zoomed out to 85%). */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Avenir Next", Inter, system-ui, sans-serif;
  --serif: var(--sans);
  --mono: var(--sans);
  --code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f9; --bg-2: #eef0f4; --card: #ffffff; --line: #dde1e8; --line-2: #c9cfd9;
    --ink: #121722; --ink-2: #48536a; --ink-3: #7a8396; --accent: #1f6fd1; --accent-ink: #fff; --good: #138a55;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13.6px/1.55 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
code { font: 11.1px var(--code); background: var(--bg-2); padding: 1px 4.2px; border-radius: 4.2px; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.15; }
[hidden] { display: none !important; }

/* ambient RGB glow — the three LED colours of a GelSight sensor */
.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glow span { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(76.5px); opacity: .13; animation: drift 26s ease-in-out infinite alternate; }
.g-r { background: var(--r); left: -12vmax; top: -10vmax; }
.g-g { background: var(--g); right: -14vmax; top: 18vmax; animation-delay: -9s !important; }
.g-b { background: var(--b); left: 22vmax; bottom: -22vmax; animation-delay: -17s !important; }
@keyframes drift { to { transform: translate(6vmax, -5vmax) scale(1.12); } }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .glow span { opacity: .08; } }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 13.6px;
  padding: 10.2px max(13.6px, calc((100vw - 1020px) / 2)); backdrop-filter: blur(11.9px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-weight: 600; display: flex; align-items: center; gap: 8.5px; letter-spacing: -.01em; }
.brand-dot { width: 11.9px; height: 11.9px; border-radius: 50%; background: conic-gradient(var(--r), var(--g), var(--b), var(--r)); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.topbar nav { display: flex; gap: 18.7px; }
.topbar nav a { color: var(--ink-2); font-size: 11.9px; }
.topbar nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .topbar nav { display: none; } }

main { max-width: 1020px; margin: 0 auto; padding: 0 13.6px; }
.section { padding: 81.6px 0 20.4px; }
.eyebrow { font: 650 10.2px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10.2px; }
.section-head { max-width: 646px; margin-bottom: 30.6px; }
.section-head h2 { font: 700 clamp(23.8px, 3.2vw, 34px)/1.1 var(--sans); letter-spacing: -.02em; margin-bottom: 11.9px; }
.section-head p { color: var(--ink-2); margin: 0; }
.ref { font: 10.2px var(--mono); color: var(--ink-3); white-space: nowrap; }
.fine { font-size: 10.6px; color: var(--ink-3); margin: 6.8px 0 0; line-height: 1.5; }
.tag { font: 500 8.9px var(--mono); letter-spacing: .04em; padding: 2px 5.9px; border-radius: 84.2px; border: 1px solid var(--line-2); color: var(--ink-2); vertical-align: 2px; white-space: nowrap; }
.tag.new { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6.8px; padding: 9.4px 15.3px; border-radius: 849.2px; border: 1px solid var(--line-2); color: var(--ink); background: var(--card); font: 500 11.9px var(--sans); cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.btn:hover { transform: translateY(-1px); border-color: var(--ink-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5.1px 10.2px; font-size: 11.1px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 47.6px; align-items: center; min-height: calc(100vh - 51px); padding: 40.8px 0; }
.hero h1 { font: 700 clamp(30.6px, 4.6vw, 49.3px)/1.06 var(--sans); letter-spacing: -.025em; margin-bottom: 18.7px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--r), var(--g) 50%, var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--ink-2); font-size: 14.4px; max-width: 476px; }
.authors { color: var(--ink); font-size: 11.9px; margin: 18.7px 0; }
.authors span { display: block; color: var(--ink-3); font-size: 10.6px; margin-top: 3.4px; }
.cta { display: flex; gap: 10.2px; flex-wrap: wrap; }
.hero-sensor { margin: 0; }
.hero-sensor figcaption { color: var(--ink-3); font-size: 10.6px; margin-top: 10.2px; }
.press-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 25.5px 68px -30px #000, 0 0 0 5.1px color-mix(in srgb, var(--card) 70%, transparent); aspect-ratio: 648/486; background: #000; }
.press-frame .layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.press-frame .press { opacity: 0; transition: opacity .55s ease; }
.press-frame.pressed .press { opacity: 1; }
.ripple { position: absolute; left: 50%; top: 50%; width: 10.2px; height: 10.2px; margin: -6px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); opacity: 0; pointer-events: none; }
.press-frame.pressed .ripple { animation: ripple 1.2s ease-out; }
@keyframes ripple { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(9); opacity: 0; } }
.hud { position: absolute; left: 10.2px; top: 8.5px; font: 9.4px var(--mono); color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 5.9px; text-shadow: 0 1px 2px #000; }
.rec { width: 5.9px; height: 5.9px; border-radius: 50%; background: #ff4d4d; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: 0; gap: 27.2px; } }

/* modules */
.modules { list-style: none; padding: 0; margin: 0 0 47.6px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10.2px; counter-reset: m; }
.modules li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15.3px 13.6px 13.6px; overflow: hidden; counter-increment: m; }
.modules li::before { content: "0" counter(m); font: 9.4px var(--mono); color: var(--ink-3); display: block; margin-bottom: 8.5px; }
.modules li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2.5px; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s); }
.modules.in li::after { transform: scaleX(1); }
.modules b { display: block; margin-bottom: 5.1px; }
.modules span { color: var(--ink-2); font-size: 11.1px; line-height: 1.45; display: block; }
@media (max-width: 900px) { .modules { grid-template-columns: 1fr 1fr; } }

.eq { font: 11.9px var(--code); color: var(--ink) !important; background: var(--bg-2); padding: 8.5px 11.9px; border-radius: 8.5px; overflow-x: auto; }

.objectives { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10.2px; }
.objectives article { border-top: 1px solid var(--line-2); padding-top: 11.9px; }
.objectives h4 { font-size: 12.8px; margin-bottom: 5.1px; }
.objectives p { color: var(--ink-2); font-size: 11.5px; margin: 0; }
@media (max-width: 900px) { .objectives { grid-template-columns: 1fr 1fr; } }

/* viewers */
.viewer { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); background: radial-gradient(120% 90% at 50% 20%, var(--bg-2), var(--bg)); border: 1px solid var(--line); overflow: hidden; touch-action: none; }
.viewer.small { aspect-ratio: 16/10; }
.viewer canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-hint { position: absolute; left: 8.5px; bottom: 6.8px; font: 8.9px var(--mono); color: var(--ink-3); pointer-events: none; z-index: 1; }
.mini-switch { position: absolute; right: 8.5px; bottom: 6.8px; z-index: 1; font-size: 9.4px !important; }
.mini-seg { position: absolute; right: 6.8px; top: 6.8px; z-index: 1; }

/* tabs */
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6.8px; margin-bottom: 17px; }
.tabs button { text-align: left; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); border-radius: 10.2px; padding: 10.2px 13.6px; font: 600 12.8px var(--sans); cursor: pointer; transition: border-color .2s, color .2s, transform .2s; position: relative; overflow: hidden; }
.tabs button small { display: block; font: 500 8.9px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); animation: grow .4s ease; }
@keyframes grow { from { transform: scaleX(0); } }
@media (max-width: 960px) { .tabs { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 720px) { .tabs { grid-template-columns: 1fr 1fr; } }
.tabs button em { display: block; font-style: normal; font-weight: 500; font-size: 9.8px; color: var(--ink-3); margin-top: 2px; }
.tabs .tab-custom { background: linear-gradient(135deg, color-mix(in srgb, var(--r) 10%, var(--card)), color-mix(in srgb, var(--b) 12%, var(--card))); }

.panel { animation: panelIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(8.5px); } }
.panel-lede { color: var(--ink-2); max-width: 731px; margin: 0 0 15.3px; }
.steps { display: flex; gap: 6.8px; flex-wrap: wrap; margin-bottom: 13.6px; }
.steps button { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); border-radius: 849.2px; padding: 5.9px 11.9px; font: 500 11.1px var(--sans); cursor: pointer; }
.steps button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.lab { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 17px; align-items: start; }
@media (max-width: 960px) { .lab { grid-template-columns: 1fr; } }
.stage { position: sticky; top: 64.6px; }
@media (max-width: 960px) { .stage { position: static; } }
.frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line-2); }
.frame.tall { max-height: 74vh; margin: 0 auto; }
.xfade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.frame .badge { position: absolute; left: 8.5px; top: 8.5px; font: 9.4px var(--mono); padding: 2.5px 6.8px; border-radius: 5.1px; background: rgba(0,0,0,.55); color: #fff; z-index: 3; backdrop-filter: blur(3.4px); }
.frame .spinner { position: absolute; right: 8.5px; top: 8.5px; width: 11.9px; height: 11.9px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .7s linear infinite; z-index: 3; opacity: 0; transition: opacity .2s; }
.frame.loading .spinner { opacity: 1; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 10.2px; flex-wrap: wrap; margin-top: 8.5px; }

.controls { display: flex; flex-direction: column; gap: 11.9px; min-width: 0; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 11.9px; }
.group h5 { font: 600 11.1px var(--sans); margin-bottom: 8.5px; display: flex; justify-content: space-between; gap: 6.8px; align-items: baseline; }
.hint { font: 400 9.4px var(--mono); color: var(--ink-3); }

/* segmented + switches + sliders */
.seg { display: inline-flex; flex-wrap: wrap; gap: 3.4px; background: var(--bg-2); padding: 2.5px; border-radius: 8.5px; border: 1px solid var(--line); align-items: center; }
.seg.wide { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: 500 11.1px var(--sans); padding: 5.9px 8.5px; border-radius: 5.9px; cursor: pointer; transition: background .2s, color .2s; line-height: 1.25; }
.seg button small { display: block; font-size: 8.9px; color: var(--ink-3); font-weight: 400; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 0 var(--line-2), 0 2px 6.8px rgba(0,0,0,.25); }
.seg-label { font: 8.9px var(--mono); color: var(--ink-3); padding: 0 5.1px; }
#beltVariant { margin-top: 6.8px; }
.row-ctl { display: flex; gap: 6.8px; flex-wrap: wrap; margin-top: 6.8px; }

.switch { display: inline-flex; align-items: center; gap: 7.7px; font-size: 11.1px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch span { width: 27.2px; height: 15.3px; border-radius: 84.2px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11.9px; height: 11.9px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(11.9px); }

.ctl { display: flex; align-items: center; gap: 10.2px; font: 10.2px var(--mono); color: var(--ink-3); }
.ctl input[type=range] { flex: 1; min-width: 0; }
.ctl output { font: 500 11.1px var(--mono); color: var(--ink); min-width: 54.4px; text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 18.7px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3.4px; border-radius: 3.4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line-2) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 3.4px; border-radius: 3.4px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 3.4px; border-radius: 3.4px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15.3px; height: 15.3px; border-radius: 50%; background: #fff; margin-top: -7px; box-shadow: 0 0 0 3.4px color-mix(in srgb, var(--accent) 35%, transparent); transition: box-shadow .15s; }
input[type=range]::-moz-range-thumb { width: 15.3px; height: 15.3px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3.4px color-mix(in srgb, var(--accent) 35%, transparent); }
input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 6.8px color-mix(in srgb, var(--accent) 30%, transparent); }

/* press grid (GelBelt) */
.press-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6.8px; width: 127.5px; margin: 2px auto 10.2px; aspect-ratio: 400/510; padding: 15.3px 11.9px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8.5px; }
.press-grid button { border: 0; border-radius: 50%; aspect-ratio: 1; align-self: center; background: var(--line-2); cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.press-grid button:hover { transform: scale(1.15); }
.press-grid button.on { background: var(--accent); box-shadow: 0 0 0 4.2px color-mix(in srgb, var(--accent) 25%, transparent); }

/* charts */
.charts { display: grid; gap: 8.5px; }
.chart { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10.2px 10.2px 5.1px; position: relative; }
.chart h6 { margin: 0 0 3.4px; font: 600 10.6px var(--sans); color: var(--ink); display: flex; justify-content: space-between; }
.chart h6 span { font: 400 9.4px var(--mono); color: var(--ink-3); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--ink-3); font: 8.5px var(--mono); }
.chart .band { fill: var(--accent); opacity: .1; }
.chart .band-label { fill: var(--ink-3); font: 8.5px var(--mono); }
.chart .series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.chart .cur-g { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.chart .cur { fill: var(--card); stroke: var(--ink); stroke-width: 2.5; transition: cy .35s cubic-bezier(.2,.7,.2,1); }
.chart .cur-line { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; cursor: pointer; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font: 9.4px var(--mono); padding: 3.4px 6.8px; border-radius: 5.1px; transform: translate(-50%, -130%); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 4; }
.chart-note { font: 8.9px var(--sans); color: var(--ink-3); margin: 2px 0 3.4px; }

/* G360 light designer */
.light-designer { display: grid; grid-template-columns: 127.5px 1fr; gap: 11.9px; align-items: center; }
#g360Wheel { width: 127.5px; height: 127.5px; }
#g360Wheel .ring { fill: none; stroke: var(--ink-3); stroke-width: 3; }
#g360Wheel .arm { cursor: pointer; }
#g360Wheel .arm line { stroke-width: 7; stroke-linecap: round; transition: stroke .3s; }
#g360Wheel .arm .hit { stroke: transparent; stroke-width: 34; }
#g360Wheel .arm:hover line:not(.hit) { filter: brightness(1.3); }
#g360Wheel .lg { font: 8.5px var(--mono); fill: var(--ink-3); }
.code { font: 600 15.3px var(--code); letter-spacing: .12em; margin: 5.1px 0 8.5px; }
.code b { font-weight: 500; }
.code .R { color: var(--r); } .code .G { color: var(--g); } .code .B { color: var(--b); }
.chips { display: flex; flex-wrap: wrap; gap: 5.1px; margin-bottom: 8.5px; }
.chips button { font: 9.4px var(--code); padding: 3.4px 6.8px; border-radius: 84.2px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; }
.chips button.on { border-color: var(--accent); color: var(--ink); }
.scores table { width: 100%; border-collapse: collapse; font: 10.2px var(--mono); }
.scores th { text-align: left; color: var(--ink-3); font-weight: 400; padding: 3.4px 5.1px; border-bottom: 1px solid var(--line); }
.scores td { padding: 4.2px 5.1px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.scores tr.on td { color: var(--ink); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.scores tr td:first-child { letter-spacing: .08em; font-family: var(--code); }
.scores .best { color: var(--good); }

/* Svelte wipe */
.wipe { cursor: ew-resize; user-select: none; }
.wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wipe-top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x, 50%)); }
.wipe-handle { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; background: #fff; box-shadow: 0 0 10.2px rgba(0,0,0,.6); }
.wipe-handle span { position: absolute; top: 50%; left: 50%; width: 28.9px; height: 28.9px; margin: -17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8.5px rgba(0,0,0,.4); }
.wipe-handle span::before { content: "⟷"; color: #111; font-size: 15.3px; position: absolute; inset: 0; display: grid; place-items: center; }
.corner { position: absolute; top: 8.5px; font: 9.4px var(--mono); padding: 2.5px 6.8px; border-radius: 5.1px; background: rgba(0,0,0,.55); color: #fff; }
.corner.l { left: 8.5px; } .corner.r { right: 8.5px; }
.loupe { position: absolute; width: 127.5px; height: 127.5px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 6.8px 25.5px rgba(0,0,0,.6); pointer-events: none; opacity: 0; transition: opacity .15s; background-repeat: no-repeat; transform: translate(-50%, -50%); }
.wipe:hover .loupe { opacity: 1; }
@media (hover: none) { .loupe { display: none; } }
.aoap-row { display: flex; align-items: center; gap: 15.3px; }
.aoap-row div { display: flex; flex-direction: column; }
.aoap-row b { font: 700 27.2px/1 var(--sans); letter-spacing: -.02em; }
.aoap-row b.good { color: var(--good); }
.aoap-row small { color: var(--ink-3); font-size: 10.2px; }
.aoap-row .arrow { color: var(--ink-3); font-size: 18.7px; }

/* beyond */
.beyond-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 17px; }
@media (max-width: 960px) { .beyond-grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 17px; padding: 18.7px; }
.card h3 { font: 700 17px var(--sans); letter-spacing: -.015em; margin-bottom: 11.9px; }
.card .ctl { margin-top: 10.2px; }
.tilt { display: grid; grid-template-columns: 1fr 170px; gap: 15.3px; align-items: center; }
@media (max-width: 560px) { .tilt { grid-template-columns: 1fr; } }
.pad { position: relative; width: 127.5px; height: 127.5px; border-radius: 13.6px; background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0/21.2px 21.2px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0/21.2px 21.2px, var(--bg-2);
  border: 1px solid var(--line-2); cursor: crosshair; touch-action: none; }
.pad .knob { position: absolute; left: 50%; top: 50%; width: 18.7px; height: 18.7px; margin: -11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5.1px color-mix(in srgb, var(--accent) 25%, transparent); pointer-events: none; transition: left .08s, top .08s; }
.pad .ax { position: absolute; font: 8.5px var(--mono); color: var(--ink-3); font-style: normal; }
.pad .ax.x { right: 5.1px; bottom: 3.4px; } .pad .ax.y { left: 5.1px; top: 3.4px; }
#tiltSpec { margin-top: 3.4px; }

/* sources */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.sources { width: 100%; border-collapse: collapse; font-size: 11.1px; min-width: 646px; }
.sources th { text-align: left; font: 500 9.4px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 10.2px 11.9px; border-bottom: 1px solid var(--line); }
.sources td { padding: 9.4px 11.9px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.sources td:first-child { font: 500 10.2px var(--mono); color: var(--ink); white-space: nowrap; }
.sources td:nth-child(3), .sources td:nth-child(4) { font: 10.2px var(--code); word-break: break-word; }
.sources small { color: var(--ink-3); }
.sources tr:last-child td { border-bottom: 0; }
.cite { margin-top: 30.6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15.3px; }
.cite-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8.5px; }
.cite h3 { font: 700 15.3px var(--sans); }
.cite pre { margin: 0; font: 10.6px/1.6 var(--code); color: var(--ink-2); overflow-x: auto; }
footer { text-align: center; color: var(--ink-3); font-size: 10.2px; padding: 54.4px 13.6px 34px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(15.3px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(11.9px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}

/* panel headers with metric chips */
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8.5px 13.6px; margin-bottom: 6.8px; }
.panel-head h3 { font: 700 18.7px/1.2 var(--sans); letter-spacing: -.015em; }
.metric-chips { display: flex; flex-wrap: wrap; gap: 5.1px; align-items: center; }
.metric-chips [data-metric] { font: 600 10.6px var(--sans); padding: 3.4px 9.4px; border-radius: 849.2px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); cursor: help; }
[data-metric] { cursor: help; }
.objectives article[data-metric] { transition: border-color .2s; }
.objectives article[data-metric]:hover { border-color: var(--accent); }
.info { display: inline-grid; place-items: center; width: 12.8px; height: 12.8px; border-radius: 50%; border: 1px solid var(--ink-3); color: var(--ink-3); font: 600 8.5px var(--sans); font-style: normal; vertical-align: 2px; margin-left: 3.4px; }
.chart h6 [data-metric] { border-bottom: 1px dotted var(--ink-3); }
.aoap h5 [data-metric] { border-bottom: 1px dotted var(--ink-3); }

/* metric popover */
.metric-pop { position: fixed; z-index: 50; width: min(408px, calc(100vw - 27.2px)); background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-radius: 13.6px; padding: 13.6px 15.3px;
  box-shadow: 0 20.4px 51px -20px rgba(0,0,0,.55); opacity: 0; transform: translateY(5.1px); pointer-events: none; transition: opacity .16s, transform .16s; max-height: calc(100vh - 20.4px); overflow-y: auto; }
.metric-pop.on { opacity: 1; transform: none; pointer-events: auto; }
.metric-pop h6 { margin: 0 0 2px; font: 700 12.8px var(--sans); }
.metric-pop .sub { color: var(--ink-3); font-size: 10.2px; margin: 0 0 8.5px; }
.metric-pop p { font-size: 11.1px; color: var(--ink-2); margin: 0 0 6.8px; line-height: 1.5; }
.metric-pop .math { background: var(--bg-2); border-radius: 8.5px; padding: 8.5px 10.2px; margin: 5.1px 0 8.5px; overflow-x: auto; font-size: 11.9px; }
.metric-pop .meta { display: flex; gap: 11.9px; flex-wrap: wrap; font-size: 10.2px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 6.8px; }
.metric-pop .meta b { color: var(--ink); font-weight: 600; }

/* Mini coating swatch */
.swatch { position: relative; aspect-ratio: 480/300; border-radius: 8.5px; overflow: hidden; margin-top: 8.5px; background: #111; }

/* live renderer status */
.live-pill { display: inline-flex; align-items: center; gap: 6.8px; font: 600 10.2px var(--sans); padding: 4.2px 10.2px; border-radius: 849.2px; border: 1px solid var(--line-2); color: var(--ink-2); }
.live-pill i { width: 6.8px; height: 6.8px; border-radius: 50%; background: var(--ink-3); }
.live-pill.on i { background: var(--good); box-shadow: 0 0 0 3.4px color-mix(in srgb, var(--good) 25%, transparent); animation: blink 1.6s infinite; }
.live-pill.off i { background: #e0a030; }
.dot { display: inline-block; width: 7.7px; height: 7.7px; border-radius: 50%; margin-right: 5.1px; vertical-align: 0; }
.dot.R { background: var(--r); } .dot.G { background: var(--g); } .dot.B { background: var(--b); }
.scale-note { display: flex; justify-content: space-between; margin: -2px 0 5.1px 44.2px !important; font-size: 9.4px !important; }
.row-label { font-size: 10.2px; color: var(--ink-3); margin: 6.8px 0 5.1px; }
.seg.sub { margin-top: 6.8px; }
.group .ctl + .ctl, .group .seg + .ctl, .group .ctl + .seg { margin-top: 5.1px; }
.group .btn.small { margin-top: 6.8px; }
.ctl > span:first-child { min-width: 54.4px; }
.frame.stale::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 2; }
.frame .render-note { position: absolute; left: 50%; bottom: 10.2px; transform: translateX(-50%); z-index: 3; font-size: 10.2px; color: #fff; background: rgba(0,0,0,.6); padding: 3.4px 8.5px; border-radius: 84.2px; white-space: nowrap; }

.ctl.off { opacity: .4; }
.ctl.off input { cursor: not-allowed; }

/* hero: paper title first, tagline second */
.hero h1.paper-title { font: 700 clamp(25.5px, 3.6vw, 39.1px)/1.1 var(--sans); letter-spacing: -.025em; margin-bottom: 11.9px; }
.tagline { font: 650 clamp(15.3px, 1.8vw, 18.7px)/1.3 var(--sans); letter-spacing: -.01em; margin: 0 0 15.3px; color: var(--ink); }
.tagline em { font-style: normal; background: linear-gradient(90deg, var(--r), var(--g) 50%, var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.swatch { aspect-ratio: 1; max-width: 187px; margin: 10.2px auto 0; background: radial-gradient(circle at 50% 40%, #3a3f4a, #1b1e25 70%); border-radius: 11.9px; }
.swatch img { object-fit: contain !important; }

.bgsub-toggle { margin-top: 11.9px; }
.bgsub-toggle small { color: var(--ink-3); margin-left: 3.4px; }

/* custom sensor: browser path tracer + Cycles reference */
#customImg canvas.pt-canvas, #customImg img.pt-diff { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#customImg img.pt-diff { z-index: 1; }
#customImg .badge { z-index: 3; }
.cycles-ref { display: grid; grid-template-columns: 153px 1fr; gap: 11.9px; align-items: start; margin-top: 10.2px; padding: 10.2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.cycles-ref h6 { margin: 0 0 2px; font: 650 11.1px var(--sans); }
.cycles-ref .fine { margin-top: 3.4px; }
#customCycles img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#customCycles.stale img { opacity: .45; }
@media (max-width: 560px) { .cycles-ref { grid-template-columns: 1fr; } }

.seg.wide.wrap { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
#customControls .seg + .row-label { margin-top: 8.5px; }

#g360Wheel .arm path.base { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke .3s; }

/* build your own: render with a smaller 3D preview under it, parameters on the right */

/* background-subtraction switch above every tactile image (all switches stay in sync) */
.img-tools { display: flex; align-items: center; justify-content: space-between; gap: 8.5px; flex-wrap: wrap; margin-bottom: 6.8px; }
.img-tools .hint { font-size: 9.8px; }
.frame.tall { margin-top: 0; }
.bgsub-scale button { font-size: 9.8px; padding: 3.4px 7.7px; }
.bgsub-scale.off { opacity: .45; pointer-events: none; }
.custom-left figure { margin: 0; }
.custom-left figcaption { font-size: 10.6px; color: var(--ink-3); margin-top: 5.1px; }
/* tilt demo: image takes the full card width, controls in a row underneath */
.tilt { grid-template-columns: 1fr !important; }
.tilt-ctl { display: flex; align-items: center; gap: 15.3px; flex-wrap: wrap; }
.tilt-ctl .code { margin: 0; }


/* build your own: switch row over the render; render + 3D preview (same size) on the left, compact parameters beside */
.custom-layout { display: grid; grid-template-columns: 460px minmax(0, 1fr); grid-template-areas: "tools ." "left params"; column-gap: 18px; align-items: start; }
.custom-layout > .img-tools { grid-area: tools; }
.custom-left { grid-area: left; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 64px; }
.custom-left .frame, .custom-left .viewer { width: 100%; aspect-ratio: 4/3; margin: 0; }
.custom-params { grid-area: params; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; align-items: start; }
.custom-params .param-col { display: flex; flex-direction: column; gap: 9px; }
.custom-params .group { padding: 10px 11px; }
.custom-params .group h5 { margin-bottom: 7px; }
.custom-params .row-label { margin: 6px 0 4px; }
.custom-params .seg button { padding: 5px 6px; font-size: 11.5px; }
.custom-params .seg.wide.vertical { grid-template-columns: 1fr; grid-auto-flow: row; }
@media (max-width: 960px) {
  .custom-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tools" "left" "params"; }
    .custom-left { position: static; }
}
@media (max-width: 560px) { .custom-params { grid-template-columns: minmax(0, 1fr); } }
/* tilt card: same spacing under the background-subtraction row as the radius card */
.tilt { row-gap: 0 !important; }
.tilt > .img-tools { margin-bottom: 6.8px; }
.tilt > .tilt-ctl { margin-top: 13.6px; }
.tilt-readout { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.topbar nav a.nav-paper { color: var(--accent); font-weight: 600; }
