/* ARNEB site. Japanese simple and clean: paper, ink, ruled lines, one accent.
   Square corners only (design banlist). Every card and section is outlined with --line (>=3:1). */
:root {
  --paper: #F6FAF9;
  --paper-2: #EDF3F1;
  --surface: #FFFFFF;
  --ink: #0A1F2B;
  --ink-2: #33474F;
  --ink-3: #55666D;
  --line: #7F8D91;
  --line-ink: #4F7F86;
  --teal: #0F766E;
  --teal-2: #0D9488;
  --teal-glow: #2DD4BF;
  --amber: #B45309;
  --amber-mark: #F59E0B;
  --dawn: #FDBA74;
  --fail: #B42318;
  --on-ink: #F6FAF9;
  --on-ink-2: #9FB3BA;
  --sans: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1240px;
  --gutter: clamp(24px, 5vw, 64px); /* side margin: 56px at 1118 wide, 64px from 1280 up; phones set 16px below */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 144px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 var(--s4); }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.022em; color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--on-ink); padding: var(--s3) var(--s4); z-index: 100; }
.skip:focus { left: var(--s4); top: var(--s4); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono { font-family: var(--mono); }
.mark { display: inline-block; width: 8px; height: 8px; background: var(--teal); vertical-align: 1px; margin-right: var(--s2); }
.mark--amber { background: var(--amber-mark); }
.mark--teal { background: var(--teal); }
.mark--fail { background: var(--fail); }
.mark--ink { background: var(--ink-3); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); /* Safari < 16.2 drops color-mix */
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: var(--s6); height: 64px; }
.brand { display: flex; align-items: baseline; gap: var(--s3); text-decoration: none; }
.brand__name { font-weight: 600; letter-spacing: 0.2em; font-size: 17px; }
.brand__by { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
.nav { display: flex; gap: var(--s5); margin-left: auto; align-items: center; }
.nav a:not(.btn) { text-decoration: none; font-size: 14px; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--ink); }
.nav .lang { font-family: var(--sans); border: 1px solid var(--line); padding: 4px 10px; font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s3);
  min-height: 48px; padding: 0 var(--s5);
  font: 500 15px/1 var(--sans); letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--ink); color: var(--on-ink); }
.btn--primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--small { min-height: 40px; padding: 0 var(--s4); font-size: 14px; }
.btn .arrow { font-family: var(--mono); font-size: 14px; }
.menu-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 1100px; max-height: 1100px;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--teal-glow) 16%, transparent), transparent 70%),
    radial-gradient(closest-side at 70% 60%, color-mix(in srgb, var(--dawn) 16%, transparent), transparent 70%);
  pointer-events: none; filter: blur(10px);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 5fr 7fr; gap: var(--s7); align-items: center; padding-top: var(--s8); padding-bottom: var(--s8); }
/* sized so the headline, lede and both hero buttons fit the first screen at 1280-1920 wide (EN 4-5 lines in the 443 px column) */
.hero h1 { font-size: clamp(40px, 3.5vw, 54px); line-height: 1.04; letter-spacing: -0.032em; margin: var(--s5) 0 var(--s5); }
.hero h1 .soft { color: var(--ink-3); }
/* Japanese: break at phrase boundaries, no negative tracking, a calmer size */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .lede { word-break: auto-phrase; }
:lang(ja) h1, :lang(ja) h2 { letter-spacing: 0; }
:lang(ja) .hero h1 { font-size: clamp(32px, 2.7vw, 44px); line-height: 1.3; }
:lang(ja) .hero h1 .soft { display: block; margin-top: var(--s2); }
:lang(ja) .sec__head h2 { line-height: 1.32; }
.hero .lede { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero .fine { margin-top: var(--s4); font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }

.fig { margin: 0; border: 1px solid var(--line); background: var(--surface); position: relative; }
.fig__cap {
  display: flex; gap: var(--s4); justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding: var(--s3) var(--s4);
  font-family: var(--mono); font-size: 12px; color: var(--ink-3); line-height: 1.5; background: var(--surface);
}
.fig__cap b { color: var(--ink); font-weight: 500; }
.tag-ai { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); padding: 2px 6px; white-space: nowrap; }

.hero3d { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #FBFDFC 0%, var(--paper) 100%); overflow: hidden; }
.hero3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the still shows at once; it fades out when the live scene has drawn its first frame */
.hero3d .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity .5s; pointer-events: none; }
.hero3d.is-live .poster { opacity: 0; }
.hero3d.is-fallback .poster { opacity: 1; }
.hero3d.is-fallback canvas { display: none; }
.hero3d .crop { position: absolute; width: 14px; height: 14px; border-color: var(--ink-3); border-style: solid; border-width: 0; pointer-events: none; z-index: 2; }
.hero3d .crop.tl { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.hero3d .crop.tr { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.hero3d .crop.bl { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.hero3d .crop.br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
/* 3D scan viewer: the HUD reads the engine's result for the part on screen */
.scan-hud {
  position: absolute; left: 16px; top: 16px; z-index: 3; pointer-events: none; display: grid; gap: 2px; min-width: 228px;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); padding: 10px 12px 11px;
}
.scan-hud p { margin: 0; }
.scan-hud__part { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.scan-hud__step { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-2); padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px !important; }
.scan-hud[data-step="scan"] .scan-hud__step { color: var(--teal); }
.scan-hud__band { font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ink); }
.scan-hud__band b { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; font-weight: 600; }
.scan-hud[data-band="FAIL"] .scan-hud__band b { color: var(--fail); }
.scan-hud[data-band="REVIEW"] .scan-hud__band b { color: var(--amber); }
.scan-hud[data-band="PASS"] .scan-hud__band b { color: var(--teal); }
.scan-hud__kind { font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.scan-hud__meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 4px !important; }
.scan-hud__band, .scan-hud__kind, .scan-hud__meta { transition: opacity .3s ease; }
.scan-hud[data-step="scan"] .scan-hud__band, .scan-hud[data-step="scan"] .scan-hud__kind, .scan-hud[data-step="scan"] .scan-hud__meta,
.scan-hud[data-step="check"] .scan-hud__band, .scan-hud[data-step="check"] .scan-hud__kind, .scan-hud[data-step="check"] .scan-hud__meta { display: none; }
.scan-hud[data-step="scan"] .scan-hud__step, .scan-hud[data-step="check"] .scan-hud__step { border-bottom: 0; padding-bottom: 0; margin-bottom: 0 !important; }
.scan-sim {
  position: absolute; left: 16px; bottom: 16px; z-index: 3; margin: 0; pointer-events: none;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); padding: 4px 8px;
}
.scan-legend {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  background: var(--surface); background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); padding: 4px 8px;
}
.scan-legend__bar { width: 56px; height: 8px; background: linear-gradient(90deg, rgb(255 170 0 / .55), rgb(235 50 50 / .85)); border: 1px solid var(--line); }
.hero3d canvas { cursor: grab; }
.hero3d canvas:active { cursor: grabbing; }
.hero3d.is-fallback .scan-hud, .hero3d.is-fallback .scan-legend { display: none; }
/* the part picker and drag hint only work on the live 3D scene: none on the poster, none without JS */
.hero3d.is-fallback ~ .scan-pick, .hero3d.is-fallback ~ .fig__cap .fig__hint,
html:not(.js) .scan-pick, html:not(.js) .fig__hint, html:not(.js) .hero3d .scan-hud, html:not(.js) .hero3d .scan-legend { display: none; }
.flagtabs[hidden], .uitabs[hidden] { display: none; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* 3 x 2 so every label fits on one line; the phone rule below goes back to one row of numbers */
.scan-pick { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.scan-pick button {
  appearance: none; margin: 0; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 500 12px/1.2 var(--mono); letter-spacing: 0.03em; padding: 10px 10px; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 0;
}
.scan-pick button:nth-child(3n) { border-right: 0; }
.scan-pick button:nth-child(n+4) { border-bottom: 0; }
.scan-pick button:hover { background: var(--paper-2); color: var(--ink); }
.scan-pick button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.scan-pick button:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.scan-pick__k { margin-left: 6px; font-weight: 400; color: inherit; opacity: .8; white-space: nowrap; }
.hero-status { list-style: none; margin: var(--s5) 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 34em; }
.hero-status li { display: grid; grid-template-columns: 11em 1fr; gap: var(--s4); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.hero-status b { font-weight: 500; color: var(--ink); }
.hero-status span { color: var(--ink-2); }

/* proof strip */
.proof { border-bottom: 1px solid var(--line); background: var(--surface); }
.proof__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.proof__cell { border-right: 1px solid var(--line); padding: var(--s6) var(--s5) var(--s5); }
.proof__num { font-size: clamp(34px, 3.6vw, 52px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.proof__num small { font-size: 0.42em; color: var(--ink-3); letter-spacing: -0.01em; margin-left: 4px; }
.proof__txt { margin-top: var(--s3); font-size: 15px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.proof__note { border-top: 1px solid var(--line); padding: var(--s3) 0; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.proof__note a { color: var(--teal); }

/* ---------- sections ---------- */
.sec { border-bottom: 1px solid var(--line); padding: var(--s10) 0; }
.sec--tight { padding: var(--s9) 0; }
.sec__head { display: grid; grid-template-columns: 4fr 8fr; gap: var(--s7); margin-bottom: var(--s8); }
.sec__head h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -0.028em; }
.sec__head .lede { font-size: 18px; color: var(--ink-2); max-width: 38em; margin-top: var(--s2); }
.sec__head .label { padding-top: 10px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.step { padding: var(--s5) var(--s5) var(--s5) 0; border-right: 1px solid var(--line); margin-right: var(--s5); }
.step:last-child { border-right: 0; margin-right: 0; }
.step__n { font-family: var(--mono); font-size: 12px; color: var(--teal); letter-spacing: 0.08em; }
.step h3 { font-size: 22px; margin: var(--s3) 0 var(--s3); }
.step p { color: var(--ink-2); font-size: 16px; }

.teach { margin-top: var(--s8); display: grid; grid-template-columns: 8fr 4fr; gap: 0; }
.teach .fig { border-right: 0; }
.teach__grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; padding: var(--s4); background: var(--paper-2); }
.teach__tile { aspect-ratio: 1; background-size: 2000% 1000%; opacity: 0; transform: scale(.6); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.teach.is-near .teach__tile { background-image: url("/assets/teach/pcb1-200-sprite.webp"); }
.no-webp .teach.is-near .teach__tile { background-image: url("/assets/teach/pcb1-200-sprite.jpg"); }
.teach.is-in .teach__tile { opacity: 1; transform: none; }
.teach__side { border: 1px solid var(--line); padding: var(--s6); display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); }
.teach__count { font-size: clamp(56px, 6vw, 96px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.teach__count + p { color: var(--ink-2); margin-top: var(--s3); }
.teach__zero { border-top: 1px solid var(--line); padding-top: var(--s4); margin-top: var(--s5); }
.teach__zero .teach__count { font-size: 40px; color: var(--ink-3); }

/* flags */
.flagtabs, .uitabs { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
.flagtab, .uitab {
  font: 500 14px/1 var(--sans); color: var(--ink-2); background: transparent; border: 0; border-right: 1px solid var(--line);
  padding: var(--s4) var(--s5); cursor: pointer; display: flex; align-items: center; gap: var(--s2); min-height: 52px;
}
.flagtab[aria-selected="true"], .uitab[aria-selected="true"] { color: var(--ink); background: var(--paper-2); box-shadow: inset 0 -2px 0 var(--teal); }
.flagtab .mark { margin-right: 0; }
.viewer { border: 1px solid var(--line); background: var(--surface); }
.viewer__panes { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.pane { position: relative; background: #10141A; cursor: crosshair; overflow: hidden; }
.pane img { width: 100%; aspect-ratio: 7 / 6; object-fit: cover; }
.pane__label { position: absolute; left: 0; top: 0; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 10px; font-family: var(--mono); font-size: 12px; color: var(--ink); z-index: 2; }
.pane__label .k { color: var(--amber); }
.pane--ref .pane__label .k { color: var(--teal); }
.pane__probe { position: absolute; width: 18%; aspect-ratio: 1; border: 1px solid #fff; outline: 1px solid rgba(10,31,43,.6); pointer-events: none; opacity: 0; transform: translate(-50%, -50%); transition: opacity .15s; z-index: 1; }
.viewer.is-probing .pane__probe { opacity: 1; }
/* spot the defect (JS on): unmarked photos first; ARNEB's marks after a pick or "Show ARNEB's mark" */
.spot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.spot[hidden], .spot [hidden], .pane__guess[hidden] { display: none; }
.spot p { margin: 0; flex: 1 1 320px; font-size: 16px; color: var(--ink-2); }
.spot strong { color: var(--ink); font-weight: 500; }
.spot__result { color: var(--ink); }
.spot__result.is-hit { box-shadow: inset 3px 0 0 var(--teal); padding-left: var(--s3); }
.pane__clean { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; }
.viewer.is-guess .pane__clean { opacity: 1; }
.viewer.is-guess .pane picture { visibility: hidden; }
.viewer.is-guess .viewer__info { display: none; }
.viewer.is-fading .pane__clean { transition: opacity .4s ease; }
.pane__guess { position: absolute; width: 14px; height: 14px; background: #fff; box-shadow: 0 0 0 2px rgba(10,31,43,.85); transform: translate(-50%, -50%); pointer-events: none; z-index: 1; }
.viewer__info { display: grid; grid-template-columns: 7fr 5fr; border-top: 1px solid var(--line); }
.viewer__info > div { padding: var(--s5); }
.viewer__info > div + div { border-left: 1px solid var(--line); }
.viewer__title { font-size: 20px; font-weight: 500; margin-bottom: var(--s2); }
.viewer__what { color: var(--ink-2); font-size: 16px; margin: 0; }
.verdict { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); padding: 4px 10px; margin-bottom: var(--s3); }
.scale { position: relative; height: 54px; margin-top: var(--s2); }
.scale__track { position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--paper-2); border: 1px solid var(--line); box-sizing: content-box; }
.scale__band { position: absolute; top: 18px; height: 10px; }
.scale__band--review { background: rgba(245, 158, 11, .22); background: color-mix(in srgb, var(--amber-mark) 22%, transparent); }
.scale__band--fail { background: rgba(180, 35, 24, .18); background: color-mix(in srgb, var(--fail) 18%, transparent); }
.scale__tick { position: absolute; top: 12px; width: 1px; height: 22px; background: var(--ink-2); }
.scale__ticklbl { position: absolute; top: 36px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.scale__ticklbl.end { transform: translateX(calc(-100% - 4px)); }
.scale__ticklbl.start { transform: translateX(4px); }
.scale__dot { position: absolute; top: 15px; width: 16px; height: 16px; transform: translateX(-50%); background: var(--amber-mark); border: 2px solid var(--surface); outline: 1px solid var(--ink); transition: left .6s cubic-bezier(.2,.7,.2,1); }
.scale__dot.is-pass { background: var(--teal); }
.scale__score { position: absolute; top: -4px; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: var(--ink); white-space: nowrap; transition: left .6s cubic-bezier(.2,.7,.2,1); }
.credit { margin-top: var(--s4); font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.credit a { color: var(--ink-3); }

/* evidence (ink section) */
.sec--ink { background: var(--ink); color: var(--on-ink); border-bottom-color: var(--line-ink); }
.sec--ink h2, .sec--ink h3 { color: var(--on-ink); }
.sec--ink .label { color: var(--on-ink-2); }
.sec--ink .lede, .sec--ink p { color: var(--on-ink-2); }
.ev-charts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-ink); }
.ev-chart { padding: var(--s6); }
.ev-chart + .ev-chart { border-left: 1px solid var(--line-ink); }
.ev-chart h3 { font-size: 18px; margin-bottom: var(--s1); }
.ev-chart .sub { font-family: var(--mono); font-size: 12px; color: var(--on-ink-2); margin-bottom: var(--s5); }
.bar-row { display: grid; grid-template-columns: 150px 1fr; gap: var(--s4); align-items: center; margin-bottom: var(--s4); }
.bar-row__k { font-size: 14px; color: var(--on-ink-2); line-height: 1.3; }
.bar-row__track { position: relative; height: 28px; border-left: 1px solid var(--line-ink); }
.bar-row__fill { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; background: #5E7883; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.bar-row--now .bar-row__fill { background: #5EC4B8; }
.bar-row__v { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 13px; color: var(--on-ink); white-space: nowrap; padding-left: var(--s2); transition: left 1.1s cubic-bezier(.2,.7,.2,1); }
.bar-row__v.in { transform: translate(calc(-100% - 8px), -50%); padding-left: 0; color: #fff; }
.bar-row--now .bar-row__v.in { color: #0B1416; }
.ev-chart .axis { display: flex; justify-content: space-between; margin-left: calc(150px + var(--s4)); font-family: var(--mono); font-size: 11px; color: var(--on-ink-2); border-top: 1px solid var(--line-ink); padding-top: 4px; }
.ev-table-wrap { margin-top: var(--s7); border: 1px solid var(--line-ink); overflow-x: auto; }
.ev-table-wrap:focus-visible { outline: 2px solid var(--teal-glow); outline-offset: 2px; }
.ev-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.ev-table caption { text-align: left; padding: var(--s4) var(--s5); font-family: var(--mono); font-size: 12px; color: var(--on-ink-2); border-bottom: 1px solid var(--line-ink); }
.ev-table th, .ev-table td { text-align: left; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line-ink); }
.ev-table th { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-2); }
.ev-table td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--on-ink); white-space: nowrap; }
.ev-table tfoot td { color: var(--on-ink); font-weight: 500; border-bottom: 0; }
.ev-notes { margin-top: var(--s7); display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-ink); }
.ev-notes > div { padding: var(--s6); }
.ev-notes > div + div { border-left: 1px solid var(--line-ink); }
.ev-notes h3 { font-size: 18px; margin-bottom: var(--s3); }
.ev-notes ul { margin: 0; padding: 0; list-style: none; }
.ev-notes li { padding: var(--s2) 0 var(--s2) var(--s5); position: relative; color: var(--on-ink-2); font-size: 15px; border-top: 1px solid color-mix(in srgb, var(--line-ink) 50%, transparent); }
.ev-notes li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; background: #5EC4B8; }
.ev-notes li strong { color: var(--on-ink); font-weight: 500; }

/* fit */
.fit { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--surface); }
.fit > div { padding: var(--s6); }
.fit > div + div { border-left: 1px solid var(--line); background: var(--paper); }
.fit h3 { font-size: 20px; margin-bottom: var(--s4); display: flex; align-items: center; }
.fit ul { margin: 0; padding: 0; list-style: none; }
.fit li { border-top: 1px solid var(--line); padding: var(--s3) 0; color: var(--ink-2); font-size: 16px; }

/* setup */
/* 3D checks section */
.s3d-status { display: flex; align-items: baseline; gap: var(--s3); margin: 0 0 var(--s6); padding: var(--s4) var(--s5); border: 1px solid var(--line); background: var(--surface); font-size: 15px; color: var(--ink-2); max-width: 52em; }
.s3d-status .mark { flex: none; margin: 0; }
.s3d-status b { color: var(--ink); font-weight: 500; }
.s3d-panes { display: grid; grid-template-columns: repeat(3, 1fr); }
.s3d-pane { border-right: 1px solid var(--line); padding: var(--s4) var(--s4) var(--s5); }
.s3d-pane:last-child { border-right: 0; }
.s3d-pane img { display: block; width: 100%; height: auto; aspect-ratio: 1; border: 1px solid var(--line); background: var(--paper-2); }
.s3d-pane p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.s3d-pane .s3d-pane__k { margin: var(--s3) 0 var(--s1); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); }
.s3d-pane__k b { color: var(--ink); font-weight: 600; }
.cells.s3d-checks { margin-top: var(--s7); grid-template-columns: repeat(3, 1fr); }
/* Fig 2.1 wipe (JS on): one part, photo -> depth scan -> marks; the three panes become the A/B/C captions */
.s3d-fig.is-wipe { display: grid; grid-template-columns: minmax(0, 560px) minmax(240px, 1fr); }
.s3d-fig.is-wipe .fig__cap { grid-column: 1 / -1; }
.s3d-wipe { padding: var(--s4); border-right: 1px solid var(--line); }
.s3d-wipe[hidden] { display: none; }
.s3d-wipe__stage { position: relative; aspect-ratio: 1; border: 1px solid var(--line); background: var(--paper-2); overflow: hidden; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.s3d-wipe__stage img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.s3d-wipe__line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--teal-glow); box-shadow: 0 0 0 1px rgba(10, 31, 43, 0.55); }
.s3d-wipe__line[hidden] { display: none; }
.s3d-wipe__grip { position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); border: 1px solid var(--teal-glow); font-family: var(--mono); font-size: 16px; line-height: 1; letter-spacing: 0.1em; }
.s3d-wipe__tag { position: absolute; top: var(--s3); padding: 2px var(--s2); background: rgba(10, 31, 43, 0.8); color: var(--on-ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; white-space: nowrap; }
.s3d-wipe__tag--l { left: var(--s3); }
.s3d-wipe__tag--r { right: var(--s3); }
.s3d-wipe__tag[hidden] { display: none; }
.s3d-wipe__range { display: block; width: 100%; height: 32px; margin: var(--s3) 0 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.s3d-wipe__range::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
.s3d-wipe__range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -9px; background: var(--teal); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--teal); }
.s3d-wipe__range::-moz-range-track { height: 2px; background: var(--line); }
.s3d-wipe__range::-moz-range-thumb { width: 16px; height: 16px; background: var(--teal); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--teal); border-radius: 0; }
.s3d-wipe__ticks { display: flex; justify-content: space-between; padding: 0 5px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.s3d-wipe__hint { margin: var(--s2) 0 0; font-size: 14px; color: var(--ink-3); }
.s3d-fig.is-wipe .s3d-panes { grid-template-columns: 1fr; align-content: start; }
.s3d-fig.is-wipe .s3d-pane { border-right: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; cursor: pointer; }
.s3d-fig.is-wipe .s3d-pane:last-child { border-bottom: 0; }
.s3d-fig.is-wipe .s3d-pane img { display: none; }
.s3d-fig.is-wipe .s3d-pane.is-on { border-left-color: var(--teal); background: var(--paper); }
.s3d-fig.is-wipe .s3d-pane:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
/* Fig 2.2 scroll scan (JS + WebGL on): the 3D stage sticks beside (desktop) or above (phone) the three check
   cards, and each card's part is scanned as the card crosses the reading line. Without it the cards stay a row. */
.s3d-scan { margin-top: var(--s7); }
.s3d-scan > .cells.s3d-checks { margin-top: 0; }
.s3d-fig3[hidden] { display: none; }
.s3d-view { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #FBFDFC 0%, var(--paper) 100%); overflow: hidden; }
.s3d-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.s3d-scan.is-live { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.s3d-scan.is-live .s3d-fig3 { position: sticky; top: calc(64px + var(--s5)); }
/* width set, so a short window cuts the stage's height only; without it the 4:3 ratio shrinks the width too
   and leaves a blank strip inside the figure's outline */
.s3d-scan.is-live .s3d-view { width: 100%; max-height: calc(100vh - 64px - var(--s5) - 96px); }
.s3d-scan.is-live .cells.s3d-checks { display: block; border: 0; padding: var(--s3d-lead, 40vh) 0 var(--s3d-tail, 30vh); }
.s3d-scan.is-live .cell { border: 1px solid var(--line); margin-bottom: 34vh; scroll-margin-top: calc(var(--s3d-stuck, 64px) + var(--s3)); }
.s3d-scan.is-live .cell:last-child { margin-bottom: 0; }
.s3d-scan.is-live .cell.is-on { box-shadow: inset 3px 0 0 var(--teal); }
.s3d-scan.is-live .cell.is-on .label { color: var(--teal); }
.s3d-weak { margin-top: var(--s5); border: 1px solid var(--line); border-left: 3px solid var(--amber-mark); padding: var(--s4) var(--s5); background: var(--surface); max-width: 52em; }
.s3d-weak h3 { font-size: 15px; font-weight: 500; margin-bottom: var(--s1); }
.s3d-weak p { margin: 0; font-size: 15px; color: var(--ink-2); }
#flags .teach { margin: 0 0 var(--s8); }
.setup { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s6); align-items: start; }
.cells { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--s5); background: var(--surface); }
.cell h3 { font-size: 17px; margin-bottom: var(--s2); }
.cell p { color: var(--ink-2); font-size: 15px; margin: 0; }
.cell .label { display: block; margin-bottom: var(--s2); }
.status { font-family: var(--mono); font-size: 12px; display: inline-flex; align-items: center; margin-top: var(--s3); color: var(--ink-2); }
.ui-shot { margin-top: var(--s7); }
.ui-shot img { width: 100%; border-bottom: 1px solid var(--line); }
.ui-shot .uitabs { border: 0; border-bottom: 1px solid var(--line); }
.ui-shot [hidden] { display: none; }
/* on phones the picture swaps to a crop of the key panel; the link opens the whole screen */
.ui-shot__open { display: block; cursor: zoom-in; }
.ui-shot__open:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.ui-shot__tap { display: none; }

/* faq */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: var(--s5) var(--s7) var(--s5) 0; font-size: 19px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 22px; font-weight: 400; color: var(--teal); }
.faq details[open] summary::after { content: "\2212"; }
.faq .a { padding: 0 var(--s7) var(--s5) 0; color: var(--ink-2); max-width: 46em; }

/* cta */
.cta { padding: var(--s10) 0; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: -10%; bottom: -60%; width: 60vw; height: 60vw; background: radial-gradient(closest-side, color-mix(in srgb, var(--teal-glow) 14%, transparent), transparent 70%); pointer-events: none; }
.cta .wrap { position: relative; display: grid; grid-template-columns: 7fr 5fr; gap: var(--s7); align-items: end; }
.cta h2 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.06; letter-spacing: -0.03em; }
.cta .box { border: 1px solid var(--line); background: var(--surface); padding: var(--s6); }
.cta .box p { color: var(--ink-2); }
.cta .mail { font-family: var(--mono); font-size: 15px; color: var(--teal); }

/* footer */
.foot { padding: var(--s7) 0 var(--s8); font-size: 14px; color: var(--ink-3); }
.foot .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s7); }
.foot p { margin: 0 0 var(--s2); }
.foot a { color: var(--ink-2); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s5); margin-bottom: var(--s4); }

/* reveal */
.rv { transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
/* hidden only while site.js runs; with no JS, or after the 4 s watchdog, sections just show */
.js:not(.rv-fail) .rv:not(.is-in) { opacity: 0; transform: translateY(14px); }

@media (max-width: 1080px) {
  .nav a:not(.btn):not(.lang) { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }
  /* one column: the headline has the full width again, so keep the larger tablet size the desktop cap would cut */
  .hero h1 { font-size: clamp(40px, 5.1vw, 54px); }
  :lang(ja) .hero h1 { font-size: clamp(32px, 3.6vw, 44px); }
  .sec__head { grid-template-columns: 1fr; gap: var(--s3); }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; margin-right: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .teach { grid-template-columns: 1fr; }
  .cells.s3d-checks { grid-template-columns: 1fr; }
  .teach .fig { border-right: 1px solid var(--line); }
  .teach__side { border-top: 0; }
  .setup { grid-template-columns: 1fr; }
  .cta .wrap, .foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ev-table { min-width: 0; font-size: 14px; }
  .ev-table caption, .ev-table th, .ev-table td { padding-left: var(--s2); padding-right: var(--s2); }
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .site-head .wrap { gap: var(--s3); }
  .brand__by { display: none; }
  .nav { gap: var(--s3); }
  .nav .btn--small { padding: 0 var(--s3); }
  .sec { padding: var(--s9) 0; }
  .hero .lede { font-size: 17px; }
  .proof__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof__cell { padding-left: var(--s4); padding-right: var(--s4); }
  .proof__cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; margin-right: 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; }
  .teach__grid { gap: 1px; padding: var(--s2); }
  .s3d-panes { grid-template-columns: 1fr; }
  .s3d-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .s3d-pane:last-child { border-bottom: 0; }
  .s3d-pane img { max-width: 420px; }
  .s3d-fig.is-wipe { grid-template-columns: 1fr; }
  .s3d-wipe { border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s3); }
  .s3d-fig.is-wipe .s3d-pane { padding: var(--s3) var(--s4); }
  .s3d-scan.is-live { display: block; }
  .s3d-scan.is-live .s3d-fig3 { top: 64px; z-index: 5; }
  .s3d-scan.is-live .s3d-view { max-height: 36vh; }
  .s3d-scan.is-live .cell { margin-bottom: 18vh; }
  #flags .teach { margin-bottom: var(--s7); }
  .viewer__panes { grid-template-columns: 1fr; }
  .viewer__info { grid-template-columns: 1fr; }
  .viewer__info > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .flagtab, .uitab { padding: var(--s3) var(--s4); flex: 1 1 auto; }
  .ev-charts, .ev-notes, .fit, .cells { grid-template-columns: 1fr; }
  .ev-chart + .ev-chart, .ev-notes > div + div, .fit > div + div { border-left: 0; border-top: 1px solid var(--line-ink); }
  .fit > div + div { border-top-color: var(--line); }
  .bar-row { grid-template-columns: 96px 1fr; }
  .ev-chart .axis { margin-left: calc(96px + var(--s4)); }
  .scan-legend { display: none; }
  .scan-hud { min-width: 0; left: 10px; top: 10px; padding: 8px 10px; }
  .scan-sim { left: 10px; bottom: 10px; font-size: 9.5px; max-width: calc(100% - 20px); }
  .scan-pick { grid-template-columns: repeat(6, 1fr); }
  .ui-shot__tap { display: inline; }
  .scan-pick__k { display: none; }
  .scan-pick button { justify-content: center; padding: 12px 4px; border-bottom: 0; border-right: 1px solid var(--line); }
  .scan-pick button:last-child { border-right: 0; }
  .hero-status li { grid-template-columns: 1fr; gap: 0; }
  .fig__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .teach__tile, .bar-row__fill, .bar-row__v, .scale__dot, .scale__score, .pane__clean { transition: none !important; }
  .rv { opacity: 1 !important; transform: none !important; }
}
