/* NestLinker GEO — styles
   Default layout is a plain scrolling document ("flow"): it is what crawlers,
   agents, phones and no-JS readers get. app.js adds html.scenes on large
   pointer-driven screens and turns the sections into full-screen scenes. */

:root {
  --bg: #050a16;
  --bg-2: #0a1630;
  --navy: #1d386f;
  --blue: #5b80cf;
  --ice: #a9c1f2;
  --ink: #eaf1ff;
  --mut: #93a5cc;
  --dim: #8496c0;
  --line: rgba(169, 193, 242, 0.18);
  --font: "Fusion Pixel", ui-monospace, "SF Mono", Menlo, Consolas, "Apple SD Gothic Neo", "PingFang SC", "Noto Sans CJK SC", monospace;
  --pad: clamp(20px, 3.4vw, 48px);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; background: var(--bg); color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
/* The pixel face has no Vietnamese diacritics; use one consistent system face instead of a mix. */
html[data-lang="vi"] { --font: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace; }
body {
  margin: 0; min-height: 100svh; background: var(--bg); color: var(--ink);
  font: 1rem/1.75 var(--font); letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision;
}
a, button, summary { cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 400; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; letter-spacing: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--ice); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dim { color: var(--dim); }

.skip { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--bg); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- background field & wipe ---------- */
.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; image-rendering: pixelated; pointer-events: none; }
.trail { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; image-rendering: pixelated; }
.wipe { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; image-rendering: pixelated; display: none; }
html.scenes .wipe { display: block; }
html:not(.js) .field, html.no-gl .field {
  background:
    radial-gradient(120% 60% at 50% 110%, rgba(29, 56, 111, 0.55), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(169, 193, 242, 0.14) 1px, transparent 1.5px) 0 0 / 8px 8px;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--pad);
  background: linear-gradient(var(--bg) 20%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { width: 40px; filter: brightness(0) invert(1); }
.brand__name { font-size: 1.1875rem; letter-spacing: 0.04em; }
.brand__tag { font-size: 0.8rem; line-height: 1; padding: 4px 6px 3px; border: 1px solid var(--line); color: var(--ice); }
.nav__links { margin-left: auto; display: flex; gap: clamp(20px, 4.5vw, 72px); }
.nav__links a { color: var(--mut); transition: color 0.2s; white-space: nowrap; }
.nav__links a:hover, .nav__links a[aria-current] { color: var(--ink); }
.nav__tools { display: flex; align-items: center; gap: 20px; margin-left: clamp(8px, 3vw, 48px); }
.langs { position: relative; font-size: 0.8rem; line-height: 1; }
.langs summary { display: inline-flex; align-items: center; gap: 8px; padding: 8px 8px 7px; border: 1px solid var(--line); color: var(--mut); list-style: none; white-space: nowrap; transition: color 0.2s, border-color 0.2s; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: ""; width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; transition: transform 0.2s; }
.langs[open] summary::after { transform: rotate(180deg); }
.langs summary:hover, .langs[open] summary { color: var(--ink); border-color: var(--ice); }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); min-width: 100%; padding: 4px 0; border: 1px solid var(--line); background: var(--bg); z-index: 5; }
.langs li a { display: block; padding: 9px 12px 8px; color: var(--mut); white-space: nowrap; }
.langs li a:hover, .langs li a:focus-visible { color: var(--ink); background: var(--bg-2); }
.langs li a[aria-current] { color: var(--ink); }
/* The pixel face has no Vietnamese diacritics: keep that one label in a single face. */
.langs li a[lang="vi"] { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace; }
@media (pointer: coarse) { .langs summary, .langs li a, .viewtoggle { min-height: 44px; align-items: center; } .langs li a { display: flex; } }
.langs li a[aria-current]::before { content: "› "; color: var(--ice); }
.viewtoggle { display: inline-flex; align-items: center; font-size: 0.8rem; line-height: 1; border: 1px solid var(--line); white-space: nowrap; }
.viewtoggle__label { padding: 8px 8px 7px; color: var(--dim); }
.viewtoggle__opt { padding: 8px 8px 7px; color: var(--mut); }
.viewtoggle[aria-pressed="false"] .viewtoggle__opt--human, .viewtoggle[aria-pressed="true"] .viewtoggle__opt--agent { background: var(--ink); color: var(--bg); }
.viewtoggle:hover { border-color: var(--ice); }

/* ---------- shared pieces ---------- */
main { position: relative; z-index: 1; }
.scene { position: relative; padding: calc(var(--nav-h) + 56px) var(--pad) 72px; min-height: 100svh; display: grid; align-items: center; border-top: 1px solid var(--line); }
.scene:first-child { border-top: 0; }
.scene__inner { width: 100%; max-width: 1180px; margin: 0 auto; }
.tag { font-size: 0.875rem; color: var(--ice); margin-bottom: 14px; }
.tag--bracket::before { content: "〈 "; color: var(--dim); }
.tag--bracket::after { content: " 〉"; color: var(--dim); }
h2 { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.35; letter-spacing: 0.03em; text-wrap: balance; }
h3 { font-size: 1rem; line-height: 1.6; }
.head { text-align: center; margin-bottom: clamp(24px, 4.5vh, 48px); }
.head--left { text-align: left; }
.meta { margin-top: 10px; font-size: 0.875rem; color: var(--dim); }
.tlink { color: var(--ice); border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: border-color 0.2s, color 0.2s; }
.tlink:hover { color: var(--ink); border-color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px 11px; font-size: 0.9375rem; line-height: 1; border: 1px solid var(--ink); transition: background 0.15s, color 0.15s, transform 0.15s; white-space: nowrap; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--ice); border-color: var(--ice); }
.btn--line { border-color: var(--line); color: var(--ink); background: rgba(5, 10, 22, 0.6); }
.btn--line:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
kbd { font: inherit; font-size: 11px; padding: 2px 5px; border: 1px solid var(--line); color: var(--mut); }

/* ---------- hero ---------- */
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__h { display: flex; flex-direction: column; align-items: center; font: inherit; letter-spacing: inherit; }
.kicker { font-size: 0.875rem; color: var(--mut); margin-bottom: 28px; }
.hero__title { font-size: clamp(36px, 5vw, 60px); line-height: 1.15; letter-spacing: 0.04em; }
.hero__sub { margin-top: 18px; font-size: clamp(16px, 1.6vw, 20px); color: var(--ice); }
.shift { margin-top: clamp(28px, 5vh, 52px); font-size: 0.9375rem; }
.shift__head, .shift li { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: baseline; }
.shift__head { font-size: 0.8rem; color: var(--dim); padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.shift__head .shift__to { color: var(--ice); }
.shift__from { text-align: right; color: var(--dim); }
.shift__to { text-align: left; color: var(--ink); }
.shift__arrow { text-align: center; color: var(--blue); }
.shift li { padding: 2px 0; }
.hero__lede { margin-top: clamp(24px, 4vh, 40px); max-width: 36em; font-size: 0.875rem; color: var(--mut); text-wrap: balance; }

/* ---------- §1 background ---------- */
.split { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(32px, 7vw, 120px); align-items: center; }
.film { position: relative; height: min(72svh, 640px); overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.film::before, .film::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px; background: repeating-linear-gradient(var(--line) 0 3px, transparent 3px 18px); }
.film::before { left: 10px; } .film::after { right: 10px; }
.film__track { display: flex; flex-direction: column; align-items: center; gap: 22px; will-change: transform; }
.film__frame { position: relative; width: 196px; }
.film__frame canvas { display: block; width: 196px; height: 147px; border-radius: 26px / 22px; image-rendering: pixelated; opacity: 0.55; transition: opacity 0.5s; }
.film__frame.is-on canvas { opacity: 1; }
.film__frame span { position: absolute; left: 14px; bottom: 10px; font-size: 0.8rem; line-height: 1; padding: 3px 5px 2px; background: var(--bg); color: var(--ice); }
.bgcopy h2 { margin-bottom: 28px; }
.lines p { color: var(--mut); line-height: 2.05; }
.lines p:nth-child(4) { color: var(--ink); }
.lines .coda { margin-top: 14px; font-size: 0.875rem; color: var(--dim); }
.timeline { margin-top: clamp(24px, 4vh, 40px); border-top: 1px solid var(--line); font-size: 0.875rem; }
.timeline li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 7px 0 6px; border-bottom: 1px solid var(--line); color: var(--dim); transition: color 0.4s; }
.timeline time { color: inherit; }
.timeline li.is-on { color: var(--ink); }
.timeline li.is-on time { color: var(--ice); }
html:not(.scenes) .timeline li { color: var(--mut); }

/* ---------- §2 observation ---------- */
.prompt { margin: 18px auto 0; max-width: 46em; padding: 12px 18px; border: 1px solid var(--line); background: rgba(10, 22, 48, 0.55); font-size: 0.9375rem; color: var(--ice); text-align: left; }
.prompt p::before { content: "> "; color: var(--dim); }
.prompt footer { margin-top: 6px; font-size: 0.8rem; color: var(--mut); }
.timeline .src { margin-left: 6px; font-size: 0.8rem; color: var(--ice); border-bottom: 1px solid transparent; }
.timeline .src:hover { color: var(--ink); border-color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 40px); }
.stat__num { display: flex; align-items: baseline; gap: 8px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.stat__num b { font-weight: 400; font-size: clamp(30px, 3.2vw, 44px); line-height: 1; color: var(--ice); font-variant-numeric: tabular-nums; }
.obs__intro { margin: 16px auto 0; max-width: 44em; color: var(--mut); font-size: 0.9375rem; text-wrap: pretty; }
.stat__num span { font-size: 0.875rem; color: var(--mut); }
.stat__label { font-size: 0.9375rem; line-height: 1.6; }
.stat__desc { margin-top: 6px; font-size: 0.875rem; line-height: 1.7; color: var(--mut); }
.obs__foot { margin-top: clamp(24px, 4.5vh, 48px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.fig figcaption { margin-top: 10px; font-size: 0.8rem; color: var(--dim); }
.fig__lists { display: flex; align-items: flex-start; gap: 0; }
.fig__col { display: grid; grid-template-columns: repeat(4, 14px); gap: 5px; }
.fig__col span { grid-column: 1 / -1; font-size: 0.8rem; line-height: 1; color: var(--mut); margin-bottom: 4px; }
.fig__col i { width: 14px; height: 14px; background: var(--blue); }
.fig__col--b i { background: none; border: 2px solid var(--ice); }
.fig__gap { width: 64px; height: 14px; margin-top: 21px; border-top: 2px dotted var(--dim); position: relative; }
.fig__gap::after { content: "∅"; position: absolute; left: 50%; top: -12px; transform: translateX(-50%); padding: 0 6px; background: var(--bg); color: var(--mut); font-size: 0.875rem; line-height: 20px; }
.rec { min-width: 0; }
.rec__card { width: min(100%, 340px); border: 1px solid var(--line); background: rgba(5, 10, 22, 0.86); font-size: 0.8rem; line-height: 1; }
.rec__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 7px; border-bottom: 1px solid var(--line); color: var(--mut); }
.rec__bar span:first-child { color: var(--bg); background: var(--ice); padding: 3px 5px 2px; }
.rec__now { font-variant-numeric: tabular-nums; }
.rec__tag { margin-left: auto; color: var(--ice); white-space: nowrap; }
.rec__row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 10px 6px; color: var(--mut); }
.rec__row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec__row i { height: 6px; width: var(--w); background: repeating-linear-gradient(90deg, var(--blue) 0 4px, transparent 4px 6px); opacity: 0.75; }
@media (max-width: 420px) { .rec__bar { flex-wrap: wrap; } .rec__tag { margin-left: 0; flex-basis: 100%; white-space: normal; line-height: 1.4; } }
.rec figcaption { margin-top: 10px; font-size: 0.8rem; color: var(--dim); }
.conclusion { font-size: 0.9375rem; color: var(--ink); max-width: 44em; text-wrap: pretty; }

/* ---------- §3 method ---------- */
.method { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding: 8px 0 48px; }
.orbit { position: relative; width: 100%; aspect-ratio: 700 / 380; }
.orbit__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-8deg); }
.orbit__ring ellipse { fill: none; stroke: rgba(169, 193, 242, 0.42); stroke-width: 2; stroke-dasharray: 2 7; vector-effect: non-scaling-stroke; }
.orbit__loop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 0.8rem; color: var(--dim); white-space: nowrap; }
.orbit__ring .r2 { stroke: rgba(169, 193, 242, 0.26); }
.orbit__ring .r3 { stroke: rgba(169, 193, 242, 0.14); }
.orbit__node { position: absolute; left: 0; top: 0; width: 132px; height: 72px; margin: -36px 0 0 -66px; cursor: pointer; will-change: transform; }
.orbit__node canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.orbit__node b { position: absolute; right: 6px; top: -8px; width: 24px; height: 24px; display: grid; place-items: center; font-weight: 400; font-size: 0.8rem; line-height: 1; background: var(--bg); border: 1px solid var(--line); color: var(--mut); border-radius: 50%; }
.orbit__node.is-on b { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.steps { border-top: 1px solid var(--line); }
.step { border-bottom: 1px solid var(--line); }
.step__head { display: flex; align-items: baseline; gap: 16px; width: 100%; padding: 14px 0 12px; text-align: left; color: var(--mut); transition: color 0.25s; }
.step__no { font-size: 0.8rem; color: var(--dim); }
.step__name { font-size: 1.1875rem; }
.step__head:hover, .step.is-on .step__head { color: var(--ink); }
.step.is-on .step__no { color: var(--ice); }
.step__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.step__body > div { overflow: hidden; }
.step__body p { padding: 0 0 12px 40px; font-size: 0.9375rem; color: var(--mut); text-wrap: pretty; }
.step__body .step__out { font-size: 0.875rem; color: var(--ice); padding-bottom: 16px; }
html.scenes .step:not(.is-on) .step__body { grid-template-rows: 0fr; }

/* ---------- §4 custom ---------- */
.custom .head { margin-bottom: clamp(18px, 3vh, 32px); }
.lead { margin-top: 16px; max-width: 56em; color: var(--mut); font-size: 0.9375rem; text-wrap: pretty; }
.cmp { width: 100%; border-collapse: collapse; font-size: 0.9375rem; text-align: left; }
.cmp th, .cmp td { padding: 8px 16px 7px 0; line-height: 1.55; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: baseline; }
.cmp thead th { font-size: 0.8rem; color: var(--dim); }
.cmp thead th:last-child { color: var(--ice); }
.cmp tbody th { width: 20%; color: var(--mut); font-size: 0.875rem; }
.cmp tbody td { width: 38%; color: var(--mut); }
.cmp tbody td:last-child { width: 42%; color: var(--ink); }
.custom__foot { margin-top: clamp(20px, 3.5vh, 36px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 72px); font-size: 0.875rem; color: var(--mut); }
.custom__foot h3 { font-size: 0.875rem; color: var(--ice); margin-bottom: 8px; }
.custom__foot p + p { margin-top: 8px; }
.ticks li { padding-left: 20px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; background: var(--blue); }

/* ---------- §5 limits ---------- */
.qas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.qa { background: rgba(5, 10, 22, 0.92); padding: clamp(18px, 2.6vw, 32px); }
.qa__no { font-size: 0.8rem; color: var(--dim); margin-bottom: 8px; }
.qa h3 { font-size: 1.0625rem; margin-bottom: 10px; text-wrap: balance; }
.qa p:last-child { font-size: 0.9375rem; color: var(--mut); text-wrap: pretty; }

/* ---------- appendix: for agents ---------- */
.split--agents { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); }
.agcopy h2 { margin-bottom: 22px; }
.agcopy p { color: var(--mut); max-width: 34em; text-wrap: pretty; }
.agcopy p + p { margin-top: 12px; }
.agcopy .agnote { font-size: 0.875rem; color: var(--ice); padding: 10px 14px; border-left: 2px solid var(--blue); background: rgba(10, 22, 48, 0.55); }
.agcopy .btn { margin-top: 10px; }
.files { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.875rem; }
.files span { color: var(--dim); }
.term { border: 1px solid var(--line); background: rgba(5, 10, 22, 0.86); min-width: 0; }
.term__bar { display: flex; gap: 16px; padding: 8px 14px 7px; border-bottom: 1px solid var(--line); font-size: 0.8rem; color: var(--dim); }
.term__bar span:nth-child(2) { margin-left: auto; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term__bar span:last-child { color: var(--ice); }
.term__body { margin: 0; padding: 14px; height: min(48svh, 420px); overflow: hidden; font: inherit; font-size: 0.875rem; line-height: 1.7; color: var(--mut); white-space: pre-wrap; overflow-wrap: anywhere; }
.term__body::after { content: "█"; color: var(--ice); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- contact + footer ---------- */
.contact { display: flex; flex-direction: column; gap: clamp(40px, 9vh, 96px); min-height: calc(100svh - var(--nav-h) - 128px); }
.contact__main { margin: auto 0; text-align: center; padding-top: 4vh; }
.contact__main h2 { font-size: clamp(28px, 3.4vw, 48px); }
.contact__body { margin: 18px auto 0; max-width: 34em; color: var(--ice); text-wrap: balance; }
.contact__actions { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.contact__mail { margin-top: 16px; font-size: 0.875rem; color: var(--mut); }
.contact__mail a:hover { color: var(--ink); }
.foot { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto; gap: clamp(20px, 4vw, 64px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.8rem; line-height: 1.8; color: var(--mut); }
.brand--foot { margin-bottom: 8px; color: var(--ink); }
.brand--foot img { width: 30px; }
.brand--foot .brand__name { font-size: 1rem; }
.foot__legal div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; }
.foot__legal dt { color: var(--dim); }
.foot__links a:hover { color: var(--ink); }

/* ---------- HUD (scene mode only) ---------- */
.hud, .pos, .hint { display: none; }
html.scenes .hud { display: block; position: fixed; right: calc(var(--pad) - 14px); top: 50%; transform: translateY(-50%); z-index: 45; }
.hud a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 24px; padding: 0 14px; }
.hud a::after { content: ""; width: 6px; height: 6px; background: var(--dim); transition: background 0.2s, transform 0.2s; }
.hud a span { font-size: 0.8rem; line-height: 1; color: var(--mut); opacity: 0; transform: translateX(6px); transition: opacity 0.2s, transform 0.2s; white-space: nowrap; pointer-events: none; }
.hud a:hover span, .hud a:focus-visible span { opacity: 1; transform: none; }
.hud a:hover::after { background: var(--ice); }
.hud a[aria-current]::after { background: var(--ink); transform: scale(1.7); }
html.scenes .pos { display: flex; align-items: baseline; gap: 8px; position: fixed; left: calc(var(--pad) - 8px); bottom: 18px; z-index: 45; padding: 8px; background: rgba(5, 10, 22, 0.85); font-size: 0.8rem; line-height: 1; color: var(--mut); }
.pos__n { font-weight: 400; color: var(--ink); }
.pos__tag { margin-left: 8px; color: var(--mut); }
html.scenes .hint { display: flex; flex-direction: column; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 45; font-size: 0.8rem; line-height: 1; color: var(--mut); transition: opacity 0.3s, color 0.2s; }
.hint:hover { color: var(--ink); }
.hint__chev { width: 14px; height: 14px; background:
  linear-gradient(var(--ice), var(--ice)) 6px 10px / 2px 2px, linear-gradient(var(--ice), var(--ice)) 4px 8px / 2px 2px, linear-gradient(var(--ice), var(--ice)) 8px 8px / 2px 2px,
  linear-gradient(var(--ice), var(--ice)) 2px 6px / 2px 2px, linear-gradient(var(--ice), var(--ice)) 10px 6px / 2px 2px,
  linear-gradient(var(--blue), var(--blue)) 6px 4px / 2px 2px, linear-gradient(var(--blue), var(--blue)) 4px 2px / 2px 2px, linear-gradient(var(--blue), var(--blue)) 8px 2px / 2px 2px;
  background-repeat: no-repeat; animation: bob 1.6s steps(3) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
html.scenes.at-end .hint { opacity: 0; pointer-events: none; }
html.scenes.at-end .pos { display: none; }

/* ---------- scene mode ---------- */
html.scenes, html.scenes body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.scenes main { position: fixed; inset: 0; }
html.scenes .scene { position: absolute; inset: 0; min-height: 0; border: 0; grid-template-rows: minmax(0, 1fr); padding: calc(var(--nav-h) + 12px) calc(var(--pad) + 28px) 64px; visibility: hidden; }
html.scenes .scene.is-active { visibility: visible; }
html.scenes .scene__inner { align-self: center; justify-self: start; max-height: 100%; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
html.scenes .scene__inner::-webkit-scrollbar { display: none; }
html.scenes .scene__inner.is-scroll { scrollbar-width: thin; scrollbar-color: var(--blue) transparent; padding-right: 10px; }
html.scenes .scene__inner.is-scroll::-webkit-scrollbar { display: block; width: 6px; }
html.scenes .scene__inner.is-scroll::-webkit-scrollbar-thumb { background: var(--blue); }
html.scenes .step:not(.is-on) .step__body > div { visibility: hidden; }
.is-measuring .step__body { transition: none !important; }
html[data-lang="vi"] .cmp, html[data-lang="vi"] .lead, html[data-lang="vi"] .custom__foot { font-size: 0.8125rem; }
html[data-lang="vi"] .cmp th, html[data-lang="vi"] .cmp td { padding-top: 5px; padding-bottom: 4px; }
html.agent-open { overflow: hidden; }
html:not(.js) [data-agent-open], html:not(.js) .film, html:not(.js) .term { display: none; }
html.scenes .scene--contact { padding-bottom: 28px; }

/* ---------- agent view ---------- */
.agentview { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--bg); color: var(--ice); padding: 0 var(--pad) 24px; }
.agentview__bar { display: flex; align-items: center; gap: 20px; min-height: var(--nav-h); border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.agentview__bar p:first-child { color: var(--bg); background: var(--ice); padding: 5px 8px 4px; line-height: 1; font-size: 0.8rem; white-space: nowrap; }
.agentview__req { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.agentview__req span { color: var(--ice); }
.agentview__bar .btn { margin-left: auto; padding: 9px 12px 8px; font-size: 0.8rem; }
.agentview__hint { padding: 14px 0; font-size: 0.875rem; color: var(--dim); }
.agentview__body { flex: 1; min-height: 0; margin: 0; padding: 20px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); background: rgba(10, 22, 48, 0.35); font: inherit; font-size: 0.9375rem; line-height: 1.8; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.agentview__body .h { color: var(--ice); }
.agentview__body .q { color: var(--mut); }
.agentview.is-in { animation: scan 0.35s steps(6) both; }
@keyframes scan { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* ---------- responsive (flow mode) ---------- */
@media (max-width: 899px) {
  .nav { gap: 12px; }
  .nav__links { display: none; }
  .nav__tools { margin-left: auto; gap: 8px; }
  .viewtoggle__label { display: none; }
  .scene { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 56px; }
  .split, .split--agents, .method, .obs__foot, .custom__foot, .foot { grid-template-columns: minmax(0, 1fr); }
  .film { height: 190px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
  .film::before, .film::after { display: none; }
  .film__track { flex-direction: row; align-items: flex-start; padding-top: 16px; width: max-content; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .stat:last-child { grid-column: 1 / -1; }
  .qas { grid-template-columns: minmax(0, 1fr); }
  .head { text-align: left; }
  .prompt { margin-left: 0; }
  .cmp { font-size: 0.875rem; }
  .cmp thead { display: none; }
  .cmp tbody tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--line); }
  .cmp tbody th, .cmp tbody td, .cmp tbody td:last-child { width: auto; border: 0; padding: 1px 0; }
  .term__body { height: 240px; }
  .orbit__node { width: 88px; height: 48px; margin: -24px 0 0 -44px; }
  .contact { min-height: 0; }
  .contact__main { padding: 10vh 0 4vh; }
  .foot__legal div { grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 6px; }
}
@media (max-width: 420px) {
  .brand__tag, .viewtoggle__opt--human, .agentview__req { display: none; }
  .viewtoggle[aria-pressed="false"] .viewtoggle__opt--agent { background: none; color: var(--ink); }
  .shift__head, .shift li { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); }
  .shift { font-size: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
@media (forced-colors: active) {
  .field, .wipe, .trail { display: none !important; }
  .brand img { filter: none; }
  .hud a::after { border: 1px solid CanvasText; }
  .hud a[aria-current]::after { background: CanvasText; forced-color-adjust: none; }
  .viewtoggle[aria-pressed="false"] .viewtoggle__opt--human, .viewtoggle[aria-pressed="true"] .viewtoggle__opt--agent { outline: 2px solid CanvasText; outline-offset: -2px; }
}
@media print {
  .field, .wipe, .trail, .hud, .pos, .hint, .nav__tools, .film, .orbit, .term, .rec__card { display: none !important; }
  body { background: #fff; color: #000; }
  html.scenes, html.scenes body { height: auto; overflow: visible; }
  html.scenes main { position: static; }
  html.scenes .scene { position: static; visibility: visible; }
  html.scenes .scene__inner { max-height: none !important; overflow: visible; width: auto !important; margin: 0 auto !important; transform: none !important; }
  html.scenes .step:not(.is-on) .step__body { grid-template-rows: 1fr; }
  html.scenes .step:not(.is-on) .step__body > div { visibility: visible; }
  .scene { min-height: 0; padding: 24px 0; }
  * { color: #000 !important; }
}
