/* V210 — Trang hướng dẫn "Tạo SePay và nối với TikLive", bản 3 (09/10 chiều).
   Bản 2: mỗi thao tác một khối xếp dọc (số + một câu hành động + tối đa một câu giải thích), ảnh ở dưới; chữ → ảnh 16 px,
   ảnh → khối kế 40 px, giữa hai bước 64 px; cột chữ ≤ 680 px; chữ 16 px, giãn dòng 1,6.
   Bản 3 (anh: "hình ảnh bị gọn quá"): ảnh app nguyên cửa sổ (680 px), ảnh SePay một vùng rộng (tới 880 px trên máy tính),
   chỉ dẫn bằng khung + mũi tên + số; một ảnh dùng cho các thao tác liền nhau.
   Bộ màu trang donate (sáng). CSS tách riêng để chạy dưới CSP style-src 'self'. */
@font-face { font-family: 'TLNunito'; src: url('assets/fonts/nunito-vietnamese-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'TLNunito'; src: url('assets/fonts/nunito-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'TLNunito'; src: url('assets/fonts/nunito-latin-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #f6f3ff; --paper: #ffffff; --soft: #f4f0ff; --line: #ebe5f8; --line-strong: #dcd3f2;
  --text: #1c1632; --muted: #625d7e; --faint: #8e89a8; --brand: #8b3df0; --pin: #ff2d8a;
  --grad: linear-gradient(120deg, #a855f7, #e43bc4 55%, #ff2d8a);
  --ok: #08795c; --ok-soft: #e7f7f1; --info: #2355b5; --info-soft: #eef3fd; --info-line: #c9d8f8;
  /* Bộ nhận diện app (từ 15/08, client 774550cf/1036c5ac): "Live" chuyển màu xanh dương → tím → hồng 105°.
     Ba màu = color-mix của --ui-sound-swatch-blue/purple/pink (82/86/88 %) với màu chữ chính của trang, đã tính sẵn. */
  --brand-live-1: #356fd3; --brand-live-2: #944cdb; --brand-live-3: #d3428d;
  --sp-text-img: 16px; --sp-block: 40px; --sp-step: 64px; --col: 680px; --img: 880px;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: 'TLNunito', -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); font-weight: 800; }
b, strong { font-weight: 900; }
code { font-family: 'Cascadia Mono', Consolas, ui-monospace, monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
svg.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Thanh trên ── */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .mark { display: block; width: auto; height: 22px; }
/* Chữ TikLive đúng kiểu thanh tiêu đề app: Nunito 900, "Tik" màu chữ chính, "Live" chuyển màu */
.wm { display: inline-flex; font-weight: 900; font-size: 21px; line-height: 1; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.wm-live { background: linear-gradient(105deg, var(--brand-live-1), var(--brand-live-2) 52%, var(--brand-live-3)); background-size: 125% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: saturate(1.2) contrast(1.08); }
.wm.sm { font-size: 14px; }
.top .crumb { min-width: 0; color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .toc-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--paper); font: inherit; font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; cursor: pointer; }
@media (max-width: 420px) { .top .crumb { display: none; } }

/* ── Bố cục: điện thoại 1 cột trên nền giấy trắng; máy tính mục lục dính trái + cột giấy 960 px (ảnh tới 880 px) ── */
.layout { max-width: 1240px; margin: 0 auto; }
.paper { background: var(--paper); padding: 24px 16px 48px; }
.toc { margin: 0 16px; }
@media (min-width: 1024px) {
  .layout { display: grid; grid-template-columns: 220px minmax(0, 960px); gap: 28px; justify-content: center; align-items: start; padding: 28px 16px 64px; }
  .paper { padding: 44px 40px 56px; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 44px rgba(76, 40, 140, .07); }
  .toc { position: sticky; top: 80px; margin: 0; }
  .top .toc-btn { display: none; }
}

/* ── Mục lục: máy tính luôn mở; điện thoại thu gọn ── */
.toc { border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.toc summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 14px; font-weight: 900; color: var(--muted); cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.toc[open] summary::after { transform: rotate(-135deg); }
.toc ol { list-style: none; display: grid; gap: 2px; padding: 0 8px 10px; }
.toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 14.5px; line-height: 1.35; }
.toc a:hover, .toc a.on { background: var(--soft); }
.toc .n { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 1000; }
.toc .n.alt { background: var(--soft); color: var(--brand); border: 1.5px solid var(--line-strong); }
.layout > .toc { margin-top: 16px; }
@media (min-width: 1024px) { .layout > .toc { margin-top: 0; } .toc summary { cursor: default; } .toc summary::after { display: none; } }

/* ── Đầu trang ── */
.hero, .step, .trouble { max-width: var(--img); margin-left: auto; margin-right: auto; }
/* Chữ giữ cột ≤ 680 px (canh trái); ảnh được rộng tới 880 px, canh giữa */
.hero > *, .step-h, .act > div, .notes, .done, .part > h3, .part > ol, .part > .why, .faq { max-width: var(--col); }
.hero h1 { font-size: 28px; line-height: 1.25; font-weight: 1000; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin-top: 12px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero .meta span { padding: 3px 12px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 800; color: var(--muted); }
.need { margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: var(--soft); }
.need h2 { font-size: 15px; font-weight: 900; }
.need ul { margin: 8px 0 0 20px; display: grid; gap: 4px; }
.fee { margin-top: 12px; font-size: 14px; color: var(--muted); }
@media (min-width: 720px) { .hero h1 { font-size: 34px; } }

/* ── Bước ── */
.step { margin-top: var(--sp-step); padding-top: var(--sp-step); border-top: 1px solid var(--line); }
.step-h { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.step-h .n { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; font-size: 23px; font-weight: 1000; box-shadow: 0 8px 18px rgba(228, 59, 196, .25); }
.step-h .n.alt { background: var(--soft); color: var(--brand); border: 1.5px solid var(--line-strong); box-shadow: none; }
.step-h small { display: block; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.step-h h2 { font-size: 23px; line-height: 1.3; font-weight: 1000; }
.goal { margin-top: 8px; font-size: 15px; color: var(--muted); }
.goal b { color: var(--text); }

/* Khối thao tác: số (cùng màu số trong ảnh) + câu hành động; ảnh nằm dưới, canh giữa */
.act { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; margin-top: var(--sp-block); }
.step-h + .act { margin-top: 32px; }
.an { display: grid; place-items: center; width: 30px; height: 30px; margin-top: -1px; border-radius: 50%; background: var(--pin); color: #fff; font-size: 15px; font-weight: 1000; box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(255, 45, 138, .25); }
.say { font-size: 16.5px; font-weight: 700; }
.why { margin-top: 4px; font-size: 15px; color: var(--muted); }
.act > figure, .part > figure { grid-column: 1 / -1; }

figure { margin-top: var(--sp-text-img); text-align: center; }
figure .fr { display: inline-block; max-width: 100%; vertical-align: top; border-radius: 12px; overflow: hidden; border: 1px solid #ddd5ef; background: #fff; box-shadow: 0 8px 24px rgba(76, 40, 140, .10); }
figure img { display: block; max-width: 100%; height: auto; }
figure figcaption { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font-size: 13.5px; color: var(--faint); }
figure figcaption svg.i { font-size: 15px; }
/* Ảnh dọc (hộp Thêm Webhook, trang đăng ký, màn điện thoại): trên máy tính không rộng quá 560 px để khỏi quá cao */
figure.tall .fr { max-width: min(100%, 560px); }
.zoom { cursor: zoom-in; }

/* Bước 4: bốn phần của hộp "Thêm Webhook" */
.parts { grid-column: 1 / -1; margin-top: 24px; display: grid; gap: var(--sp-block); }
.part { padding: 0; }
@media (min-width: 720px) { .part { padding: 22px 24px 24px; border-radius: 16px; background: #fbfaff; border: 1px solid var(--line); } }
.part h3 { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 1000; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
ol.fl { list-style: none; margin-top: 12px; display: grid; gap: 10px; counter-reset: fl; }
ol.fl > li { position: relative; padding-left: 36px; counter-increment: fl; }
ol.fl > li::before { content: counter(fl); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pin); color: #fff; font-size: 13px; font-weight: 1000; }
.part .why { margin-top: 10px; }

/* Ghi chú cuối bước 2 — nhẹ, nhỏ */
.notes { margin-top: var(--sp-block); display: grid; gap: 10px; }
.note { padding: 10px 14px; border-radius: 10px; background: var(--info-soft); border-left: 3px solid var(--info-line); font-size: 14.5px; color: #33456b; }
.note b:first-child { color: var(--info); }
/* Hộp riêng cho một nhóm ngân hàng (có thao tác + ảnh): cùng màu ghi chú, có khung ở mọi cỡ màn để không lẫn với thao tác chung */
.part.cond { margin-top: 14px; padding: 14px 14px 16px; border-radius: 12px; background: var(--info-soft); border: 0; border-left: 3px solid var(--info-line); }
@media (min-width: 720px) { .part.cond { padding: 18px 22px 22px; background: var(--info-soft); border: 0; border-left: 3px solid var(--info-line); } }
.part.cond h3 { background: #fff; color: var(--info); text-transform: none; letter-spacing: 0; font-size: 14px; }
.part.cond > .why { margin-top: 10px; }

/* Hộp trấn an (bước 3): xanh lá nhạt, không phải cảnh báo */
.calm { display: flex; gap: 10px; align-items: flex-start; max-width: var(--col); margin-top: 20px; padding: 12px 16px; border-radius: 12px;
  background: var(--ok-soft); border: 1px solid #bfe8d8; color: #1f4d40; font-size: 15px; }
.calm svg.i { margin-top: 3px; font-size: 20px; color: var(--ok); }
.calm b { color: var(--ok); }

/* Xong bước */
.done { display: flex; gap: 8px; align-items: flex-start; margin-top: var(--sp-block); padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-size: 15px; font-weight: 800; }
.done svg.i { margin-top: 4px; stroke-width: 3; }

/* Nút sao chép: cố định kích thước, chỉ đổi chữ */
.copy { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 28px; margin-left: 6px; vertical-align: 1px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: var(--paper); font: inherit; font-size: 13px; font-weight: 900; color: var(--text); cursor: pointer; }
.copy.done-c { border-color: var(--ok); color: var(--ok); }

/* Sự cố */
.trouble { margin-top: var(--sp-step); padding-top: var(--sp-step); border-top: 1px solid var(--line); }
.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { border-radius: 14px; border: 1px solid var(--line-strong); background: #fbfaff; }
.faq summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 900; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .body { padding: 0 16px 14px; font-size: 15px; display: grid; gap: 8px; }
.faq .body ul { margin-left: 20px; display: grid; gap: 4px; }

.foot { max-width: var(--col); margin: var(--sp-step) auto 0; text-align: center; color: var(--faint); font-size: 14px; }
.foot .mark { display: inline-block; width: auto; height: 18px; vertical-align: -3px; margin-right: 4px; }

/* Xem ảnh lớn */
.lightbox { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: none; place-items: center; padding: 16px; background: rgba(20, 14, 40, .86); }
.lightbox.on { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; background: #fff; }
.lightbox button { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 20px; font-weight: 900; cursor: pointer; }
