﻿/* ===== Design tokens ===== */
:root {
  color-scheme: light;
  --bg: #F3F6FD;
  --surface: #FFFFFF;
  --ink: #14213F;
  --navy: #0D1B33;
  --muted: #5A6684;
  --line: #DCE3F2;
  --orange: #0066FF;
  --orange-2: #0052cc;
  --blue: #2F6BFF;
  --mint: #0FB57E;
  --grape: #8457F5;
  --sun: #F5A300;
  --pink: #EF4C78;
  --sky: #1FA9E8;
  --display: 'Montserrat', 'Be Vietnam Pro', system-ui, sans-serif;
  --body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --shadow: 0 4px 18px rgba(20, 33, 63, .06);
  --shadow-lg: 0 14px 40px rgba(20, 33, 63, .14);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
#app { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
body.no-promo #app { grid-template-rows: auto minmax(0, 1fr); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }

/* ===== Header ===== */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 20px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand svg { flex: none; transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.brand:hover svg { transform: rotate(-12deg) scale(1.08); }
.brand h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -.3px; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; margin-left: auto; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.tabs button:hover { color: var(--ink); background: #fff; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(20,33,63,.25); }
.copy-tab { border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: border-color .2s, transform .2s; }
.copy-tab:hover { border-color: var(--orange); transform: translateY(-1px); }

#views { min-height: 0; position: relative; }
.view { height: 100%; overflow: auto; animation: viewIn .35s ease; }
.view[hidden] { display: none !important; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Shared ===== */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.lv-co-ban { background: color-mix(in srgb, var(--mint) 16%, #fff); color: #0A7F59; }
.lv-trung-binh { background: color-mix(in srgb, var(--sun) 20%, #fff); color: #8A5A00; }
.lv-nang-cao { background: color-mix(in srgb, var(--pink) 16%, #fff); color: #B5244D; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none; color: var(--ink); transition: border-color .2s, transform .15s, box-shadow .2s; }
.btn:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #4d94ff, var(--orange-2)); border-color: var(--orange-2); color: #fff; box-shadow: 0 4px 12px rgba(0,102,255,.3); }
.btn.primary:hover { box-shadow: 0 6px 18px rgba(0,102,255,.42); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.gd-kicker { font-size: 12px; letter-spacing: .12em; color: var(--orange-2); font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; z-index: 100; box-shadow: 0 8px 24px rgba(20,33,63,.25); animation: toastIn .25s ease; }
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

.tab-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 1180px; margin: 8px auto 28px; padding: 18px 20px; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); }
.tab-foot a { color: var(--ink); font-weight: 700; text-decoration: none; }
.tab-foot a.tf-home { display: inline-block; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; transition: border-color .2s, transform .2s; }
.tab-foot a.tf-home b { color: var(--orange); }
.tab-foot a.tf-home:hover { border-color: var(--orange); transform: translateY(-2px); }

/* ===== TAB 1: HÆ°á»›ng dáº«n ===== */
#view-huong-dan { background: radial-gradient(1200px 400px at 70% -100px, #e6f0ff 0%, transparent 60%), #f6f8fc; }
.gd { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; max-width: 1180px; margin: 0 auto; padding: 28px 20px 48px; }
.gd-toc { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.gd-toc a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.3; transition: background .15s; }
.gd-toc a:hover { background: #eef3ff; }
.gd-toc a.active { background: #e6f0ff; font-weight: 700; color: #0052cc; }
.gd-toc a span { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--orange-2); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.gd-toc a.done span { background: var(--mint); }
.gd-toc a.faq span { background: var(--blue); }
.gd-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.gd-hero { background: linear-gradient(120deg, #fff 0%, #f0f7ff 100%); border: 1px solid #cce0ff; border-radius: 18px; padding: 26px 28px; position: relative; overflow: hidden; }
.gd-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(0,102,255,.12), transparent 70%); }
.gd-hero h2 { margin: 6px 0 8px; font-family: var(--display); font-size: clamp(26px, 3.6vw, 38px); line-height: 1.12; color: var(--navy); }
.gd-hero p { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; }
.gd-hero p b { color: #ff2d55; }
.gd-progress { height: 8px; border-radius: 99px; background: #cce0ff; overflow: hidden; margin-bottom: 18px; }
.gd-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4d94ff, var(--orange-2)); border-radius: inherit; transition: width .3s; }
.gd-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; position: relative; z-index: 1; }
.gd-note { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); transition: transform .2s, box-shadow .2s; }
.gd-note:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gd-note b { color: var(--navy); font-size: 14px; }
.gd-note code { font-family: var(--mono); font-weight: 600; color: var(--orange-2); }
.gd-note-warn { text-decoration: none; background: #f0f7ff; border-color: #99c2ff; cursor: pointer; }

.gd-steps { display: flex; flex-direction: column; gap: 28px; }
.gd-step { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); scroll-margin-top: 16px; opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease, border-color .2s; }
.gd-step.in { opacity: 1; transform: none; }
.gd-step:hover { border-color: #ffc9a0; }
.gd-body { display: flex; gap: 16px; align-items: flex-start; }
.gd-num { flex: none; width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(160deg, #ff9a3c, var(--orange-2)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 4px 12px rgba(232,112,26,.3); }
.gd-num span { font-size: 9px; letter-spacing: .1em; opacity: .9; }
.gd-num b { font-size: 24px; }
.gd-body h3 { margin: 2px 0 6px; font-size: 20px; color: var(--navy); }
.gd-body p { margin: 0; font-size: 15.5px; line-height: 1.65; color: #34405a; }
.gd-body p b { color: var(--navy); }
.gd-link { margin-top: 12px; }
.gd-codes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gd-code { border: 2px dashed var(--orange-2); background: #fff8f1; border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; transition: background .2s, transform .2s; }
.gd-code small { font-size: 11px; color: var(--muted); }
.gd-code b { font-size: 22px; letter-spacing: .12em; color: var(--navy); font-family: var(--mono); }
.gd-code em { font-style: normal; font-size: 11px; color: var(--orange-2); font-weight: 700; }
.gd-code:hover { background: #ffefe0; transform: translateY(-2px); }
.gd-code.copied { border-style: solid; border-color: var(--mint); background: #eafaf3; }
.gd-code.copied em { color: var(--mint); }

.gd-shot { position: relative; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; background: #eef1f6; }
.gd-shot > img { display: block; width: 100%; height: auto; }
.gd-shot figcaption { position: absolute; right: 10px; bottom: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(13,27,51,.7); color: #fff; opacity: 0; transition: opacity .2s; }
.gd-shot:hover figcaption { opacity: 1; }
.gd-shot { container-type: inline-size; }
.gd-ring { position: absolute; border: 4px solid #ff2d55; border-radius: 999px; box-shadow: 0 0 0 4px rgba(255,45,85,.22), 0 0 18px rgba(255,45,85,.5); pointer-events: none; animation: gdPulse 1.8s ease-in-out infinite; }
.gd-codebox { position: absolute; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2.1%; pointer-events: none; }
.gd-codebox span { display: grid; place-items: center; background: #ececee; border-radius: 30%; font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 1.65cqw; color: #1c1e21; }
.gd-shot-lb { cursor: zoom-out; border: 0; max-width: min(1200px, 100%); width: 100%; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(13,27,51,.88); display: grid; place-items: center; padding: 3vh 3vw; cursor: zoom-out; animation: viewIn .2s ease; }
.lightbox > * { max-width: min(1200px, 100%); max-height: 94vh; width: 100%; overflow: auto; border-radius: 14px; }
.lightbox img { width: auto; max-width: 100%; display: block; margin: auto; }

/* ===== Mock screenshots (khi chÆ°a cÃ³ áº£nh tháº­t) ===== */
.mock { font-family: var(--body); background: #fff; color: #1c1e21; font-size: 13px; user-select: none; }
.mk-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #e9edf4; border-bottom: 1px solid #d6dce8; }
.mk-dots { display: flex; gap: 5px; }
.mk-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.mk-dots i:nth-child(2) { background: #febc2e; } .mk-dots i:nth-child(3) { background: #28c840; }
.mk-url { flex: 1; background: #fff; border-radius: 99px; padding: 4px 12px; font-size: 12px; color: #5f6368; display: flex; align-items: center; gap: 6px; }
.mk-url::before { content: 'ðŸ”’'; font-size: 10px; }
.mk-ext { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: #fff; font-size: 14px; }
.mk-page { position: relative; min-height: 240px; padding: 26px; display: grid; place-items: center; background: linear-gradient(180deg, #fbfcff, #f2f5fb); }
.mk-card { background: #fff; border: 1px solid #e3e7ef; border-radius: 16px; padding: 22px 24px; box-shadow: 0 10px 30px rgba(20,33,63,.08); width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; }
.mk-card h4 { margin: 0; font-size: 20px; font-family: var(--display); }
.mk-card p { margin: 0; color: #606770; }
.mk-input { border: 1.5px solid #ccd3df; border-radius: 10px; padding: 10px 12px; color: #8a94a6; background: #fff; }
.mk-btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; border-radius: 10px; padding: 10px 16px; font-weight: 700; background: #0064e0; color: #fff; }
.mk-btn.lite { background: #eef1f6; color: #1c1e21; }
.mk-btn.green { background: #1a73e8; }
.mk-muse { width: 42px; height: 42px; border-radius: 12px; background: conic-gradient(from 200deg, #0064e0, #8457F5, #EF4C78, #FF6A2B, #0064e0); display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--display); font-size: 22px; }
.mk-row { display: flex; align-items: center; gap: 12px; }
.mk-sm { font-size: 12px; color: #8a94a6; }
.mk-otp { display: flex; gap: 8px; justify-content: center; }
.mk-otp i { width: 40px; height: 48px; border: 1.5px solid #ccd3df; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 20px; font-family: var(--mono); }
.mk-list { display: grid; gap: 10px; }
.mk-list div { display: flex; gap: 10px; align-items: flex-start; }
.mk-list div span { font-size: 18px; }
.mk-list b { display: block; }
.mk-app { display: grid; grid-template-columns: 170px 1fr; min-height: 320px; }
.mk-side { background: #f4f6fa; border-right: 1px solid #e3e7ef; padding: 12px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.mk-side .it { padding: 7px 9px; border-radius: 8px; color: #4b5563; }
.mk-side .it.on { background: #e6ecf7; color: #111; font-weight: 600; }
.mk-side .grow { flex: 1; }
.mk-main { display: grid; place-items: center; padding: 24px; background: #fff; position: relative; }
.mk-hello { font-family: var(--display); font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 14px; background: linear-gradient(90deg, #0064e0, #8457F5, #EF4C78); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-ask { width: min(420px, 100%); border: 1.5px solid #dbe1ec; border-radius: 16px; padding: 14px; color: #8a94a6; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 6px 18px rgba(20,33,63,.06); }
.mk-ask i { width: 30px; height: 30px; border-radius: 50%; background: #0064e0; display: grid; place-items: center; color: #fff; font-style: normal; }
.mk-pop { position: absolute; left: 14px; bottom: 54px; background: #fff; border: 1px solid #e3e7ef; border-radius: 12px; box-shadow: 0 12px 30px rgba(20,33,63,.15); padding: 6px; width: 170px; display: grid; gap: 2px; z-index: 2; }
.mk-pop div { padding: 7px 10px; border-radius: 8px; }
.mk-modal { display: grid; grid-template-columns: 150px 1fr; width: min(560px, 100%); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgba(20,33,63,.15); border: 1px solid #e3e7ef; }
.mk-modal .l { background: #f4f6fa; padding: 12px; display: grid; gap: 4px; align-content: start; }
.mk-modal .l div { padding: 7px 10px; border-radius: 8px; color: #4b5563; }
.mk-modal .l div.on { background: #e6ecf7; color: #111; font-weight: 700; }
.mk-modal .r { padding: 18px; display: grid; gap: 12px; align-content: start; }
.mk-modal .r h5 { margin: 0; font-size: 16px; }
.mk-set { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eef1f6; }
.mk-mail { width: min(560px, 100%); background: #fff; border: 1px solid #e3e7ef; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(20,33,63,.08); }
.mk-mail .row { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #eef1f6; color: #5f6368; }
.mk-mail .row.new { background: #f2f6ff; color: #1c1e21; font-weight: 700; }
.mk-mail .row span:last-child { text-align: right; font-size: 12px; }
.mk-store { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; width: min(600px, 100%); background: #fff; border: 1px solid #e3e7ef; border-radius: 16px; padding: 20px; box-shadow: 0 10px 30px rgba(20,33,63,.08); }
.mk-store .ic { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, #d52b1e 0 50%, #fff 50%); display: grid; place-items: center; font-size: 30px; border: 1px solid #eee; }
.mk-vpn { position: absolute; right: 16px; top: 8px; width: 230px; background: #12182b; color: #fff; border-radius: 16px; padding: 16px; display: grid; gap: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.3); z-index: 2; }
.mk-vpn .country { display: flex; justify-content: space-between; background: rgba(255,255,255,.08); padding: 9px 12px; border-radius: 10px; }
.mk-vpn .power { width: 84px; height: 84px; margin: 4px auto; border-radius: 50%; background: radial-gradient(circle, #2ee59d 0 40%, #1b8f62 41% 100%); display: grid; place-items: center; font-size: 30px; }
.mk-success { text-align: center; align-items: center; }
.mk-badge { font-family: var(--display); font-size: 34px; font-weight: 800; background: linear-gradient(90deg, #FF6A2B, #EF4C78, #8457F5); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.mk-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mk-confetti i { position: absolute; width: 8px; height: 14px; border-radius: 2px; top: -20px; animation: fall 3.2s linear infinite; }
@keyframes fall { to { transform: translateY(380px) rotate(540deg); } }

/* VÃ²ng trÃ²n Ä‘á» Ä‘Ã¡nh dáº¥u chá»— cáº§n báº¥m */
.hl { position: relative; }
.hl::after { content: ''; position: absolute; inset: -7px; border: 3.5px solid #ff2d55; border-radius: 999px; box-shadow: 0 0 0 4px rgba(255,45,85,.22), 0 0 18px rgba(255,45,85,.5); pointer-events: none; animation: gdPulse 1.8s ease-in-out infinite; }
.hl.sq::after { border-radius: 14px; }
@keyframes gdPulse { 50% { box-shadow: 0 0 0 9px rgba(255,45,85,.12), 0 0 24px rgba(255,45,85,.6); transform: scale(1.02); } }

/* FAQ */
.gd-faq { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; scroll-margin-top: 16px; box-shadow: var(--shadow); }
.gd-faq h3 { margin: 0 0 10px; font-size: 22px; color: var(--navy); }
.gd-faq details { border-top: 1px solid var(--line); padding: 12px 2px; scroll-margin-top: 16px; }
.gd-faq details.flash { animation: flash 1.6s ease; border-radius: 10px; }
@keyframes flash { 0%, 60% { background: #fff1e6; } }
.gd-faq summary { cursor: pointer; font-weight: 700; font-size: 15.5px; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: '+'; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 800; color: var(--orange-2); transition: transform .25s; }
.gd-faq details[open] summary::after { transform: rotate(45deg); }
.gd-faq details p { margin: 8px 0 0; color: #34405a; font-size: 15px; line-height: 1.6; }
.gd-fix { margin: 8px 0 0; padding-left: 20px; color: #34405a; } .gd-fix li { margin: 4px 0; }

/* ===== TAB 2: Lá»™ trÃ¬nh ===== */
.plan { height: 100%; }
.plan-in { max-width: 1060px; margin: 0 auto; padding: 28px 20px 40px; }
.plan-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.plan-head h2 { margin: 4px 0 0; font-family: var(--display); font-size: 38px; line-height: 1.05; }
.plan-head p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.plan-stats { display: flex; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; text-align: center; min-width: 88px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--display); font-size: 28px; line-height: 1; color: var(--orange-2); }
.stat small { font-size: 12px; color: var(--muted); }
.timebar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; width: 100%; margin: 6px 0 24px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.timebar span { display: block; height: 100%; transform-origin: left; animation: grow .8s cubic-bezier(.2,.8,.2,1) both; cursor: pointer; transition: filter .2s; }
.timebar span:hover { filter: brightness(1.12); }
@keyframes grow { from { transform: scaleX(0); } }
.mods { display: grid; gap: 14px; }
.mod { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--hue); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; scroll-margin-top: 12px; }
.mod:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.mod .when { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mod .when b { display: block; font-family: var(--display); font-size: 30px; line-height: 1; color: var(--hue); }
.mod h3 { margin: 0 0 6px; font-family: var(--display); font-size: 22px; line-height: 1.15; }
.mod .concepts { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.mod .concepts li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--hue) 10%, #fff); color: color-mix(in srgb, var(--hue) 70%, var(--ink)); font-weight: 600; cursor: pointer; }
.mod .concepts li:hover { background: color-mix(in srgb, var(--hue) 20%, #fff); }
.ex { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.ex .name { font-weight: 600; }
.ex .name .chip { margin-left: 6px; vertical-align: 1px; }
.ex .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: end; }
.ex .note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

/* ===== TAB 3: Mindmap ===== */
#view-mindmap { overflow: hidden; }
.mm { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto minmax(0, 1fr); }
.mm-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.mm-bar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.mm-bar .grow { flex: 1; }
.mm-status { font-size: 12px; color: var(--muted); }
.mm-vp { position: relative; overflow: hidden; cursor: grab; background-color: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1.2px, transparent 1.3px); background-size: 22px 22px; touch-action: none; }
.mm-vp.drag { cursor: grabbing; }
.mm-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mm-canvas.anim { transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.mm-canvas svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mm-canvas path { fill: none; stroke-width: 2.2; stroke-linecap: round; opacity: .55; }
.mm-node { position: absolute; left: 0; top: 0; width: max-content; max-width: 270px; background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--hue) 30%, var(--line)); border-left: 5px solid var(--hue); border-radius: 10px; padding: 7px 10px 8px; cursor: pointer; box-shadow: 0 1px 2px rgba(20,33,63,.06); user-select: none; transition: box-shadow .2s, border-color .2s; }
.mm-node:hover { border-color: color-mix(in srgb, var(--hue) 60%, var(--line)); box-shadow: 0 6px 16px rgba(20,33,63,.1); }
.mm-node.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hue) 40%, transparent), 0 6px 16px rgba(20,33,63,.12); }
.mm-node .k { display: block; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: color-mix(in srgb, var(--hue) 80%, var(--ink)); margin-bottom: 1px; }
.mm-node .t { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; word-break: break-word; }
.mm-node .meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mm-node .meta:empty { display: none; }
.mm-node.k-module { background: color-mix(in srgb, var(--hue) 11%, #fff); }
.mm-node.k-module .t { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.2; }
.mm-node.k-root { background: var(--ink); border-color: var(--ink); border-left-color: var(--orange); color: #fff; max-width: 230px; padding: 12px 14px; }
.mm-node.k-root .t { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.15; }
.mm-node.k-root .k { color: #FFB590; }
.mm-node.k-note .t { font-weight: 500; font-size: 13px; }
.mm-node .tg { position: absolute; right: -13px; top: 50%; transform: translateY(-50%); min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--hue) 50%, var(--line)); background: var(--surface); color: color-mix(in srgb, var(--hue) 85%, var(--ink)); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.mm-node .tg:hover { background: color-mix(in srgb, var(--hue) 12%, #fff); }
.mm-node.k-root .tg { border-color: var(--orange); }
.mm-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; }
.mm-zoom .btn { padding: 5px 12px; font-size: 16px; box-shadow: 0 2px 8px rgba(20,33,63,.08); }
.mm-legend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 140px); }
.mm-legend span { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.mm-legend span i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

.panel { border-left: 1px solid var(--line); background: var(--surface); overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2 { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.15; text-wrap: balance; }
.panel .lead { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.6; }
.panel .sub { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 4px 0 -4px; }
.panel .pts { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; }
.panel .kids { display: grid; gap: 6px; }
.panel .kids button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; transition: border-color .2s; }
.panel .kids button:hover { border-color: var(--blue); }
.panel .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.outline ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.outline li { position: relative; padding: 8px 10px 8px 30px; border-radius: 10px; background: color-mix(in srgb, var(--hue, var(--blue)) 7%, #fff); border: 1px solid color-mix(in srgb, var(--hue, var(--blue)) 18%, var(--line)); font-size: 14px; line-height: 1.4; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.outline li::before { content: ''; position: absolute; left: 12px; top: 14px; width: 8px; height: 8px; border-radius: 3px; background: var(--hue, var(--orange)); }
.outline li small { color: var(--muted); font-family: var(--mono); white-space: nowrap; }

.prompt { position: relative; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFF; overflow: hidden; }
.prompt .ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); background: #fff; }
.prompt pre { margin: 0; padding: 12px 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto; }
.prompt pre mark { background: color-mix(in srgb, var(--sun) 25%, #fff); color: #6b4600; border-radius: 4px; padding: 0 2px; }

/* ===== TAB 4: ThÆ° viá»‡n ===== */
.lib-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.lib-search { flex: 1 1 260px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; box-shadow: var(--shadow); }
.lib-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent); }
.seg { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: 12px; border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.formula { background: linear-gradient(120deg, var(--navy), #1a2f55); color: #fff; border-radius: 18px; padding: 20px 22px; margin-bottom: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; position: relative; overflow: hidden; }
.formula::after { content: ''; position: absolute; right: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; border: 2px solid rgba(64,200,255,.3); }
.formula h3 { margin: 0 0 10px; font-family: var(--display); font-size: 24px; }
.formula ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.formula li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.formula li b { color: #ff9a3c; margin-right: 4px; }
.lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--hue); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.ghead { display: flex; gap: 12px; align-items: center; }
.gnum { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px; color: #fff; background: var(--hue); }
.gtype { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: color-mix(in srgb, var(--hue) 75%, var(--ink)); }
.gcard h3 { margin: 0; font-family: var(--display); font-size: 21px; line-height: 1.15; }
.gcard .gpitch { margin: 0; color: var(--muted); font-size: 14px; }
.gcard .prompt pre { max-height: 180px; }
.gcard .prompt.open pre { max-height: none; }
.lib-empty { text-align: center; color: var(--muted); padding: 30px; }

/* ===== Promo ===== */
.promo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 16px 12px; padding: 10px 46px 10px 16px; border-radius: 14px; background: linear-gradient(110deg, #0d1b33 0%, #13294d 60%, #1a2f55 100%); color: #fff; box-shadow: 0 6px 20px rgba(13,27,51,.25); position: relative; overflow: hidden; }
.promo[hidden] { display: none !important; }
.promo::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; border: 2px solid rgba(64,200,255,.35); pointer-events: none; }
.promo .pr-ic { font-size: 26px; }
.promo .pr-t { min-width: 0; flex: 1 1 260px; }
.promo .pr-k { font-size: 11px; letter-spacing: .12em; color: #f39a4a; font-weight: 700; }
.promo .pr-h { font-weight: 800; font-size: 17px; line-height: 1.2; }
.promo .pr-h b { color: #ff8a2a; }
.promo .pr-s { font-size: 12.5px; color: #b9c6dc; }
.promo .pr-d { background: rgba(255,138,42,.15); border: 1px solid #ff8a2a; color: #ffd2ad; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; text-align: center; line-height: 1.3; }
.promo .pr-d b { color: #fff; }
.promo.urgent .pr-d { animation: cdGlow 1.6s ease-in-out infinite; }
@keyframes cdGlow { 50% { box-shadow: 0 0 0 4px rgba(255,138,42,.35); } }
.promo .cd { display: flex; gap: 5px; justify-content: center; margin-top: 5px; }
.promo .cd-u { background: #0b1628; border: 1px solid rgba(255,138,42,.6); border-radius: 8px; min-width: 44px; padding: 3px 4px 2px; text-align: center; line-height: 1; }
.promo .cd-u b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; color: #fff; font-weight: 800; }
.promo .cd-u small { font-size: 9.5px; color: #ffb877; text-transform: uppercase; letter-spacing: .05em; }
.promo .cd-u.tick b { animation: cdPop .35s ease-out; }
@keyframes cdPop { 0% { transform: translateY(-4px); opacity: .3; } }
.promo .pr-cta { background: linear-gradient(180deg, #ff9a3c, #e8701a); color: #fff; font-weight: 800; text-decoration: none; padding: 10px 18px; border-radius: 10px; white-space: nowrap; box-shadow: 0 4px 12px rgba(232,112,26,.4); z-index: 1; transition: filter .2s, transform .2s; border: none; font-family: var(--display); font-size: 15px; cursor: pointer; }
.promo .pr-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.promo .pr-x { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; z-index: 1; }
.promo .pr-x:hover { background: rgba(255,255,255,.25); }
.promo-mini { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid #ff8a2a; background: linear-gradient(110deg, #0d1b33, #1a2f55); color: #fff; font-weight: 700; font-size: 13.5px; box-shadow: 0 6px 18px rgba(13,27,51,.3); animation: pmPulse 2.4s ease-in-out infinite; }
.promo-mini[hidden] { display: none; }
.promo-mini .pm-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff8a2a; animation: pmBlink 1.2s ease-in-out infinite; }
.promo-mini .pm-cd { font-variant-numeric: tabular-nums; color: #ffd2ad; font-weight: 800; }
@keyframes pmPulse { 50% { box-shadow: 0 6px 18px rgba(13,27,51,.3), 0 0 0 8px rgba(255,138,42,0); } 0%, 100% { box-shadow: 0 6px 18px rgba(13,27,51,.3), 0 0 0 0 rgba(255,138,42,.45); } }
@keyframes pmBlink { 50% { opacity: .3; } }

/* ===== Responsive ===== */
@media (max-width: 980px) { .lib-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .tabs { margin-left: 0; }
  .mm { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(380px, 62vh) auto; overflow: auto; height: auto; min-height: 100%; }
  #view-mindmap { overflow: auto; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .mm-legend { display: none; }
  .mod { grid-template-columns: minmax(0, 1fr); }
  .mk-app { grid-template-columns: 120px 1fr; }
}
@media (max-width: 820px) {
  .gd { grid-template-columns: 1fr; padding: 16px 16px 40px; }
  .gd-toc { position: static; flex-direction: row; overflow-x: auto; }
  .gd-toc a { white-space: nowrap; }
  .gd-body { flex-direction: column; }
  .gd-num { width: 46px; height: 46px; }
  .formula { grid-template-columns: 1fr; }
  .mk-store { grid-template-columns: 48px 1fr; }
  .mk-store .ic { width: 48px; height: 48px; }
  .mk-vpn { position: relative; right: auto; top: auto; margin: 0 auto 12px; }
}
@media (max-width: 600px) {
  .copy-tab { display: none; }
  .promo { margin: 6px 8px 8px; }
  .promo .pr-s { display: none; }
  .promo-mini .pm-cd { display: none; }
  .mk-modal { grid-template-columns: 1fr; }
  .mk-modal .l { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .gd-step { opacity: 1; transform: none; } }

/* ===== Modal ===== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(13, 27, 51, 0.7); backdrop-filter: blur(5px); z-index: 1000; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s ease; }
.modal-overlay[hidden] { display: none !important; }
.modal-content { background: #fff; border-radius: 16px; padding: 32px; width: 90%; max-width: 400px; position: relative; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2); animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0; transition: color 0.2s; }
.modal-close:hover { color: var(--ink); }
.modal-content h3 { margin: 0 0 8px; font-family: var(--display); font-size: 22px; color: var(--navy); }
.modal-content p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--ink); }
.form-group input { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: var(--blue); }
.full-width { width: 100%; justify-content: center; margin-top: 8px; padding: 10px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
