/* onViz landing: một file CSS, không framework. Tối là mặc định; [data-theme='light'] đổi token. */
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* Màu lấy đúng từ app (app/globals.css): tối = :root, sáng = :root[data-theme='light'].
   bg/bg-2 = --bg/--bg-2, panel = --surface-1, panel-2 = --surface-3, line/line-2 = --border/--border-2,
   text/muted/faint = --text/--text-2/--text-3, amber = --accent (chữ, icon), btn = --btn-solid + --on-accent (nút chính). */
:root {
  --bg: #0b0d10;
  --bg-2: #0e1114;
  --panel: #101317;
  --panel-2: #15191e;
  --line: #21262d;
  --line-2: #2b3139;
  --text: #d7dee7;
  --muted: #a3afbe;
  --faint: #8a97a8;
  --amber: #ffb224;
  --amber-soft: rgba(255, 178, 36, 0.12);
  --btn: #ffb224;
  --btn-hover: #ffc04d;
  --amber-ink: #0b0f14;
  --good: #3fcf8e;
  --bad: #ff6b6b;
  --glow: rgba(255, 178, 36, 0.16);
  --blue-glow: rgba(57, 135, 229, 0.14);
  --shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-2);
  --radius: 12px;
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f7f7f8;
  --bg-2: #f0f0f2;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --line: #e6e6e9;
  --line-2: #dadadf;
  --text: #18181b;
  --muted: #46464f;
  --faint: #6b6b75;
  --amber: #a86200;
  --amber-soft: rgba(255, 178, 36, 0.14);
  --btn: #ffb224;
  --btn-hover: #f5a50f;
  --amber-ink: #1a1405;
  --good: #12804f;
  --bad: #cf3434;
  --glow: rgba(255, 178, 36, 0.2);
  --blue-glow: rgba(42, 120, 214, 0.1);
  --shadow: 0 12px 32px -12px rgba(24, 24, 27, 0.18), 0 2px 6px -2px rgba(24, 24, 27, 0.06), 0 0 0 1px var(--line);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}
p {
  margin: 0;
}
svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--btn);
  color: var(--amber-ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
}
.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 550;
  font-size: 15px;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.btn svg {
  font-size: 18px;
}
.btn--sm {
  height: 34px;
  padding: 0 12px;
  font-size: 14px;
}
.btn--lg {
  height: 48px;
  padding: 0 22px;
  font-size: 16px;
}
.btn--block {
  width: 100%;
}
.btn--primary {
  background: var(--btn);
  color: var(--amber-ink);
  box-shadow: 0 8px 24px -8px var(--glow);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px var(--glow);
  background: var(--btn-hover);
}
.btn--ghost {
  background: var(--panel);
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--faint);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-2);
}
:root[data-theme='dark'] .i-moon,
:root[data-theme='light'] .i-sun {
  display: none;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
}
.nav__in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand b {
  color: var(--amber);
  font-weight: 600;
}
.nav__links {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.nav__links a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}
.nav__links a:hover {
  color: var(--text);
  background: var(--panel);
}
.nav__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--faint);
  font: 600 12px var(--font);
  padding: 6px 9px;
  border-radius: 7px;
  cursor: pointer;
}
.seg button[aria-pressed='true'] {
  background: var(--panel-2);
  color: var(--text);
}
.nav__menu {
  display: none;
}
.mnav {
  display: grid;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mnav[hidden] {
  display: none;
}
.mnav a {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 40px;
  text-align: center;
}
.hero__glow {
  position: absolute;
  inset: -120px 0 auto;
  height: 720px;
  background:
    radial-gradient(600px 300px at 50% 18%, var(--glow), transparent 70%), radial-gradient(500px 260px at 22% 50%, var(--blue-glow), transparent 70%),
    radial-gradient(500px 260px at 80% 55%, var(--blue-glow), transparent 70%);
  pointer-events: none;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 20%, #000 20%, transparent 75%);
  opacity: 0.45;
  pointer-events: none;
}
.hero__in {
  position: relative;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  font-size: 13px;
  color: var(--muted);
  max-width: 100%;
}
.pill:hover {
  color: var(--text);
}
.pill__tag {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.pill svg {
  flex: none;
}
.hero h1 {
  margin: 24px auto 0;
  max-width: 900px;
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);
}
.lead {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  text-wrap: pretty;
}
.cta {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.fine {
  margin-top: 16px;
  font-size: 13px;
  color: var(--faint);
}

.shot {
  position: relative;
  margin: 56px auto 0;
  max-width: 1080px;
}
.window {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.window__bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.window__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
}
.bubble {
  position: absolute;
  display: grid;
  gap: 4px;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}
.bubble__who {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.bubble__who--ai {
  color: var(--amber);
}
.bubble--q {
  right: -40px;
  top: 4%;
  animation: float 6s ease-in-out infinite;
}
.bubble--a {
  left: -40px;
  bottom: 8%;
  animation: float 6s ease-in-out 1.5s infinite;
}
@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

/* Logos */
.logos {
  padding: 48px 0 24px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
}
.logos .eyebrow {
  color: var(--faint);
  font-weight: 500;
}
.chips {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.chips li {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-2);
}
.chips .chips__ai {
  border-color: color-mix(in srgb, var(--amber) 35%, var(--line));
  color: var(--text);
}

/* Sections */
.section {
  padding: 96px 0;
}
.section--alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 44px);
  max-width: 760px;
  text-wrap: balance;
}
.section h2.center {
  max-width: 760px;
}
.sub {
  margin-top: 16px;
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
}

/* Bento */
.bento {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  overflow: hidden;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}
.card--wide {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}
.card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 20px;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 18px;
}
.card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}
.card__img {
  margin-top: 24px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  flex: 1;
  object-fit: cover;
  object-position: top center;
  min-height: 0;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: s;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step__n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  color: var(--amber);
  font: 600 14px var(--mono);
}
.step h3 {
  font-size: 19px;
}
.step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}
.step img {
  margin-top: auto;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}

/* Tour */
.tabs {
  margin: 32px 0 20px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
.tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 14px var(--font);
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}
.tabs button[aria-selected='true'] {
  background: var(--panel-2);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line-2);
}
.window--tour img {
  transition: opacity 0.2s;
}
.window--tour img.is-loading {
  opacity: 0.3;
}

/* Privacy */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.checks li {
  display: grid;
  gap: 4px;
  padding: 18px 20px 18px 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  position: relative;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--amber-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb224' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E")
    center/12px no-repeat;
}
.checks span {
  color: var(--muted);
  font-size: 15px;
}

/* Pricing */
.plans {
  margin: 48px auto 0;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.plan--main {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  box-shadow: 0 0 0 4px var(--amber-soft);
}
.plan h3 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.soon {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.plan__price {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}
.plan__price b {
  font-size: 36px;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-right: 4px;
}
.plan__d {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}
.ticks {
  list-style: none;
  margin: 24px 0 28px;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 15px;
}
.ticks li {
  padding-left: 26px;
  position: relative;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(-45deg);
}
.plan .btn {
  margin-top: auto;
}
#pricing .fine {
  max-width: 620px;
  margin-top: 24px;
}

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}
.qa {
  display: grid;
  gap: 8px;
}
.qa details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 0 20px;
}
.qa details[open] {
  border-color: var(--line-2);
}
.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 28px 18px 0;
  font-weight: 550;
  position: relative;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font: 400 22px var(--mono);
  color: var(--faint);
  transition: transform 0.2s;
}
.qa details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
.qa p {
  padding-bottom: 18px;
  color: var(--muted);
  font-size: 15px;
}

/* Download */
.dl {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dl__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.dl__card > svg {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--text);
}
.dl__card[data-os='mac'] > svg {
  fill: currentColor;
  stroke: none;
}
.dl__card[data-os='win'] > svg {
  fill: currentColor;
  stroke: none;
}
.dl__card h3 {
  font-size: 18px;
}
.dl__card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.dl__card .btn,
.dl__code {
  margin-top: auto;
}
.dl__card.is-mine {
  border-color: color-mix(in srgb, var(--amber) 50%, var(--line));
  box-shadow: 0 0 0 4px var(--amber-soft);
}
.dl__card.is-mine .btn {
  background: var(--btn);
  color: var(--amber-ink);
  border-color: transparent;
}
.dl__code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font: 13px var(--mono);
  color: var(--text);
  overflow-x: auto;
}
#download .fine {
  max-width: 640px;
  margin-top: 24px;
}

/* Final CTA */
.final {
  padding: 24px 0 96px;
}
.final__in {
  text-align: center;
  padding: 72px 24px;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: radial-gradient(500px 220px at 50% 0%, var(--glow), transparent 70%), var(--panel);
}
.final h2 {
  font-size: clamp(28px, 4.5vw, 48px);
  letter-spacing: -0.03em;
}
.final p {
  margin: 16px auto 32px;
  color: var(--muted);
  max-width: 520px;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  font-size: 14px;
}
.foot__in {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.foot__brand p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 320px;
}
.foot__col {
  display: grid;
  gap: 8px;
  align-content: start;
}
.foot__col h4 {
  font-size: 13px;
  color: var(--faint);
  font-weight: 500;
  margin-bottom: 4px;
}
.foot__col a {
  color: var(--muted);
}
.foot__col a:hover {
  color: var(--text);
}
.foot__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}

/* Reveal on scroll (main.js thêm .reveal khi trình duyệt hỗ trợ IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .bubble {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .bubble--q {
    right: 12px;
  }
  .bubble--a {
    left: 12px;
  }
}
@media (max-width: 960px) {
  .nav__links {
    display: none;
  }
  .nav__tools {
    margin-left: auto;
  }
  .nav__menu {
    display: inline-grid;
  }
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .card--wide {
    grid-column: span 2;
    grid-row: auto;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .split,
  .faq {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .dl {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  .nav__cta {
    display: none;
  }
  .hero {
    padding-top: 48px;
  }
  .pill {
    font-size: 12px;
  }
  .section {
    padding: 72px 0;
  }
  .bento,
  .plans,
  .dl {
    grid-template-columns: 1fr;
  }
  .card--wide {
    grid-column: auto;
  }
  .bubble {
    position: static;
    max-width: none;
    margin-top: 12px;
    animation: none;
  }
  .shot {
    margin-top: 40px;
  }
  .cta .btn {
    width: 100%;
  }
  .tabs {
    display: flex;
  }
  .tabs button {
    flex: 1 1 auto;
  }
  .foot__in {
    grid-template-columns: 1fr 1fr;
  }
  .foot__brand {
    grid-column: span 2;
  }
}

/* Báo cáo minh hoạ ở hero (ECharts, asset/charts.js) */
.dash {
  padding: 20px;
  text-align: left;
  background: var(--bg);
}
.dash__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dash__head b {
  display: block;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.dash__head span {
  font-size: 12px;
  color: var(--faint);
}
.dash__chip {
  flex: none;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--muted) !important;
  background: var(--panel);
}
.dash__kpis {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.kpi {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.kpi span {
  font-size: 12px;
  color: var(--muted);
}
.kpi b {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.kpi em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}
.kpi .up {
  color: var(--good);
}
.kpi .down {
  color: var(--bad);
}
.dash__grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.tile {
  padding: 12px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  min-width: 0;
}
.tile h4 {
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ec {
  width: 100%;
  height: 200px;
}
/* SVG của ECharts: bỏ kiểu icon dùng chung (svg { width: 1em; fill: none; … }) */
.ec svg {
  width: auto;
  height: auto;
  fill: initial;
  stroke: none;
  stroke-width: 1;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

/* Chat ra biểu đồ (card tính năng) */
.chatdemo {
  margin-top: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg);
}
.msg {
  font-size: 14px;
  line-height: 1.5;
}
.msg--me {
  align-self: flex-end;
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 12px 12px 4px 12px;
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  color: var(--text);
}
.msg--ai {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 4px;
  background: var(--panel);
}
.msg__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 6px;
}
.msg__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
  flex: none;
}
.msg__tools {
  font-weight: 400;
  color: var(--faint);
}
.msg--ai p {
  margin-top: 8px;
  color: var(--muted);
}
.ec--chat {
  height: 210px;
}
.msg__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.msg__acts span {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--muted);
}
.chatdemo__input {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 13px;
  color: var(--faint);
}
.chatdemo__input i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--btn);
  color: var(--amber-ink);
  flex: none;
}

/* Biểu đồ nhỏ ở các bước */
.mini {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.mini__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 8px;
}
.mini__q > span:not(.msg__dot):not(.mini__badge) {
  margin-right: auto;
}
.mini__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
}
.ec--mini {
  height: 190px;
}
.step img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: left top;
}

@media (max-width: 960px) {
  .dash__grid {
    grid-template-columns: 1fr 1fr;
  }
  .tile--wide {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .dash {
    padding: 12px;
  }
  .dash__kpis {
    grid-template-columns: 1fr 1fr;
  }
  .kpi b {
    font-size: 18px;
  }
  .dash__grid {
    grid-template-columns: 1fr;
  }
  .tile--wide {
    grid-column: auto;
  }
  .dash__chip {
    display: none;
  }
}

/* Xem ảnh phóng to (main.js: openZoom) */
img.zoomable {
  cursor: zoom-in;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
img.zoomable:hover {
  transform: translateY(-2px);
}
.zoom {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 56px 24px 24px;
  border: 0;
  background: transparent;
  color: var(--text);
}
.zoom[open] {
  display: grid;
  place-items: center;
}
.zoom::backdrop {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.zoom figure {
  margin: 0;
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
}
.zoom img {
  max-width: min(100%, 2160px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  cursor: zoom-out;
}
.zoom figcaption {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.zoom__close {
  position: fixed;
  top: 14px;
  right: 14px;
  background: var(--panel);
  color: var(--text);
}
body.is-zoomed {
  overflow: hidden;
}

/* Trang pháp lý (terms, privacy, cookies, security) */
html[lang='vi'] [data-l='en'],
html:not([lang='vi']) [data-l='vi'] {
  display: none;
}
.legal {
  padding: 56px 0 96px;
}
.legal__in {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.legal__nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 2px;
  font-size: 14px;
}
.legal__nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
}
.legal__nav a:hover {
  color: var(--text);
  background: var(--panel);
}
.legal__nav a[aria-current='page'] {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: inset 2px 0 0 var(--amber);
}
.doc {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
}
.doc h1 {
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -0.03em;
}
.doc .updated {
  margin-top: 10px;
  font-size: 14px;
  color: var(--faint);
}
.doc .tldr {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--line));
  border-radius: 12px;
  background: var(--amber-soft);
}
.doc .tldr ul {
  margin: 8px 0 0;
}
.doc h2 {
  margin-top: 44px;
  font-size: 22px;
  scroll-margin-top: 88px;
}
.doc h3 {
  margin-top: 24px;
  font-size: 17px;
}
.doc p,
.doc ul,
.doc ol,
.doc table {
  margin-top: 12px;
}
.doc p,
.doc li {
  color: var(--muted);
}
.doc strong {
  color: var(--text);
  font-weight: 600;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li + li {
  margin-top: 6px;
}
.doc a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc code {
  font: 0.9em var(--mono);
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
}
.doc .tbl {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.doc table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 14px;
}
.doc th,
.doc td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.doc th {
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
}
.doc td {
  color: var(--muted);
}
.doc tr:last-child td {
  border-bottom: 0;
}
@media (max-width: 960px) {
  .legal__in {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .legal__nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .legal__nav a {
    border: 1px solid var(--line);
  }
}

/* So sánh với ChatGPT, Claude, BI */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.cmp {
  margin-top: 40px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.cmp table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 14px;
}
.cmp th,
.cmp td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.cmp tr:last-child th,
.cmp tr:last-child td {
  border-bottom: 0;
}
.cmp thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-2);
  white-space: nowrap;
}
.cmp tbody th {
  width: 22%;
  font-weight: 550;
  color: var(--text);
  position: sticky;
  left: 0;
  background: var(--panel);
  z-index: 1;
}
.cmp td {
  color: var(--muted);
  line-height: 1.45;
}
.cmp td .cmp__i {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  stroke-width: 2.5;
}
.cmp__i--y {
  color: var(--good);
}
.cmp__i--p {
  color: var(--faint);
}
.cmp__i--n {
  color: var(--bad);
}
.cmp .cmp__me {
  background: var(--amber-soft);
  color: var(--text);
}
.cmp thead .cmp__me {
  color: var(--amber);
}
#compare .fine {
  margin-top: 14px;
}
.together {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.together > div {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.together > div:first-child {
  border-color: color-mix(in srgb, var(--amber) 40%, var(--line));
}
.together h3 {
  font-size: 16px;
}
.together p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 960px) {
  .together {
    grid-template-columns: 1fr;
  }
}

/* Chưa phát hành: html[data-release="soon"] hiện phần "Sắp ra mắt", ẩn nút tải; đổi thành "open" khi mở bản tải */
html[data-release='soon'] [data-when='open'],
html:not([data-release='soon']) [data-when='soon'] {
  display: none !important;
}
.btn.is-soon {
  cursor: default;
  color: var(--faint);
  border-style: dashed;
}
.btn.is-soon:hover {
  border-color: var(--line-2);
}
.soon-cta {
  margin-top: 20px;
}
