/* learn.yashtrology.com — Yashtrology brand tokens (midnight navy + gold, from the logo) */
:root {
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --surface-2: #f3ecdd;
  --ink: #17203f;
  --ink-2: #3f4664;
  --muted: #6e6f7f;
  --line: #e6dabf;
  --gold: #946512;          /* gold for text on ivory (AA contrast) */
  --gold-1: #c99a35;
  --gold-2: #e8b84a;
  --gold-3: #f6d27a;
  --gold-soft: #f6eacb;
  --gold-grad: linear-gradient(135deg, #f6d27a 0%, #e8b84a 38%, #c99a35 72%, #a87a22 100%);
  --night: #0b1230;
  --night-2: #121b45;
  --night-3: #1b2660;
  --night-ink: #ece4cf;
  --night-mute: #9aa1c2;
  --night-line: rgba(232,184,74,.22);
  --indigo: #0b1230;
  --indigo-2: #1b2660;
  --ok: #1f7a46;
  --ok-soft: #e2f1e6;
  --warn: #93560f;
  --warn-soft: #fbefd6;
  --err: #a33434;
  --err-soft: #f8e2e0;
  --info-soft: #ebe6f3;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(23,32,63,.03), 0 14px 34px -20px rgba(23,32,63,.35);
  --shadow-gold: 0 0 0 1px rgba(201,154,53,.35), 0 18px 40px -22px rgba(148,101,18,.55);
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.7 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: .01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.12rem; letter-spacing: .02em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.5em; border-radius: 999px; border: 1px solid transparent;
  background: var(--night); color: var(--night-ink); font: 600 .92rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .2s, filter .2s; }
.btn:hover { color: #fff; transform: translateY(-1px); background: var(--night-3); }
.btn--gold { background: var(--gold-grad); color: #1d1606; border-color: rgba(168,122,34,.55); box-shadow: 0 8px 22px -12px rgba(201,154,53,.9), inset 0 1px 0 rgba(255,255,255,.45); }
.btn--gold:hover { background: var(--gold-grad); color: #1d1606; filter: brightness(1.06); box-shadow: 0 12px 28px -12px rgba(201,154,53,1), inset 0 1px 0 rgba(255,255,255,.5); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn--danger { background: var(--err); color: #fff; }
.btn--sm { padding: .6em 1.1em; font-size: .84rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(11,18,48,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--night-line); color: var(--night-ink); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--night-ink); text-decoration: none; }
.brand:hover { color: var(--night-ink); }
.brand__logo { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(232,184,74,.45), 0 0 18px rgba(232,184,74,.25); }
.brand__name { font: 700 1.28rem/1 var(--serif); letter-spacing: .04em; display: flex; flex-direction: column; gap: .3rem;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__name small { font: 600 .62rem/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--night-mute); -webkit-text-fill-color: var(--night-mute); }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a, .nav .linkbtn { color: #c9cde0; text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav a:hover, .nav .linkbtn:hover, .nav a.is-active { color: var(--gold-3); }
.nav a.btn { color: #1d1606; }
.nav__form { margin: 0; }
.navtoggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px 8px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.navtoggle span:not(.sr) { display: block; height: 2px; background: var(--gold-2); border-radius: 2px; }
@media (max-width: 860px) {
  .navtoggle { display: flex; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 16px 18px; background: var(--night); border-bottom: 1px solid var(--night-line); }
  .nav.is-open { display: flex; }
  .nav > * { padding: 11px 0; width: 100%; }
  .nav a.btn { width: auto; margin-top: 6px; padding: .6em 1.1em; }
}

/* Flash */
.flashes { margin-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--info-soft); font-size: .95rem; }
.flash--success { background: var(--ok-soft); color: var(--ok); }
.flash--error { background: var(--err-soft); color: var(--err); }
.flash--warn { background: var(--warn-soft); color: var(--warn); }

/* Hero */
.hero { position: relative; overflow: hidden; color: var(--night-ink);
  background: radial-gradient(900px 520px at 78% 40%, rgba(232,184,74,.16), transparent 62%), radial-gradient(1000px 600px at 10% -20%, #1d2a6b 0%, transparent 60%), linear-gradient(180deg, #0b1230, #070b1f); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .7; pointer-events: none;
  background-image: radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 33% 68%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 48% 14%, #f6d27a 50%, transparent 51%), radial-gradient(1px 1px at 26% 44%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 6% 78%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 22% 88%, #f6d27a 50%, transparent 51%),
  radial-gradient(1px 1px at 42% 36%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 54% 82%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 18% 8%, #cfd6ff 50%, transparent 51%), radial-gradient(1px 1px at 38% 92%, #cfd6ff 50%, transparent 51%); }
.hero__art { position: absolute; top: 0; right: 0; bottom: 0; width: min(46%, 620px); pointer-events: none;
  background: url("../img/planets.webp") right center / cover no-repeat; opacity: .9;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%); mask-image: linear-gradient(to right, transparent 0%, #000 55%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(232,184,74,.7), transparent); }
.hero__inner { position: relative; padding-top: 64px; padding-bottom: 72px; display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.2fr 1fr; padding-top: 96px; padding-bottom: 108px; } }
.eyebrow { display: inline-block; font: 600 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.hero__motto { font: 600 .9rem/1.2 var(--serif); letter-spacing: .14em; color: var(--gold-2); margin: 0 0 20px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.12; max-width: 14ch; margin-bottom: .45em;
  background: linear-gradient(180deg, #fff6dc 0%, #f6d27a 45%, #d9a441 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { color: #c8cde3; font-size: 1.06rem; max-width: 50ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn--ghost { color: var(--night-ink); border-color: rgba(232,184,74,.4); }
.hero .btn--ghost:hover { background: rgba(232,184,74,.1); color: #fff; }
.hero__by { margin: 26px 0 0; font-size: .86rem; color: var(--night-mute); }
.hero__seal { justify-self: center; position: relative; width: min(400px, 74vw); aspect-ratio: 1; }
.hero__seal::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(circle, rgba(246,210,122,.32) 0%, rgba(232,184,74,.12) 38%, transparent 68%); }
.hero__seal img { position: relative; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 1px rgba(232,184,74,.5), 0 30px 80px -20px rgba(0,0,0,.8);
  animation: seal-in 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes seal-in { from { opacity: 0; transform: scale(.94); filter: brightness(.6); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 899px) { .hero__art { width: 70%; opacity: .45; } .hero__seal { width: min(300px, 70vw); order: -1; } }
@media (prefers-reduced-motion: reduce) { .hero__seal img { animation: none; } }

/* Sections */
.section { padding: 64px 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section__head p { margin: 0; max-width: 56ch; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: .45em 1em; font: 500 .85rem/1 var(--sans); cursor: pointer; }
.pill:hover { border-color: var(--gold-1); color: var(--ink); }
.pill.is-active { background: var(--night); color: var(--gold-3); border-color: var(--night); }

/* Course cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s, box-shadow .25s, border-color .25s; }
a.card { color: inherit; text-decoration: none; }
a.card:hover { transform: translateY(-3px); color: inherit; border-color: rgba(201,154,53,.6); box-shadow: var(--shadow-gold); }
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: .35em; }
.card__body p { color: var(--ink-2); font-size: .94rem; flex: 1; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; font-size: .88rem; color: var(--muted); }
.price { font: 700 1.12rem/1 var(--sans); color: var(--ink); }
.price s { color: var(--muted); font-weight: 400; font-size: .85em; margin-left: .35em; }
.badge { display: inline-block; font: 600 .68rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: .45em .75em; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.badge--draft { background: var(--warn-soft); color: var(--warn); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--muted { background: var(--surface-2); color: var(--muted); }

/* Generated covers: midnight sky with a gold glyph in a gold ring */
.cover { --accent: #5b4b8a; position: relative; color: var(--gold-3); display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(1px 1px at 14% 24%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 82% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 76%, #f6d27a 50%, transparent 51%), radial-gradient(1px 1px at 30% 80%, #cfd6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 58%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 46% 12%, #cfd6ff 50%, transparent 51%),
    radial-gradient(70% 90% at 50% 50%, color-mix(in srgb, var(--accent) 45%, transparent) 0%, transparent 70%),
    linear-gradient(160deg, #142057, #0b1230 60%, #070b1f); }
.cover::after { content: ""; position: absolute; inset: 0; border-bottom: 1px solid rgba(232,184,74,.5); pointer-events: none; }
.cover--card { aspect-ratio: 16 / 9; }
.cover--hero { aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(232,184,74,.4), 0 30px 60px -30px rgba(0,0,0,.8); }
.cover--thumb { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.cover--thumb .cover__cat { display: none; }
.cover--thumb .cover__glyph { font-size: 1.5rem; width: 2.1em; height: 2.1em; }
.cover__glyph { position: relative; z-index: 1; display: grid; place-items: center; width: 2.05em; height: 2.05em; border-radius: 50%; font-family: Georgia, serif; font-size: 2.7rem; line-height: 1;
  border: 1px solid rgba(232,184,74,.75); box-shadow: 0 0 0 6px rgba(232,184,74,.07), 0 0 0 7px rgba(232,184,74,.25), 0 0 40px rgba(232,184,74,.3), inset 0 0 24px rgba(232,184,74,.15);
  background: radial-gradient(circle, rgba(11,18,48,.2), rgba(11,18,48,.75)); color: var(--gold-3); text-shadow: 0 0 18px rgba(246,210,122,.6); }
.cover--hero .cover__glyph { font-size: 4.6rem; }
.cover__cat { position: absolute; z-index: 1; left: 16px; bottom: 12px; font: 600 .66rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }
.cover--img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Value strip */
.values { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.value { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gold-1); }
.value__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--night); color: var(--gold-3); font-size: 1.2rem; box-shadow: 0 0 0 1px rgba(232,184,74,.5); }
.value h3 { font-size: 1.02rem; margin: .9em 0 .35em; }
.value p { color: var(--ink-2); font-size: .93rem; margin: 0; }

/* Course detail */
.course-hero { padding: 48px 0 48px; color: var(--night-ink); position: relative;
  background: radial-gradient(800px 400px at 85% 30%, rgba(232,184,74,.14), transparent 65%), linear-gradient(180deg, #0b1230, #0a1029); border-bottom: 1px solid rgba(232,184,74,.4); }
.course-hero h1 { color: #fff3d6; }
.course-hero a { color: var(--gold-3); }
.course-hero .badge { background: rgba(232,184,74,.16); color: var(--gold-3); }
.course-hero__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .course-hero__grid { grid-template-columns: 1.5fr 1fr; align-items: center; } }
.course-hero .lead { font-size: 1.1rem; color: #c8cde3; max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--night-mute); font-size: .9rem; margin-top: 16px; }
.facts span::before { content: "✦ "; color: var(--gold-2); }
.course-body { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 72px; }
@media (min-width: 900px) { .course-body { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.buybox { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold-1); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .buybox { position: sticky; top: 96px; } }
.buybox .price { font-size: 2rem; }
.buybox ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: .93rem; color: var(--ink-2); }
.buybox li::before { content: "✓ "; color: var(--ok); font-weight: 600; }
.coupon { display: flex; gap: 8px; margin-top: 14px; }
.coupon input { flex: 1; min-width: 0; }

.prose { font-size: 1.05rem; color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; color: var(--ink); font-size: 1.45rem; }
.prose h3 { margin-top: 1.4em; color: var(--ink); font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.4em 0; padding: .6em 1.2em; border-left: 3px solid var(--gold-1); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95em; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface-2); color: var(--ink); }
.prose img { border-radius: var(--radius-sm); }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; }
.placeholder-note { padding: 18px 20px; border: 1px dashed var(--gold); border-radius: var(--radius-sm); background: var(--gold-soft); color: var(--ink); }

/* Curriculum */
.curriculum { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.curriculum details { border-top: 1px solid var(--line); }
.curriculum details:first-child { border-top: 0; }
.curriculum summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.curriculum summary::-webkit-details-marker { display: none; }
.curriculum summary::after { content: "+"; color: var(--gold-1); font-size: 1.2rem; line-height: 1; }
.curriculum details[open] summary::after { content: "–"; }
.curriculum summary small { color: var(--muted); font-weight: 400; margin-left: auto; white-space: nowrap; }
.curriculum ol { list-style: none; margin: 0; padding: 0 20px 14px; }
.curriculum li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: .95rem; color: var(--ink-2); }
.curriculum li .dur { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.curriculum li a { color: var(--ink); }
.ico { width: 18px; text-align: center; color: var(--muted); flex: none; }

/* Forms */
.authwrap { padding: 56px 16px 80px; display: grid; place-items: center; background: radial-gradient(700px 360px at 50% 0%, rgba(201,154,53,.14), transparent 70%); }
.authcard { position: relative; width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold-1); border-radius: var(--radius); padding: 64px 28px 32px; margin-top: 40px; box-shadow: var(--shadow); }
.authcard::before { content: ""; position: absolute; top: -44px; left: 50%; width: 88px; height: 88px; margin-left: -44px; border-radius: 50%; background: url("../img/logo-256.webp") center / cover; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px rgba(201,154,53,.5), 0 12px 30px -10px rgba(11,18,48,.6); }
.authcard h1 { font-size: 1.7rem; text-align: center; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .9rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: .75em .9em; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: .97rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-1); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; }
.check input { margin-top: .3em; accent-color: var(--gold); }
.row2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.formfoot { font-size: .92rem; color: var(--muted); text-align: center; margin-top: 18px; }

/* Dashboard */
.pagehead { padding: 40px 0 24px; }
.pagehead p { color: var(--ink-2); margin: 0; }
.mycourses { display: grid; gap: 16px; padding-bottom: 72px; }
.mycourse { display: flex; gap: 18px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.mycourse__main { flex: 1; min-width: 200px; }
.mycourse__main h3 { margin: 0 0 .3em; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 4px; }
.bar > span { display: block; height: 100%; background: var(--gold-grad); border-radius: 99px; }
.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* Lesson player */
.player { display: grid; min-height: calc(100vh - 72px); }
@media (min-width: 980px) { .player { grid-template-columns: 330px 1fr; } }
.player__side { background: var(--surface); border-right: 1px solid var(--line); }
@media (min-width: 980px) { .player__side { position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; } }
@media (max-width: 979px) { .player__side { border-right: 0; border-bottom: 1px solid var(--line); } .player__side:not(.is-open) .sidecurr { display: none; } }
.sidehead { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sidehead a { color: var(--muted); font-size: .85rem; text-decoration: none; }
.sidehead h2 { font-size: 1.25rem; margin: .35em 0 .5em; }
.sidetoggle { display: none; margin-top: 10px; }
@media (max-width: 979px) { .sidetoggle { display: inline-flex; } }
.sidecurr .mod { padding: 14px 20px 4px; font: 600 .74rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sidecurr a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 20px; color: var(--ink-2); text-decoration: none; font-size: .92rem; line-height: 1.4; border-left: 3px solid transparent; }
.sidecurr a:hover { background: var(--surface-2); color: var(--ink); }
.sidecurr a.is-current { background: var(--gold-soft); color: var(--ink); border-left-color: var(--gold-1); font-weight: 600; }
.sidecurr a.is-locked { opacity: .55; }
.tick { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; margin-top: 1px; display: grid; place-items: center; font-size: .7rem; }
.tick.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.player__main { padding: 32px 16px 80px; }
@media (min-width: 720px) { .player__main { padding: 48px 48px 96px; } }
.lesson { max-width: 720px; margin: 0 auto; }
.lesson__crumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.lesson .prose { font-size: 1.08rem; line-height: 1.75; }
.files { margin: 32px 0; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.files h3 { margin: 0 0 12px; font-size: 1.15rem; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.file:first-of-type { border-top: 0; }
.file__ico { width: 38px; height: 46px; border-radius: 6px; background: var(--err-soft); color: var(--err); display: grid; place-items: center; font: 700 .66rem/1 var(--sans); flex: none; }
.file__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file__name small { display: block; color: var(--muted); }
.lessonnav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.lessonnav form { margin: 0; }
.donebanner { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-weight: 500; margin-bottom: 20px; }

/* Tables (account + admin) */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font: 600 .74rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }

/* Footer */
.footer { padding: 48px 0 26px; margin-top: auto; color: var(--night-ink); background: linear-gradient(180deg, #0b1230, #070b1f); border-top: 1px solid rgba(232,184,74,.4); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer__brand { display: flex; gap: 18px; align-items: center; max-width: 520px; }
.footer__brand img { width: 88px; height: 88px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(232,184,74,.45), 0 0 26px rgba(232,184,74,.2); }
.footer__motto { font: 600 .9rem/1.3 var(--serif); letter-spacing: .1em; color: var(--gold-2); margin: 0 0 6px; }
.footer__tag { font-size: .88rem; color: var(--night-mute); margin: 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-start; font-size: .9rem; max-width: 460px; }
.footer__links a { color: #c9cde0; text-decoration: none; }
.footer__links a:hover { color: var(--gold-3); }
.footer__base { font-size: .8rem; margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(232,184,74,.15); color: var(--night-mute); }

/* Certificate */
.cert { max-width: 960px; margin: 40px auto; padding: 16px; }
.cert__paper { aspect-ratio: 1.414; background: radial-gradient(70% 60% at 50% 40%, #fffdf6, #f8f0dc); color: #17203f; border: 1px solid #d9c9a3; padding: 6%; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: var(--shadow); }
.cert__paper::before { content: ""; position: absolute; inset: 14px; border: 2px solid #c99a35; pointer-events: none; }
.cert__paper::after { content: ""; position: absolute; inset: 22px; border: 1px solid #d9c9a3; pointer-events: none; }
.cert__mark img { width: 92px; height: 92px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(201,154,53,.6); }
.cert__small { font: 600 .78rem/1 var(--serif); letter-spacing: .24em; text-transform: uppercase; color: #946512; margin-top: 14px; }
.cert__name { font: 700 clamp(1.8rem, 5vw, 3.1rem)/1.15 var(--serif); color: #17203f; margin: .25em 0; border-bottom: 1px solid #d9c9a3; padding: 0 1em .15em; }
.cert__course { font: 600 clamp(1.05rem, 2.6vw, 1.5rem)/1.3 var(--serif); color: #946512; margin: .3em 0 1.2em; }
.cert__foot { display: flex; justify-content: space-between; width: 80%; font-size: .85rem; color: #4a4659; margin-top: 4%; }
.cert__sig { font: 600 1.3rem/1 var(--serif); color: #17203f; border-bottom: 1px solid #4a4659; padding-bottom: 4px; margin-bottom: 6px; }
@media print {
  .topbar, .footer, .noprint { display: none !important; }
  body { background: #fff; }
  .cert { margin: 0; padding: 0; max-width: none; }
  .cert__paper { box-shadow: none; aspect-ratio: auto; height: 186mm; padding: 4% 6%; break-inside: avoid; }
  body { min-height: 0; display: block; }
  .flashes, .skip { display: none !important; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* Print: keep gold and navy */
@media print { .cert__paper { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

.authcard > .eyebrow { display: block; text-align: center; }
