/* Cosmic Ray Detector v2 — landing page */
:root {
  /* "Stardust Notebook" — same tokens as accel-kitchen2026/assets/style.css */
  --bg: #FAF6EB;
  --bg2: #F2EBD9;
  --bg3: #FFFDF7;
  --ink: #2A2730;
  --ink2: #4F4956;
  --muted: #6E6776;
  --dim: #8A8391;
  --line: rgba(42, 39, 48, 0.12);
  --line2: rgba(42, 39, 48, 0.22);
  --amber: #C8654E;      /* coral: the accent for actions and numbers */
  --amber2: #A84A37;
  --blue: #7C65A6;       /* mauve */
  --cyan: #2E8BA0;       /* signal-2: only for things that are live or measured */
  --green: #3F8A5C;
  --red: #C8654E;
  --rose: #D77A95;
  --rose2: #B4546F;
  --signal: #5CD6EA;
  --night: #171630;
  --night2: #24224A;
  --nk: #E9E6F0;
  --nk2: #A9A3BC;
  --glass: #FFFDF7;
  --radius: 14px;
  --f-jp: "Noto Sans JP", system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --f-disp: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --f-en: "Fraunces", var(--f-jp);
  --f-hand: "Klee One", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --nav-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-jp); font-size: 16px; line-height: 1.8; letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img, svg, canvas { display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--f-mono); font-size: 0.86em; background: rgba(255, 255, 255, 0.07); padding: 1px 6px; border-radius: 5px; }
sub { font-size: 0.7em; }
::selection { background: rgba(255, 181, 77, 0.35); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ fixed layers */
#stars, #gl { position: fixed; inset: 0; width: 100%; height: 100%; }
#stars { z-index: 0; pointer-events: none; }
#gl { z-index: 1; pointer-events: none; transition: opacity 0.8s ease; outline: none; }
#gl.interactive { pointer-events: auto; cursor: grab; touch-action: none; }
#gl.interactive:active { cursor: grabbing; }
#gl-ui { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
#gl-tip {
  position: fixed; z-index: 60; pointer-events: none; display: none;
  background: rgba(8, 11, 18, 0.92); border: 1px solid var(--line2); color: var(--ink);
  font: 500 12px/1.4 var(--f-mono); padding: 5px 9px; border-radius: 8px; white-space: nowrap;
}
body.gl-off #gl, body.gl-off #stars, body.gl-off #gl-ui { opacity: 0; }

.pin { position: absolute; left: 0; top: 0; will-change: transform; }
.pin i {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 0 rgba(255, 181, 77, 0.6); animation: ping 1.8s infinite;
}
.pin span {
  position: absolute; left: 14px; bottom: 10px; white-space: nowrap;
  font: 500 12px/1.3 var(--f-mono); color: var(--ink); letter-spacing: 0.02em;
  background: rgba(8, 11, 18, 0.86); border: 1px solid rgba(255, 181, 77, 0.45);
  padding: 4px 9px; border-radius: 7px; backdrop-filter: blur(6px);
}
.pin span::before { content: ""; position: absolute; left: -10px; bottom: -6px; width: 12px; height: 1px; background: rgba(255, 181, 77, 0.6); transform: rotate(-38deg); transform-origin: right; }
.pin b { color: var(--amber); font-weight: 700; }
.pin { opacity: 0; transition: opacity 0.35s ease var(--d, 0s); }
.pin.on { opacity: 1; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 77, 0.6); } 80%, 100% { box-shadow: 0 0 0 14px rgba(255, 181, 77, 0); } }

/* ------------------------------------------------------------------ nav */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--cyan) 50%, var(--amber)); }
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 28px; padding: env(safe-area-inset-top, 0px) clamp(16px, 3vw, 36px) 0;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.45s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(5, 7, 11, 0.72); backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--line); }
.nav.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 32px; height: 32px; color: var(--ink); }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font: 800 14px/1 var(--f-en); font-stretch: 125%; letter-spacing: 0.08em; }
.brand small { font: 500 10px/1.4 var(--f-mono); color: var(--muted); letter-spacing: 0.16em; margin-top: 3px; }
.links { display: flex; gap: 4px; margin-left: auto; }
.links a {
  position: relative; text-decoration: none; font-size: 14px; color: var(--ink2); padding: 8px 12px; border-radius: 99px;
  transition: color 0.25s ease, background 0.25s ease;
}
.links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.links a.on { color: var(--ink); }
.links a.on::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--amber); }
.menu { display: none; width: 42px; height: 42px; border: 1px solid var(--line2); border-radius: 12px; background: rgba(255, 255, 255, 0.04); position: relative; }
.menu i { position: absolute; left: 12px; right: 12px; height: 1.6px; background: var(--ink); transition: transform 0.3s ease; }
.menu i:first-child { top: 16px; } .menu i:last-child { top: 24px; }
.nav.open .menu i:first-child { transform: translateY(4px) rotate(45deg); }
.nav.open .menu i:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; border: 0;
  font: 700 15px/1 var(--f-jp); letter-spacing: 0.04em; padding: 16px 24px; border-radius: 99px;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.3s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--amber); color: #170f02; box-shadow: 0 0 0 0 rgba(255, 181, 77, 0); }
.btn-primary:hover { background: #ffc675; box-shadow: 0 10px 40px -8px rgba(255, 160, 60, 0.6); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--ink); border: 1px solid var(--line2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.4); }
.btn-sm { padding: 10px 16px; font-size: 13px; gap: 8px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { padding: 20px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }

/* ------------------------------------------------------------------ type */
.eyebrow { font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.22em; color: var(--amber); margin: 0 0 18px; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--f-jp); margin: 0; letter-spacing: 0.01em; }
h1 { font-size: clamp(2.3rem, 4.5vw, 4.5rem); font-weight: 900; line-height: 1.12; }
h2 { font-size: clamp(1.9rem, 4.1vw, 3.3rem); font-weight: 900; line-height: 1.2; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.4; }
.sub { color: var(--ink2); font-size: clamp(0.98rem, 1.2vw, 1.08rem); margin: 18px 0 0; max-width: 46em; }
.lead { color: var(--ink2); font-size: clamp(1rem, 1.35vw, 1.15rem); margin: 26px 0 32px; max-width: 34em; }
.lead strong { color: var(--ink); font-weight: 700; background: linear-gradient(transparent 62%, rgba(125, 149, 255, 0.35) 62%); }
.fine { color: var(--dim); font-size: 12.5px; line-height: 1.7; margin: 28px 0 0; max-width: 64em; }
.split .ch { display: inline-block; will-change: transform; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.sec-head { margin-bottom: clamp(36px, 6vw, 64px); }

/* reveal (only when JS + GSAP run) */
html.anim [data-reveal], html.anim [data-reveal-group] > * { opacity: 0.5; transform: translateY(28px); }

/* ------------------------------------------------------------------ main stacking */
main { position: relative; z-index: 3; pointer-events: none; }
main > section, .gl-zone > *, .foot { pointer-events: auto; }
.gl-zone { pointer-events: none; }
.solid { background: var(--bg); position: relative; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; padding: calc(var(--nav-h) + 6vh) clamp(16px, 5vw, 72px) 120px; display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 70% 48%, rgba(77, 104, 255, 0.16), transparent 70%), radial-gradient(40% 40% at 10% 90%, rgba(255, 150, 60, 0.07), transparent 70%); pointer-events: none; }
.hero-copy { position: relative; max-width: 700px; }
.status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; padding: 7px 14px 7px 12px;
  font: 500 12px/1 var(--f-mono); color: var(--ink2); letter-spacing: 0.06em;
  border: 1px solid var(--line2); border-radius: 99px; background: rgba(10, 16, 24, 0.6); backdrop-filter: blur(8px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(70, 224, 138, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(70, 224, 138, 0.65); } 70% { box-shadow: 0 0 0 10px rgba(70, 224, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(70, 224, 138, 0); } }
.hero h1 { text-shadow: 0 4px 40px rgba(5, 7, 11, 0.6); }

.oled {
  position: absolute; right: clamp(16px, 4vw, 56px); bottom: 56px; width: 252px;
  font-family: var(--f-mono);
}
.oled-screen {
  background: #020304; border-radius: 10px; padding: 12px 14px; color: #dff4ff;
  border: 7px solid #10151d; box-shadow: 0 0 0 1px var(--line2), 0 20px 60px -20px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(120, 200, 255, 0.06);
  font-size: 12.5px; line-height: 1.55; text-shadow: 0 0 6px rgba(160, 225, 255, 0.55); position: relative; overflow: hidden;
}
.oled-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px); pointer-events: none; }
.oled-row { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.oled-row b { font-weight: 500; }
.oled-row small { font-size: 0.85em; opacity: 0.8; margin-left: 2px; }
.oled-row i { font-style: normal; }
.oled-title { border-bottom: 1px solid rgba(223, 244, 255, 0.25); margin-bottom: 4px; padding-bottom: 2px; }
.blink { opacity: 0.15; transition: opacity 0.1s; }
.blink.on { opacity: 1; color: #fff; }
.oled-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.oled-caption div { background: rgba(10, 14, 22, 0.7); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; backdrop-filter: blur(8px); }
.oled-caption .k { display: block; font: 500 10px/1.4 var(--f-jp); color: var(--muted); }
.oled-caption b { font: 800 22px/1.1 var(--f-en); font-stretch: 112%; }
.oled-caption div:last-child b { color: var(--blue); }
.oled-note { font: 400 10.5px/1.5 var(--f-jp); color: var(--dim); margin: 8px 2px 0; }

.loader { position: absolute; left: clamp(16px, 5vw, 72px); bottom: 40px; display: flex; align-items: center; gap: 12px; font: 500 11px/1 var(--f-mono); color: var(--muted); letter-spacing: 0.08em; transition: opacity 0.6s ease; }
.loader .bar { width: 120px; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.loader .bar i { display: block; height: 100%; width: 0; background: var(--cyan); transition: width 0.4s ease; }
.loader.done { opacity: 0; pointer-events: none; }
.loader.err { color: var(--red); }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; font: 500 10px/1 var(--f-mono); letter-spacing: 0.3em; color: var(--muted); }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: #fff; animation: drip 1.8s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes drip { to { top: 110%; } }

/* ------------------------------------------------------------------ marquee */
.marquee { position: relative; padding: 18px 0; border-block: 1px solid var(--line); background: rgba(5, 7, 11, 0.55); backdrop-filter: blur(6px); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-track { display: flex; width: max-content; animation: mq 60s linear infinite; }
.mq-track.rev { animation-direction: reverse; animation-duration: 75s; margin-top: 8px; }
.mq-track span { display: inline-flex; align-items: center; white-space: nowrap; font: 600 15px/1.6 var(--f-jp); color: var(--ink2); padding: 0 22px; }
.mq-track span::after { content: ""; width: 6px; height: 6px; margin-left: 44px; border: 1px solid var(--amber); transform: rotate(45deg); }
.mq-track.rev span { font: 500 12px/1.6 var(--f-mono); letter-spacing: 0.24em; color: var(--dim); }
.mq-track.rev span::after { border-color: var(--blue); width: 4px; height: 4px; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }


/* ------------------------------------------------------------------ tour */
.tour { position: relative; padding: 14vh clamp(16px, 4vw, 56px) 16vh; }
.tour-head { max-width: 460px; margin-bottom: 16vh; }
.step { max-width: 440px; padding: 28px 28px 24px; margin-bottom: 26vh; position: relative; }
.step:last-child { margin-bottom: 0; }
.step-n { font: 500 11px/1 var(--f-mono); color: var(--amber); letter-spacing: 0.18em; }
.step h3 { margin: 12px 0 12px; font-size: clamp(1.3rem, 2vw, 1.6rem); }
.step h3 small { display: block; font: 500 12px/1.6 var(--f-mono); color: var(--muted); letter-spacing: 0.06em; margin-top: 2px; }
.step p { margin: 0; color: var(--ink2); font-size: 15px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 0; }
.chips li { font: 500 12px/1 var(--f-mono); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line2); color: var(--ink2); background: rgba(255, 255, 255, 0.03); }
.step::before { content: ""; position: absolute; left: -1px; top: 26px; bottom: 26px; width: 2px; border-radius: 2px; background: linear-gradient(var(--amber), transparent); opacity: 0; transition: opacity 0.4s ease; }
.step.on::before { opacity: 1; }

/* ------------------------------------------------------------------ explore */
.explore { position: relative; height: calc(100vh + 30vh); height: calc(100svh + 30vh); min-height: 620px; pointer-events: none; }
/* the last 30vh is where #how fades in over the canvas; keep the controls above it */
.explore > * { pointer-events: auto; }
.explore-head { position: absolute; left: clamp(16px, 4vw, 56px); top: calc(var(--nav-h) + 24px); max-width: 420px; pointer-events: none; }
.explore-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.explore-head .sub { font-size: 14px; margin-top: 10px; }
.show-touch { display: none !important; }
.toolbar { position: absolute; left: 50%; bottom: calc(30vh + 28px); transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 16px; width: max-content; max-width: calc(100% - 24px); }
.seg { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.seg .lbl { font: 500 11px/1 var(--f-mono); color: var(--dim); padding: 0 8px 0 6px; }
.seg button { border: 0; background: transparent; color: var(--ink2); font-size: 13px; padding: 7px 11px; border-radius: 8px; transition: background 0.2s, color 0.2s; }
.seg button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.seg button.on { background: rgba(255, 181, 77, 0.16); color: var(--amber); }
.seg.icons button { padding: 7px; }
.seg.icons svg { width: 17px; height: 17px; }
.part-card { position: absolute; right: clamp(16px, 4vw, 56px); top: calc(var(--nav-h) + 24px); width: min(330px, calc(100% - 32px)); padding: 20px 22px; }
.pc-group { font: 500 11px/1 var(--f-mono); letter-spacing: 0.16em; color: var(--amber); margin: 0 0 10px; }
.pc-name { font-size: 1.15rem; }
.pc-info { color: var(--ink2); font-size: 14px; margin: 8px 0 0; }
.part-card.flash { animation: cardin 0.5s ease; }
@keyframes cardin { from { transform: translateY(8px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.tri-note { position: absolute; left: clamp(16px, 4vw, 56px); bottom: calc(30vh + 92px); font: 500 11px/1.5 var(--f-mono); color: var(--dim); margin: 0; letter-spacing: 0.04em; }

/* ------------------------------------------------------------------ how */
.how { height: 300vh; background: radial-gradient(80% 60% at 70% 30%, #0b1224 0%, var(--bg) 70%); }
.how::before { content: ""; position: absolute; left: 0; right: 0; top: -30vh; height: 30vh; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.how-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: clamp(20px, 3vw, 48px); align-items: center; padding: calc(var(--nav-h) + 8px) clamp(16px, 4vw, 56px) 24px; }
.how h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
.how-steps { list-style: none; padding: 0; margin: 22px 0 0; }
.how-steps li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); opacity: 0.35; transition: opacity 0.35s ease; }
.how-steps li > span { font-size: 18px; line-height: 1.5; color: var(--dim); transition: color 0.3s; }
.how-steps b { font-size: 15px; }
.how-steps p { margin: 0; max-height: 0; overflow: hidden; font-size: 13.5px; color: var(--ink2); line-height: 1.75; transition: max-height 0.45s ease, margin 0.45s ease; }
.how-steps li.on { opacity: 1; }
.how-steps li.on > span { color: var(--cyan); }
.how-steps li.on p { max-height: 9em; margin-top: 4px; }
.how-canvas { position: relative; height: min(76vh, 640px); }
.how-canvas canvas { width: 100%; height: 100%; }

/* ------------------------------------------------------------------ signal */
.signal { padding: clamp(90px, 14vh, 160px) 0 clamp(70px, 10vh, 120px); background: linear-gradient(180deg, var(--bg), #070b12 40%, var(--bg)); }
.sig-grid { display: grid; grid-template-columns: 330px 1fr; gap: 20px; }
.sig-controls { padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.rng { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink2); }
.rng span { display: flex; justify-content: space-between; gap: 10px; }
.rng output { font: 500 13px/1.6 var(--f-mono); color: var(--amber); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--amber) var(--p, 50%), rgba(255, 255, 255, 0.14) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
input[type=range]::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--amber); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; border-radius: 50%; background: #fff; border: 4px solid var(--amber); box-shadow: 0 0 0 6px rgba(255, 181, 77, 0.14); transition: box-shadow 0.2s; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid var(--amber); }
input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 9px rgba(255, 181, 77, 0.2); }
.presets { display: flex; gap: 6px; margin-top: -4px; }
.presets button { flex: 1; font-size: 12px; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.03); color: var(--ink2); transition: all 0.2s; }
.presets button:hover { border-color: var(--amber); color: var(--amber); }
.sig-controls .seg { align-self: stretch; }
.sig-controls .seg button { flex: 1; }
.rng.off { opacity: 0.38; }
.rng.off output { color: var(--muted); }
.readout { margin: 4px 0 0; display: grid; gap: 0; }
.readout div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.readout dt { color: var(--muted); }
.readout dd { margin: 0; font: 500 13px/1.6 var(--f-mono); color: var(--ink); text-align: right; }
.readout .big dd { font: 800 26px/1 var(--f-en); font-stretch: 115%; color: var(--amber); }
.readout .big { align-items: center; }
.readout dd.yes { color: var(--green); } .readout dd.no { color: var(--red); }
.sig-plot { padding: 14px; min-height: 480px; }
.sig-plot canvas { width: 100%; height: 100%; min-height: 450px; }

/* ------------------------------------------------------------------ coincidence */
.coin { padding: clamp(80px, 12vh, 140px) 0; background: radial-gradient(60% 50% at 20% 40%, #0b1426, var(--bg) 70%); }
.coin-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.coin-plot { padding: 12px; min-height: 520px; }
.coin-plot canvas { width: 100%; height: 100%; min-height: 496px; }
.coin-side { display: flex; flex-direction: column; gap: 20px; }
.coin-ctl { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.coin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coin-stats div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(255, 255, 255, 0.02); }
.coin-stats span { display: block; font-size: 11px; color: var(--muted); }
.coin-stats b { font: 800 24px/1.2 var(--f-en); font-stretch: 112%; }
.coin-stats .hl { border-color: rgba(70, 224, 138, 0.4); }
.coin-stats .hl b { color: var(--green); }
.ratio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.ratio b { font: 800 30px/1 var(--f-en); color: var(--ink); }
.ratio small { font: 500 12px/1 var(--f-mono); }
.ratio i { font-style: normal; color: var(--green); }
.acc { padding: 20px 22px; }
.acc h4 { margin: 0 0 6px; font-size: 15px; }
.acc p { margin: 0; font-size: 13px; color: var(--ink2); }
.acc-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.acc-in label { display: flex; flex-direction: column; gap: 4px; font: 500 12px/1 var(--f-mono); color: var(--muted); }
.acc-in input { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); border-radius: 8px; color: var(--ink); font: 500 15px/1 var(--f-mono); padding: 9px 8px; }
.acc-in small { font-size: 10px; color: var(--dim); }
.acc-out { font-size: 14px !important; }
.acc-out b { font: 800 26px/1 var(--f-en); color: var(--amber); }
.jack-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.jack { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: rgba(255, 255, 255, 0.02); position: relative; }
.jack b { font: 800 18px/1 var(--f-en); font-stretch: 118%; letter-spacing: 0.04em; }
.jack span { position: absolute; right: 16px; top: 16px; font: 500 11px/1 var(--f-mono); color: var(--amber); }
.jack p { margin: 8px 0 0; font-size: 12.5px; color: var(--ink2); line-height: 1.7; }

/* ------------------------------------------------------------------ apps */
.apps { padding: clamp(90px, 14vh, 160px) 0; background: linear-gradient(180deg, var(--bg), #0a0f19 50%, var(--bg)); }
.browser { border-radius: 16px; overflow: hidden; border: 1px solid var(--line2); background: #0b1018; box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02); }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 11px 16px; background: #111824; border-bottom: 1px solid var(--line); font: 500 12px/1 var(--f-mono); color: var(--muted); }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #2a3342; }
.lights i:first-child { background: #ff5f57; } .lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.url { flex: 1; background: rgba(255, 255, 255, 0.05); border-radius: 7px; padding: 7px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-tag { color: var(--amber); border: 1px solid rgba(255, 181, 77, 0.4); border-radius: 6px; padding: 5px 8px; letter-spacing: 0.08em; }
/* recorder demo — same look as arduino/v2/console: paper and ink, cyan only for what is live, night for the scope */
.rec {
  --paper: #FAF6EB; --field: #FFFDF7; --rk: #2A2730; --rk2: #4F4956; --rk3: #6E6776; --rk4: #A39CA8; --rr: rgba(42, 39, 48, 0.12);
  --sig: #5CD6EA; --sig2: #2E8BA0; --sigink: #1F6B7C; --coral: #C8654E; --night: #171630; --nk: #E9E6F0; --nk2: #A9A3BC;
  display: flex; flex-direction: column; min-height: 580px; background: var(--paper); color: var(--rk);
  font: 400 13px/1.6 var(--f-jp); letter-spacing: 0; transition: background 0.4s ease, color 0.4s ease;
}
.rec.night { background: var(--night); color: var(--nk); --rr: rgba(233, 230, 240, 0.14); --rk2: var(--nk2); --rk3: var(--nk2); }
.rec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 12px 18px; border-bottom: 1px solid var(--rr); }
.rec-brand { font: 600 18px/1 "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif; white-space: nowrap; }
.rec-brand small { font: 400 11px/1 var(--f-mono); color: var(--rk3); margin-left: 4px; }
.rec-conn { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid var(--rr); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rec-conn code { background: none; padding: 0; font-size: 11.5px; font-weight: 400; color: var(--rk3); }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--rk4); flex: none; transition: box-shadow 0.12s ease; }
.rec-dot.on { border-color: var(--sig2); background: var(--sig); }
.rec-dot.on.hit { box-shadow: 0 0 0 5px rgba(92, 214, 234, 0.4); }
.rec-dot.wait { border-color: var(--sig2); animation: recwait 0.8s ease-in-out infinite alternate; }
.rec-dot.stop { border-radius: 2px; border-color: var(--coral); background: var(--coral); }
.rec.night .rec-conn { color: #f0a48f; }
@keyframes recwait { to { background: var(--sig); } }
.rec-tabs { display: flex; gap: 2px; margin-left: auto; }
.rec-tabs button { border: 0; background: transparent; padding: 7px 11px; border-radius: 4px; font-size: 12.5px; color: var(--rk2); transition: background 0.2s, color 0.2s; }
.rec-tabs button:hover { background: rgba(42, 39, 48, 0.06); }
.rec-tabs button.on { background: var(--rk); color: var(--paper); }
.rec.night .rec-tabs button:hover { background: rgba(233, 230, 240, 0.08); }
.rec.night .rec-tabs button.on { background: var(--sig); color: var(--night); }
.rec:not(.live) .rec-tabs { display: none; }
.rec-off { border: 1px solid var(--rr); background: transparent; border-radius: 4px; padding: 6px 11px; font-size: 12.5px; color: var(--rk2); }
.rec-off:hover { border-color: var(--coral); color: var(--coral); }
.rec-banner { padding: 7px 18px; font-size: 12px; color: var(--rk2); border-bottom: 1px solid var(--rr); background: repeating-linear-gradient(135deg, rgba(42, 39, 48, 0.045) 0 6px, transparent 6px 12px); }
.rec-banner b { display: inline-block; border: 1px solid currentColor; border-radius: 2px; padding: 0 6px; margin-right: 8px; font-size: 11px; font-weight: 700; }
.rec-view { display: none; flex: 1; padding: 20px 22px; min-width: 0; }
.rec-view.on { display: block; }
.rec-kicker { margin: 18px 0 0; font-size: 12.5px; color: var(--rk3); }
.rec-h { margin: 6px 0 6px; font: 600 clamp(28px, 3.6vw, 42px)/1.2 "Shippori Mincho", "Yu Mincho", serif; letter-spacing: 0.04em; }
.rec-lead { margin: 0 0 22px; color: var(--rk2); }
.rec-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rec-cards button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 20px 20px 22px; background: var(--field); border: 1px solid var(--rr); border-radius: 6px; color: var(--rk); transition: border-color 0.2s, transform 0.2s; }
.rec-cards button:hover { border-color: var(--rk2); transform: translateY(-2px); }
.rec-cards button.demo { border-style: dashed; }
.rec-cards svg { width: 22px; height: 22px; margin-bottom: 10px; }
.rec-cards b { font-size: 16px; }
.rec-cards span { font-size: 12.5px; color: var(--rk3); line-height: 1.65; }
.rec-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid var(--rr); list-style: none; font-size: 12.5px; color: var(--rk3); }
.rec-steps b { color: var(--rk); margin-right: 6px; }
.rec-big { display: grid; grid-template-columns: auto auto 1fr; gap: 10px 46px; margin-bottom: 14px; }
.rec-big span { display: block; font-size: 12px; color: var(--rk3); }
.rec-big b { font: 600 clamp(24px, 3vw, 34px)/1.2 var(--f-mono); font-variant-numeric: tabular-nums; }
.rec-big small { font: 400 12px/1 var(--f-jp); color: var(--rk3); margin-left: 6px; }
.rec-big i { font-style: normal; }
.rec-charts { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.rec-chart p { margin: 0 0 4px; font-size: 12px; color: var(--rk3); }
.rec-chart p b { font-size: 14px; color: var(--rk); margin-right: 6px; }
.rec-chart canvas { width: 100%; height: 230px; }
.rec-stats { display: grid; grid-template-columns: repeat(7, auto); justify-content: space-between; gap: 10px 18px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--rr); }
.rec-stats dt { font-size: 11.5px; color: var(--rk3); }
.rec-stats dd { margin: 0; font: 500 14px/1.5 var(--f-mono); white-space: nowrap; }
.rec-scope canvas { width: 100%; height: 330px; }
.rec-scope .rec-stats { grid-template-columns: repeat(4, auto); justify-content: start; gap: 10px 46px; }
.rec-scope p { margin: 0 0 8px; font-size: 12px; color: var(--nk2); }
.rec-raw { margin: 0; height: 380px; overflow: hidden; font: 400 11.5px/1.7 var(--f-mono); color: var(--rk2); background: var(--field); border: 1px solid var(--rr); border-radius: 6px; padding: 12px 14px; white-space: pre; }
.rec-raw .hd { color: var(--rk4); } .rec-raw .ev { color: var(--rk); } .rec-raw .new { color: var(--sigink); font-weight: 700; }

.app-feats { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.app-feats li { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: rgba(255, 255, 255, 0.02); position: relative; overflow: hidden; }
.app-feats svg { width: 28px; height: 28px; color: var(--cyan); margin-bottom: 14px; }
.app-feats b { font-size: 16px; }
.app-feats p { margin: 6px 0 0; color: var(--ink2); font-size: 13.5px; }
.tools-h { margin: 72px 0 20px; font-size: 1.4rem; }
.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tool { text-decoration: none; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; transition: transform 0.35s ease, border-color 0.35s ease; position: relative; overflow: hidden; }
.tool:hover { transform: translateY(-6px); border-color: rgba(127, 232, 255, 0.4); }
.tool canvas { width: 100%; height: 108px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); margin-bottom: 8px; border: 1px solid var(--line); }
.tool b { font-size: 15px; }
.tool p { margin: 0; font-size: 12.5px; color: var(--ink2); line-height: 1.7; flex: 1; }
.tool .go { display: flex; align-items: center; gap: 6px; font: 500 11px/1.4 var(--f-mono); color: var(--cyan); margin-top: 8px; }
.tool .go svg { width: 13px; height: 13px; }

/* spotlight that follows the pointer on cards */
.spot { --sx: 50%; --sy: 50%; }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s ease; background: radial-gradient(260px circle at var(--sx) var(--sy), rgba(127, 232, 255, 0.09), transparent 60%); }
.spot:hover::after { opacity: 1; }

/* ------------------------------------------------------------------ scintillator versions */
.versions { padding: clamp(80px, 12vh, 140px) 0 clamp(40px, 6vh, 70px); }
.app-feats.ver-grid { grid-template-columns: repeat(2, 1fr); }
.ver-grid li > b { font-size: 18px; }
.ver-size { display: inline-block; margin: 10px 0 4px; font: 500 13px/1 var(--f-mono); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line2); color: var(--amber); }
.spec-fig { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line2); }
.spec-fig img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; }
.spec-fig figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.spec-fig figcaption b { display: block; font: 500 11px/1.6 var(--f-mono); letter-spacing: 0.1em; color: var(--amber); }
@media (max-width: 760px) { .app-feats.ver-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ use cases (figures sit straight on the page) */
.uses { padding: clamp(80px, 12vh, 140px) 0; }
.use-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.use-tabs button { font: 700 14px/1 var(--f-jp, inherit); padding: 12px 18px; border-radius: 999px; border: 1.5px solid var(--line2); background: rgba(255, 255, 255, 0.55); color: var(--ink2); transition: all 0.2s ease; }
.use-tabs button:hover { border-color: var(--ink); color: var(--ink); }
.use-tabs button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.use-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 28px; }
.use-anim { position: relative; height: clamp(340px, 46vw, 480px); }
.use-anim canvas { width: 100%; height: 100%; display: block; }
.use-pane h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); margin: 0 0 10px; }
.use-pane > p { margin: 0 0 18px; color: var(--ink2); font-size: 14.5px; }
.use-pane img { display: block; width: 100%; height: auto; }
.use-pane[hidden] { display: none; }
.use-pane .use-cap { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .use-stage { grid-template-columns: 1fr; } .use-anim { height: 340px; } }

/* ------------------------------------------------------------------ log */
.logsec { padding: clamp(80px, 12vh, 140px) 0; }

/* ------------------------------------------------------------------ numbers */
.numbers { padding: clamp(50px, 8vh, 90px) 0; border-block: 1px solid var(--line); background: var(--bg2); }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.nums > div { position: relative; padding-left: 18px; border-left: 1px solid var(--line2); }
.nums b { font: 800 clamp(2.6rem, 5vw, 4.4rem)/1 var(--f-en); font-stretch: 118%; letter-spacing: -0.01em; background: linear-gradient(180deg, #fff, #9fb2d6); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.nums span { font: 500 14px/1 var(--f-mono); color: var(--amber); margin-left: 6px; }
.nums p { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ start */
.start { padding: clamp(90px, 14vh, 160px) 0; }
.timeline { --p: 0; list-style: none; padding: 0; margin: 0; position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px 22px; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--line2); }
.timeline::after { content: ""; position: absolute; left: 0; top: 19px; height: 1px; width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--cyan), var(--amber)); }
.timeline li { position: relative; padding-top: 0; }
.tn { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 800 15px/1 var(--f-en); background: var(--bg); border: 1px solid var(--line2); color: var(--muted); transition: all 0.4s ease; }
.timeline li.on .tn { border-color: var(--amber); color: #170f02; background: var(--amber); box-shadow: 0 0 0 6px rgba(255, 181, 77, 0.12); }
.timeline b { display: block; font-size: 16px; margin-top: 16px; }
.timeline p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink2); }

/* ------------------------------------------------------------------ specs */
.specs { padding: clamp(80px, 12vh, 140px) 0; background: var(--bg2); }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; margin: 0; }
.spec-grid div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.spec-grid dt { font-size: 13px; color: var(--muted); }
.spec-grid dd { margin: 0; font-size: 14px; color: var(--ink); }

/* ------------------------------------------------------------------ cta */
.cta { position: relative; padding: clamp(120px, 20vh, 220px) 0; overflow: hidden; text-align: center; background: radial-gradient(70% 60% at 50% 100%, #12204a, var(--bg) 70%); }
.cta canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cta-in { position: relative; }
.cta h2 { font-size: clamp(2.2rem, 6vw, 5rem); margin-bottom: 44px; }
.doc-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding: 0; margin: 40px 0 0; font-size: 13px; }
.doc-links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line2); transition: color 0.2s, border-color 0.2s; }
.doc-links a:hover { color: var(--ink); border-color: var(--amber); }
a:not([href]) { cursor: default; }
.repo-note { margin: 22px auto 0; font-size: 12.5px; color: var(--dim); max-width: 46em; }

.foot { position: relative; z-index: 3; background: var(--bg); border-top: 1px solid var(--line); padding: 34px 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot p { margin: 0; font-size: 12.5px; color: var(--muted); }
.foot a { color: var(--ink2); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .timeline { grid-template-columns: repeat(3, 1fr); }
  .tools { grid-template-columns: repeat(3, 1fr); }
  .app-feats { grid-template-columns: repeat(2, 1fr); }
  .sig-grid { grid-template-columns: 300px 1fr; }
  .coin-grid { grid-template-columns: 1fr 320px; }
}
@media (max-width: 860px) {
  :root { --nav-h: 58px; }
  .links { position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 18px; background: rgba(5, 7, 11, 0.96); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform 0.4s ease; margin: 0; }
  .nav.open .links { transform: none; }
  .links a { padding: 14px 6px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; }
  .nav .btn-primary { margin-left: auto; }
  .menu { display: block; }

  .hero { align-items: flex-start; padding-top: calc(var(--nav-h) + 28px); padding-bottom: 46vh; }
  .hero h1 { font-size: clamp(1.9rem, 8.2vw, 3rem); }
  .lead { font-size: 15px; margin: 18px 0 24px; }
  .oled { left: 16px; right: 16px; width: auto; bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
  .oled-screen { font-size: 10.5px; padding: 8px 10px; border-width: 5px; }
  .oled-caption { grid-template-columns: 1fr; margin: 0; }
  .oled-caption b { font-size: 18px; }
  .oled-note { grid-column: 1 / -1; margin: 0; }
  .scroll-cue, .loader { display: none; }

  .tour { padding: 10vh 12px 16vh; }
  .tour-head { margin: 0 0 18vh; padding: 20px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); }
  .step { margin: 0 0 28vh; padding: 20px; max-width: none; }
  .tour-head, .step { margin-top: 18vh; }
  .step p { font-size: 13.5px; line-height: 1.75; }
  .step .chips { display: none; }
  .step h3 { margin: 8px 0; }

  .hide-touch { display: none; }
  .show-touch { display: inline-flex !important; }
  .explore-head { left: 16px; right: 16px; top: calc(var(--nav-h) + 12px); }
  .explore-head h2 { font-size: 1.4rem; }
  .part-card { top: auto; bottom: calc(30vh + 150px); right: 12px; left: 12px; width: auto; padding: 14px 16px; }
  .pc-info { font-size: 13px; }
  .toolbar { bottom: calc(30vh + 12px); gap: 6px; padding: 6px; }
  .seg .lbl { display: none; }
  .seg button { padding: 6px 8px; font-size: 12px; }
  .tri-note { display: none; }

  .how { height: 320vh; }
  .how-sticky { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: stretch; gap: 8px; padding-top: calc(var(--nav-h) + 10px); }
  .how h2 { font-size: 1.35rem; }
  .how .eyebrow { margin-bottom: 8px; }
  .how-steps { margin-top: 8px; }
  .how-steps li { display: none; border: 0; padding: 2px 0; }
  .how-steps li.on { display: flex; }
  .how-canvas { height: auto; min-height: 0; }

  .sig-grid, .coin-grid { grid-template-columns: 1fr; }
  .sig-plot { min-height: 0; }
  .sig-plot canvas { min-height: 420px; }
  .coin-plot { min-height: 0; } .coin-plot canvas { min-height: 380px; }
  .jack-row { grid-template-columns: repeat(2, 1fr); }

  .rec-conn { border-left: 0; padding-left: 0; }
  .rec-tabs { margin-left: 0; width: 100%; }
  .rec-tabs button { flex: 1; padding: 7px 4px; }
  .rec-view { padding: 16px 14px; }
  .rec-cards, .rec-steps, .rec-charts { grid-template-columns: 1fr; }
  .rec-big { grid-template-columns: 1fr 1fr; gap: 8px 20px; }
  .rec-big > div:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .rec-stats { grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 22px; }
  .rec-chart canvas { height: 190px; }
  .rec-scope canvas { height: 260px; }
  .demo-tag { display: none; }
  .app-feats { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr 1fr; }

  .nums { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .timeline { grid-template-columns: 1fr; gap: 26px; padding-left: 0; }
  .timeline::before, .timeline::after { left: 19px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .timeline::after { height: calc(var(--p) * 100%); bottom: auto; width: 1px; }
  .timeline li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
  .timeline b { margin-top: 8px; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-grid div { grid-template-columns: 7.5em 1fr; }
}
@media (max-width: 520px) {
  .tools { grid-template-columns: 1fr; }
  .nav .btn-primary { display: none; }
  .menu { margin-left: auto; }
  .cta-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mq-track, .scroll-cue i::after, .dot, .pin i { animation: none; }
  html.anim [data-reveal], html.anim [data-reveal-group] > * { opacity: 1; transform: none; }
}

/* ================================================================== light theme ("Stardust Notebook")
   Same paper and ink as accel-kitchen.com. Night (#171630) is kept only for the instrument panels
   (waveform canvases), the numbers band and the closing band, like the main site's own night bands. */
body { background: var(--bg); font-weight: 500; letter-spacing: 0.025em; font-feature-settings: "palt"; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(42, 39, 48, 0.045) 31px 32px),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(244, 196, 161, 0.2), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 70%, rgba(220, 201, 232, 0.18), transparent 60%);
}
#stars { display: none; }
code { background: rgba(42, 39, 48, 0.07); }
::selection { background: rgba(215, 122, 149, 0.3); }
:focus-visible { outline-color: var(--rose); }
.solid { background: var(--bg); }
h1, h2, h3 { font-family: var(--f-disp); font-weight: 700; color: var(--ink); }
h1 { font-weight: 800; }

#gl-tip { background: var(--bg3); border-color: var(--line2); color: var(--ink); box-shadow: 0 8px 24px -10px rgba(42, 39, 48, 0.3); }
.pin i { background: var(--amber); animation-name: ping2; }
.pin span { background: rgba(255, 253, 247, 0.94); border-color: rgba(200, 101, 78, 0.5); color: var(--ink); box-shadow: 0 6px 16px -8px rgba(42, 39, 48, 0.35); }
.pin span::before { background: rgba(200, 101, 78, 0.6); }
@keyframes ping2 { 0% { box-shadow: 0 0 0 0 rgba(200, 101, 78, 0.55); } 80%, 100% { box-shadow: 0 0 0 14px rgba(200, 101, 78, 0); } }

/* nav */
.nav.scrolled { background: rgba(250, 246, 235, 0.82); border-bottom: 1px dashed #D8CFB6; }
.brand svg [stroke="#ffb54d"] { stroke: #C8654E; }
.brand svg circle { fill: #2E8BA0; }
.brand b { font-family: var(--f-disp); font-stretch: normal; font-weight: 700; font-size: 15px; letter-spacing: 0.1em; }
.links a:hover { color: var(--rose2); background: #FBE8EE; }
.menu { background: rgba(255, 255, 255, 0.5); }

/* buttons */
.btn-primary { background: var(--rose); color: #fff; box-shadow: 0 1px 2px rgba(180, 84, 111, 0.2), 0 14px 28px -10px rgba(215, 122, 149, 0.5); }
.btn-primary:hover { background: var(--rose2); box-shadow: 0 1px 2px rgba(180, 84, 111, 0.3), 0 18px 32px -10px rgba(180, 84, 111, 0.55); }
.btn-ghost { background: rgba(255, 255, 255, 0.55); color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: #fff; border-color: var(--ink); }

/* type */
.eyebrow { font: italic 400 17px/1.4 var(--f-en); letter-spacing: 0.02em; text-transform: none; color: var(--rose); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 30px; height: 1.5px; background: var(--rose); border-radius: 2px; flex: none; }
.lead strong { color: var(--ink); background: linear-gradient(transparent 62%, rgba(242, 201, 92, 0.55) 62%); }
.fine { color: var(--muted); }
.glass {
  background: rgba(255, 253, 247, 0.94); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(42, 39, 48, 0.05), 0 18px 40px -22px rgba(42, 39, 48, 0.28);
}

/* hero */
.hero::before { background: radial-gradient(55% 55% at 72% 50%, rgba(183, 211, 229, 0.38), transparent 70%), radial-gradient(40% 40% at 8% 92%, rgba(244, 196, 161, 0.3), transparent 70%); }
.hero h1 { text-shadow: 0 2px 24px rgba(250, 246, 235, 0.9); }
.status { background: rgba(255, 253, 247, 0.8); backdrop-filter: none; color: var(--ink2); }
.oled-screen { box-shadow: 0 0 0 1px var(--line2), 0 20px 50px -22px rgba(42, 39, 48, 0.55), inset 0 0 30px rgba(120, 200, 255, 0.06); }
.oled-caption div { background: rgba(255, 253, 247, 0.94); backdrop-filter: none; }
.oled-caption b { font-family: var(--f-en); font-stretch: normal; font-weight: 600; }
.oled-caption div:last-child b { color: var(--cyan); }
.loader .bar i { background: var(--rose); }
.scroll-cue i { background: linear-gradient(var(--rose), transparent); }
.scroll-cue i::after { background: var(--ink); }

/* marquee */
.marquee { background: rgba(250, 246, 235, 0.86); backdrop-filter: none; border-block: 1px dashed #D8CFB6; }
.mq-track span::after { border-color: var(--rose); }
.mq-track.rev span::after { border-color: var(--cyan); }

/* tour / explore */
.how-steps li { border-top-style: dashed; }
.how-steps li.on > span { color: var(--cyan); }
.step::before { background: linear-gradient(var(--rose), transparent); }
.step-n, .pc-group { color: var(--rose2); }
.chips li { background: #fff; }
.seg { background: rgba(42, 39, 48, 0.04); }
.seg button:hover { background: rgba(42, 39, 48, 0.07); }
.seg button.on { background: var(--ink); color: var(--bg); }
.tri-note { color: var(--muted); }

/* sliders */
input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--rose) var(--p, 50%), rgba(42, 39, 48, 0.16) var(--p, 50%)); }
input[type=range]::-moz-range-track { background: rgba(42, 39, 48, 0.16); }
input[type=range]::-moz-range-progress { background: var(--rose); }
input[type=range]::-webkit-slider-thumb { border-color: var(--rose); box-shadow: 0 0 0 6px rgba(215, 122, 149, 0.16); }
input[type=range]::-moz-range-thumb { border-color: var(--rose); }
input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 9px rgba(215, 122, 149, 0.22); }
.rng output, .readout .big dd, .acc-out b { color: var(--rose2); }
.readout .big dd, .coin-stats b, .ratio b, .acc-out b { font-family: var(--f-en); font-stretch: normal; font-weight: 600; }
.presets button { background: #fff; }
.presets button:hover { border-color: var(--rose); color: var(--rose2); }

/* sections */
.how { background: linear-gradient(180deg, var(--bg), var(--bg2) 60%, var(--bg)); }
.how::before { background: linear-gradient(transparent, var(--bg)); }
.signal { background: linear-gradient(180deg, var(--bg), var(--bg2) 45%, var(--bg)); }
.coin { background: radial-gradient(60% 50% at 20% 40%, rgba(183, 211, 229, 0.3), var(--bg) 70%); }
.apps { background: linear-gradient(180deg, var(--bg), var(--bg2) 50%, var(--bg)); }
/* the waveform canvases are drawn for a dark ground, so they sit on night panels, like a scope face */
/* the three instrument canvases sit directly on the page: no frame, no fill */
.how-canvas, .sig-plot, .coin-plot { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.sig-plot, .coin-plot { padding: 0; }
.how-canvas { border-radius: var(--radius); }
.tool canvas { background: var(--night); }
.coin-stats div, .jack, .app-feats li { background: #fff; }
.coin-stats .hl b, .ratio i { color: var(--green); }
.acc-in input { background: #fff; }
.jack span { color: var(--rose2); }
.app-feats svg, .tool .go { color: var(--cyan); }
.tool:hover { border-color: rgba(46, 139, 160, 0.5); }
.spot::after { background: radial-gradient(260px circle at var(--sx) var(--sy), rgba(92, 214, 234, 0.12), transparent 60%); }

/* recorder demo frame */
.browser { background: var(--bg3); border-color: var(--line2); box-shadow: 0 30px 70px -36px rgba(42, 39, 48, 0.45); }
.browser-bar { background: var(--bg2); }
.lights i { background: #D8CFB6; }
.url { background: rgba(42, 39, 48, 0.06); }
.demo-tag { color: var(--rose2); border-color: rgba(180, 84, 111, 0.4); }

/* log decoder */

/* numbers + closing band stay night */
.numbers { background: var(--night); border-block-color: var(--night2); color: var(--nk); }
.nums > div { border-left-color: rgba(233, 230, 240, 0.22); }
.nums b { font-family: var(--f-en); font-stretch: normal; font-weight: 600; background: linear-gradient(180deg, #fff, #CFC8E6); -webkit-background-clip: text; background-clip: text; }
.nums span { color: #F2C95C; }
.nums p { color: var(--nk2); }

.timeline .tn { background: var(--bg); }
.timeline li.on .tn { color: #fff; background: var(--rose); border-color: var(--rose); box-shadow: 0 0 0 6px rgba(215, 122, 149, 0.18); }
.timeline::after { background: linear-gradient(90deg, var(--cyan), var(--rose)); }
.specs { background: var(--bg2); }

.cta { background: radial-gradient(70% 60% at 50% 100%, #2C2A60, var(--night) 70%); color: var(--nk); }
.cta h2 { color: var(--nk); }
.cta .eyebrow { color: #F2A7BC; justify-content: center; }
.cta .eyebrow::before { background: #F2A7BC; }
.cta .btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--nk); border-color: rgba(233, 230, 240, 0.5); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.doc-links a { color: var(--nk2); border-bottom-color: rgba(233, 230, 240, 0.25); }
.doc-links a:hover { color: #fff; border-bottom-color: #F2A7BC; }
.repo-note { color: var(--nk2); }

.foot { background: var(--bg2); border-top: 1px dashed #D8CFB6; }

/* ------------------------------------------------------------------ real unit (photos) */
.real { padding: clamp(80px, 12vh, 140px) 0; }
.real-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(26px, 3.4vw, 48px) clamp(18px, 2.4vw, 32px); align-items: start; }
.shot { position: relative; margin: 0; padding: 12px 12px 14px; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(42, 39, 48, 0.08), 0 24px 44px -24px rgba(42, 39, 48, 0.4); }
.shot img, .shot video { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; background: #ECECEC; }
.shot video { aspect-ratio: 16 / 9; }
.shot figcaption { margin-top: 12px; font: 400 15px/1.6 "Klee One", var(--f-jp); color: var(--ink2); }
.shot figcaption b { color: var(--rose2); font-weight: 600; margin-right: 6px; }
.washi { position: absolute; top: -11px; left: 50%; margin-left: -48px; width: 96px; height: 22px; transform: rotate(-3deg); opacity: 0.88;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 6px, transparent 6px 12px), linear-gradient(135deg, #F4C4A1, #F0AD80);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6px, #000 calc(100% - 6px), transparent); mask-image: linear-gradient(to right, transparent 0, #000 6px, #000 calc(100% - 6px), transparent); }
.washi.lilac { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 6px, transparent 6px 12px), linear-gradient(135deg, #DCC9E8, #C7AEDA); transform: rotate(2.5deg); }
.washi.mint { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 6px, transparent 6px 12px), linear-gradient(135deg, #C8E0CB, #A5C9AB); transform: rotate(-2deg); }
.washi.sky { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 6px, transparent 6px 12px), linear-gradient(135deg, #D6E6F0, #B7D3E5); transform: rotate(3deg); }
.shot.a { grid-column: 1 / span 7; transform: rotate(-0.8deg); }
.shot.b { grid-column: 8 / span 5; margin-top: 8%; transform: rotate(1.1deg); }
.shot.c { grid-column: 1 / span 5; transform: rotate(0.9deg); }
.shot.d { grid-column: 6 / span 7; transform: rotate(-0.6deg); }

@media (max-width: 860px) {
  .links { background: rgba(250, 246, 235, 0.97); }
  .links a { border-bottom: 1px dashed #D8CFB6; }
  .tour-head { background: rgba(255, 253, 247, 0.94); }
  .real-grid { grid-template-columns: 1fr; }
  .shot.a, .shot.b, .shot.c, .shot.d { grid-column: 1; margin-top: 0; }
  .shot.b, .shot.d { transform: rotate(0.6deg); }
}
