/* Nền Móng website — site.css · v2 "Rõ như ban ngày".
   Tokens come from tokens.css. No framework, no decoration without a job. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--font-head); font-stretch: var(--head-stretch); color: var(--text); }
h1 { font-weight: 560; font-family: var(--font-display); font-optical-sizing: auto; font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--tracking-display); text-wrap: balance; }
h2 { font-weight: 600; font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: -.012em; text-wrap: balance; }
h2.h-serif { font-family: var(--font-display); font-optical-sizing: auto; font-stretch: normal; font-weight: 560; line-height: 1.16; }
h3 { font-weight: 580; font-size: var(--fs-h3); line-height: var(--lh-h3); text-wrap: balance; }
p { text-wrap: pretty; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); max-width: var(--measure); }
.small { font-size: var(--fs-small); color: var(--text-3); line-height: 1.5; }
.num { font-family: var(--font-head); font-stretch: var(--head-stretch); font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--page-pad)); margin-inline: auto; padding-inline: var(--page-pad); }
.sec { padding-block: var(--section-y); }
.sec--alt { background: linear-gradient(var(--bg) 0, var(--bg-alt) 96px, var(--bg-alt) calc(100% - 96px), var(--bg) 100%); }
.sec--stone { background: linear-gradient(var(--bg) 0, var(--bg-stone) 120px, var(--bg-stone) calc(100% - 120px), var(--bg) 100%); }
.sec-tight { padding-block: clamp(40px, 2rem + 2vw, 64px); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6) var(--gutter); }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }

/* "Chương" label: brass bar + plain lowercase text */
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--brand); margin-bottom: var(--s-4); }
.eyebrow::before { content: ""; flex: none; width: 20px; height: 3px; background: var(--accent); }

/* ---------- Buttons & links ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--r-sm); background: var(--cta-bg); color: var(--cta-text); font: 600 1.0625rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background var(--dur-1) var(--ease); text-align: center; }
.btn { position: relative; overflow: hidden; isolation: isolate; box-shadow: var(--shadow-cta); transition: background-color var(--t-1), translate var(--t-2) var(--ease-soft), scale var(--t-1); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); translate: -120% 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn::before { background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); } }
:root[data-theme="dark"] .btn::before { background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); }
@media (hover: hover) {
  .btn:hover { translate: 0 -1px; }
  .btn:hover::before { translate: 120% 0; transition: translate 900ms var(--ease-inout); }
}
.btn:active { translate: 0 0; scale: .99; }
.btn:hover { background: var(--cta-bg-hover); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--t-2) var(--ease-soft); }
.btn:hover svg { transform: translateX(3px); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.125rem; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 1rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--link); text-decoration: none; min-height: 44px; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow svg { width: 18px; height: 18px; flex: none; transition: transform var(--dur-1) var(--ease); }
.link-arrow:hover svg { transform: translateX(2px); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cta-note { font-size: var(--fs-small); color: var(--text-3); line-height: 1.5; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: transparent; isolation: isolate; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; background: var(--glass); -webkit-backdrop-filter: saturate(1.3) blur(16px); backdrop-filter: saturate(1.3) blur(16px); box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(21,32,48,.18); transition: opacity var(--t-2) var(--ease-soft); }
.site-header.is-solid::before { opacity: 1; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header::before { background: var(--bg); } }
@media (prefers-reduced-transparency: reduce) { .site-header::before { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
html.menu-open .site-header::before { opacity: 1; background: var(--bg); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 24px; width: auto; }
.brand .logo-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-header .brand .logo-l { display: none; } :root:not([data-theme="light"]) .site-header .brand .logo-d { display: block; } }
:root[data-theme="dark"] .site-header .brand .logo-l { display: none; }
:root[data-theme="dark"] .site-header .brand .logo-d { display: block; }

.menu-btn { width: 48px; height: 48px; margin-right: -10px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; border-radius: var(--r-sm); }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 1px; transition: transform var(--dur-2) var(--ease), background var(--dur-2); }
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -7px; } .menu-btn span::after { top: 7px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.nav-panel { position: fixed; inset: 60px 0 0 0; z-index: 40; background: var(--bg); padding: 24px var(--page-pad) 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity var(--dur-2), transform var(--dur-2) var(--ease), visibility 0s var(--dur-2); }
.nav-panel.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-links a { display: flex; align-items: center; min-height: 52px; font-size: 1.375rem; font-weight: 500; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.nav-links a[aria-current] { font-weight: 650; }
.nav-cta-s { display: none; }
.nav-actions { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.nav-actions .btn { width: 100%; min-height: 54px; }
.nav-actions .login { text-align: center; font-weight: 600; text-decoration: none; min-height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text); }
html.menu-open { overflow: hidden; }

@media (min-width: 1180px) {
  .site-header .bar { height: 72px; }
  .brand img { height: 28px; }
  .menu-btn { display: none; }
  .nav-panel { position: static; inset: auto; z-index: auto; flex: 1; flex-direction: row; align-items: center; justify-content: space-between; padding: 0 0 0 32px; background: none; visibility: visible; opacity: 1; transform: none; overflow: visible; gap: 16px; }
  .nav-links { flex-direction: row; gap: 22px; }
  .nav-links a { white-space: nowrap; position: relative; min-height: 44px; font-size: 1rem; color: var(--text-2); border: 0; }
  .nav-links a:hover { color: var(--text); }
  .nav-links a[aria-current] { color: var(--text); font-weight: 600; }
  .nav-links a[aria-current]::after { content: ""; position: absolute; left: 0; bottom: 4px; width: 16px; height: 2px; background: var(--accent); }
  .nav-actions { flex-direction: row; align-items: center; gap: 20px; }
  .nav-actions .btn { width: auto; min-height: 40px; padding: 0 16px; font-size: 1rem; }
  .nav-actions .login { min-height: 44px; font-weight: 500; color: var(--text-2); }
  .nav-actions .login:hover { color: var(--text); }
  .nav-cta-l { display: none; } .nav-cta-s { display: inline; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding-top: clamp(24px, 1rem + 2.5vw, 64px); padding-bottom: 0; }
.hero::before { content: ""; position: absolute; inset: -80px 0 auto; height: min(1100px, 150vh); z-index: -1; pointer-events: none; background: radial-gradient(55% 45% at 72% 58%, var(--glow-steel), transparent 70%), radial-gradient(35% 30% at 12% 8%, var(--glow-brass), transparent 70%), linear-gradient(180deg, color-mix(in srgb, #fff 60%, var(--bg)) 0%, var(--bg) 70%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero::before { background: radial-gradient(55% 45% at 72% 58%, var(--glow-steel), transparent 70%), radial-gradient(35% 30% at 12% 8%, var(--glow-brass), transparent 70%); } }
:root[data-theme="dark"] .hero::before { background: radial-gradient(55% 45% at 72% 58%, var(--glow-steel), transparent 70%), radial-gradient(35% 30% at 12% 8%, var(--glow-brass), transparent 70%); }
@media (prefers-contrast: more) { .hero::before { display: none; } }
.hero .eyebrow { color: var(--text-2); font-weight: 500; }
.hero .eyebrow::before { display: none; }
.hero .eyebrow { max-width: 30ch; }
.hero h1 { max-width: 15ch; margin-bottom: var(--s-5); }
.hero .lead { margin-bottom: var(--s-6); }
.hero-cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.hero-cta .cta-note { max-width: 36ch; }
@media (min-width: 768px) {
  .hero .eyebrow { max-width: none; }
  .hero h1 { max-width: none; }
  .hero-cta .cta-note { max-width: 52ch; }
  .hero-cta { flex-direction: row; align-items: center; gap: 20px; }
}
@media (max-width: 767px) {
  .hero-cta .btn { width: 100%; }
  .hero-stage-d { display: none; }
}
@media (min-width: 768px) { .hero-stage-m { display: none; } }

/* ---------- Stage (display table) + figure ---------- */
.stage { position: relative; isolation: isolate; border-radius: var(--r-xl); padding: var(--stage-pad); view-timeline: --stage block; }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--stage-bg); box-shadow: var(--shadow-stage); }
.stage .lamp { position: absolute; left: 50%; top: 50%; width: 600px; height: 600px; margin: -300px 0 0 -300px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--lamp), transparent); pointer-events: none; }
@media (max-width: 1099px) { .stage .lamp { display: none; } }
.stage-wrap { margin-top: var(--s-6); }
.shot { position: relative; margin: 0 auto; width: 100%; max-width: var(--shot-w, 1040px); container-type: inline-size; }
.shot .zoom { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-shot); cursor: zoom-in; background: #fff; transition: translate var(--t-2) var(--ease-soft); }
.shot::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none; transition: opacity var(--t-2) var(--ease-soft), translate var(--t-2) var(--ease-soft); }
@media (hover: hover) { .shot .zoom:hover { translate: 0 -4px; } .shot:has(.zoom:hover)::after { opacity: 1; translate: 0 -4px; } }
.shot picture, .shot img { display: block; width: 100%; }
.shot img { height: auto; filter: var(--shot-filter); }
.stage-cap { margin-top: var(--s-3); font-size: var(--fs-caption); color: var(--text-3); line-height: 1.5; }
.stage-cap::before { content: ""; }
.hint-zoom { display: none; }
@media (max-width: 767px) { .hint-zoom { display: inline; } .stage { padding: var(--s-4); } }

/* Callouts: dot on the picture, a straight line to the nearest edge, a label OUTSIDE the picture (>=1100px). */
.callout { position: absolute; left: calc(var(--x) * 1%); width: 0; pointer-events: none; }
.callout .dot { position: absolute; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-strong); }
.callout .lab { position: absolute; width: max-content; max-width: 380px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text); font-size: .9375rem; font-weight: 500; line-height: 1.4; box-shadow: var(--shadow-1); }
.callout .lab b { font-family: var(--font-head); font-stretch: var(--head-stretch); font-weight: 700; font-variant-numeric: tabular-nums; }
.callout-list { display: none; }

/* <768: numbered dots + list under the picture */
@media (max-width: 767px) {
  .callout { top: calc(var(--y) * 1%); }
  .callout .dot { top: -11px; left: -11px; width: 22px; height: 22px; box-shadow: 0 0 0 2px var(--surface); display: grid; place-items: center; font: 600 12px/1 var(--font-head); color: #0D131B; }
  .callout .dot::after { content: attr(data-n); }
  .callout .lab { display: none; }
  .callout-list { display: grid; gap: 8px; margin-top: var(--s-4); counter-reset: c; }
  .callout-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: baseline; font-size: 1.0625rem; line-height: 1.5; color: var(--text-2); }
  .callout-list li::before { counter-increment: c; content: counter(c); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #0D131B; font: 600 12px/22px var(--font-head); text-align: center; align-self: start; margin-top: 2px; }
}
/* 768–1099: no overlay on the picture (it would hide the numbers) — the caption + sr-only list carry the notes */
@media (min-width: 768px) and (max-width: 1099px) {
  .callout:not(.callout--n) { display: none; }
}
@media (min-width: 768px) and (max-width: 1099px) { .callout-list { display: grid; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* >=1100: label outside, vertical line to the nearest edge */
@media (min-width: 1100px) {
  .callout::before { content: ""; position: absolute; left: -.5px; width: 1px; background: var(--text-3); opacity: .7; }
  .callout[data-side] { height: 0; }
  .callout[data-side="top"] { top: 0; }
  .callout[data-side="bottom"] { top: auto; bottom: 0; }
  .callout[data-side] .dot { display: none; }
  .callout[data-side]::before { height: 14px; }
  .callout[data-side="top"]::before { top: -14px; bottom: auto; }
  .callout[data-side="bottom"]::before { bottom: -14px; top: auto; }
  .callout[data-side]::after { content: ""; position: absolute; left: -5px; border: 5px solid transparent; }
  .callout[data-side="top"]::after { top: -1px; border-top-color: var(--text-3); border-bottom-width: 0; }
  .callout[data-side="bottom"]::after { bottom: -1px; border-bottom-color: var(--text-3); border-top-width: 0; }
  .callout[data-side="top"] .lab { bottom: calc(100% + 14px); }
  .callout[data-side="bottom"] .lab { top: calc(100% + 14px); }
  .callout .lab { left: 50%; transform: translateX(-50%); white-space: nowrap; max-width: none; }
  .callout[data-align="start"] .lab { left: -12px; transform: none; }
  .callout[data-align="end"] .lab { left: auto; right: -12px; transform: none; }
  .callout-list { display: grid; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stage.has-top { padding-top: 64px; }
  .stage.has-bot { padding-bottom: 64px; }
  .stage.has-bot .stage-cap-in { margin-top: 0; }
}

/* Numbered dot variant (paper sheet): number + list below at every width */
.callout--n { top: calc(var(--y) * 1%); }
.callout--n::before, .callout--n .lab { display: none; }
.callout--n .dot { top: -11px; left: -11px; width: 22px; height: 22px; box-shadow: 0 0 0 2px #fff; display: grid; place-items: center; font: 600 12px/1 var(--font-head); color: #0D131B; }
.callout--n .dot::after { content: attr(data-n); }

/* ---------- Chapters ---------- */
.chapter-head { margin-bottom: var(--s-6); }
.chapter-head h2 { max-width: 30ch; }
.chapter-body { display: grid; gap: var(--s-6) var(--gutter); }
.chapter-body .lead { margin-top: var(--s-3); }
.chapter-body h3 { margin-bottom: 0; }
.chapter-body .link-arrow { margin-top: var(--s-4); }
@media (min-width: 960px) {
  .chapter-body { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .chapter-text { grid-column: 1 / span 5; }
  .points { grid-column: 7 / span 6; }
}
.points > li, .rules > li { padding: 14px 0; border-top: 1px solid var(--line); }
.points > li:last-child, .rules > li:last-child { border-bottom: 1px solid var(--line); }
.points h4, .rules h4 { font: 600 1.125rem/1.35 var(--font-body); margin: 0 0 4px; color: var(--text); }
.points p, .rules p { color: var(--text-2); font-size: 1.0625rem; line-height: 1.55; max-width: 60ch; }
.sec--alt .points > li, .sec--alt .rules > li { border-color: var(--line-strong); border-color: color-mix(in srgb, var(--line-strong) 40%, transparent); }

/* ---------- Also ---------- */
.also h3 { margin-bottom: var(--s-5); }
.also-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.also-grid > li { padding: 12px 0; border-top: 1px solid var(--line); }
.also-grid h4 { font: 600 1.0625rem/1.35 var(--font-body); margin-bottom: 2px; }
.also-grid p { font-size: 1rem; line-height: 1.5; color: var(--text-2); }
@media (min-width: 720px) { .also-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); } }
@media (min-width: 1100px) { .also-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .also-grid > li { padding: 16px 0 20px; } }
.also-grid > li:last-child, .also-grid > li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .also-grid > li:nth-last-child(2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 719px) { .also-grid > li:nth-last-child(2) { border-bottom: 0; } }
@media (min-width: 1100px) { .also-grid > li:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); } }

/* ---------- Flow (one day) ---------- */
.flow-head { margin-bottom: var(--s-6); }
.flow-head h2 { max-width: 34ch; }
.flow-head .lead { margin-top: var(--s-3); }
.flow { display: grid; gap: 0; position: relative; margin-left: 5px; border-left: 1px solid var(--line-strong); padding-left: 24px; }
.flow > li { position: relative; padding: 0 0 20px; }
.flow > li:last-child { padding-bottom: 0; }
.flow > li::before { content: ""; position: absolute; left: -29px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.flow time { display: block; font: 600 1.25rem/1.3 var(--font-head); font-stretch: var(--head-stretch); color: var(--brand); font-variant-numeric: tabular-nums; }
.flow .who { display: block; font-weight: 600; margin: 0 0 2px; }
.flow p { color: var(--text-2); font-size: 1.0625rem; line-height: 1.55; }
.flow-note { margin-top: var(--s-6); }
@media (min-width: 960px) {
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); margin: 0; padding: 0; border-left: 0; border-top: 1px solid var(--line-strong); }
  .flow > li { padding: 24px 0 0; }
  .flow > li::before { left: 0; top: -5px; }
}

/* ---------- Rules (money control) ---------- */
.rules-grid { display: grid; gap: var(--s-6) var(--gutter); align-items: start; }
.rules-intro { margin-bottom: var(--s-6); }
.rules-intro h2 { max-width: 30ch; }
.rules-intro .lead { margin-top: var(--s-3); }
.rules-cta { margin-top: var(--s-6); }
.config-line { margin-top: var(--s-7); max-width: 80ch; font-size: var(--fs-small); color: var(--text-2); line-height: 1.55; }
@media (min-width: 960px) {
  .rules-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .rules-fig { grid-column: 1 / span 7; position: sticky; top: 112px; }
  .rules-col { grid-column: 8 / span 5; }
  .rules-col .rules-cta { margin-top: var(--s-5); }
}

/* ---------- Real things: phone + paper ---------- */
.real-head h2 { max-width: 22ch; margin-bottom: var(--s-7); }
.real { display: grid; gap: var(--s-8) var(--gutter); }
.real h3 { margin-bottom: var(--s-3); }
.real .lead { font-size: 1.125rem; }
.real-objs { margin-top: var(--s-6); }
@media (min-width: 960px) { .real-objs { margin-top: var(--s-7); } }
@media (min-width: 960px) { .real { grid-template-columns: repeat(12, minmax(0, 1fr)); } .real-a { grid-column: 1 / span 6; } .real-b { grid-column: 7 / span 6; } }
.phones { display: flex; gap: 32px; align-items: flex-start; justify-content: center; }
.phone-fig { margin: 0; }
.phone { --pw: 272px; width: var(--pw); padding: 9px; background: var(--phone-bezel); border-radius: calc(var(--pw) * .16); box-shadow: var(--shadow-phone); }
.phone .zoom { display: block; border-radius: calc(var(--pw) * .125); overflow: hidden; aspect-ratio: 390 / 844; background: #fff; cursor: zoom-in; }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--shot-filter); }
.phone-fig:nth-child(2) { margin-top: 40px; }
.phone-fig figcaption, .sheet-fig figcaption { margin-top: var(--s-3); font-size: var(--fs-caption); color: var(--text-3); line-height: 1.5; max-width: 272px; }
.phone-b { display: none; }
@media (max-width: 767px) { .phone { --pw: 240px; } .phone-fig:nth-child(1) { display: none; } .phone-fig:nth-child(2) { margin-top: 0; } .phones { justify-content: center; } .phone-fig figcaption { max-width: none; text-align: center; } }
.sheet-fig { margin: 0; }
.sheet-stack { position: relative; max-width: 440px; margin-inline: auto; }
.sheet { position: relative; display: block; max-width: 100%; border-radius: var(--r-paper); background: #fff; box-shadow: var(--shadow-sheet); overflow: visible; cursor: zoom-in; }
.sheet img { display: block; width: 100%; height: auto; border-radius: var(--r-paper); }
@media (min-width: 960px) {
  .sheet-stack::before { content: ""; position: absolute; inset: 0; background: #fff; border-radius: 2px; box-shadow: var(--shadow-sheet); transform: translate(24px, -10px) rotate(-2deg); }
}
.sheet-fig figcaption { max-width: none; text-align: left; }
.sheet-notes { display: grid; gap: 8px; margin-top: var(--s-4); }
.sheet-notes b { font-family: var(--font-head); font-stretch: var(--head-stretch); font-variant-numeric: tabular-nums; color: var(--text); }
.sheet-notes li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 1.0625rem; line-height: 1.5; color: var(--text-2); }
.sheet-notes li::before { content: attr(data-n); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #0D131B; font: 600 12px/22px var(--font-head); text-align: center; margin-top: 2px; }

/* ---------- Security ---------- */
.sec-grid { display: grid; gap: var(--s-6) var(--gutter); }
.sec-grid h2 { max-width: 20ch; margin-bottom: var(--s-4); }
.sec-grid .honest { margin-top: var(--s-5); color: var(--text-2); max-width: 52ch; }
@media (min-width: 960px) { .sec-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } .sec-text { grid-column: 1 / span 5; } .sec-grid .points { grid-column: 7 / span 6; } }

/* ---------- FAQ ---------- */
.faq-wrap h2 { margin-bottom: var(--s-6); }
.faq { max-width: 790px; border-bottom: 1px solid var(--line); }
details.qa { border-top: 1px solid var(--line); }
details.qa summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 0; font-size: 1.1875rem; font-weight: 600; line-height: 1.4; cursor: pointer; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: ""; flex: none; width: 22px; height: 22px; background: linear-gradient(var(--text-2), var(--text-2)) center / 14px 2px no-repeat, linear-gradient(var(--text-2), var(--text-2)) center / 2px 14px no-repeat; transition: rotate var(--t-2) var(--ease-inout); }
details.qa[open] summary::after { rotate: 45deg; }
details.qa summary { border-radius: var(--r-md); transition: background-color var(--t-1) linear; }
@media (hover: hover) { details.qa summary:hover { background: var(--bg-alt); } }
:root { interpolate-size: allow-keywords; }
details.qa::details-content { block-size: 0; overflow: clip; transition: block-size var(--t-3) var(--ease-inout), content-visibility var(--t-3) allow-discrete; }
details.qa[open]::details-content { block-size: auto; }
details.qa .ans { padding: 0 40px 20px 0; color: var(--text-2); max-width: var(--measure); }
details.qa .ans p + p { margin-top: 8px; }

/* ---------- Trial panel ---------- */
.trial-panel { background: var(--surface); border: 1px solid var(--line); border-bottom: 4px solid var(--accent); border-radius: var(--r-lg); padding: clamp(20px, 3.5vw, 48px); box-shadow: var(--shadow-1); }
.trial-top { display: grid; gap: var(--s-5) var(--gutter); }
.trial-top h2 { max-width: 20ch; }
.trial-top .lead { margin-top: var(--s-3); max-width: 52ch; }
.trial-act { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.trial-act .btn { width: 100%; }
@media (min-width: 960px) { .trial-top { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } .trial-act { align-items: flex-start; } .trial-act .btn { width: auto; } }
.steps { display: grid; gap: 0; margin-top: var(--s-6); border-top: 1px solid var(--line); counter-reset: s; }
.steps > li { padding: 18px 0; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; border-bottom: 1px solid var(--line); }
.steps > li::before { counter-increment: s; content: counter(s); font: 600 1.75rem/1.1 var(--font-head); font-stretch: var(--head-stretch); color: var(--brand); }
.steps h4 { font: 600 1.125rem/1.35 var(--font-body); margin-bottom: 2px; }
.steps p { color: var(--text-2); font-size: 1.0625rem; line-height: 1.55; }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); } .steps > li { border-bottom: 0; padding: 24px 0 0; } }
.know { margin-top: var(--s-6); }
.know h3 { font: 600 1.125rem/1.35 var(--font-body); margin-bottom: var(--s-3); }
.know ul { display: grid; gap: 8px 32px; }
.know li { position: relative; padding-left: 18px; font-size: 1.0625rem; line-height: 1.55; color: var(--text-2); }
.know li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
@media (min-width: 720px) { .know ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trial-links { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: var(--fs-small); }
.trial-links a { color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: var(--deep-text-2); padding: var(--s-8) 0 var(--s-6); }
.site-footer .brand img { height: 28px; }
.foot-grid { display: grid; gap: var(--s-6) var(--gutter); }
.foot-about p { margin-top: var(--s-4); max-width: 36ch; font-size: 1rem; line-height: 1.55; }
.foot-col h4 { font: 600 .9375rem/1.4 var(--font-body); color: var(--deep-text); margin-bottom: 10px; }
.foot-col ul { display: grid; gap: 0; }
.foot-col a { display: inline-flex; align-items: center; min-height: 40px; color: var(--deep-text-2); text-decoration: none; font-size: 1rem; }
.foot-col a:hover { color: var(--deep-text); text-decoration: underline; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); }
.foot-base { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--deep-line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: var(--fs-caption); color: var(--deep-text-3); }
.foot-base a { color: var(--deep-text-3); }
@media (min-width: 960px) { .foot-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { body { padding-bottom: 0; } }

/* ---------- Sticky CTA (phones only; hides itself while any other CTA button is on screen) ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 8px var(--page-pad) calc(8px + env(safe-area-inset-bottom)); background: var(--glass); -webkit-backdrop-filter: saturate(1.3) blur(16px); backdrop-filter: saturate(1.3) blur(16px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -14px rgba(21,32,48,.25); transform: translateY(110%); visibility: hidden; transition: transform 320ms var(--ease-out), visibility 0s 240ms; }
@media (prefers-reduced-transparency: reduce) { .sticky-cta { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.sticky-cta.is-on { transform: none; visibility: visible; transition-delay: 0s; }
.sticky-cta .btn { width: 100%; min-height: 52px; }
@media (min-width: 900px) { .sticky-cta { display: none; } }
@media (max-width: 899px) { body.has-sticky { padding-bottom: 72px; } }

/* ---------- Lightbox ---------- */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.lightbox::backdrop { background: rgba(8, 14, 22, .82); }
.lb-inner { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 16px; }
.lb-scroll { max-width: 100%; max-height: calc(100vh - 120px); overflow: auto; border-radius: var(--r-md); background: #fff; touch-action: pan-x pan-y pinch-zoom; -webkit-overflow-scrolling: touch; }
.lb-scroll img { display: block; max-width: none; width: min(96vw, 1500px); height: auto; filter: none; }
@media (max-width: 767px) { .lb-scroll img { width: 230vw; } }
.lb-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: var(--r-sm); border: 0; background: #fff; color: #101828; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-cap { margin-top: 12px; color: #EEF1F4; font-size: var(--fs-caption); text-align: center; max-width: 80ch; }

/* ---------- Sub-pages ---------- */
.crumbs { font-size: var(--fs-small); color: var(--text-3); margin-bottom: var(--s-4); }
.crumbs a { color: var(--text-2); }
.page-hero { padding-top: clamp(28px, 1rem + 3vw, 64px); padding-bottom: clamp(28px, 1rem + 2vw, 48px); }
.page-hero h1, .nf h1, .legal-hero h1 { font-family: var(--font-head); font-weight: 650; font-stretch: var(--head-stretch); }
.page-hero h1 { font-size: clamp(2.125rem, 1.4rem + 2.8vw, 3.5rem); max-width: 22ch; margin-bottom: var(--s-4); }
.page-hero .lead { margin-bottom: var(--s-5); }
.doc { display: grid; gap: var(--s-6) var(--gutter); padding-bottom: var(--section-y); }
.toc { font-size: 1rem; }
.toc-m { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 16px; background: var(--surface); }
.toc-m summary { min-height: 52px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.toc-m ol, .toc-m ul { padding: 0 0 12px; }
.toc a { display: flex; align-items: center; min-height: 40px; color: var(--text-2); text-decoration: none; }
.toc a[aria-current] { color: var(--text); font-weight: 650; }
.toc-d { display: none; }
@media (min-width: 1180px) {
  .doc { grid-template-columns: 240px minmax(0, 1fr); column-gap: 64px; align-items: start; }
  .toc-m { display: none; }
  .toc-d { display: block; position: sticky; top: 100px; max-height: calc(100vh - 124px); overflow: auto; }
  .toc-d .toc-h { font-weight: 600; margin-bottom: 8px; }
  .toc-d a { min-height: 36px; padding-left: 14px; position: relative; font-size: .9375rem; line-height: 1.35; padding-block: 4px; }
  .toc-d a[aria-current]::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 2px; margin-top: -1px; background: var(--accent); }
}
.doc-main { min-width: 0; max-width: 720px; }
.sec-doc { padding-top: var(--s-8); }
.sec-doc:first-child { padding-top: 0; }
.sec-doc h2 { margin-bottom: var(--s-4); font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); }
.sec-doc p { color: var(--text-2); max-width: var(--measure); }
.sec-doc p + p { margin-top: var(--s-3); }
.doc-fig { margin-top: var(--s-6); }
.doc-fig .stage { padding: var(--s-4); }
@media (min-width: 720px) { .doc-fig .stage { padding: var(--s-6); } }
.doc-main .rv-cta { margin-top: var(--s-8); padding: var(--s-5); background: var(--brand-tint); border-radius: var(--r-md); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.doc-main .rv-cta p { font-weight: 600; max-width: 34ch; color: var(--text); }
.not-promise { background: var(--brand-tint); border-radius: var(--r-md); padding: var(--s-5); }
.not-promise h2 { margin-bottom: var(--s-3); }
.panel-end .trial-panel { margin-top: 0; }
.panel-end .trial-top { align-items: center; }

/* Wide figure pages (rental): figures can be wider than the 720 text column */
.doc-main--wide { max-width: 940px; }

/* ---------- Legal reading layout ---------- */
.legal-doc .doc-main { max-width: 720px; font-size: 1.0625rem; line-height: 1.7; }
.legal-meta { font-size: var(--fs-small); color: var(--text-3); margin-bottom: var(--s-3); }
.legal-meta a { color: var(--text-2); }
.legal-body h2 { font-size: 1.75rem; line-height: 1.25; margin: var(--s-8) 0 var(--s-4); scroll-margin-top: 96px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font: 600 1.1875rem/1.4 var(--font-body); margin: var(--s-6) 0 var(--s-2); color: var(--text); scroll-margin-top: 96px; }
.legal-body p { color: var(--text-2); margin-top: var(--s-3); max-width: none; }
.legal-body ul { margin: var(--s-3) 0 0; padding-left: 24px; list-style: disc; color: var(--text-2); }
.legal-body ul ul { margin-top: 4px; list-style: circle; }
.legal-body li { margin-top: 6px; padding-left: 2px; }
.legal-body li::marker { color: var(--text-3); }
.legal-body code { font: inherit; font-weight: 600; background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-hero h1 { max-width: 24ch; }

/* ---------- 404 ---------- */
.nf { padding: clamp(56px, 8vw, 128px) 0; }
.nf h1 { max-width: 18ch; margin-bottom: var(--s-4); }
.nf .lead { margin-bottom: var(--s-6); }

/* ---------- Print (legal pages) ---------- */
@media print {
  .site-header, .site-footer, .toc, .toc-m, .toc-d, .sticky-cta, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .legal-body p, .legal-body ul, .legal-body li { color: #000; }
  a { color: #000; }
  .legal-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .doc { display: block; }
  .legal-body h2 { page-break-after: avoid; }
}


/* ---------- Phones: tighter vertical rhythm (page budget on mobile ≤ 10.000px) ---------- */
@media (max-width: 767px) {
  :root { --lh-body: 1.55; }
  .hero { padding-top: 20px; }
  .hero .lead { margin-bottom: var(--s-5); }
  .hero h1 { margin-bottom: var(--s-4); }
  .stage-wrap { margin-top: var(--s-5); }
  .chapter-head { margin-bottom: var(--s-4); }
  .chapter-body { gap: var(--s-4); }
  .chapter-body .lead { font-size: 1.0625rem; margin-top: var(--s-2); }
  .chapter-body .link-arrow { margin-top: var(--s-2); }
  .points > li, .rules > li { padding: 11px 0; }
  .points p, .rules p, .flow p, .steps p { line-height: 1.5; }
  .also-grid > li { padding: 10px 0; }
  .also-grid > li p { display: none; }
  .also-grid > li.keep p { display: block; margin-top: 2px; }
  .flow-head { margin-bottom: var(--s-5); }
  .flow > li { padding-bottom: 14px; }
  .flow time { display: inline; margin-right: 8px; font-size: 1.125rem; }
  .flow .who { display: inline; }
  .rules-intro { margin-bottom: var(--s-4); }
  .config-line { margin-top: var(--s-5); }
  .real-head h2 { margin-bottom: var(--s-5); }
  .real { gap: var(--s-6); }
  .real-objs { margin-top: var(--s-4); }
  .phone { --pw: 216px; }
  .sheet-stack { max-width: 300px; }
  .real-note { margin-top: var(--s-5) !important; }
  .trial-top .lead { margin-top: var(--s-2); }
  .steps { margin-top: var(--s-4); }
  .steps > li { padding: 12px 0; }
  .know { margin-top: var(--s-4); }
  .know ul { gap: 4px; }
  .trial-links { margin-top: var(--s-3); }
  .site-footer { padding: var(--s-6) 0 var(--s-5); }
  .foot-grid { gap: var(--s-5); }
  .foot-about p { margin-top: var(--s-3); }
  .foot-cols { gap: var(--s-4) var(--gutter); }
  .foot-col a { min-height: 36px; }
  .foot-base { margin-top: var(--s-5); padding-top: var(--s-4); }
  .faq-wrap h2 { margin-bottom: var(--s-4); }
  details.qa summary { min-height: 60px; padding: 10px 0; font-size: 1.125rem; }
  .page-hero { padding-top: 20px; }
}

@media (max-width: 767px) {
  :root { --fs-h2: 1.75rem; --fs-h3: 1.25rem; }
  .foot-col--prod { display: none; }
  .trial-panel { padding: 16px; }
  .phone-shot { --shot-w: 216px !important; }
}

@media (max-width: 767px) {
  /* page budget: the day-timeline is a desktop block (the same facts are in the chapters); "also" becomes one wrapped line list */
  .also-grid { display: block; margin: 0; }
  .also-grid > li { display: inline; padding: 0; border: 0 !important; }
  .also-grid > li h4 { display: inline; font-size: 1.0625rem; font-weight: 500; color: var(--text-2); }
  .also-grid > li::after { content: " · "; color: var(--text-3); }
  .also-grid > li:last-child::after { content: ""; }
  .also-grid > li.keep p { display: none; }
  .also h3 { margin-bottom: var(--s-3); }
  .also-grid { line-height: 1.8; }
}

@media (max-width: 767px) {
  .lead-d { display: none; }
  .hero .phone { --pw: 196px; }
  .real .phone { --pw: 196px; }
  .phone-shot { --shot-w: 196px !important; }
}

@media (max-width: 767px) {
  /* chapter pictures on a phone: caption + tap-to-zoom only (numbered dots stay on the hero phone and the paper sheet) */
  .stage--pm .callout, .stage--pm .callout-list { display: none; }
  .stage { padding: 12px; }
  .lead-d, .chapter-body .lead { display: none; }
  #cho-thue .chapter-body .lead { display: block; }
}
@media (max-width: 767px) { .config-d { display: none; } }

/* Paper sheet badges: OUTSIDE the paper edge (left), with a short stub pointing in */
.callout--n.out { left: -6px; top: calc(var(--y) * 1%); }
.callout--n.out::before { display: block; content: ""; position: absolute; left: 0; top: -.5px; width: 8px; height: 1px; background: var(--text-3); }
.callout--n.out .dot { left: -30px; top: -11px; }
.callout--n.out .dot { box-shadow: 0 0 0 2px var(--bg-stone); }
@media (max-width: 767px) { .callout--n.out .dot { left: -28px; } .sheet-stack { margin-left: 34px; margin-right: 0; } }

/* =====================================================================
   v2.1 MOTION: enter slowly, stop softly; the text being read never moves.
   Nothing is hidden unless html.js (set synchronously by boot.js). No infinite loops. No overshoot.
   ===================================================================== */
@font-face { font-family: "NM Serif Fallback"; src: local("Georgia"); size-adjust: 96%; ascent-override: 94%; descent-override: 26%; line-gap-override: 0%; }

@keyframes nm-rise   { from { opacity: 0; translate: 0 14px; } }
@keyframes nm-word   { from { opacity: 0; translate: 0 .35em; filter: blur(6px); } }
@keyframes nm-word-m { from { translate: 0 .2em; } }
@keyframes nm-stage  { from { translate: 0 40px; scale: .975; } }
@keyframes nm-stage-m { from { translate: 0 24px; } }
@keyframes nm-open   { from { scale: .94 .9; opacity: .5; } }
@keyframes nm-settle { from { translate: 0 48px; scale: .97; } }
@keyframes nm-drift-far { to { translate: 0 120px; } }
@keyframes nm-drift-near { to { translate: 0 -24px; } }
@keyframes nm-sheen  { from { translate: -120% 0; } to { translate: 120% 0; } }
@keyframes nm-progress { to { scale: 1 1; } }
@keyframes nm-dot { to { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); scale: 1.25; } }

/* 1. Reveal of content blocks: by TIME (IntersectionObserver), once. Never scroll-linked, so text is never half transparent. */
html.js .rv { opacity: 0; translate: 0 var(--rise); filter: blur(var(--blur-in)); transition: opacity var(--t-3) var(--ease-out), translate var(--t-3) var(--ease-out), filter var(--t-3) var(--ease-out); transition-delay: calc(var(--d, 0) * var(--stagger)); }
html.js .rv--media { filter: none; }
html.js .rv.is-in { opacity: 1; translate: 0 0; filter: none; }

/* 2. Hero: runs from the first frame in CSS (no JS wait). The LCP picture never has opacity < 1. */
.hero h1 .ln { display: block; }
@media (prefers-reduced-motion: no-preference) {
  html.js .hero .eyebrow { animation: nm-rise var(--t-3) var(--ease-out) both; }
  html.js .hero h1 .w { display: inline-block; animation: nm-word var(--t-4) var(--ease-out) both; animation-delay: calc(80ms + var(--i) * 42ms); }
  html.js:not(.nm-ready) .hero h1 .w { animation-play-state: paused; }
  html.js .hero .lead { animation: nm-rise var(--t-3) var(--ease-out) 520ms both; }
  html.js .hero-cta { animation: nm-rise var(--t-3) var(--ease-out) 640ms both; }
  html.js .hero .stage { animation: nm-stage var(--t-5) var(--ease-out) 260ms both; }
  html.js .hero-cta .btn::before { animation: nm-sheen 900ms var(--ease-inout) 1600ms 1 both; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  html.js .hero h1 .w { animation-name: nm-word-m; }
  html.js .hero .stage { animation-name: nm-stage-m; }
  html.js .hero-cta .btn::before { animation: none; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 768px) and (max-width: 1099px) {
  html.js .hero h1 .w { animation-name: nm-word-m; }
}
/* hero glow drifts with scroll (desktop only, far layer) */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 1100px) {
    .hero::before { animation: nm-drift-far linear both; animation-timeline: scroll(root); animation-range: 0 900px; }
  }
}

/* 3. Display table "opens": 3 layers, scroll-linked, settled before the reader arrives */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
    .sec .stage::before { animation: nm-open linear both; animation-timeline: --stage; animation-range: entry 0% entry 90%; }
    .sec .stage .shot { animation: nm-settle both; animation-timing-function: var(--ease-out); animation-timeline: --stage; animation-range: entry 10% cover 45%; }
  }
}
@supports not (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html.js .sec .stage-wrap .stage::before { scale: .94 .9; opacity: .5; transition: scale var(--t-4) var(--ease-out), opacity var(--t-4) var(--ease-out); }
    html.js .sec .stage-wrap .shot { translate: 0 48px; scale: .97; transition: translate var(--t-4) var(--ease-out), scale var(--t-4) var(--ease-out); }
    html.js .sec .stage-wrap.is-in .stage::before, html.js .sec .stage-wrap.is-in .shot { scale: 1; opacity: 1; translate: 0 0; }
  }
}

/* 4. Callouts: label first, then the line is drawn towards the picture, then the arrow head. --k set at build. */
html.js .callout .lab { opacity: 0; translate: 0 6px; transition: opacity var(--t-2) var(--ease-out), translate var(--t-2) var(--ease-out); transition-delay: calc(var(--k, 0) * 140ms + 200ms); }
html.js .callout[data-side]::before { scale: 1 0; transition: scale var(--t-3) var(--ease-out); transition-delay: calc(var(--k, 0) * 140ms + 380ms); }
html.js .callout[data-side="top"]::before { transform-origin: top; }
html.js .callout[data-side="bottom"]::before { transform-origin: bottom; }
html.js .callout[data-side]::after { opacity: 0; transition: opacity var(--t-1) linear calc(var(--k, 0) * 140ms + 900ms); }
html.js .is-in .callout .lab { opacity: 1; translate: 0 0; }
html.js .is-in .callout[data-side]::before { scale: 1 1; }
html.js .is-in .callout[data-side]::after { opacity: 1; }
[data-count] { display: inline-block; font-variant-numeric: tabular-nums; text-align: right; }

/* 5. One day: copper progress line + dots follow the scroll; the TEXT never changes opacity */
.flow::after { content: ""; position: absolute; pointer-events: none; background: var(--accent); }
@media (min-width: 960px) { .flow::after { left: 0; right: 0; top: -1px; height: 2px; transform-origin: left; } }
@media (max-width: 959px) { .flow::after { left: -1px; top: 0; bottom: 0; width: 2px; transform-origin: top; } }
html.js .flow::after { scale: 0 1; }
@media (max-width: 959px) { html.js .flow::after { scale: 1 0; } }
.flow { view-timeline: --flow block; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .flow::after { animation: nm-progress linear both; animation-timeline: --flow; animation-range: cover 25% cover 60%; }
    .flow > li::before { animation: nm-dot linear both; animation-timeline: --flow; animation-range: cover calc(25% + var(--i) * 8.75%) cover calc(27% + var(--i) * 8.75%); }
  }
}
@supports not (animation-timeline: view()) {
  html.js .flow.is-in::after { scale: 1 1; transition: scale 1400ms var(--ease-inout) 200ms; }
  html.js .flow > li::before { transition: background-color var(--t-2), box-shadow var(--t-2), scale var(--t-2) var(--ease-out); }
  html.js .flow.is-in > li::before { background: var(--accent); scale: 1.25; transition-delay: calc(200ms + var(--i) * 280ms); }
}
@media (prefers-reduced-motion: reduce) { html.js .flow::after { scale: 1 1; } .flow > li::before { background: var(--accent); } }

/* 6. Phones + paper: "placed on the table" once */
@media (prefers-reduced-motion: no-preference) {
  html.js .sheet-stack .sheet { translate: 0 -28px; rotate: 1.2deg; }
  html.js .sheet-stack.is-in .sheet { translate: 0 0; rotate: 0deg; transition: translate 1000ms var(--ease-out), rotate 1000ms var(--ease-out); }
  html.js .phones .phone-fig { translate: 0 32px; opacity: 0; transition: translate var(--t-4) var(--ease-out), opacity var(--t-3) var(--ease-out); }
  html.js .phones .phone-fig:nth-child(2) { transition-delay: 120ms; }
  html.js .phones.is-in .phone-fig { translate: 0 0; opacity: 1; }
  html.js .sheet-stack .callout--n .dot { scale: .4; opacity: 0; transition: scale var(--t-2) var(--ease-out), opacity var(--t-2) linear; transition-delay: calc(900ms + var(--k, 0) * 160ms); }
  html.js .sheet-stack.is-in .callout--n .dot { scale: 1; opacity: 1; }
}
@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  html.js .sheet-stack::before { transform: none; transition: transform 1100ms var(--ease-out) 120ms; }
  html.js .sheet-stack.is-in::before { transform: translate(24px, -10px) rotate(-2deg); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 1100px) {
    .phones { view-timeline: --phones block; }
    .phones .phone-fig:nth-child(2) .phone { animation: nm-drift-near linear both; animation-timeline: --phones; animation-range: cover 0% cover 100%; }
  }
}

/* FAQ: answers fade in where ::details-content is not animatable */
@media (prefers-reduced-motion: no-preference) { details.qa[open] .ans { animation: nm-rise var(--t-2) var(--ease-out) both; } }

/* Mobile is lighter: shorter lift, no blur */
@media (max-width: 767px) { html.js .sheet-stack .sheet { translate: 0 -16px; rotate: 0deg; } html.js .phones .phone-fig { translate: 0 20px; } }

/* 7. Reduced motion: keep a short fade for reveal, switch everything else off */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .rv { translate: none; filter: none; transition: opacity 200ms linear; transition-delay: 0s; }
  .hero *, .hero::before, .stage, .stage::before, .shot, .flow::after, .flow > li::before, .sheet, .sheet-stack::before, .phone-fig, .phone, .callout::before, .callout::after, .callout .lab, .btn::before, details.qa .ans { animation: none !important; translate: none !important; scale: none !important; rotate: none !important; filter: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  html.js .callout .lab, html.js .callout[data-side]::after, html.js .phones .phone-fig, html.js .sheet-stack .callout--n .dot { opacity: 1; }
  html.js .callout[data-side]::before { scale: 1 1 !important; }
  details.qa::details-content { transition: none; }
}

/* CLS guard: the hero eyebrow is always exactly two lines on a phone, whichever font is painted first */
@media (max-width: 767px) { .hero .eyebrow { max-width: none; min-height: 2.8em; align-items: flex-start; } }
@media (max-width: 767px) { .phone-fig .phone { margin-inline: auto; } }

/* paper sits clear of the lead above it (back sheet pokes up ~30px when it fans out) */
@media (min-width: 960px) { .sheet-fig.real-objs { margin-top: 76px; } }
/* static light behind the trial panel (second and last place with a coloured glow) */
#dung-thu { position: relative; isolation: isolate; }
#dung-thu::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(50% 55% at 50% 45%, var(--glow-steel), transparent 70%), radial-gradient(30% 35% at 85% 20%, var(--glow-brass), transparent 70%); }
@media (prefers-contrast: more) { #dung-thu::before { display: none; } }

.real-note { margin-top: var(--s-3); max-width: 60ch; color: var(--text-2); }

/* v3 (13/11/2026): trang con chỉ còn MỘT giao diện tối (html data-theme="dark"), cùng nền chấm với trang chủ "Bảng mạch" (home.css). */
:root[data-theme="dark"] body { background-image: radial-gradient(rgba(160, 190, 230, .07) 1px, transparent 1.4px); background-size: 26px 26px; }
