/* vidub.net: trang giới thiệu và trang tài khoản dùng chung */
  /* Một cột hẹp như tờ hướng dẫn. Phần nghe thử là điểm nhấn duy nhất; lime chỉ làm nền khối như logo ViDub. */
  :root {
    --paper: #f7f6f2;
    --card: #ffffff;
    --ink: #111114;
    --muted: #5f5e58;
    --line: #e4e2db;
    --lime: #c8ff2e;
    --lime-ink: #111114;
    --font: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    --col: 600px;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --paper: #121214; --card: #1b1b1f; --ink: #ecebe6; --muted: #a3a29b; --line: #2c2c31; color-scheme: dark; }
  }
  :root[data-theme="dark"] { --paper: #121214; --card: #1b1b1f; --ink: #ecebe6; --muted: #a3a29b; --line: #2c2c31; color-scheme: dark; }
  :root[data-theme="light"] { color-scheme: light; }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  img { max-width: 100%; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
  body {
    margin: 0; background: var(--paper); color: var(--ink);
    font: 400 16px/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
  }
  .gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
  .site-bar {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent; transition: border-color .2s ease;
  }
  .site-bar.scrolled { border-bottom-color: var(--line); }
  .site-bar .top { max-width: var(--col); margin: 0 auto; padding-block: 12px; }
  section[id] { scroll-margin-top: 76px; }
  .page { max-width: var(--col); margin: 0 auto; padding-block: 28px 40px; display: grid; gap: 48px; }
  .stack { display: grid; gap: 72px; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* đầu trang */
  .top { display: flex; align-items: center; gap: 16px; }
  .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; margin-right: auto; }
  .brand svg { width: 30px; height: 30px; display: block; }
  .brand b { background: var(--lime); color: var(--lime-ink); padding: 0 4px; border-radius: 5px; font-weight: 700; }
  .top nav { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
  .top nav a { text-decoration: none; }
  .top nav a:hover { color: var(--ink); }
  .theme {
    width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px;
    background: var(--card); color: var(--ink); cursor: pointer; transition: transform .15s ease;
  }
  .theme:hover { transform: rotate(-12deg); }
  .theme svg { width: 17px; height: 17px; }
  .theme .i-sun { display: none; }
  :root[data-dark] .theme .i-sun { display: block; }
  :root[data-dark] .theme .i-moon { display: none; }

  /* chữ */
  h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
  h1 { font-size: clamp(32px, 7vw, 46px); line-height: 1.12; font-weight: 700; }
  h2 { font-size: 24px; line-height: 1.25; font-weight: 700; }
  h3 { font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: -0.005em; }
  p { margin: 0; }
  .lead { font-size: 18px; color: var(--muted); max-width: 33em; }
  .eyebrow.chrome { display: inline-flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
  .eyebrow.chrome img { width: 18px; height: 18px; display: block; }
  .eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
  section { display: grid; gap: 20px; }
  .head { display: grid; gap: 8px; }
  .head p { color: var(--muted); }

  /* nút */
  .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
  .btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px;
    background: var(--lime); color: var(--lime-ink); font-weight: 600; font-size: 15px; text-decoration: none;
    border-radius: 999px; transition: transform .15s ease, box-shadow .15s ease;
  }
  .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgb(17 17 20 / .45); }
  .btn:active { transform: translateY(0); }
  .note { font-size: 14px; color: var(--muted); }

  .hero { display: grid; gap: 22px; }

  /* nghe thử: ảnh video + thanh phát giọng thuyết minh thật */
  .listen { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
  .listen img { display: block; width: 100%; height: auto; max-width: 100%; background: #000; }
  .player { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px 18px; }
  .play {
    width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
    background: var(--lime); color: var(--lime-ink); transition: transform .15s ease;
  }
  .play:hover { transform: scale(1.04); }
  .play:active { transform: scale(.97); }
  .play svg { width: 22px; height: 22px; }
  .play .i-pause { display: none; }
  .play[aria-pressed="true"] .i-play { display: none; }
  .play[aria-pressed="true"] .i-pause { display: block; }
  .say { font-size: 15px; line-height: 1.5; }
  .meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 10px; }
  .bar i { display: block; height: 100%; width: 0; background: var(--ink); }
  .listen-note { font-size: 13px; color: var(--muted); padding: 0 18px 16px; }

  /* các bước */
  ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
  ol.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 4px 14px; counter-increment: s; }
  ol.steps li::before {
    content: counter(s); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%;
    background: var(--lime); color: var(--lime-ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; margin-top: 1px;
  }
  ol.steps p { color: var(--muted); font-size: 15px; }

  /* điều khiển */
  .shot { display: block; width: 100%; height: auto; max-width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #000; }
  ul.controls { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  ul.controls li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  ul.controls span { color: var(--muted); text-align: right; font-size: 14px; }
  kbd { font: 500 12px/1 var(--mono); padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--card); color: var(--ink); white-space: nowrap; }
  .where { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px 14px; align-items: start; }
  .where .label { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 6px; }
  .sites { display: flex; flex-wrap: wrap; gap: 8px; }
  .sites span { font-size: 14px; font-weight: 500; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }

  /* giọng đọc */
  ul.voices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
  ul.voices li { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
  .vplay { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); cursor: pointer; transition: transform .15s ease; }
  .vplay:hover { transform: scale(1.06); }
  .vplay svg { width: 16px; height: 16px; }
  .vplay .i-pause { display: none; }
  .vplay[aria-pressed="true"] .i-play { display: none; }
  .vplay[aria-pressed="true"] .i-pause { display: block; }
  .vname { font-weight: 600; font-size: 15px; }
  .vg { margin-left: auto; font-size: 13px; color: var(--muted); }

  /* bảng giá */
  .plans { display: grid; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
  .plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 16px 18px; border-top: 1px solid var(--line); }
  .plan:first-child { border-top: 0; }
  .plan h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .plan .price { font-weight: 700; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
  .plan .what { color: var(--muted); font-size: 14px; }
  .plan .per { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
  .plan .feats { grid-column: 1 / -1; list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
  .plan .feats li { display: flex; align-items: baseline; gap: 8px; }
  .plan .feats li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex: none; transform: translateY(-1px); }
  .plan .feats li.on { color: var(--ink); font-weight: 500; }
  .plan .feats li.on::before { background: var(--ink); }
  .plan.pick { background: color-mix(in srgb, var(--lime) 14%, var(--card)); }
  .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--lime); color: var(--lime-ink); padding: 2px 8px; border-radius: 999px; }
  ul.rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }

  /* hỏi đáp */
  .faq { border-top: 1px solid var(--line); }
  details { border-bottom: 1px solid var(--line); }
  summary { cursor: pointer; list-style: none; padding: 14px 28px 14px 0; font-weight: 600; position: relative; }
  summary::-webkit-details-marker { display: none; }
  summary::after { content: "+"; position: absolute; right: 2px; top: 12px; font-weight: 400; font-size: 20px; color: var(--muted); transition: transform .15s ease; }
  details[open] summary::after { transform: rotate(45deg); }
  details p { padding: 0 0 16px; color: var(--muted); font-size: 15px; }

  .end { display: grid; gap: 14px; padding: 28px; border-radius: 16px; background: var(--ink); color: var(--paper); }
  .end p { color: color-mix(in srgb, var(--paper) 72%, transparent); }
  footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding-top: 20px; border-top: 1px solid var(--line); }

  @media (max-width: 520px) {
    .page { gap: 40px; padding-block: 20px 32px; }
    .stack { gap: 56px; }
    .top nav { display: none; }
    .lead { font-size: 17px; }
    ul.controls li { grid-template-columns: 1fr; gap: 2px; }
    ul.controls span { text-align: left; }
    .player { padding: 14px; }
    .where { grid-template-columns: 1fr; gap: 6px; }
    .where .sites + .label { margin-top: 8px; }
    .end { padding: 22px; }
  }

  /* ---- trang tài khoản: số phút + mua gói 3 bước ---- */
  .brand img { width: 30px; height: 30px; display: block; }
  .portal { gap: 28px; }
  .card { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
  .between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .who { font-weight: 600; overflow-wrap: anywhere; }
  .link { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
  .link:hover { color: var(--ink); }
  .big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .big.bad { color: #c42b27; }
  .meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
  .meter i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .4s ease; }
  .err { color: #c42b27; font-size: 14px; }

  .checkout { display: grid; gap: 24px; scroll-margin-top: 76px; }
  .stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; counter-reset: st; }
  .stepper li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); counter-increment: st; padding-top: 10px; border-top: 3px solid var(--line); }
  .stepper li::before { content: counter(st); width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--line); color: var(--muted); }
  .stepper li[aria-current=step] { color: var(--ink); font-weight: 600; border-top-color: var(--ink); }
  .stepper li[aria-current=step]::before { background: var(--ink); color: var(--paper); }
  .stepper li.done { border-top-color: var(--ink); }
  .stepper li.done::before { content: "✓"; background: var(--lime); color: var(--lime-ink); }
  .step { display: grid; gap: 18px; }
  .step h2 { font-size: 22px; outline: none; }
  .choices { border: 0; margin: 0; padding: 0; min-width: 0; }
  #plans { display: grid; gap: 14px; }
  .choice { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; padding: 20px; border: 1.5px solid var(--line);
    border-radius: 14px; background: var(--card); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
  .choice:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
  .choice.on { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 60%, transparent); }
  .choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
  .choice input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  .c-main { display: grid; gap: 6px; min-width: 0; }
  .c-name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .c-sub { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .c-feats { font-size: 13px; color: var(--ink); }
  .c-price { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .promo { border-bottom: 0; }
  .promo[open] { padding-bottom: 10px; }
  .promo summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; width: max-content; list-style: none; }
  .promo summary::-webkit-details-marker { display: none; }
  .promo summary::after { content: none; }
  .promo summary:hover { color: var(--ink); }
  .promo[open] summary { margin-bottom: 8px; }
  .promo-row { display: flex; gap: 8px; }
  .promo-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
    font: 500 15px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
  .promo-row input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
  .promo-row input::placeholder { font-family: var(--font); text-transform: none; letter-spacing: 0; color: var(--muted); }
  .promo-row .copy { min-height: 44px; padding: 0 18px; }
  .promo-on { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; font-size: 15px;
    background: color-mix(in srgb, var(--lime) 22%, var(--card)); border: 1px solid color-mix(in srgb, var(--lime) 55%, var(--line)); }
  .promo-on b { font-family: var(--mono); font-size: 14px; }
  .tag.soft { background: var(--line); color: var(--ink); }
  .choice.locked { cursor: not-allowed; background: transparent; border-style: dashed; }
  .choice.locked:hover { border-color: var(--line); }
  .choice.locked .c-name, .choice.locked .c-price { color: var(--muted); }
  .c-lock { font-size: 13px; color: var(--muted); }
  .pay-note { text-align: center; font-size: 14px; }
  .c-price s { display: block; font-weight: 500; font-size: 13px; color: var(--muted); text-align: right; }
  .cta { display: grid; gap: 10px; }
  .btn.wide { width: 100%; justify-content: center; min-height: 50px; font-size: 16px; border: 0; cursor: pointer; font-family: inherit; }
  .btn[disabled] { opacity: .55; cursor: progress; transform: none; box-shadow: none; }
  .gbtn { min-height: 44px; }
  .back-link { justify-self: start; font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 8px 0; cursor: pointer; }
  .back-link:hover { color: var(--ink); }
  .qrbox { display: grid; justify-items: center; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: center; }
  .qr { width: 100%; max-width: 240px; height: auto; aspect-ratio: 1; border-radius: 10px; background: #fff; }
  .manual { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 0 16px; }
  .manual summary { cursor: pointer; padding: 14px 0; font-weight: 600; min-height: 44px; }
  .manual[open] { padding-bottom: 14px; }
  .kv { margin: 0 0 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; font-size: 15px; align-items: center; }
  .kv dt { color: var(--muted); }
  .kv dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
  .mono { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
  .copy { flex: none; font: 600 13px var(--font); min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
  .copy:hover { border-color: var(--ink); }
  .status { display: grid; gap: 4px; padding: 14px 16px 14px 40px; border-radius: 12px; position: relative; font-size: 14px; background: var(--card); border: 1px solid var(--line); }
  .status b { font-size: 15px; }
  .status span { color: var(--muted); }
  .status::before { content: ""; position: absolute; left: 16px; top: 19px; width: 10px; height: 10px; border-radius: 50%; }
  .status.wait::before { background: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 35%, transparent); animation: pulse 1.4s ease-in-out infinite; }
  .status.bad { border-color: color-mix(in srgb, #c42b27 40%, var(--line)); }
  .status.bad::before { background: #c42b27; }
  .status.bad b { color: #c42b27; }
  @keyframes pulse { 50% { opacity: .35; } }
  @media (prefers-reduced-motion: reduce) { .status.wait::before { animation: none; } .meter i { transition: none; } }
  .step.done { justify-items: center; text-align: center; padding: 12px 0; }
  .ok-ico { width: 56px; height: 56px; }
  .history { border-top: 1px solid var(--line); }
  .history summary { cursor: pointer; padding: 14px 0; font-weight: 600; min-height: 44px; }
  ul.orders { list-style: none; margin: 0; padding: 0; }
  ul.orders li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
  @media (max-width: 520px) {
    .choice { grid-template-columns: auto minmax(0, 1fr); }
    .c-price { grid-column: 2; }
    .stepper li { font-size: 12px; gap: 6px; white-space: nowrap; min-width: 0; }
    .stepper li::before { width: 20px; height: 20px; font-size: 11px; }
    /* trên điện thoại không quét được mã trên chính màn hình: thông tin chuyển khoản lên trước, mã QR sau */
    #step2 .qrbox { order: 1; }
    #step2 .status { order: 2; }
  }

  /* ---- trang văn bản: điều khoản, chính sách ----
     Nhịp chữ kiểu tài liệu: một cỡ chữ thân 16px / dòng 1.75; tiêu đề mục cách xa mục trước, sát nội dung của nó. */
  .doc { display: block; max-width: 62ch; font-size: 16px; line-height: 1.75; }
  .doc h1 { font-size: clamp(28px, 5vw, 34px); line-height: 1.2; letter-spacing: -0.02em; margin: 8px 0 6px; }
  .doc h1 + .note { font-size: 14px; color: var(--muted); margin: 0 0 28px; }
  .doc h2 { font-size: 19px; line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; margin: 40px 0 10px; font-variant-numeric: tabular-nums; }
  .doc p { margin: 0 0 14px; }
  .doc ul { margin: 0 0 14px; padding-left: 1.25em; }
  .doc li { margin: 0 0 8px; padding-left: 0.2em; }
  .doc li:last-child { margin-bottom: 0; }
  .doc li::marker { color: var(--muted); }
  .doc b { font-weight: 600; }
  .doc a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
  .doc code { font-family: var(--mono); font-size: 0.82em; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
  .doc hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0 32px; }
  .doc section { display: block; }
  @media (max-width: 520px) {
    .doc { font-size: 15.5px; }
    .doc h2 { margin-top: 32px; }
  }
  footer a { color: inherit; }
