/* EduSite — all-English education platform styles */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #1a2033;
  --ink-soft: #5a6274;
  --line: #e4e7f0;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef0ff;
  --gold: #d97706;
  --gold-soft: #fef3e2;
  --green: #15803d;
  --green-soft: #e8f7ee;
  --red: #b91c1c;
  --red-soft: #fdeaea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 28, 48, .05), 0 8px 24px -12px rgba(23, 28, 48, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Inter", "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: .2em 0 .4em; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
code { background: #eef0f6; padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.mt { margin-top: 12px; }
.center { text-align: center; }
.pad-left { padding-left: 8px; }
.cap { text-transform: capitalize; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.wide { width: 100%; }

/* ---------- header ---------- */
.site-header {
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
  color: var(--ink-soft); padding: 8px 12px; border-radius: 10px; font-weight: 500;
}
.main-nav a:hover { color: var(--ink); background: var(--brand-soft); text-decoration: none; }
.main-nav a.active { color: var(--brand); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline; }

/* ---------- buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 600; padding: 9px 16px; transition: .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { color: var(--ink-soft); background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: #f0f1f7; color: var(--ink); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-block { display: flex; width: 100%; margin-top: 8px; }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; }
.pill {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  text-transform: uppercase;
}
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-lock { background: #f1f2f7; color: var(--ink-soft); text-transform: none; }
.pill-pro { background: var(--gold-soft); color: var(--gold); }
.pill-soft { background: #f0f1f7; color: var(--ink-soft); text-transform: none; }
.dot-ok { color: var(--green); }

/* ---------- flash ---------- */
.flash { margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-weight: 500; }
.flash-ok { background: var(--green-soft); color: var(--green); border: 1px solid #bfe6cd; }
.flash-err { background: var(--red-soft); color: var(--red); border: 1px solid #f2c4c4; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #eef0ff 0%, #f8f5ff 55%, #f6f7fb 100%);
  border-bottom: 1px solid var(--line);
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.blob-a { width: 420px; height: 420px; background: #c7cdff; top: -160px; right: -80px; }
.blob-b { width: 360px; height: 360px; background: #ffd9ec; bottom: -180px; left: -100px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 44px; padding: 68px 20px 60px; align-items: center; }
.hero h1 { font-size: 2.9rem; margin: 12px 0 12px; line-height: 1.12; }
.grad-text {
  background: linear-gradient(90deg, #4f46e5, #9333ea 55%, #db2777);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 58ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; color: var(--ink-soft); font-size: .9rem; font-weight: 500; }

/* hero visual mock */
.hero-visual { position: relative; }
.mock-window {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(30, 27, 75, .35);
  padding: 16px; transform: rotate(1.2deg);
}
.mock-dots { display: flex; gap: 6px; margin: 0 4px 10px; }
.mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e2e5f0; }
.mock-dots i:first-child { background: #fb7185; }
.mock-dots i:nth-child(2) { background: #fbbf24; }
.mock-dots i:nth-child(3) { background: #34d399; }
.mock-screen {
  aspect-ratio: 16/9; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(400px 160px at 30% 20%, rgba(199,205,255,.55), transparent),
    linear-gradient(135deg, #312e81, #4f46e5 60%, #7c3aed);
}
.mock-play {
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; padding-left: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.mock-progress { height: 6px; border-radius: 99px; background: #eceefb; margin: 12px 2px 10px; overflow: hidden; }
.mock-progress span { display: block; width: 42%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #9333ea); }
.mock-caption { display: flex; flex-direction: column; gap: 1px; padding: 0 2px 10px; }
.mock-caption span { color: var(--ink-soft); font-size: .8rem; }
.mock-row {
  display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-top: 1px solid var(--line);
}
.mock-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; }
.mock-row.locked .mock-ico { background: #f1f2f7; }
.mock-float {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow); padding: 7px 14px; font-size: .8rem; font-weight: 700; color: var(--ink);
}
.mock-float.f1 { top: -14px; right: -10px; transform: rotate(2deg); }
.mock-float.f2 { bottom: -12px; left: -14px; transform: rotate(-2deg); }

/* ---------- category marquee ---------- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: #fff; }
.marquee-track { display: flex; align-items: center; gap: 26px; width: max-content; padding: 13px 0; animation: mq 55s linear infinite; }
.mq-item { white-space: nowrap; color: var(--ink-soft); font-weight: 600; font-size: .88rem; }
.mq-dot { color: #c9cdf5; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- age tiles (home variant) ---------- */
.age-emoji { font-size: 1.7rem; }
.age-tile { transition: .15s ease; }
.age-tile:hover { transform: translateY(-2px); }
.age-early-years { border-top: 4px solid #f59e0b; }
.age-grades-1-2 { border-top: 4px solid #10b981; }
.age-grades-3-5 { border-top: 4px solid #3b82f6; }
.age-middle-school { border-top: 4px solid #8b5cf6; }
.age-high-school { border-top: 4px solid #ef4444; }
.age-college { border-top: 4px solid #0ea5e9; }
.age-all-ages { border-top: 4px solid #64748b; }

/* ---------- features ---------- */
.grid-features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
.feature b { font-size: 1rem; }
.feature p { margin: 0; }
.feat-ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 4px;
}

/* ---------- faq home ---------- */
.faq-home { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 26px; }
.faq-home details { padding: 12px 0; }

/* ---------- partner who chips ---------- */
.partner-who { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.who-chip {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); color: #e3e4fb;
  border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600;
}

/* ---------- hero (legacy helpers kept minimal) ---------- */
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat, .stat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.stat b, .stat-tile b { font-size: 1.5rem; letter-spacing: -.02em; }
.stat span, .stat-tile span { color: var(--ink-soft); font-size: .85rem; }

/* ---------- home: category tree ---------- */
.branch {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 14px;
}
.branch-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.branch-emoji { font-size: 1.7rem; }
.branch-title { margin: 0; font-size: 1.18rem; flex: 1; min-width: 180px; }
.branch-title a { color: var(--ink); }
.branch-more { font-size: .88rem; white-space: nowrap; }
.branch-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: .87rem; color: var(--ink-soft); font-weight: 500;
  transition: .12s ease;
}
.cat-chip b {
  background: var(--brand-soft); color: var(--brand); border-radius: 999px;
  font-size: .74rem; padding: 1px 8px; font-variant-numeric: tabular-nums;
}
.cat-chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; transform: translateY(-1px); }

/* ---------- home: steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px;
}
.step-num {
  width: 30px; height: 30px; border-radius: 999px; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 6px;
}
.step p { margin: 0; }

/* ---------- home: partner band ---------- */
.pill-gold { background: var(--gold-soft); color: var(--gold); }
.partner-band {
  background:
    radial-gradient(1200px 400px at 110% -50%, rgba(217,119,6,.18), transparent),
    linear-gradient(120deg, #1e1b4b, #312e81);
  color: #fff; border-radius: var(--radius); padding: 40px 44px; margin-bottom: 30px;
}
.partner-band h2 { color: #fff; margin: 10px 0 8px; font-size: 1.6rem; }
.partner-copy p { max-width: 62ch; }
.partner-band .muted { color: #c7c9f4; }
.partner-perks { list-style: none; padding: 0; margin: 14px 0 20px; color: #dcdcf7; }
.partner-perks li { padding: 4px 0; }
.partner-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.partner-cta .btn-outline { background: transparent; border-color: #6d6ff0; color: #c7c9f4; }
.partner-cta .btn-outline:hover { background: rgba(255,255,255,.08); }

/* ---------- sections & grids ---------- */
.section { padding: 40px 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.grid { display: grid; gap: 16px; }
.grid-subjects { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-courses { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.grid-ages { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 26px 0; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0; }

.subject-tile, .age-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
  color: var(--ink); transition: .15s ease;
}
.subject-tile:hover, .age-tile:hover { text-decoration: none; transform: translateY(-2px); border-color: #c9cdf5; }
.tile-emoji { font-size: 1.9rem; }
.tile-title { font-weight: 700; }
.age-tile b { font-size: 1.05rem; }

/* ---------- course cards ---------- */
.course-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .15s ease;
}
.course-card:hover { transform: translateY(-2px); border-color: #c9cdf5; }
.card-thumb { display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, #eef0ff, #f8f5ff); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }
.thumb-fallback.big { font-size: 4rem; min-height: 220px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { margin: 0; font-size: 1rem; }
.card-body h3 a { color: var(--ink); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 6px; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }

/* ---------- breadcrumbs & page head ---------- */
.breadcrumb { color: var(--ink-soft); font-size: .88rem; margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); }
.page-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.page-emoji { font-size: 2.6rem; }
.filter-chips, .filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 22px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px;
  font-size: .85rem; color: var(--ink-soft); font-weight: 500;
}
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip-label { color: var(--ink-soft); font-size: .85rem; margin-right: 2px; }
.filter-bar input[type="search"], .filter-bar select {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; background: #fff;
}

/* ---------- course page ---------- */
.course-header { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; margin-bottom: 26px; }
.course-stats { display: flex; gap: 18px; color: var(--ink-soft); margin-top: 10px; flex-wrap: wrap; }
.course-stats b { color: var(--ink); }
.pro-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.pro-box-active { border-color: #bfe6cd; background: var(--green-soft); }
.unit-block { margin: 26px 0; }
.unit-title { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.unit-num { font-size: .8rem; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.lesson-list { display: flex; flex-direction: column; }
.lesson-row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 10px; border-bottom: 1px solid var(--line); color: var(--ink); border-radius: 8px;
}
.lesson-row:hover { background: var(--brand-soft); text-decoration: none; }
.lesson-row:hover .lesson-name { color: var(--brand); }
.lesson-idx { color: var(--ink-soft); font-variant-numeric: tabular-nums; text-align: center; }
.lesson-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.lesson-locked .lesson-name { color: var(--ink-soft); }

/* ---------- lesson page ---------- */
.lesson-page { max-width: 940px; }
.lesson-head { margin-bottom: 22px; }
.player-wrap { border-radius: var(--radius); overflow: hidden; background: #101322; box-shadow: var(--shadow); }
.player { width: 100%; aspect-ratio: 16/9; display: block; background: #000; }
.media-placeholder { display: flex; flex-direction: column; align-items: center; padding: 46px 20px; background: #f0f1f7; }
.content-block { margin: 26px 0; }
.content-info h2 { margin-top: 14px; }
.content-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.article-body {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 40px; box-shadow: var(--shadow); max-width: 100%; overflow-x: auto;
  font-size: 1.02rem; line-height: 1.75; color: #262c3f;
}

/* ---- document typography (markdown & perseus articles) ---- */
.article-body > :first-child { margin-top: 0; }
.article-body > :last-child { margin-bottom: 0; }
.article-body h1, .article-body h2, .article-body h3,
.article-body h4, .article-body h5, .article-body h6 {
  color: var(--ink); line-height: 1.3; margin: 1.6em 0 .55em; letter-spacing: -.015em;
  scroll-margin-top: 80px;
}
.article-body h1 { font-size: 1.85rem; border-bottom: 2px solid var(--line); padding-bottom: .35em; }
.article-body h2 { font-size: 1.45rem; border-bottom: 1px solid var(--line); padding-bottom: .3em; }
.article-body h3 { font-size: 1.18rem; }
.article-body h4 { font-size: 1.02rem; }
.article-body p { margin: .85em 0; }
.article-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--brand-dark); }
.article-body strong { font-weight: 700; color: var(--ink); }
.article-body ul, .article-body ol { margin: .8em 0; padding-left: 1.6em; }
.article-body li { margin: .35em 0; }
.article-body li > input[type="checkbox"] { margin-right: 6px; accent-color: var(--brand); }
.article-body ul ul, .article-body ol ol, .article-body ul ol, .article-body ol ul { margin: .25em 0; }
.article-body blockquote {
  margin: 1.1em 0; padding: 10px 18px; border-left: 4px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 10px 10px 0; color: #3d4260;
}
.article-body blockquote p { margin: .3em 0; }
.article-body code {
  background: #eef0f6; border: 1px solid #e2e5f0; padding: 2px 7px; border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; color: #b3305c;
}
.article-body pre {
  background: #14172b; color: #dbe1ff; padding: 18px 20px; border-radius: 12px;
  overflow-x: auto; margin: 1.2em 0; line-height: 1.55; font-size: .9rem;
}
.article-body pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }
.article-body img {
  max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line);
  margin: 1em 0; display: block;
}
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem;
  display: block; overflow-x: auto;
}
.article-body th, .article-body td {
  border: 1px solid var(--line); padding: 9px 14px; text-align: left; vertical-align: top;
}
.article-body th { background: #f4f5fa; font-weight: 700; color: var(--ink); }
.article-body tr:nth-child(even) td { background: #fafbfe; }
.article-body dl dt { font-weight: 700; margin-top: .8em; }
.article-body dl dd { margin: .2em 0 .2em 1.4em; color: var(--ink-soft); }
.article-body kbd {
  border: 1px solid #cfd3e4; border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px;
  font-family: ui-monospace, Menlo, monospace; font-size: .82em; background: #f7f8fc;
}
.article-body .footnotes { color: var(--ink-soft); font-size: .9rem; border-top: 1px dashed var(--line); margin-top: 2em; }
.article-body mark { background: #fff3c4; padding: 0 3px; border-radius: 4px; }
.lesson-nav { display: flex; justify-content: space-between; margin: 30px 0 10px; }
.upsell-band {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between;
  background: linear-gradient(120deg, #fef3e2, #fdf1f7); border: 1px solid #f3ddba;
  padding: 18px 22px; border-radius: var(--radius); margin-top: 26px;
}

/* ---------- paywall ---------- */
.paywall-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px; text-align: center; max-width: 720px; margin: 10px auto 0;
}
.paywall-icon { font-size: 3rem; }
.paywall-copy { text-align: left; background: var(--bg); border-radius: 12px; padding: 18px 22px; margin: 18px 0; }
.paywall-perks { list-style: none; padding: 0; margin: 10px 0 0; color: var(--ink-soft); }
.paywall-perks li { padding: 3px 0; }
.paywall-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.paywall-actions .link { display: inline-block; }

/* ---------- forms ---------- */
.auth-page { display: flex; justify-content: center; }
.auth-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px 36px; width: 100%; max-width: 460px;
}
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; margin: 12px 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; font: inherit; background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--brand); border-color: transparent; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
.form-err {
  background: var(--red-soft); color: var(--red); border: 1px solid #f2c4c4;
  border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-weight: 500;
}
.form-row { display: flex; gap: 12px; }
.form-row label { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.settings-form h3 { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
.settings-form h3:first-of-type { border-top: none; padding-top: 0; margin-top: 6px; }
.cdn-check { background: var(--bg); border-radius: 10px; padding: 12px 16px; margin: 8px 0 4px; }

/* ---------- account / panels / tables ---------- */
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; margin: 14px 0;
}
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--ink-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table.small { font-size: .84rem; }
.table.small th, .table.small td { padding: 7px 8px; }

/* ---------- pricing ---------- */
.center-head { text-align: center; margin-top: 10px; }
.plan-card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; display: flex; flex-direction: column;
}
.plan-featured { border: 2px solid var(--gold); }
.plan-badge {
  position: absolute; top: -12px; right: 18px; background: var(--gold); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 12px; }
.plan-price b { font-size: 2rem; letter-spacing: -.03em; }
.plan-price .per { color: var(--ink-soft); font-size: .88rem; }
.plan-perks { list-style: none; padding: 0; margin: 0 0 16px; color: var(--ink-soft); }
.plan-perks li { padding: 4px 0; }
.plan-card .btn-block { margin-top: auto; }
.pay-notice {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px;
}
.faq { margin-top: 26px; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 4px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--ink-soft); margin: 8px 0 4px; }

/* ---------- checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.card-form button { margin-top: 16px; }
.order-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.order-total { border-bottom: none; font-size: 1.05rem; }
.test-cards td:first-child { font-family: ui-monospace, Menlo, monospace; }
.pay-brands { display: flex; gap: 10px; }
.brand-chip {
  font-weight: 800; font-style: italic; font-size: .9rem; padding: 6px 14px; border-radius: 8px; color: #fff;
}
.brand-chip.visa { background: #1a1f71; }
.brand-chip.mc { background: #eb001b; }

/* ---------- pagination ---------- */
.result-count { margin: 4px 0 18px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin: 34px 0 12px; }
.page-btn {
  min-width: 40px; padding: 8px 13px; text-align: center; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  font-weight: 600; font-size: .92rem; transition: .12s ease; display: inline-flex;
  align-items: center; justify-content: center;
}
a.page-btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.page-btn.current { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.page-btn.disabled { opacity: .45; cursor: default; }
.page-ellipsis { color: var(--ink-soft); padding: 0 2px; }

/* ---------- empty & error ---------- */
.empty-state {
  background: var(--surface); border: 1px dashed var(--line); color: var(--ink-soft);
  border-radius: var(--radius); padding: 34px; text-align: center; margin: 18px 0;
}
.error-panel { text-align: center; padding: 60px 0; }
.error-code { font-size: 4.4rem; font-weight: 800; color: var(--brand); letter-spacing: -.04em; }
.group-block { margin: 30px 0; }
.group-title { border-bottom: 2px solid var(--line); padding-bottom: 8px; }

/* ---------- admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-report { border-color: #bfe6cd; background: #f4fbf6; }

/* ---------- pricing teaser ---------- */
.pricing-teaser {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(120deg, #1e1b4b, #312e81); color: #fff;
  border-radius: var(--radius); padding: 30px 34px; margin: 30px 0 40px;
}
.pricing-teaser h2 { color: #fff; margin: 0 0 6px; }
.pricing-teaser .muted { color: #c7c9f4; }
.teaser-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.teaser-actions .btn-outline { background: transparent; border-color: #6d6ff0; color: #c7c9f4; }
.teaser-actions .btn-outline:hover { background: rgba(255,255,255,.08); }

/* ---------- footer ---------- */
.site-footer { background: #14172b; color: #b9bdd4; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 40px 20px 24px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: .9rem; }
.site-footer a { display: block; color: #b9bdd4; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.brand-footer { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid #2a2e4a; padding: 16px 20px 26px; font-size: .84rem; }
.site-footer .small { font-size: .8rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner, .course-header, .checkout-grid, .admin-two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  .hero-visual { max-width: 480px; margin: 10px auto 0; }
  .mock-float { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .lesson-row { grid-template-columns: 28px 1fr; }
  .lesson-meta { display: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .search-bar { flex-direction: column; }
}
