/* ==========================================================
   AI സഹായി — styles
   Palette idea: Kerala kasavu (cream + gold) with backwater teal.
   ========================================================== */
:root {
  --bg: #faf6ea;
  --bg2: #f3ecd8;
  --card: #fffdf7;
  --ink: #1b2a28;
  --ink2: #51615e;
  --line: #e7dec6;
  --brand: #0e6b5b;
  --brand2: #128a74;
  --on-brand: #ffffff;
  --brand-soft: #ddf0e8;
  --brand-ink: #08473d;
  --gold: #c79a33;
  --gold-soft: #f7ebcb;
  --gold-ink: #7d5a0f;
  --ok: #1e9a68;
  --ok-soft: #dcf3e8;
  --ok-ink: #0f6a45;
  --bad: #c2453a;
  --bad-soft: #fadfda;
  --bad-ink: #8f2c23;
  --shadow: 0 1px 2px rgba(60, 45, 10, 0.06), 0 10px 28px -12px rgba(60, 45, 10, 0.16);
  --shadow-lg: 0 2px 4px rgba(60, 45, 10, 0.06), 0 24px 48px -20px rgba(60, 45, 10, 0.28);
  --glass: rgba(250, 246, 234, 0.82);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h: 66px;
  --tabbar-h: 66px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1716;
  --bg2: #132120;
  --card: #172625;
  --ink: #eaf1ee;
  --ink2: #a6b9b4;
  --line: #263836;
  --brand: #2fb596;
  --brand2: #46c9aa;
  --on-brand: #04201a;
  --brand-soft: #173b34;
  --brand-ink: #8fe3ce;
  --gold: #e0b650;
  --gold-soft: #3a3115;
  --gold-ink: #f0cf7a;
  --ok: #3cc58f;
  --ok-soft: #14382b;
  --ok-ink: #8fe3bd;
  --bad: #ee7b6e;
  --bad-soft: #432420;
  --bad-ink: #f6aaa0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 48px -20px rgba(0, 0, 0, 0.6);
  --glass: rgba(13, 23, 22, 0.82);
  color-scheme: dark;
}

/* module tints (8 soft colours) */
.c1 { --t: #ddf0e8; --ti: #0e6b5b; }
.c2 { --t: #f7ebcb; --ti: #7d5a0f; }
.c3 { --t: #fadfd6; --ti: #a4442c; }
.c4 { --t: #dce8f7; --ti: #29559a; }
.c5 { --t: #e3f0d3; --ti: #4a6b1b; }
.c6 { --t: #ebddf1; --ti: #70408a; }
.c7 { --t: #d6eef0; --ti: #1b6a74; }
.c8 { --t: #fce6cb; --ti: #a15a10; }
:root[data-theme="dark"] .c1 { --t: #173b34; --ti: #7fdcc4; }
:root[data-theme="dark"] .c2 { --t: #3a3115; --ti: #ebc96b; }
:root[data-theme="dark"] .c3 { --t: #40231d; --ti: #f0a794; }
:root[data-theme="dark"] .c4 { --t: #1d2d47; --ti: #9dbdf0; }
:root[data-theme="dark"] .c5 { --t: #2a3820; --ti: #b4d58a; }
:root[data-theme="dark"] .c6 { --t: #34223d; --ti: #d3a9e6; }
:root[data-theme="dark"] .c7 { --t: #14363a; --ti: #86d3dc; }
:root[data-theme="dark"] .c8 { --t: #44290f; --ti: #f3b574; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0;
  font-family: "Anek Malayalam", "Noto Sans Malayalam", "Nirmala UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 70%),
    radial-gradient(700px 420px at -10% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.005em; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--gold-soft); color: var(--ink); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink2); }
.center { text-align: center; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 26px; height: 26px; }
.ic.fill { fill: currentColor; }
.hide { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--glass); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 14px; height: var(--topbar-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.brand__logo { display: grid; place-items: center; transition: transform 0.4s var(--ease); }
.brand:hover .brand__logo { transform: rotate(-8deg) scale(1.05); }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__txt b { font-size: 1.15rem; font-weight: 800; }
.brand__txt small { font-size: 0.72rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: none; margin-left: 18px; gap: 4px; }
.nav a { color: var(--ink2); padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 0.95rem; transition: background 0.2s, color 0.2s; }
.nav a:hover { background: var(--bg2); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar__strip { height: 3px; background: transparent; }
.topbar__strip i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--brand2)); transition: width 0.9s var(--ease); }

.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 0.92rem; text-decoration: none !important; transition: box-shadow 0.2s, transform 0.2s; }
.pill:hover { box-shadow: var(--shadow); }
.pill svg.mini { width: 26px; height: 26px; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink2); cursor: pointer; transition: background 0.2s, color 0.2s; }
.iconbtn:hover { background: var(--bg2); color: var(--ink); }

/* ---------- bottom tab bar (mobile) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tabbar-h); color: var(--ink2); font-size: 0.7rem; font-weight: 500; text-decoration: none !important; position: relative; }
.tabbar a.on { color: var(--brand); font-weight: 700; }
.tabbar a.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
.tabbar .ic { width: 22px; height: 22px; }
main { padding-bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); outline: none; }

@media (min-width: 900px) {
  .nav { display: flex; }
  .tabbar { display: none; }
  main { padding-bottom: 60px; }
  .brand__txt small { max-width: 220px; }
}
@media (max-width: 520px) {
  .brand__txt small { display: none; }
  .hide-sm { display: none !important; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none !important; position: relative; overflow: hidden; transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.2s, filter 0.2s; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -10px color-mix(in srgb, var(--brand) 75%, transparent); filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn[disabled], .btn.is-loading { opacity: 0.6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--bg2); box-shadow: none; filter: none; }
.btn--gold { background: var(--gold); color: #2b1f00; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--gold) 80%, transparent); }
.btn--soft { background: var(--brand-soft); color: var(--brand-ink); box-shadow: none; }
.btn--soft:hover { box-shadow: none; }
.btn--danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); box-shadow: none; }
.btn--danger:hover { background: var(--bad-soft); box-shadow: none; filter: none; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 0.92rem; border-radius: 12px; }
.btn--block { width: 100%; }

/* ---------- generic ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: var(--bg2); color: var(--ink2); }
.chip--ok { background: var(--ok-soft); color: var(--ok-ink); }
.chip--gold { background: var(--gold-soft); color: var(--gold-ink); }
.chip--brand { background: var(--brand-soft); color: var(--brand-ink); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; font-size: 0.85rem; margin-bottom: 16px; }
.lead { font-size: 1.1rem; color: var(--ink2); max-width: 36em; }
.section { padding-top: 36px; padding-bottom: 8px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.kasavu { height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 20px); opacity: 0.65; }

/* ---------- view transition ---------- */
.view { animation: viewIn 0.5s var(--ease) both; }
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
.boot { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 60vh; color: var(--ink2); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 38px 0 28px; }
.hero__grid { display: grid; gap: 28px; align-items: center; position: relative; z-index: 1; }
.hero h1 { margin-bottom: 0.35em; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--brand), var(--brand2) 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 6px; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink2); font-size: 0.95rem; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts .ic { color: var(--brand); width: 18px; height: 18px; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; z-index: 0; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.blob.b1 { width: 340px; height: 340px; background: color-mix(in srgb, var(--brand) 28%, transparent); top: -90px; right: -60px; }
.blob.b2 { width: 280px; height: 280px; background: color-mix(in srgb, var(--gold) 35%, transparent); bottom: -80px; left: -60px; animation-delay: -6s; }

.art { position: relative; height: 330px; max-width: 420px; width: 100%; margin: 0 auto; }
.art__core { position: absolute; inset: 0; margin: auto; width: 150px; height: 150px; border-radius: 42px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand2), var(--brand-ink)); box-shadow: var(--shadow-lg); animation: breathe 5s ease-in-out infinite; }
:root[data-theme="dark"] .art__core { color: var(--on-brand); background: linear-gradient(135deg, var(--brand2), var(--brand)); }
.art__core .ic { width: 64px; height: 64px; stroke-width: 1.6; }
.art__ring { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, transparent); }
.art__ring.r1 { width: 250px; height: 250px; animation: spin 40s linear infinite; }
.art__ring.r2 { width: 340px; height: 340px; animation: spin 60s linear infinite reverse; border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.art__chip { position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: 0.88rem; animation: floaty 6s ease-in-out infinite; }
.art__chip i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--t); color: var(--ti); }
.art__chip i .ic { width: 16px; height: 16px; }
.art__chip.a1 { top: 8%; left: 0; animation-delay: 0s; }
.art__chip.a2 { top: 20%; right: -2%; animation-delay: -1.5s; }
.art__chip.a3 { bottom: 16%; left: -2%; animation-delay: -3s; }
.art__chip.a4 { bottom: 5%; right: 4%; animation-delay: -4.5s; }

@media (min-width: 880px) {
  .hero { padding: 64px 0 40px; }
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
  .art { height: 400px; }
}

/* feature cards */
.feat { padding: 22px; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feat__ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--t); color: var(--ti); margin-bottom: 12px; }
.feat h3 { margin-bottom: 4px; }
.feat p { margin: 0; color: var(--ink2); font-size: 0.97rem; line-height: 1.65; }
.steps { counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { padding: 20px 20px 20px 20px; position: relative; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); font-weight: 800; margin-bottom: 10px; }
.step h3 { margin-bottom: 2px; }
.step p { margin: 0; color: var(--ink2); font-size: 0.95rem; line-height: 1.6; }
.banner { margin: 40px 0 0; padding: 28px 22px; border-radius: 24px; color: #fff; background: linear-gradient(120deg, var(--brand-ink), var(--brand) 70%, var(--brand2)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; position: relative; overflow: hidden; }
:root[data-theme="dark"] .banner { color: var(--on-brand); background: linear-gradient(120deg, #1d6f5d, var(--brand) 80%); }
.banner h2 { margin: 0 0 4px; }
.banner p { margin: 0; opacity: 0.9; }
.banner::after { content: ""; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 70%, transparent), transparent 70%); }
.banner .btn { position: relative; z-index: 1; }

/* ---------- module card ---------- */
.mcard { display: flex; flex-direction: column; gap: 10px; padding: 18px; color: var(--ink); text-decoration: none !important; transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s; position: relative; overflow: hidden; }
.mcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--ti) 40%, var(--line)); }
.mcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ti); opacity: 0.55; }
.mcard__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mcard__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--t); color: var(--ti); transition: transform 0.4s var(--ease); }
.mcard:hover .mcard__icon { transform: rotate(-6deg) scale(1.06); }
.mcard__no { font-size: 0.78rem; font-weight: 700; color: var(--ti); letter-spacing: 0.04em; }
.mcard h3 { margin: 0; font-size: 1.08rem; }
.mcard p { margin: 0; color: var(--ink2); font-size: 0.93rem; line-height: 1.6; }
.mcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; font-size: 0.85rem; color: var(--ink2); }
.bar { height: 8px; border-radius: 8px; background: var(--bg2); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: 8px; background: linear-gradient(90deg, var(--ti, var(--brand)), color-mix(in srgb, var(--ti, var(--brand)) 60%, var(--gold))); transition: width 1s var(--ease); }

/* ---------- dashboard ---------- */
.dash { display: grid; gap: 16px; padding-top: 28px; }
.welcome { padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; position: relative; overflow: hidden; }
.welcome .eyebrow { margin-bottom: 10px; font-size: 0.8rem; padding: 4px 11px; }
.welcome h1 { font-size: clamp(1.35rem, 4vw, 2.1rem); margin: 0 0 4px; }
.welcome .ringwrap { width: 92px !important; height: 92px !important; }
.welcome .ringwrap b { font-size: 1.2rem; }
@media (min-width: 560px) {
  .welcome .ringwrap { width: 112px !important; height: 112px !important; }
  .welcome .ringwrap b { font-size: 1.5rem; }
}
.welcome::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 28%, transparent), transparent 70%); pointer-events: none; }
.ringbox { display: flex; align-items: center; gap: 16px; }
.ring { width: 100%; height: 100%; flex: none; transform: rotate(-90deg); }
.only-desktop { display: none; }
@media (min-width: 900px) { .only-desktop { display: grid; } }
.savestate { font-size: 0.78rem; color: var(--ink2); white-space: nowrap; }
.ring .bg { fill: none; stroke: var(--bg2); stroke-width: 9; }
.ring .fg { fill: none; stroke: url(#ringGrad); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0)); transition: stroke-dashoffset 1.3s var(--ease); }
.ringwrap { position: relative; width: 112px; height: 112px; flex: none; }
.ringwrap b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; }
.ringwrap b small { font-size: 0.7em; font-weight: 700; opacity: 0.7; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 14px; text-align: center; }
.stat__ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto 6px; background: var(--t); color: var(--ti); }
.stat b { display: block; font-size: 1.5rem; line-height: 1.2; font-weight: 800; }
.stat span { font-size: 0.8rem; color: var(--ink2); }
.continue { display: flex; align-items: center; gap: 14px; padding: 18px; color: var(--ink); text-decoration: none !important; border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: linear-gradient(120deg, var(--brand-soft), var(--card) 60%); transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.continue:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.continue__go { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); flex: none; animation: pulse 2.4s ease-in-out infinite; }
.continue small { color: var(--brand-ink); font-weight: 700; }
.continue h3 { margin: 0; font-size: 1.05rem; }
@media (min-width: 760px) {
  .welcome { padding: 28px 32px; }
}

/* ---------- outline (course page) ---------- */
.omod { padding: 0; overflow: hidden; margin-bottom: 16px; }
.omod__head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 14px; }
.omod__head .mcard__icon { flex: none; }
.omod__head h3 { margin: 0; font-size: 1.1rem; }
.omod__head p { margin: 0; font-size: 0.9rem; color: var(--ink2); line-height: 1.5; }
.omod__bar { padding: 0 18px 12px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none !important; min-height: 56px; transition: background 0.2s; }
.lrow:hover { background: var(--bg2); }
.lrow__st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--line); color: transparent; transition: all 0.3s; }
.lrow__st .ic { width: 15px; height: 15px; stroke-width: 3; }
.lrow.done .lrow__st { background: var(--ok); border-color: var(--ok); color: #fff; }
.lrow.lock .lrow__st { border-style: dashed; color: var(--ink2); }
.lrow__t { flex: 1; min-width: 0; font-weight: 500; line-height: 1.5; }
.lrow__m { font-size: 0.8rem; color: var(--ink2); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.lrow--quiz .lrow__t { color: var(--ti); font-weight: 700; }
.omod.flash { animation: flash 1.6s var(--ease); }

/* ---------- lesson ---------- */
.lesson { max-width: 760px; margin: 0 auto; padding-top: 22px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--ink2); margin-bottom: 14px; }
.crumbs a { color: var(--ink2); }
.crumbs .ic { width: 14px; height: 14px; }
.lesson__head { padding: 22px; margin-bottom: 20px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--t), var(--card) 85%); }
.lesson__head h1 { font-size: clamp(1.45rem, 4.2vw, 2rem); margin: 8px 0 8px; color: var(--ink); }
.lesson__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dots { display: flex; gap: 6px; margin-top: 14px; }
.dots a { height: 6px; flex: 1; max-width: 56px; border-radius: 6px; background: color-mix(in srgb, var(--ti) 22%, transparent); }
.dots a.on { background: var(--ti); }
.dots a.done { background: color-mix(in srgb, var(--ti) 60%, transparent); }
.prose > * { margin-top: 0; }
.prose p { font-size: 1.04rem; }
.prose h3 { margin: 1.6em 0 0.5em; padding-left: 12px; border-left: 4px solid var(--gold); }
.prose strong { font-weight: 700; color: var(--brand-ink); }
:root[data-theme="dark"] .prose strong { color: var(--brand-ink); }
.prose ul, .prose ol { padding-left: 0; list-style: none; margin: 0 0 1.2em; }
.prose li { position: relative; padding: 4px 0 4px 30px; }
.prose ul li::before { content: ""; position: absolute; left: 8px; top: 0.85em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n); position: absolute; left: 0; top: 0.4em; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; background: var(--brand-soft); color: var(--brand-ink); line-height: 1; }
.callout { display: flex; gap: 12px; padding: 16px 16px; border-radius: var(--radius-sm); margin: 0 0 1.2em; border: 1px solid transparent; }
.callout > .ic { margin-top: 3px; }
.callout .cbody { flex: 1; min-width: 0; }
.callout .cbody > :last-child { margin-bottom: 0; }
.callout b.ct { display: block; font-weight: 700; margin-bottom: 2px; }
.callout.tip { background: var(--ok-soft); color: var(--ink); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.callout.tip > .ic, .callout.tip b.ct { color: var(--ok-ink); }
.callout.warn { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.callout.warn > .ic, .callout.warn b.ct { color: var(--bad-ink); }
.callout.ex { background: var(--bg2); border-color: var(--line); }
.callout.ex > .ic, .callout.ex b.ct { color: var(--brand-ink); }
.callout.try { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.callout.try > .ic, .callout.try b.ct { color: var(--gold-ink); }
.callout.key { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.callout.key > .ic, .callout.key b.ct { color: var(--brand-ink); }
.callout.key ul { margin: 6px 0 0; }
.callout.key li::before { background: var(--brand); }
.promptbox { margin: 0 0 1.2em; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.promptbox__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; background: var(--bg2); border-bottom: 1px solid var(--line); font-weight: 700; font-size: 0.88rem; color: var(--brand-ink); }
.promptbox__top span { display: flex; align-items: center; gap: 8px; }
.promptbox pre { margin: 0; padding: 14px 16px; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 0.97rem; line-height: 1.75; }
.cmp { display: grid; gap: 12px; margin: 0 0 1.2em; }
.cmp > div { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.cmp b { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; margin-bottom: 4px; }
.cmp p { margin: 0; font-size: 0.97rem; white-space: pre-wrap; }
.cmp .bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.cmp .bad b { color: var(--bad-ink); }
.cmp .good { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.cmp .good b { color: var(--ok-ink); }
@media (min-width: 700px) { .cmp.two { grid-template-columns: 1fr 1fr; } }
.tblwrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 480px; }
.tbl th { text-align: left; background: var(--bg2); font-weight: 700; padding: 10px 14px; }
.tbl td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.traffic { display: grid; gap: 12px; margin: 0 0 1.2em; }
.traffic > div { padding: 14px 16px; border-radius: var(--radius-sm); border-left: 6px solid; }
.traffic b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.traffic b::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.traffic ul { margin: 0; }
.traffic li { padding-top: 2px; padding-bottom: 2px; }
.traffic .g { background: var(--ok-soft); border-color: var(--ok); } .traffic .g b { color: var(--ok-ink); }
.traffic .y { background: var(--gold-soft); border-color: var(--gold); } .traffic .y b { color: var(--gold-ink); }
.traffic .r { background: var(--bad-soft); border-color: var(--bad); } .traffic .r b { color: var(--bad-ink); }
.prose .traffic li::before { left: 6px; width: 6px; height: 6px; top: 1.05em; background: currentColor; opacity: 0.55; }
.traffic li { padding-left: 24px; color: var(--ink); }
.notes { margin-top: 28px; padding: 18px; }
.notes h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1rem; }
.notes textarea { width: 100%; min-height: 110px; resize: vertical; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 12px 14px; font: inherit; line-height: 1.7; }
.notes textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
.notes small { color: var(--ink2); display: block; margin-top: 6px; min-height: 1.4em; }
.lesson__foot { margin-top: 26px; display: grid; gap: 12px; }
.donebtn { min-height: 56px; font-size: 1.05rem; }
.donebtn.is-done { background: var(--ok); }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- quiz ---------- */
.quiz { max-width: 720px; margin: 0 auto; padding-top: 22px; }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.qhead h1 { font-size: clamp(1.3rem, 3.6vw, 1.7rem); margin: 0; }
.qcard { padding: 22px 20px; margin-top: 14px; animation: viewIn 0.45s var(--ease) both; }
.qcard h2 { font-size: 1.15rem; line-height: 1.6; margin-bottom: 16px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%; padding: 13px 14px; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; line-height: 1.55; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease); }
.opt:hover:not([disabled]) { border-color: var(--brand); background: var(--brand-soft); transform: translateX(3px); }
.opt__k { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 0.85rem; background: var(--bg2); color: var(--ink2); margin-top: 1px; }
.opt[disabled] { cursor: default; }
.opt.ok { border-color: var(--ok); background: var(--ok-soft); animation: pop 0.4s var(--ease); }
.opt.ok .opt__k { background: var(--ok); color: #fff; }
.opt.no { border-color: var(--bad); background: var(--bad-soft); animation: shake 0.4s; }
.opt.no .opt__k { background: var(--bad); color: #fff; }
.opt.dim { opacity: 0.55; }
.qexp { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg2); animation: viewIn 0.4s var(--ease) both; }
.qexp b { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.qexp.good b { color: var(--ok-ink); } .qexp.bad b { color: var(--bad-ink); }
.qexp p { margin: 0; font-size: 0.97rem; }
.qnext { margin-top: 16px; display: flex; justify-content: flex-end; }
.result { padding: 28px 22px; text-align: center; animation: viewIn 0.5s var(--ease) both; }
.result .ringwrap { margin: 0 auto 10px; }
.result h2 { margin-bottom: 4px; }
.review { text-align: left; margin-top: 22px; display: grid; gap: 10px; }
.review > div { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg2); font-size: 0.95rem; line-height: 1.6; }
.review b { color: var(--bad-ink); }
.result .cta { justify-content: center; }
.locked { padding: 36px 22px; text-align: center; }
.locked .ic { width: 44px; height: 44px; color: var(--gold); margin-bottom: 8px; }

/* ---------- auth ---------- */
.auth { max-width: 460px; margin: 0 auto; padding: 36px 0 10px; }
.auth__card { padding: 26px 22px; box-shadow: var(--shadow-lg); }
.auth h1 { font-size: 1.6rem; margin-bottom: 4px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg2); margin: 18px 0 16px; }
.tabs a { text-align: center; padding: 10px; border-radius: 11px; color: var(--ink2); font-weight: 600; text-decoration: none !important; transition: background 0.25s, color 0.25s; }
.tabs a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 5px; }
.field label small { font-weight: 400; color: var(--ink2); }
.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.passwrap { position: relative; }
.passwrap .input { padding-right: 52px; }
.passwrap button { position: absolute; right: 4px; top: 3px; }
.form-err { display: none; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad-ink); font-size: 0.93rem; margin-bottom: 14px; line-height: 1.5; }
.form-err.show { display: flex; animation: shake 0.4s; }
.two-col { display: grid; gap: 0 12px; }
@media (min-width: 520px) { .two-col { grid-template-columns: 1fr 1fr; } }
.trial { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); font-size: 0.85rem; line-height: 1.5; display: flex; gap: 8px; }

/* ---------- progress page ---------- */
.ptable { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ptable th, .ptable td { padding: 10px 8px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.ptable th { border-top: 0; font-size: 0.8rem; color: var(--ink2); font-weight: 600; }
.mini-bar { min-width: 90px; }
.noteitem { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg2); margin-bottom: 8px; }
.noteitem a { font-weight: 700; }
.noteitem p { margin: 4px 0 0; white-space: pre-wrap; font-size: 0.93rem; line-height: 1.6; }
.two { display: grid; gap: 16px; }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- prompts + glossary ---------- */
.tools { display: grid; gap: 12px; margin-bottom: 18px; }
.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 15px; color: var(--ink2); pointer-events: none; }
.search .input { padding-left: 44px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink2); cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; }
.filters button:hover { border-color: var(--brand); color: var(--ink); }
.filters button.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pcard { display: flex; flex-direction: column; overflow: hidden; }
.pcard__top { padding: 14px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard h3 { margin: 6px 16px 6px; font-size: 1.02rem; }
.pcard pre { margin: 0 16px 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg2); font: inherit; font-size: 0.92rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; flex: 1; }
.pcard .btn { margin: 0 16px 16px; }
.empty { text-align: center; padding: 36px 16px; color: var(--ink2); }
.gl { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.gl > div { padding: 16px 18px; }
.gl h3 { margin: 0 0 2px; font-size: 1.05rem; }
.gl h3 small { font-weight: 500; color: var(--ink2); font-size: 0.85rem; margin-left: 6px; }
.gl p { margin: 4px 0 0; color: var(--ink2); font-size: 0.95rem; line-height: 1.65; }
.pagehead { padding: 32px 0 20px; }
.pagehead h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin-bottom: 6px; }

/* ---------- certificate ---------- */
.cert-wrap { padding-top: 22px; }
.cert { position: relative; max-width: 900px; margin: 0 auto; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, var(--gold), #f3dc9c 40%, var(--gold)); box-shadow: var(--shadow-lg); animation: viewIn 0.7s var(--ease) both; }
.cert__in { position: relative; padding: 34px 24px 30px; border-radius: 12px; background: #fffdf5; color: #1b2a28; text-align: center; border: 2px solid #d9c07a; outline: 1px solid #d9c07a; outline-offset: -9px; overflow: hidden; }
.cert__in::before, .cert__in::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: repeating-linear-gradient(90deg, #c79a33 0 16px, transparent 16px 24px); opacity: 0.7; }
.cert__in::before { top: 0; } .cert__in::after { bottom: 0; }
.cert__logo { display: inline-grid; margin-bottom: 6px; }
.cert small.k { letter-spacing: 0.18em; color: #7d5a0f; font-weight: 700; font-size: 0.78rem; }
.cert h2 { font-size: clamp(1.4rem, 4.4vw, 2.2rem); margin: 6px 0 14px; color: #0a5547; font-weight: 800; }
.cert .name { font-size: clamp(1.7rem, 6vw, 2.8rem); font-weight: 800; color: #1b2a28; margin: 6px 0; padding: 0 12px 6px; display: inline-block; border-bottom: 2px solid #c79a33; }
.cert p { color: #3d4d4a; margin: 8px auto; max-width: 560px; }
.cert__foot { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: end; margin-top: 26px; font-size: 0.88rem; color: #3d4d4a; }
.cert__foot div { text-align: center; min-width: 120px; }
.cert__foot b { display: block; color: #1b2a28; font-size: 1rem; }
.seal { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; color: #7d5a0f; background: radial-gradient(circle at 30% 30%, #fbe9b0, #d9a93e); box-shadow: inset 0 0 0 4px rgba(255,255,255,0.45), 0 4px 10px rgba(125, 90, 15, 0.3); margin: 0 auto; }
.seal .ic { width: 42px; height: 42px; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }

/* ---------- toast / confetti ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; z-index: 60; width: max-content; max-width: min(92vw, 440px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.95rem; box-shadow: var(--shadow-lg); transition: opacity 0.3s, transform 0.4s var(--ease); display: flex; gap: 8px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: fall var(--d, 2.4s) cubic-bezier(0.3, 0.6, 0.5, 1) var(--dl, 0s) forwards; }

/* ---------- footer ---------- */
.foot { margin-top: 56px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--ink2); font-size: 0.88rem; text-align: center; }

/* ---------- keyframes ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(30px, 24px) scale(1.12); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 40%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
@keyframes pop { 0% { transform: scale(0.97); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 55%, transparent), var(--shadow); } }
@keyframes fall { 0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); } 100% { opacity: 0; transform: translate3d(var(--x, 0), 105vh, 0) rotate(var(--r, 540deg)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- print (certificate) ---------- */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff !important; }
  .topbar, .tabbar, .toast, .confetti, .no-print, .foot, .skip, .consent { display: none !important; }
  main { padding: 0 !important; }
  .cert-wrap { padding: 0; }
  .cert { box-shadow: none; max-width: none; animation: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==================== selling: price, paywall, sales page ==================== */
.price { font-weight: 800; font-size: 1.15rem; color: var(--brand-ink); }
.price--lg { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; }
.mrp { color: var(--ink2); font-size: 0.95rem; margin-left: 8px; }
.ccard { display: flex; flex-direction: column; gap: 8px; padding: 18px; position: relative; overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.ccard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ccard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ti); opacity: 0.55; }
.ccard h3 { margin: 4px 0 0; font-size: 1.2rem; }

.sale { display: grid; gap: 22px; align-items: start; padding: 6px 0 4px; position: relative; }
.sale h1 { margin-bottom: 0.3em; }
.sale h1 em { font-style: normal; font-size: 0.6em; display: block; margin-top: 6px; background: linear-gradient(100deg, var(--brand), var(--brand2) 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (min-width: 880px) { .sale { grid-template-columns: 1.15fr 0.85fr; gap: 36px; } }
.pricebox { padding: 22px; box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); position: sticky; top: calc(var(--topbar-h) + 14px); }
.pricebox__p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 4px; }
.incl { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 7px; font-size: 0.95rem; }
.incl li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.5; }
.incl .ic { color: var(--ok); margin-top: 3px; width: 17px; height: 17px; stroke-width: 3; }

.paywall { padding: 36px 22px; text-align: center; margin-top: 18px; border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); background: linear-gradient(160deg, var(--gold-soft), var(--card) 55%); }
.paywall > .ic { width: 46px; height: 46px; color: var(--gold-ink); margin-bottom: 6px; }
.upsell { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 18px; margin-bottom: 14px; border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); background: linear-gradient(120deg, var(--gold-soft), var(--card) 70%); }
.upsell > div:first-child { color: var(--gold-ink); }

.lrow.free .lrow__st { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.lrow.free .lrow__st .ic { width: 13px; height: 13px; fill: currentColor; }
.lrow .chip { flex: none; }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt.sel .opt__k { background: var(--brand); color: var(--on-brand); }
.btn--gold[disabled] { opacity: 0.55; }
.banner .btn--gold { box-shadow: none; }
.paywall .cta .btn { height: auto; min-height: 44px; padding-block: 8px; text-align: left; justify-content: flex-start; line-height: 1.5; }
.welcome .muted b { color: var(--ink); }

/* ==================== legal pages (server-rendered) ==================== */
.legal { max-width: 800px; padding-top: 28px; padding-bottom: 40px; }
.legal h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin-bottom: 4px; }
.legal h2 { font-size: 1.15rem; margin: 1.8em 0 0.4em; padding-left: 12px; border-left: 4px solid var(--gold); }
.legal p, .legal li { font-size: 1rem; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 4px; }
.legal code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.legal .ml { background: var(--brand-soft); color: var(--brand-ink); padding: 12px 16px; border-radius: var(--radius-sm); }
.legal__card { padding: 18px 20px; margin: 14px 0; }
.legal__card p { margin: 0 0 4px; }
.legal__nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.legal__nav a[aria-current] { font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot a { color: var(--ink2); margin: 0 6px; }
.foot a:hover { color: var(--ink); }

/* ==================== admin panel + receipt ==================== */
.chip--bad { background: var(--bad-soft); color: var(--bad-ink); }
.nowrap { white-space: nowrap; }
.atabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin: 6px 0 0; background: var(--bg2); border-radius: 14px; scrollbar-width: none; }
.atabs::-webkit-scrollbar { display: none; }
.atabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 11px; color: var(--ink2); font-weight: 600; font-size: 0.92rem; text-decoration: none !important; transition: background 0.2s, color 0.2s; }
.atabs a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.astats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
@media (min-width: 760px) { .astats { grid-template-columns: repeat(4, 1fr); } }
.astats .stat b { font-size: 1.35rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.checklist .ic { margin-top: 3px; }
.checklist li.ok .ic { color: var(--ok); }
.checklist li.todo .ic { color: var(--gold); }
.checklist .muted { font-size: 0.88rem; }
.lhead { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.aform__grid { display: grid; gap: 0 14px; }
@media (min-width: 700px) { .aform__grid { grid-template-columns: 1fr 1fr; } }
select.input { appearance: auto; padding-right: 10px; }
.tempbox { margin-top: 14px; padding: 16px; border-radius: var(--radius-sm); background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.tempbox b { color: var(--ok-ink); display: flex; gap: 6px; align-items: center; }
.bigcode { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.08em; background: var(--card); padding: 4px 10px; border-radius: 8px; user-select: all; }
.tempbox textarea { width: 100%; resize: vertical; line-height: 1.7; background: var(--card); }
.admin .ptable td, .admin .ptable th { padding: 10px 10px; }
.admin code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: 0.85rem; word-break: break-all; }
.receipt { max-width: 640px; margin: 0 auto; padding: 26px 24px; animation: viewIn 0.6s var(--ease) both; }
.receipt__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--gold); }
.rtable { width: 100%; border-collapse: collapse; }
.rtable th { text-align: left; width: 38%; color: var(--ink2); font-weight: 600; padding: 9px 8px 9px 0; vertical-align: top; font-size: 0.93rem; }
.rtable td { padding: 9px 0; border-top: 1px solid var(--line); }
.rtable tr:first-child td, .rtable tr:first-child th { border-top: 0; }
.rtable th { border-top: 1px solid var(--line); }
.rtable code { word-break: break-all; font-size: 0.85rem; }
@media print { .atabs { display: none; } }

/* ==================== admin editors (courses, website, learner controls) ==================== */
textarea.input { padding: 11px 14px; min-height: 84px; line-height: 1.65; resize: vertical; }
.field--check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.field--check input[type="checkbox"] { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--brand); cursor: pointer; }
.field--check label { margin: 0; font-weight: 500; cursor: pointer; }
.span2 { grid-column: 1 / -1; }
.chipbtn { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink2); font-weight: 600; font-size: 0.92rem; text-decoration: none !important; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.chipbtn:hover { border-color: var(--brand); color: var(--ink); }
.chipbtn.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.adetails { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.adetails > summary { cursor: pointer; padding: 13px 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; min-height: 48px; }
.adetails[open] > summary { border-bottom: 1px solid var(--line); }
.adetails > form { margin: 16px; }
.actrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); }
.adetails > summary + .actrow { border-top: 0; }
.actrow p { margin: 2px 0 0; font-size: 0.9rem; max-width: 60ch; }

.cmods { display: grid; gap: 12px; }
.cmod { padding: 0; overflow: hidden; }
.cmod > summary, .clesson > summary, .cquiz > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; min-height: 52px; }
.cmod > summary::-webkit-details-marker, .clesson > summary::-webkit-details-marker, .cquiz > summary::-webkit-details-marker { display: none; }
.cmod > summary::before, .clesson > summary::before, .cquiz > summary::before { content: "▸"; color: var(--ink2); transition: transform 0.2s; flex: none; }
.cmod[open] > summary::before, .clesson[open] > summary::before, .cquiz[open] > summary::before { transform: rotate(90deg); }
.cmod > summary .chip { background: var(--t); color: var(--ti); min-width: 30px; justify-content: center; }
.cmod[open] > summary { border-bottom: 1px solid var(--line); }
.csum { margin-left: auto; font-size: 0.85rem; }
.cdetail { padding: 6px 16px 16px; }
.clesson, .cquiz { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 10px 0; background: var(--bg); }
.cquiz { border-style: dashed; margin-top: 16px; }
.clesson[open] > summary, .cquiz[open] > summary { border-bottom: 1px solid var(--line); }
.cnum { font-weight: 700; color: var(--gold-ink); min-width: 2.6em; }
.ch { margin: 20px 0 4px; }
.cblock, .cq { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 4px; margin: 12px 0; background: var(--card); }
.cblock__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ctools { display: inline-flex; gap: 4px; flex: none; }
.iconbtn--sm { width: 40px; height: 40px; font-size: 1rem; border-color: var(--line); }
.iconbtn--sm:disabled { opacity: 0.35; cursor: not-allowed; }
.iconbtn--bad { color: var(--bad); }
.iconbtn--bad:hover { background: var(--bad-soft); color: var(--bad-ink); }
.copt { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.copt input[type="radio"] { width: 22px; height: 22px; accent-color: var(--ok); flex: none; cursor: pointer; }
.cadd { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.cadd select { max-width: 320px; }
.cfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.savebar { position: sticky; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 0.92rem; color: var(--ink2); transition: border-color 0.25s, background 0.25s; }
.savebar.is-dirty { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-ink); }
.savebar__btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 900px) { .savebar { bottom: 14px; } }
@media print { .savebar { display: none; } }

/* tracking consent banner (public/js/track.js) */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 65; max-width: 560px; margin: 0 auto; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 0.92rem; line-height: 1.6; }
.consent p { margin: 0 0 10px; }
.consent__btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) { .consent { bottom: 20px; } }
.foot .linkbtn { background: none; border: 0; padding: 0; margin: 0 6px; font: inherit; color: var(--ink2); cursor: pointer; text-decoration: underline; }
.foot .linkbtn:hover { color: var(--ink); }
