/* Success4Sure — clean, flat, fintech-style design (white space, thin borders, one accent colour). */

/* ============ Design tokens ============ */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f8fa;
  --heading: #33364a;
  --text: #44475b;
  --muted: #7c7e8c;
  --border: #e9e9eb;
  --border-strong: #d6d6db;
  --brand: #2457f5;
  --brand-600: #1c47d6;
  --brand-50: #eef3ff;
  --brand-100: #d9e4ff;
  --violet: #7a5af8;
  --ink: #33364a;
  --success: #00a87e;
  --success-soft: #e6f7f2;
  --danger: #eb5b3c;
  --danger-soft: #fdeeea;
  --warn: #c88a04;
  --warn-soft: #fff7e2;
  --grad: var(--brand);
  --shadow-lg: 0 8px 28px rgba(51, 54, 74, .08);
  --radius: 16px;
  --radius-lg: 22px;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter Tight", "Noto Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #121212; --surface-2: #1c1c1f; --heading: #f2f2f4; --text: #d4d5db; --muted: #8f909c;
    --border: #2a2a2e; --border-strong: #3a3a40; --brand: #5d84ff; --brand-600: #4b73f2; --brand-50: #172242; --brand-100: #213469;
    --success-soft: #0f2e26; --danger-soft: #35201b; --warn-soft: #33290f; --shadow-lg: 0 8px 28px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #121212; --surface-2: #1c1c1f; --heading: #f2f2f4; --text: #d4d5db; --muted: #8f909c;
  --border: #2a2a2e; --border-strong: #3a3a40; --brand: #5d84ff; --brand-600: #4b73f2; --brand-50: #172242; --brand-100: #213469;
  --success-soft: #0f2e26; --danger-soft: #35201b; --warn-soft: #33290f; --shadow-lg: 0 8px 28px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); font-weight: 500; letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; letter-spacing: -.025em; }
h3 { font-size: 1.08rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
b, strong { font-weight: 600; color: var(--heading); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 32px; padding-bottom: 72px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }
.ico { flex: none; vertical-align: middle; }
.grad-text { color: var(--brand); }

/* ============ Top bar ============ */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; letter-spacing: -.03em; flex: none; }
.brand b { color: var(--brand); font-weight: 600; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark i { font-style: normal; opacity: .8; }
.nav { flex: 1; display: flex; gap: 4px; align-items: center; }
.nav-links { display: flex; gap: 4px; }
.nav a:not(.btn) { color: var(--text); padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: .95rem; white-space: nowrap; transition: color .15s; }
.nav a:not(.btn):hover, .nav a.active { color: var(--brand); }
.nav-search { position: relative; margin-left: auto; flex: 0 1 300px; min-width: 150px; }
.nav-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.nav-search input { padding: 9px 44px 9px 38px; border-radius: 10px; font-size: .9rem; }
.nav-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 500 .72rem var(--font-body); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.nav-right { display: flex; gap: 8px; align-items: center; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 600; font-size: .85rem; }

/* Ticker */
.ticker { border-bottom: 1px solid var(--border); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 36px; padding: 10px 0; animation: ticker 70s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { display: inline-flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); font-weight: 500; }
.ticker a b { color: var(--heading); font-weight: 600; }
.ticker .up { color: var(--success); font-weight: 600; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--heading);
  padding: 10px 18px; border-radius: 8px; font: 600 .92rem var(--font-body); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--heading); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-50); border-color: transparent; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .ico-arrow { transition: transform .2s; }
.btn:hover .ico-arrow { transform: translateX(3px); }

/* ============ Cards & badges ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--brand-50); color: var(--brand); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-hot { background: var(--surface-2); color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border-radius: 10px; padding: 12px 14px; font-size: .875rem; }
.notice.info { background: var(--surface-2); }
.notice.ok { background: var(--success-soft); }

/* Exam card */
.exam-card { --c: var(--brand); position: relative; display: flex; flex-direction: column; gap: 6px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: border-color .2s, box-shadow .2s; }
.exam-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.ec-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.ec-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); }
.exam-card .series { font-size: .78rem; font-weight: 600; color: var(--muted); }
.exam-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.4; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.ec-meta { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.ec-meta span { display: inline-flex; gap: 5px; align-items: center; }
.ec-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; font-size: .88rem; color: var(--muted); }
.ec-foot b { font-size: .98rem; }
.ec-arrow { color: var(--muted); transition: color .2s, transform .2s; }
.exam-card:hover .ec-arrow { color: var(--brand); transform: translateX(3px); }

/* ============ Hero ============ */
.hero { padding: 0 0 24px; }
.hero-center { text-align: center; padding-top: 64px; }
.hero-center h1 { margin: 0 auto 18px; max-width: 860px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; margin-left: auto; margin-right: auto; }
.hero-center .row { justify-content: center; margin-top: 28px; }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .88rem; }
.trust li { display: inline-flex; gap: 6px; align-items: center; }
.trust .ico { color: var(--success); }

/* Hero interactive quiz */
.quiz-wrap { max-width: 620px; margin: 48px auto 0; }
.quiz-label { text-align: center; color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.quiz-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.quiz-score { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: .82rem; padding: 4px 10px; border-radius: 6px; background: var(--surface-2); color: var(--heading); }
.quiz-q { font-weight: 600; color: var(--heading); font-size: 1.08rem; line-height: 1.5; margin-bottom: 16px; min-height: 3em; }
.qopt { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; font-size: .95rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.qopt:hover:not([disabled]) { border-color: var(--brand); }
.qopt[disabled] { cursor: default; }
.letter { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); font-weight: 600; font-size: .8rem; color: var(--muted); transition: background .2s, color .2s, border-color .2s; }
.qopt.right { border-color: var(--success); background: var(--success-soft); animation: pop .35s; }
.qopt.right .letter { background: var(--success); border-color: var(--success); color: #fff; }
.qopt.wrong { border-color: var(--danger); background: var(--danger-soft); animation: shake .4s; }
.qopt.wrong .letter { background: var(--danger); border-color: var(--danger); color: #fff; }
.quiz-foot { margin-top: 8px; animation: slideUp .35s ease; }
.quiz-foot .explain { margin: 0 0 12px; }
.plus-one { position: absolute; right: 24px; top: 18px; z-index: 4; font-weight: 700; color: var(--success); animation: rise 1s ease forwards; pointer-events: none; }
@keyframes pop { 50% { transform: scale(1.02); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-5px); } 40%,80% { transform: translateX(5px); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-36px) scale(1.3); } }
.swap { animation: slideUp .3s ease; }

/* ============ Stats strip ============ */
.stats-strip { margin-top: 56px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.stat { padding: 22px 24px; display: flex; gap: 14px; align-items: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--heading); flex: none; }
.stat b { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.stat span { color: var(--muted); font-size: .85rem; }

/* ============ Sections ============ */
.section { padding: 64px 0; }
.section-head { display: flex; flex-direction: column; margin-bottom: 24px; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { color: var(--muted); margin: 0; max-width: 60ch; }
.section-alt { background: var(--surface-2); }
.section-alt .card, .section-alt .price-card { background: var(--surface); }

/* Category tabs (underline style) */
.cat-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; font: 500 .92rem var(--font-body); color: var(--muted); cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s; }
.cat-tab .ct-ico { display: none; }
.cat-tab:hover { color: var(--heading); }
.cat-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.cat-tab .count { font-size: .75rem; color: var(--muted); background: var(--surface-2); padding: 1px 7px; border-radius: 99px; }

/* Features */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento .span-3 { grid-column: span 3; }
.bento .span-2 { grid-column: span 2; }
.feat-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); margin-bottom: 16px; }
.bento p { color: var(--muted); margin: 0; }
.mini-bars { display: flex; align-items: flex-end; gap: 10px; height: 100px; margin-top: 22px; }
.mini-bars span { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--surface-2); border: 1px solid var(--border); height: 0; transition: height 1s cubic-bezier(.2,.7,.2,1); }
.mini-bars span:nth-child(4) { background: var(--brand); border-color: var(--brand); }
.in .mini-bars span { height: var(--h); }
.mini-bars span:nth-child(2) { transition-delay: .1s; } .mini-bars span:nth-child(3) { transition-delay: .2s; } .mini-bars span:nth-child(4) { transition-delay: .3s; } .mini-bars span:nth-child(5) { transition-delay: .4s; } .mini-bars span:nth-child(6) { transition-delay: .5s; }
.mini-timer { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); font-family: var(--font-head); font-weight: 500; font-variant-numeric: tabular-nums; font-size: 1.3rem; color: var(--heading); }
.mini-explain { display: flex; gap: 8px; align-items: center; margin-top: 18px; padding: 10px 12px; border-radius: 10px; background: var(--success-soft); font-size: .86rem; color: var(--heading); }
.mini-explain .ico { color: var(--success); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.step-num { position: relative; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; background: var(--surface-2); color: var(--heading); }
.step-num em { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-style: normal; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.step p { color: var(--muted); margin: 0; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.price-card.featured { border: 1.5px solid var(--brand); }
.price-card .ribbon { position: absolute; top: 24px; right: 24px; padding: 3px 9px; border-radius: 6px; background: var(--brand-50); color: var(--brand); font-size: .72rem; font-weight: 600; }
.amount { font-family: var(--font-head); font-size: 2.5rem; font-weight: 500; letter-spacing: -.03em; color: var(--heading); margin: 8px 0 2px; }
.per-day { font-size: .85rem; }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 24px; }
.price-card li { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: .92rem; }
.price-card li .ico { color: var(--success); }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; color: var(--heading); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { display: grid; place-items: center; flex: none; color: var(--muted); transition: transform .25s; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; margin: 0; color: var(--muted); }

/* CTA band */
.cta-band { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 32px; text-align: center; background: var(--surface-2); }
.cta-band p { color: var(--muted); font-size: 1.05rem; }
.cta-band .row { justify-content: center; }

/* ============ Page hero (inner pages) ============ */
.page-hero { background: var(--surface); padding: 36px 0 32px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { color: var(--muted); max-width: 62ch; margin: 0; }
.crumb { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .88rem; font-weight: 500; margin-bottom: 16px; }
.crumb:hover { color: var(--brand); }

/* Catalog */
.toolbar { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.search-box { position: relative; max-width: 420px; margin-bottom: 8px; }
.search-box .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 42px; }
.toolbar .cat-tabs { margin: 0; }
.result-count { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* Forms */
input, select, textarea {
  font: inherit; color: var(--heading); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px 14px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
label.field { display: block; font-weight: 500; font-size: .88rem; color: var(--heading); }
label.field > span { display: block; margin-bottom: 7px; }
.field + .field { margin-top: 16px; }
.input-ico { position: relative; }
.input-ico .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-ico input { padding-left: 42px; }
.error { color: var(--danger); font-size: .88rem; min-height: 1.4em; margin-top: 10px; font-weight: 500; }

/* Auth */
.auth { display: grid; grid-template-columns: 1fr 1fr; max-width: 980px; margin: 48px auto; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.auth-side { background: var(--surface-2); padding: 44px; border-right: 1px solid var(--border); }
.auth-side h2 { font-size: 1.8rem; }
.auth-side p { color: var(--muted); }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; }
.auth-side li { display: flex; gap: 12px; align-items: center; padding: 9px 0; font-weight: 500; color: var(--heading); }
.auth-side li span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); color: var(--brand); border: 1px solid var(--border); }
.auth-form { padding: 44px; }

/* Exam detail */
.exam-hero-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.big-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--brand-50); color: var(--brand); }
.hero-series { font-weight: 600; font-size: .85rem; color: var(--muted); }
.pattern-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pattern-pills span { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); font-weight: 500; font-size: .86rem; color: var(--heading); }
.pattern-pills .ico { color: var(--muted); }
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 96px; }
.chapter-list { list-style: none; padding: 0; margin: 0; counter-reset: ch; }
.chapter-list li { counter-increment: ch; display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-weight: 500; color: var(--heading); }
.chapter-list li:last-child { border-bottom: 0; }
.chapter-list li::before { content: counter(ch, decimal-leading-zero); color: var(--muted); font-size: .82rem; font-weight: 600; width: 22px; }
.spec { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.spec div { background: var(--surface); padding: 14px 16px; }
.spec b { display: block; font-family: var(--font-head); font-size: 1.25rem; font-weight: 500; }
.spec span { font-size: .8rem; color: var(--muted); }
.spec.four { grid-template-columns: repeat(4, 1fr); }
.plan-opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.plan-opt:hover { border-color: var(--border-strong); }
.plan-opt input { position: absolute; opacity: 0; }
.plan-opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; transition: border-color .2s; }
.plan-opt .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); transform: scale(0); transition: transform .2s; }
.plan-opt.selected { border-color: var(--brand); background: var(--brand-50); }
.plan-opt.selected .radio { border-color: var(--brand); }
.plan-opt.selected .radio::after { transform: scale(1); }
.plan-opt .p-price { margin-left: auto; text-align: right; font-weight: 600; font-size: 1.1rem; color: var(--heading); }
.plan-opt .p-price small { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; }
.access-card { border-color: var(--success); background: var(--success-soft); }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 12px 0 6px; }
.access-card .meter { background: var(--surface); }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.access-card .meter > span { background: var(--success); }

/* Sub-category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.chips:empty { display: none; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 14px; font: 500 .85rem var(--font-body); cursor: pointer; }
.chip:hover { border-color: var(--border-strong); }
.chip.active { border-color: var(--brand); color: var(--brand); background: var(--brand-50); font-weight: 600; }

/* Study material */
.study-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.teaser-list { display: flex; flex-direction: column; }
.teaser-list a { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--border); color: var(--text); }
.teaser-list a:last-child { border-bottom: 0; }
.teaser-list a > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.teaser-list small { color: var(--muted); font-size: .8rem; }
.teaser-list a > .ico { color: var(--muted); transition: transform .2s, color .2s; }
.teaser-list a:hover > .ico { color: var(--brand); transform: translateX(3px); }
.study-hero { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 16px; border-color: var(--brand-100); }
.study-table td { vertical-align: top; }
.link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .84rem; font-weight: 500; color: var(--brand); white-space: nowrap; }
.link-pill:hover { border-color: var(--brand); background: var(--brand-50); }

/* Mock test grid */
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mock-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: .78rem; transition: border-color .15s, background .15s; }
.mock-tile b { font-size: .9rem; }
.mock-tile span { color: var(--muted); }
a.mock-tile:hover { border-color: var(--brand); }
.mock-tile.next { border-color: var(--brand); background: var(--brand-50); }
.mock-tile.next span { color: var(--brand); font-weight: 600; }
.mock-tile.tried span { color: var(--danger); font-weight: 600; }
.mock-tile.passed { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.mock-tile.passed span { color: var(--success); font-weight: 600; }
.mock-tile.locked { background: var(--surface-2); color: var(--muted); border-style: dashed; cursor: not-allowed; }
.mock-tile.locked .ico { margin-bottom: 2px; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--border); font-size: .92rem; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: .8rem; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; max-width: 960px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; padding: 16px 0 0; margin-top: 8px; border-top: 1px solid var(--border); font-size: 1.25rem; font-weight: 600; color: var(--heading); }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.pay-methods span { display: grid; place-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; font-weight: 500; font-size: .84rem; color: var(--muted); }

/* ============ Test ============ */
.test-top { position: sticky; top: 72px; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.test-top-inner { display: flex; align-items: center; gap: 20px; padding: 12px 16px; flex-wrap: wrap; }
.progress { flex: 1 1 200px; }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.timer { display: inline-flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.05rem; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); color: var(--heading); }
.timer.low { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.test-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; padding-top: 24px; padding-bottom: 48px; }
.q-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.q-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 700; }
.q-text { font-size: 1.18rem; font-weight: 600; color: var(--heading); line-height: 1.5; margin-bottom: 22px; }
.option { display: flex; gap: 14px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--border-strong); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option.selected { border-color: var(--brand); background: var(--brand-50); }
.option.selected .letter { background: var(--brand); border-color: var(--brand); color: #fff; }
.option:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.q-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0 18px; }
.pal-btn { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--heading); font: 600 .9rem var(--font-body); cursor: pointer; }
.pal-btn:hover { border-color: var(--border-strong); }
.pal-btn.answered { background: var(--success); border-color: var(--success); color: #fff; }
.pal-btn.marked { background: var(--violet); border-color: var(--violet); color: #fff; }
.pal-btn.answered.marked { box-shadow: inset 0 0 0 3px var(--success); }
.pal-btn.visited:not(.answered):not(.marked) { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.pal-btn.current { outline: 2px solid var(--brand); outline-offset: 2px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .78rem; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border-strong); flex: none; }

/* Test intro */
.intro { max-width: 720px; }
.rules { list-style: none; padding: 0; margin: 20px 0; }
.rules li { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; color: var(--muted); }
.rules li .ico { color: var(--heading); margin-top: 3px; }

/* ============ Results ============ */
.result-hero { padding: 36px 0 40px; border-bottom: 1px solid var(--border); }
.result-hero.pass { background: var(--success-soft); }
.result-head { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.ring { position: relative; width: 150px; height: 150px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 150px; height: 150px; }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: var(--border); }
.ring .val { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.7,.2,1); }
.result-hero.pass .ring .val { stroke: var(--success); }
.result-hero.pass .ring .track { stroke: color-mix(in srgb, var(--success) 18%, transparent); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-label b { display: block; font-family: var(--font-head); font-size: 2.1rem; font-weight: 500; line-height: 1; }
.ring-label small { color: var(--muted); font-size: .76rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center; }
.kpi-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; }
.kpi b { display: block; font-family: var(--font-head); font-size: 1.4rem; font-weight: 500; line-height: 1.2; }
.kpi span { font-size: .8rem; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 80px; flex: 1; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand); transition: width 1s cubic-bezier(.2,.7,.2,1); }
.bar > span.low { background: var(--danger); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; font: 500 .9rem var(--font-body); color: var(--muted); padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.review-item { border: 1px solid var(--border); padding: 18px 20px; background: var(--surface); border-radius: var(--radius); margin-bottom: 12px; animation: slideUp .3s ease; }
.review-item .opt { display: flex; gap: 10px; align-items: center; font-size: .94rem; padding: 6px 10px; border-radius: 8px; margin: 2px 0; }
.review-item .opt .letter { width: 24px; height: 24px; font-size: .75rem; }
.review-item .opt.right { background: var(--success-soft); font-weight: 600; color: var(--heading); }
.review-item .opt.right .letter { background: var(--success); border-color: var(--success); color: #fff; }
.review-item .opt.mine-wrong { background: var(--danger-soft); }
.review-item .opt.mine-wrong .letter { background: var(--danger); border-color: var(--danger); color: #fff; }
.explain { display: flex; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin-top: 12px; font-size: .9rem; }
.explain .ico { color: var(--heading); margin-top: 2px; }

/* ============ Dashboard ============ */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ============ Toast / modal / confetti ============ */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 500; font-size: .92rem; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 60; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast .ico { color: #5ee0bd; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(30, 32, 45, .45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: var(--radius-lg); padding: 28px; max-width: 440px; width: 100%; animation: slideUp .25s ease; }
@keyframes fade { from { opacity: 0; } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* ============ Footer ============ */
.footer { background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); padding: 48px 0 24px; margin-top: 40px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.footer h4 { font-family: var(--font-body); font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
.footer a:not(.brand) { display: block; color: var(--muted); padding: 4px 0; }
.footer a:not(.brand):hover { color: var(--brand); }
.footer-tag { margin-top: 14px; max-width: 36ch; }
.footer-legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .78rem; }

/* ============ Scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.hero-anim { animation: slideUp .6s ease both; animation-delay: var(--d, 0s); }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .detail, .test-layout, .auth, .checkout { grid-template-columns: 1fr; }
  .stats, .kpis, .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .bento .span-2, .bento .span-3 { grid-column: span 6; }
  .pricing { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .auth-side { padding: 32px; border-right: 0; border-bottom: 1px solid var(--border); }
  .auth-form { padding: 32px 24px; }
  .sticky { position: static; }
  .palette { grid-template-columns: repeat(8, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
  .avatar, .nav-search kbd { display: none; }
  .study-teaser { grid-template-columns: 1fr; padding: 24px; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 10px; min-height: 60px; }
  .brand-name { display: none; }
  .nav-search { display: none; }
  .nav { justify-content: flex-end; }
  .nav-links { margin-left: auto; }
  .nav .nav-home, .nav .nav-study { display: none; }
  .study-table th:last-child, .study-table td:last-child { display: none; }
  .nav a:not(.btn) { padding: 6px 8px; font-size: .88rem; }
  .avatar { display: none; }
  .hero-center { padding-top: 40px; }
  .stat { padding: 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 8px; }
  .palette { grid-template-columns: repeat(6, 1fr); }
  .card { padding: 20px; }
  .cta-band { padding: 36px 20px; }
  .spec.four { grid-template-columns: 1fr 1fr; }
  .test-top { top: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 640px) { .pricing { grid-template-columns: 1fr; } .mock-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1240px) { .nav-links .nav-cat { display: none; } }
@media (max-width: 640px) { .link-pill { white-space: normal; } .study-table td:first-child { width: 40%; } }
.q-text, .quiz-q, .review-item > p { white-space: pre-line; }
