:root {
  --primary: #506cf0;
  --primary-600: #3f58d8;
  --primary-tint: #edf0fd;
  --primary-ring: rgba(91, 110, 240, 0.35);
  --accent: #d6404e;
  --accent-600: #bd3341;
  --teal: #5ce1c6;
  --navy: #0e2643;
  --navy-hero: #19395e;
  --ink: #182537;
  --muted: #5d6b80;
  --line: #dde3f5;
  --bg: #ffffff;
  --soft: #f6f8fe;
  --ok: #0f8a5f;
  --ok-tint: #e6f6ef;
  --warn: #9a5b00;
  --warn-tint: #fff4e0;
  --danger: #c23142;
  --danger-tint: #fdeced;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(14, 38, 67, 0.08);
  --shadow-soft: 0 6px 16px rgba(91, 110, 240, 0.16);
  --font: "Mulish", system-ui, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0; }
p { margin: 0; }
small { font-size: 13px; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.narrow-container { width: min(820px, 100% - 40px); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 24px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px var(--primary-ring); }
.btn-primary:hover { background: var(--primary-600); color: #fff; box-shadow: 0 6px 18px var(--primary-ring), 0 0 0 5px rgba(91, 110, 240, 0.18); }
.btn-accent { background: var(--accent); color: #fff; border-radius: 6px; height: 40px; padding: 0 18px; }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn-outline:hover { background: var(--primary-tint); }
.btn-google { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 6px rgba(14, 38, 67, 0.06); }
.btn-google:hover { box-shadow: inset 0 0 0 1.5px var(--primary), 0 4px 12px rgba(14, 38, 67, 0.08); color: var(--ink); }
.btn-lg { height: 52px; padding: 0 32px; font-size: 16px; }
.btn-sm { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; margin-top: 12px; }
.link-button { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
.link-button:hover { color: var(--danger); }

/* Pills */
.pill {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--primary-tint); color: var(--navy-hero); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.pill-dark { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pill-ok { background: var(--ok-tint); color: var(--ok); }
.pill-warn { background: var(--warn-tint); color: var(--warn); height: 22px; font-size: 12px; padding: 0 8px; }
.pill-danger { background: var(--danger-tint); color: var(--danger); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand-mark { display: inline-flex; }
.brand-mark img { display: block; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 12px; border-radius: 6px; color: var(--ink); font-weight: 600; font-size: 15px; }
.nav-link:hover, .nav-link.is-active { color: var(--primary); }
.nav-link.strong { color: var(--primary); }
.nav-link.as-button { background: none; border: 0; cursor: pointer; }
.nav-sep { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--soft); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 14px; }
.user-email { font-size: 14px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; color: var(--navy); padding: 8px; cursor: pointer; }

/* Toasts */
.toasts { position: fixed; top: 84px; right: 20px; z-index: 60; display: grid; gap: 10px; width: min(380px, 100% - 40px); }
.toast { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); border-left: 4px solid var(--primary); font-weight: 600; transition: opacity .5s ease, transform .5s ease; }
.toast.is-leaving { opacity: 0; transform: translateX(16px); }
.toast-success { border-color: var(--ok); }
.toast-error { border-color: var(--danger); }
.toast-warning { border-color: #e6a020; }
.toast-close { background: none; border: 0; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; padding: 88px 0 96px;
  background-color: var(--navy-hero);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    radial-gradient(1200px 500px at 85% 110%, rgba(92, 225, 198, 0.16), transparent 60%),
    linear-gradient(135deg, #1a3a60 0%, #172f52 55%, #13284a 100%);
  background-size: 22px 22px, auto, auto;
}
.hero-decor { position: absolute; inset: 0; pointer-events: none; }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-lines path { fill: none; stroke: rgba(92, 225, 198, 0.35); stroke-width: 1.5; }
.hero-lines circle { fill: rgba(92, 225, 198, 0.7); }
.hero-ring { position: absolute; width: 640px; height: 640px; right: -220px; top: -120px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 50%; }
.hero-inner { position: relative; }
.hero-copy { max-width: 760px; }
.hero h1 { color: #fff; font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.hl { position: relative; display: inline-block; color: var(--teal); }
.swoosh { position: absolute; left: 0; right: 0; bottom: -10px; width: 100%; height: 14px; }
.swoosh path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; }
.hero-lead { margin-top: 22px; font-size: 18px; color: rgba(255, 255, 255, 0.78); max-width: 560px; }
.hero-chips { list-style: none; margin-top: 26px; display: grid; gap: 10px; justify-items: start; }
.hero-chips li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 4px; background: rgba(0, 0, 0, 0.25); font-weight: 600; font-size: 15px; }
.hero-chips li::before { content: "+"; color: rgba(255, 255, 255, 0.7); font-weight: 400; font-size: 18px; line-height: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }


/* Sections */
.section { padding: 96px 0; }
.section-tint { background: var(--primary-tint); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-title { font-size: clamp(30px, 4vw, 46px); font-weight: 700; letter-spacing: -0.02em; }
.section-title.center { text-align: center; margin-bottom: 36px; }
.section-title .accent { color: var(--primary); }
.section-lead { margin-top: 14px; color: var(--muted); font-size: 17px; }

.price { font-weight: 800; font-size: 22px; color: var(--navy); }
.price small { font-size: 0.65em; margin-left: 2px; }
.price-xl { font-size: 34px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel h2 { font-size: 22px; font-weight: 700; }
.prose { margin-top: 14px; color: #34425a; }
.prose p + p { margin-top: 12px; }
.legal { max-width: 820px; color: #34425a; }
.legal h2 { margin: 32px 0 10px; font-size: 21px; color: var(--navy); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; }
.legal a { color: var(--primary); }

/* Category colors */
.cat-dai_cuong { --cat: #506cf0; --cat-tint: #edf0fd; }
.cat-co_so_nganh { --cat: #0f8a7a; --cat-tint: #e3f6f2; }
.cat-chuyen_nganh { --cat: #c2410c; --cat-tint: #fdeee6; }
.cat-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--cat-tint); color: var(--cat); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.code-tag { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 3px 8px; border-radius: 6px; }

/* Hero additions */
.hero-eyebrow { display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px; background: rgba(92, 225, 198, 0.14); color: var(--teal); font-weight: 700; font-size: 14px; }

/* Category cards */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.category-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius); background: var(--cat-tint); color: var(--ink); border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.category-card:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--cat); }
.category-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: #fff; color: var(--cat); box-shadow: var(--shadow-soft); margin-bottom: 8px; }
.category-card h3 { font-size: 22px; font-weight: 800; }
.category-card p { color: var(--muted); flex: 1; }
.category-count { color: var(--cat); font-weight: 800; }

/* Category groups on home */
.part-badge { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.part-badge.part-1 { background: var(--primary-tint); color: var(--primary); }
.part-badge.part-2 { background: var(--danger-tint); color: var(--accent); }
.group-block + .group-block { margin-top: 44px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.group-head h3 { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; }
.cat-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cat); }
.group-empty { padding: 22px; border-radius: 14px; border: 1px dashed var(--line); background: #fff; color: var(--muted); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.chip:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.chip.is-active { background: #fff; color: var(--navy); }

/* Subject cards */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.subject-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.subject-card:focus-within { box-shadow: 0 0 0 3px var(--primary-ring); }
.subject-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus { outline: none; }
.subject-cover { position: relative; aspect-ratio: 16 / 7; display: grid; place-content: center; justify-items: center; gap: 2px; color: #fff; overflow: hidden;
  background-color: var(--navy-hero);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    radial-gradient(420px 180px at 90% 120%, rgba(92, 225, 198, 0.18), transparent 70%),
    linear-gradient(135deg, #1a3a60 0%, #172f52 55%, #13284a 100%);
  background-size: 18px 18px, auto, auto; }
.subject-cover::before { content: var(--glyph); position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: Georgia, "Times New Roman", serif; font-size: 112px; line-height: 1; color: var(--cover); opacity: .28; }
.subject-cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--cover); }
.subject-cover.has-image { background: var(--navy-hero); }
.subject-cover.has-image::before { content: none; }
.subject-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-mono { position: relative; font-size: 44px; font-weight: 800; letter-spacing: 0.02em; line-height: 1; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.cover-mono.is-long { font-size: 36px; }
.cover-sub { position: relative; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 13px; font-weight: 800; letter-spacing: .12em; color: #fff; }
.cover-code { position: absolute; top: 12px; left: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .14); font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; }
.cat-dai_cuong .subject-cover { --cover: var(--primary); --glyph: "∫"; }
.cat-co_so_nganh .subject-cover { --cover: var(--teal); --glyph: "Ω"; }
.cat-chuyen_nganh .subject-cover { --cover: var(--accent); --glyph: "λ"; }
.subject-meta { color: var(--muted); font-size: 14px; font-weight: 600; }
.subject-price { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.subject-price strong { color: var(--navy); font-size: 18px; font-weight: 800; }
.combo-chip { padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; }
.subject-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.subject-card h3 { font-size: 20px; font-weight: 700; }
.subject-card h3 a { color: var(--navy); }
.subject-card h3 a:hover { color: var(--primary); }
.subject-summary { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.part-rows { list-style: none; display: grid; gap: 8px; margin-top: auto; }
.part-rows a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--soft); color: var(--ink); }
.part-rows a:hover { background: var(--primary-tint); color: var(--ink); }
.part-name { font-weight: 700; }
.part-name.part-1::before, .part-name.part-2::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.part-name.part-1::before { background: var(--primary); }
.part-name.part-2::before { background: var(--accent); }
.part-price { font-weight: 800; color: var(--navy); }
.subject-link { font-weight: 700; font-size: 14px; }

/* Combo & học thử */
.combo-card { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: center; padding: 28px; border-radius: var(--radius); color: #fff;
  background-color: var(--navy-hero);
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(135deg, #1a3a60, #13284a);
  background-size: 20px 20px, auto; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.combo-card h2 { color: #fff; font-size: 26px; font-weight: 800; margin-top: 10px; }
.combo-copy p { color: rgba(255, 255, 255, 0.8); margin-top: 8px; }
.combo-badge { display: inline-flex; height: 30px; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--teal); color: var(--navy); font-weight: 800; font-size: 13px; }
.combo-buy { background: #fff; color: var(--ink); border-radius: 14px; padding: 20px; display: grid; gap: 6px; }
.combo-sum { color: var(--muted); font-weight: 700; }
.combo-sum s { color: var(--ink); }
.combo-price-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.combo-off { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; font-size: 16px; }
.combo-save { color: #0f8a6c; font-weight: 700; }
.part-off { margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.combo-buy .btn-block { margin-top: 8px; height: 46px; border-radius: 999px; }
.part-name.part-combo::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--teal); }
.combo-row { background: #e3f6f2 !important; }
.preview-btn { margin-top: 6px; white-space: normal; height: auto; min-height: 38px; padding: 8px 14px; text-align: left; }
.curriculum .pill { margin-left: auto; }
.card-cta { position: sticky; top: 88px; display: grid; gap: 10px; justify-items: start; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-cta h2 { font-size: 20px; font-weight: 800; }
.card-cta .btn-block { margin-top: 4px; }
.preview-note { margin-top: 12px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Subject page */
.subject-body { display: grid; gap: 24px; padding: 40px 0 88px; }
.part-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.part-card { scroll-margin-top: 90px; display: grid; gap: 20px; padding: 28px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.part-card-head { display: grid; gap: 10px; justify-items: start; }
.part-summary { color: var(--muted); }
.part-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.part-facts li { padding: 5px 12px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 700; color: var(--navy-hero); }
.part-actions .btn-block:first-child, .part-actions form:first-child .btn-block { margin-top: 0; }
.part-lessons h3 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.part-coming { align-content: start; justify-items: start; background: var(--soft); box-shadow: none; border-style: dashed; }
.part-coming h3 { font-size: 22px; }
.subject-note { text-align: center; font-size: 14px; }

/* Steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.steps li { position: relative; padding: 28px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 50px; right: -18px; width: 14px; height: 2px; background: var(--line); }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; box-shadow: var(--shadow-soft); margin-bottom: 18px; }
.steps h3 { font-size: 18px; font-weight: 700; }
.steps p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 12px; padding: 0 22px; box-shadow: 0 1px 0 var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; color: var(--navy); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 22px; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); }

/* Page hero (inner pages) */
.page-hero { color: #fff; padding: 56px 0 64px;
  background-color: var(--navy-hero);
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(135deg, #1a3a60, #13284a);
  background-size: 22px 22px, auto; }
.page-hero.compact { padding: 44px 0 48px; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; }
.page-hero-lead { margin-top: 12px; color: rgba(255, 255, 255, 0.78); font-size: 17px; max-width: 760px; }
.page-hero-lead strong { color: #fff; }
.breadcrumb { display: flex; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, 0.6); }
.breadcrumb a { color: rgba(255, 255, 255, 0.82); }
.breadcrumb a:hover { color: var(--teal); }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.page-body { padding: 44px 0 88px; }

.curriculum { list-style: none; display: grid; gap: 8px; }
.curriculum li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px; background: var(--soft); }
.lesson-num { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--primary); font-weight: 800; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.lesson-title { flex: 1; font-weight: 600; }
.lesson-lock { color: #9aa6ba; flex: none; }

.status-box { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; margin-top: 16px; font-size: 14px; }
.status-box strong { font-size: 15px; }
.status-box.ok { background: var(--ok-tint); color: var(--ok); }
.status-box.warn { background: var(--warn-tint); color: var(--warn); }
.status-box.muted-box { background: var(--soft); color: var(--muted); }

/* My courses */
.block-title { font-size: 22px; font-weight: 700; margin: 8px 0 16px; }
.block-title:not(:first-child) { margin-top: 40px; }
.list { display: grid; gap: 12px; }
.list-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.list-main { flex: 1; display: grid; }
.list-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.list-icon.warn { background: var(--warn-tint); color: var(--warn); }
.enroll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.enroll-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.enroll-card.is-inactive { background: var(--soft); }
.enroll-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.enroll-top h3 { font-size: 19px; font-weight: 700; }
.time-left { display: grid; gap: 8px; }
.time-left-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.time-left-row strong { color: var(--primary); font-size: 18px; }
.progress { height: 8px; border-radius: 999px; background: var(--primary-tint); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--primary)); }
.progress.small { height: 6px; width: 180px; }
.enroll-card .btn-block { margin-top: auto; }

/* Learn */
.learn-shell { background: var(--soft); min-height: calc(100vh - 68px); padding-bottom: 72px; }
.learn-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 28px 0 20px; flex-wrap: wrap; }
.learn-head h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-top: 6px; }
.back-link { font-weight: 600; font-size: 14px; }
.learn-deadline { display: grid; gap: 6px; justify-items: end; background: #fff; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; }
.learn-deadline strong { color: var(--primary); }
.learn-deadline small { color: var(--muted); }
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0b1628; box-shadow: var(--shadow); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-wait { display: grid; place-items: center; text-align: center; color: rgba(255, 255, 255, 0.85); padding: 24px; }
.player-wait small { color: rgba(255, 255, 255, 0.55); }
.spinner { display: inline-block; width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--teal); animation: spin 1s linear infinite; margin-bottom: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.lesson-info { margin-top: 20px; background: #fff; border-radius: var(--radius); padding: 22px 24px; border: 1px solid var(--line); }
.lesson-info h2 { font-size: 22px; font-weight: 700; }
.lesson-info .small { margin-top: 10px; }
.eyebrow { color: var(--primary); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.lesson-nav { position: sticky; top: 88px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.lesson-nav-head { display: flex; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.lesson-nav ol { list-style: none; padding: 8px; max-height: 62vh; overflow-y: auto; }
.lesson-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink); border-left: 3px solid transparent; }
.lesson-link:hover { background: var(--soft); color: var(--ink); }
.lesson-link.is-current { background: var(--primary-tint); border-left-color: var(--primary); box-shadow: var(--shadow-soft); }
.lesson-link.is-current .lesson-num { background: var(--primary); color: #fff; box-shadow: none; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
.qr-card { text-align: center; padding: 28px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.qr { margin: 16px auto; width: 300px; height: auto; border-radius: 12px; background: var(--soft); }
.pay-card { padding: 28px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.pay-card h2 { font-size: 22px; font-weight: 700; }
.pay-rows { display: grid; gap: 0; margin: 18px 0 0; }
.pay-rows > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.pay-rows dt { color: var(--muted); font-weight: 600; }
.pay-rows dd { margin: 0; font-weight: 700; text-align: right; }
.copy-row { display: flex; align-items: center; gap: 10px; }
.code { font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 20px; letter-spacing: 0.08em; color: var(--accent); background: var(--danger-tint); padding: 4px 10px; border-radius: 6px; }
.mini-steps { margin: 18px 0 0 20px; display: grid; gap: 6px; color: var(--muted); }
.cancel-form { margin-top: 20px; }
.result-card { max-width: 520px; margin: 0 auto; text-align: center; padding: 44px 32px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.result-card h2 { font-size: 24px; margin-top: 16px; }
.result-card p { margin: 10px 0 24px; }
.result-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; }
.result-icon.ok { background: var(--ok-tint); color: var(--ok); }
.result-icon.danger { background: var(--danger-tint); color: var(--danger); }

/* Auth */
.auth-wrap { min-height: calc(100vh - 68px - 260px); display: grid; place-items: center; padding: 64px 20px;
  background: radial-gradient(800px 300px at 50% 0%, var(--primary-tint), transparent 70%); }
.auth-card { width: min(440px, 100%); text-align: center; background: #fff; padding: 40px 32px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-mark { display: inline-block; margin-bottom: 14px; }
.auth-card h1 { font-size: 28px; font-weight: 800; }
.auth-card > p { margin: 10px 0 18px; }
.auth-foot { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 14px; color: var(--muted); max-width: 320px; }
.site-footer h3 { color: var(--primary); font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer li a { color: #34425a; }
.site-footer li a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Responsive */
@media (max-width: 1024px) {
    .steps { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
  .learn-layout, .checkout, .part-grid, .combo-card { grid-template-columns: 1fr; }
  .card-cta { position: static; }
  .lesson-nav { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 68px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 20px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .nav-sep { display: none; }
  .site-nav .btn-accent { margin-top: 6px; }
  .user-chip { align-self: flex-start; margin: 6px 12px; }
}

@media (max-width: 640px) {
  .hero { padding: 56px 0 72px; }
  .section { padding: 64px 0; }
  .steps, .footer-grid, .category-grid { grid-template-columns: 1fr; }
    .qr { width: 100%; }
  .pay-rows > div { flex-direction: column; align-items: flex-start; }
  .pay-rows dd { text-align: left; }
  .learn-deadline { justify-items: start; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
