/* FinLens — trang slide 5 tab. CSP cấm style nội tuyến: chỉ dùng class (JS chỉ đặt transform / width qua CSSOM).
   Một bộ màu sáng cố định (thương hiệu: navy + xanh ngọc + vàng), phông hệ thống, không tải gì bên ngoài. */
:root {
  --bg: #f4f7fb; --bg2: #eaf0f7; --surface: #ffffff; --ink: #0d1b2e; --ink-2: #26364d; --muted: #556579; --line: #dce4ee;
  --navy: #0a1f3c; --navy-2: #0f3157; --accent: #0b7d87; --accent-2: #14a3a6; --accent-soft: #e2f4f4; --accent-ink: #ffffff;
  --gold: #f6b93b; --gold-2: #ffd27a; --gold-ink: #2a1900;
  --warn: #8f5300; --warn-soft: #fff3da; --ok: #12763a; --ok-soft: #e4f5ea; --err: #c0262d; --code-bg: #f0f4f9;
  --shadow-s: 0 1px 2px rgb(10 31 60 / 6%), 0 2px 8px rgb(10 31 60 / 5%);
  --shadow: 0 1px 2px rgb(10 31 60 / 6%), 0 12px 32px rgb(10 31 60 / 9%);
  --shadow-l: 0 24px 60px rgb(10 31 60 / 22%);
  --f-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-head: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --r: 18px; --bar-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16.5px; line-height: 1.6; overflow: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-family: var(--f-head); line-height: 1.18; text-wrap: balance; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem); font-weight: 800; }
h1:focus { outline: none; }
h2 { font-size: 1.2rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; }
b { font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── khung ─────────────────────────────────────────────── */
.app { height: 100dvh; display: grid; grid-template-rows: var(--bar-h) minmax(0, 1fr); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(16px, 3vw, 40px);
  background: rgb(255 255 255 / 92%); border-bottom: 1px solid var(--line); z-index: 5; box-shadow: 0 1px 0 rgb(10 31 60 / 3%); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand b { font-family: var(--f-head); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.beta { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-ink); background: var(--gold-2); border-radius: 99px; padding: 2px 8px; }
.tabs { display: flex; gap: 2px; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; color: var(--muted); text-decoration: none;
  font-size: 0.95rem; font-weight: 650; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--bg); }
.tabs a[aria-current="page"] { color: var(--navy); background: var(--accent-soft); }
.tabs a[aria-current="page"] svg { stroke: var(--accent); }
.tabs svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.deck { position: relative; overflow: hidden; min-height: 0; }
.track { display: flex; height: 100%; will-change: transform; }
.ready .track { transition: transform 0.6s cubic-bezier(0.65, 0, 0.25, 1); }
.slide { flex: 0 0 100%; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(24px, 4vh, 44px) clamp(16px, 4vw, 48px) 140px;
  background: radial-gradient(1100px 500px at 100% 0%, rgb(20 163 166 / 7%), transparent 60%), linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); }
.inner { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.head { display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.hint { color: var(--muted); font-size: 0.88rem; }
.lbl { font-weight: 700; font-size: 0.92rem; color: var(--ink-2); }
.center { text-align: center; justify-content: center; }
.mono { font-family: var(--f-mono); }

@media (prefers-reduced-motion: no-preference) {
  .slide[aria-hidden="false"] .inner > * { animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .slide[aria-hidden="false"] .inner > *:nth-child(2) { animation-delay: 0.06s; }
  .slide[aria-hidden="false"] .inner > *:nth-child(3) { animation-delay: 0.12s; }
  .slide[aria-hidden="false"] .inner > *:nth-child(4) { animation-delay: 0.18s; }
  @keyframes rise { from { opacity: 0.35; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .spin { animation: rot 0.8s linear infinite; }
  @keyframes rot { to { transform: rotate(360deg); } }
  .regbox { animation: drop 0.35s ease-out; }
  @keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .pulse { animation: pulse 2s ease-out infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(246 185 59 / 60%); } 70%, 100% { box-shadow: 0 0 0 9px rgb(246 185 59 / 0%); } }
}
@media (prefers-reduced-motion: reduce) { .ready .track { transition: none; } }

/* ── nút ───────────────────────────────────────────────── */
button, .btn, .ghost-btn, .btn-ghost-light { font: inherit; font-weight: 700; border-radius: 12px; padding: 11px 20px; cursor: pointer; border: 1px solid transparent;
  min-height: 48px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.15s, box-shadow 0.15s, filter 0.15s; }
.btn { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 6px 16px rgb(11 125 135 / 25%); }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:disabled, button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }
.ghost-btn, .ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.ghost-btn:hover, .ghost:hover { border-color: var(--accent); color: var(--accent); }
.wide-btn { width: 100%; font-size: 1.05rem; min-height: 54px; }
.danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-weight: 600; text-decoration: underline; box-shadow: none; }
.small { padding: 5px 12px; min-height: 32px; font-size: 0.82rem; border-radius: 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* ── 1. trang chủ ──────────────────────────────────────── */
.s-home .inner { gap: 40px; }
.hero-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(24px, 4vw, 52px); color: #eaf3f8; box-shadow: var(--shadow-l);
  background:
    radial-gradient(700px 380px at 92% 0%, rgb(20 163 166 / 42%), transparent 65%),
    radial-gradient(520px 340px at 0% 100%, rgb(246 185 59 / 18%), transparent 65%),
    linear-gradient(140deg, #071730 0%, #0a2647 48%, #0b3e57 100%);
  display: flex; flex-direction: column; gap: clamp(22px, 3.5vw, 40px); }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
.s-home .hero-band .eyebrow { color: #9fe6e7; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }
.s-home h1 { color: #fff; font-size: clamp(2rem, 1.2rem + 2.5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.03em; }
.hero-sub { font-size: clamp(1.08rem, 0.95rem + 0.5vw, 1.32rem); line-height: 1.5; color: #fff; font-weight: 500; max-width: 660px; }
.hero-sub b { color: #9fe6e7; }
.hero-sub em { font-style: normal; font-weight: 800; color: var(--gold-2); white-space: nowrap; }
.s-home .hero-band .lead { color: rgb(234 243 248 / 76%); font-size: 0.98rem; max-width: 640px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.big-cta { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); font-size: 1.06rem; padding: 14px 28px; min-height: 56px;
  box-shadow: 0 12px 30px rgb(246 185 59 / 32%); }
.big-cta:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-ghost-light { color: #fff; border-color: rgb(255 255 255 / 30%); background: rgb(255 255 255 / 6%); min-height: 56px; }
.btn-ghost-light:hover { border-color: rgb(255 255 255 / 65%); }

.mock { margin: 0; position: relative; background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 16%); border-radius: 20px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 70px rgb(0 0 0 / 30%); }
.mock-top { display: flex; gap: 6px; align-items: center; font-size: 0.8rem; color: rgb(234 243 248 / 62%); }
.mock-top i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 22%); }
.mock-top span { margin-left: 8px; font-weight: 600; white-space: nowrap; }
.bubble { border-radius: 14px; padding: 11px 14px; font-size: 0.9rem; line-height: 1.45; }
.bubble.me { align-self: flex-end; max-width: 90%; background: #5ccdd0; color: #04262a; border-bottom-right-radius: 4px; font-weight: 500; }
.toolcall { align-self: flex-start; display: inline-flex; gap: 7px; align-items: center; font-family: var(--f-mono); font-size: 0.76rem; color: var(--gold-2);
  border: 1px dashed rgb(255 210 122 / 55%); border-radius: 99px; padding: 4px 11px; }
.toolcall svg { width: 14px; height: 14px; fill: currentColor; }
.bubble.ai { background: #fbfdfe; color: var(--ink); border-bottom-left-radius: 4px; display: flex; flex-direction: column; gap: 10px; }
.ai-t { font-weight: 700; font-size: 0.86rem; }
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 78px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.bars i { display: block; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.bars .b1 { height: 42%; } .bars .b2 { height: 50%; } .bars .b3 { height: 61%; } .bars .b4 { height: 74%; } .bars .b5 { height: 92%; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 0.72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 3px 9px; }
.mock figcaption { position: absolute; right: 14px; bottom: -22px; font-size: 0.7rem; color: rgb(234 243 248 / 45%); }
/* trình chiếu 5 ví dụ trong khung minh hoạ (app.js đổi mỗi 3 giây) */
.cases { display: grid; }
.case { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0s linear 0.45s; }
.case.on { opacity: 1; visibility: visible; transition: opacity 0.45s ease; }
.rows, .flow, .diff { display: flex; flex-direction: column; gap: 8px; padding: 2px 0; }
.rows p, .flow p, .diff p { display: flex; align-items: center; gap: 8px; margin: 0; }
.rows p::before { content: ""; flex: none; width: 34px; height: 10px; border-radius: 4px; background: #d5dee8; }
.rows i, .flow i, .diff i, .quote i { display: block; flex: 0 1 auto; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.w5 { width: 50%; } .w6 { width: 60%; } .w7 { width: 70%; } .w8 { width: 80%; } .w9 { width: 90%; }
.rows i { max-width: calc(100% - 80px); }
.rows em { font-style: normal; font-size: 0.7rem; font-weight: 700; color: var(--muted); }
.flow b { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-size: 0.72rem; }
.flow i { max-width: calc(100% - 110px); background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.flow span { margin-left: auto; flex: none; font-size: 0.7rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 1px 8px; }
.quote { margin: 0; border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; display: flex; flex-direction: column; gap: 7px; }
.quote i { background: #ccd7e2; }
.diff s { position: relative; flex: none; width: 26%; height: 10px; border-radius: 99px; background: #f1c4c0; margin-right: 18px; }
.diff s::after { content: ""; position: absolute; left: -3px; right: -3px; top: 4px; height: 2px; background: #b42318; }
.diff s::before { content: "→"; position: absolute; right: -16px; top: -6px; font-size: 0.8rem; color: var(--muted); }
.diff i { max-width: calc(100% - 26% - 30px); }
@media (prefers-reduced-motion: reduce) { .case, .case.on { transition: none; } }

.kpis { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpis li { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 13%); border-radius: 16px; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.kpis b { font-family: var(--f-head); font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); font-weight: 800; color: var(--gold-2); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpis span { font-size: 0.86rem; color: rgb(234 243 248 / 74%); }

.block { display: flex; flex-direction: column; gap: 18px; }
.block-h { display: flex; flex-direction: column; gap: 6px; }
.block-h h2 { font-size: clamp(1.4rem, 1.1rem + 0.9vw, 1.9rem); font-weight: 800; }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px; }
.why article { grid-column: span 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-s);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.why article:hover, .has article:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.why p, .has p { color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-soft), #fff4dc); color: var(--accent); border: 1px solid var(--line); }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.has { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.has article { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-s);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.has article::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--gold)); }
.big { font-family: var(--f-head); font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  background: linear-gradient(90deg, var(--navy), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.unit { font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }

/* ── 2. đăng ký ────────────────────────────────────────── */
.s-reg .inner { align-items: center; }
.s-reg .head { align-items: center; text-align: center; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 940px; width: 100%; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.plan.hot { border: 2px solid var(--accent); padding: 27px; background: linear-gradient(180deg, #f6fcfc 0%, #fff 40%); }
.plan header { display: flex; flex-direction: column; gap: 6px; }
.plan h2 { font-size: 1.35rem; }
.price { font-family: var(--f-head); font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; display: flex; flex-direction: column; color: var(--navy); }
.price small { font-family: var(--f-body); font-size: 0.9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price .was { font-size: 1.35rem; font-weight: 700; color: #8a97a8; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--err); letter-spacing: -0.01em; }
.price .now { color: var(--navy); }
.plan.hot .price .now { color: var(--accent); }
.ribbon { position: absolute; top: -14px; right: 22px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); font-size: 0.8rem; font-weight: 800; padding: 6px 14px; border-radius: 99px; box-shadow: 0 8px 18px rgb(246 185 59 / 35%); }
.ribbon.off { background: var(--line); color: var(--muted); box-shadow: none; }
.feat { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; flex: 1; }
.feat li { position: relative; padding-left: 30px; }
.feat li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 0.75rem; font-weight: 900; display: grid; place-items: center; }
.feat li.n { color: #8a97a8; }
.feat li.n::before { content: "–"; background: var(--code-bg); color: #9aa6b5; }
.seats { font-size: 0.9rem; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 9px 12px; font-weight: 600; }
.seats:empty { display: none; }
.plan .btn, .plan .ghost-btn { width: 100%; min-height: 52px; font-size: 1.02rem; }

.regbox { max-width: 940px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 16px; }
.regbox form { display: flex; flex-direction: column; gap: 16px; }
.mini-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: s; }
.mini-steps li { counter-increment: s; font-size: 0.9rem; font-weight: 700; color: var(--muted); border-top: 4px solid var(--line); padding-top: 8px; }
.mini-steps li::before { content: counter(s) ". "; }
.mini-steps li.now { color: var(--navy); border-color: var(--accent); }
.mini-steps li.done { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.you-get { font-size: 0.97rem; background: var(--accent-soft); border-radius: 12px; padding: 11px 14px; color: var(--ink-2); }
.you-get:empty { display: none; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* form */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-weight: 700; font-size: 0.92rem; color: var(--ink-2); }
.center-field { align-items: center; }
input[type=text], input[type=email], input[type=tel], select {
  font: inherit; color: var(--ink); background: #fbfcfe; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 50px; transition: border-color 0.15s, box-shadow 0.15s; }
input:hover { border-color: #c4d0de; }
input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 4px rgb(11 125 135 / 12%); outline: none; }
input::placeholder { color: #9aa6b5; }
.field.bad input, .field.bad select { border-color: var(--err); }
.err { color: var(--err); font-size: 0.86rem; font-weight: 600; }
.err:empty { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.97rem; cursor: pointer; }
.check input { margin-top: 2px; width: 21px; height: 21px; accent-color: var(--accent); flex: none; }
.check.bad { color: var(--err); }
details.terms { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 0.9rem; background: var(--code-bg); }
details.terms summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
details.terms ul { margin-top: 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); line-height: 1.55; }
.code-in { font-family: var(--f-mono); font-size: 2rem; letter-spacing: 0.4em; text-align: center; max-width: 300px; padding: 10px 12px; }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 0.94rem; background: var(--warn-soft); color: var(--warn); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.err { background: color-mix(in srgb, var(--err) 9%, transparent); color: var(--err); }

/* ── 3. hướng dẫn ──────────────────────────────────────── */
.keybar { border: 2px solid color-mix(in srgb, var(--ok) 50%, transparent); background: linear-gradient(180deg, var(--ok-soft), #f6fcf8); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-s); }
.keybar-t b { color: var(--ok); font-size: 1.1rem; }
.keybar-f { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.keybar.is-saved { border-color: var(--line); background: var(--surface); }
.key { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.key code { flex: 1 1 320px; min-width: 0; font-family: var(--f-mono); font-size: 0.98rem; background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--ok) 45%, var(--line)); border-radius: 12px; padding: 12px 14px; overflow-wrap: anywhere; user-select: all; color: var(--navy); }
.cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 22px; align-items: start; }
.card-x { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 2.5vw, 28px); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); min-width: 0; }
.card-x h2 { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; }
.num { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; display: inline-grid; place-items: center; font-size: 1rem; font-weight: 800; flex: none; }
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 6px; cursor: pointer; background: #fbfcfe; text-align: center; font-weight: 700; font-size: 0.9rem; color: var(--ink);
  min-height: 66px; display: flex; flex-direction: column; justify-content: center; gap: 2px; box-shadow: none; }
.choice small { font-weight: 500; color: var(--muted); font-size: 0.75rem; }
.choice:hover { border-color: #b9c6d6; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
ol.howto { padding-left: 24px; display: flex; flex-direction: column; gap: 8px; font-size: 0.96rem; color: var(--ink-2); }
ol.howto li::marker { color: var(--accent); font-weight: 800; }
.snippet { position: relative; }
pre { margin: 0; background: var(--navy); color: #d9f2f2; border: 0; border-radius: 12px; padding: 14px 16px; padding-right: 80px; overflow-x: auto; font-family: var(--f-mono);
  font-size: 0.82rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.snippet .ghost { position: absolute; top: 9px; right: 9px; background: rgb(255 255 255 / 10%); color: #fff; border-color: rgb(255 255 255 / 25%); }
.snippet .ghost:hover { background: rgb(255 255 255 / 18%); color: #fff; }
.prompts { display: flex; flex-direction: column; gap: 8px; }
.prompt { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-left: 4px solid var(--accent-2); background: #fbfcfe; border-radius: 12px; padding: 11px 13px; font-size: 0.93rem; color: var(--ink-2); }

/* ── 4. tài khoản ──────────────────────────────────────── */
.login { max-width: 500px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hello { font-family: var(--f-head); font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-s); }
.tile b { font-family: var(--f-head); font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--navy); }
.plan-tile { background: linear-gradient(140deg, #071730, #0b3e57); border: 0; color: #eaf3f8; }
.plan-tile .lbl { color: #9fe6e7; }
.plan-tile b { color: var(--gold-2); }
.plan-tile .hint { color: rgb(234 243 248 / 75%); }
.meter { height: 10px; border-radius: 99px; background: var(--code-bg); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; border-radius: 99px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tablebox { overflow-x: auto; }
.danger-zone { background: var(--surface); }
.stack-s { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* ── 5. hỏi đáp ────────────────────────────────────────── */
.cols.help { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr); }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow-s); }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; }
.faq details[open] summary::after { content: "–"; background: var(--accent); color: #fff; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }
.support { position: sticky; top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.support hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.support .btn, .support .ghost-btn { width: 100%; }
.small-list { padding-left: 18px; font-size: 0.9rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }

/* ── thanh chuyển slide: giữa, đáy màn hình ───────────── */
.pager { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px;
  background: rgb(255 255 255 / 96%); border: 1px solid var(--line); border-radius: 999px; padding: 8px; box-shadow: 0 16px 44px rgb(10 31 60 / 20%); }
.pg-btn { min-height: 52px; padding: 0 22px; border-radius: 999px; font-size: 1rem; font-weight: 750; gap: 8px; box-shadow: none; white-space: nowrap; }
.pg-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pg-prev { background: var(--code-bg); color: var(--ink-2); border: 1px solid var(--line); }
.pg-prev:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.pg-next { background: linear-gradient(180deg, var(--navy-2), var(--navy)); color: #fff; }
.pg-next:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); }
.pg-btn:disabled { opacity: 0.35; }
.dots { list-style: none; padding: 0 4px; display: flex; gap: 6px; align-items: center; }
.dots button { min-height: 40px; height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px; background: transparent; border: 1.5px solid var(--line); color: var(--muted);
  font-size: 0.92rem; font-weight: 750; gap: 6px; box-shadow: none; }
.dots button span { display: none; }
.dots button:hover { border-color: var(--accent); color: var(--accent); }
.dots button[aria-current="step"] { background: var(--accent-soft); border-color: var(--accent); color: var(--navy); }
.dots button[aria-current="step"] b { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-size: 0.78rem; }
.dots button[aria-current="step"] span { display: inline; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 100px; background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 12px; font-size: 0.94rem; z-index: 9; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; }

/* ── màn vừa ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tabs a span { display: none; }
  .tabs a { padding: 10px 12px; }
}
@media (max-width: 1020px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .mock { max-width: 560px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why article { grid-column: span 1; }
  .has { grid-template-columns: minmax(0, 1fr); }
  .cols, .cols.help { grid-template-columns: minmax(0, 1fr); }
  .support { position: static; }
  .pg-btn span { display: none; }
  .pg-btn { padding: 0 16px; }
}
/* ── điện thoại: tab xuống đáy, thanh chuyển gọn ──────── */
@media (max-width: 760px) {
  :root { --bar-h: 58px; }
  body { font-size: 16px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); background: #fff;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; z-index: 7; box-shadow: 0 -6px 20px rgb(10 31 60 / 8%); }
  .tabs a { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 0.7rem; border-radius: 10px; }
  .tabs a span { display: inline; }
  .tabs svg { width: 23px; height: 23px; }
  .pager { bottom: calc(76px + env(safe-area-inset-bottom)); padding: 5px; gap: 6px; }
  .pg-btn { min-height: 44px; padding: 0 14px; }
  .dots button { min-width: 34px; height: 34px; min-height: 34px; padding: 0 9px; }
  .dots button[aria-current="step"] span { display: none; }
  .slide { padding: 20px 14px calc(150px + env(safe-area-inset-bottom)); }
  .hero-band { border-radius: 22px; padding: 22px 18px; }
  .s-home .mock { padding: 12px; gap: 10px; border-radius: 16px; }
  .s-home .bubble { font-size: 0.86rem; }
  .mock-top i { display: none; }
  .mock-top span { margin-left: 0; }
  .kpis li { padding: 12px 14px; }
  .why, .plans, .grid3, .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .why { grid-auto-rows: auto; }
  .why article { grid-column: span 1; }
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan { padding: 22px; } .plan.hot { padding: 21px; order: -1; }
  .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
}
