/* ==========================================================================
   Instructor Alison's Tutorials — design system
   Light = graph paper. Dark = blackboard. Colours come from the logo.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f5f6fd;
  --bg-tint: #eceefc;
  --surface: #ffffff;
  --surface-2: #f0f2fd;
  --ink: #0c0e2c;
  --ink-2: #484c72;
  --ink-3: #7a7ea3;
  --line: #dcdff3;
  --line-strong: #c3c8e8;

  --blue: #2a38ee;
  --blue-soft: #e4e7ff;
  --yellow: #ffd23f;
  --yellow-soft: #fff4c4;
  --red: #ef3a2d;
  --green: #12a15c;

  --link: #2a38ee;
  --btn-bg: #2a38ee;
  --btn-ink: #ffffff;
  --btn-hover: #1b27c9;
  --grid: rgba(42, 56, 238, .075);
  --shadow-sm: 0 1px 2px rgba(12, 14, 44, .06), 0 2px 8px rgba(12, 14, 44, .04);
  --shadow-md: 0 10px 30px -8px rgba(32, 40, 140, .22);
  --shadow-lg: 0 30px 60px -20px rgba(32, 40, 140, .35);
  --header-bg: rgba(245, 246, 253, .82);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --header-h: 72px;
  --wrap: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090a1d;
  --bg-tint: #0f1129;
  --surface: #12142e;
  --surface-2: #1a1d42;
  --ink: #f3f4ff;
  --ink-2: #aeb2d9;
  --ink-3: #7c80ab;
  --line: #262a58;
  --line-strong: #363b78;

  --blue: #7c87ff;
  --blue-soft: #1d2154;
  --yellow-soft: #3a3210;
  --green: #35d489;

  --link: #9aa3ff;
  --btn-bg: #ffd23f;
  --btn-ink: #0c0e2c;
  --btn-hover: #ffe074;
  --grid: rgba(150, 160, 255, .075);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 14px 34px -10px rgba(0, 0, 0, .65);
  --shadow-lg: 0 34px 70px -24px rgba(0, 0, 0, .8);
  --header-bg: rgba(9, 10, 29, .8);
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 .5em;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 1.4rem + 5vw, 5rem); letter-spacing: -.04em; font-weight: 800; line-height: 1; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.1rem); }
h3 { font-size: 1.35rem; line-height: 1.2; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; max-width: 68ch; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--yellow); color: #0c0e2c; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--yellow); color: #0c0e2c; padding: 10px 16px; border-radius: 8px; z-index: 999; font-weight: 700; }
.skip-link:focus { top: 12px; text-decoration: none; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 820px); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section.tint { background: var(--bg-tint); }
.stack > * + * { margin-top: var(--gap, 1rem); }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.center p { margin-inline: auto; }
.flex { display: flex; } .between { justify-content: space-between; } .items-center { align-items: center; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; } .wrap-flex { flex-wrap: wrap; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; }

/* graph-paper surface used behind heroes */
.paper {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ---------- buttons ---------- */
.btn {
  --_bg: var(--btn-bg); --_ink: var(--btn-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  background: var(--_bg); color: var(--_ink);
  font-weight: 700; font-size: 1rem; line-height: 1.1; white-space: nowrap;
  transition: transform .15s ease, background-color .2s, box-shadow .2s, border-color .2s;
  box-shadow: 0 6px 18px -8px var(--_bg);
}
.btn:hover { background: var(--btn-hover); text-decoration: none; transform: translateY(-2px); color: var(--_ink); }
.btn:active { transform: translateY(0); }
.btn-ghost { --_bg: transparent; --_ink: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink); }
.btn-yellow { --_bg: var(--yellow); --_ink: #0c0e2c; }
.btn-yellow:hover { background: #ffe074; color: #0c0e2c; }
.btn-danger { --_bg: var(--red); --_ink: #fff; }
.btn-danger:hover { background: #d42a1e; color: #fff; }
.btn-sm { padding: .55rem 1rem; font-size: .92rem; }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.link-arrow { font-weight: 700; display: inline-flex; gap: .4rem; align-items: center; }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 8px 24px -16px rgba(12, 14, 44, .35); }
.nav { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; line-height: 1.05; }
.brand:hover { text-decoration: none; }
.brand svg { width: 42px; height: 42px; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; letter-spacing: 0; color: var(--ink-2); }
.nav-links { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.nav-links > li { position: relative; }
.nav-links a, .nav-links button.nav-trigger {
  display: inline-flex; align-items: center; gap: .35rem; padding: .55rem .9rem; border-radius: 999px;
  color: var(--ink-2); font-weight: 600; font-size: .98rem; background: none; border: 0;
}
.nav-links a:hover, .nav-links button.nav-trigger:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.has-menu .menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; padding: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
}
.has-menu:hover .menu, .has-menu:focus-within .menu, .has-menu.open .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { display: flex; width: 100%; border-radius: 10px; }
.nav-tools { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--ink); transition: .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); text-decoration: none; }
.icon-btn .count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav-burger { display: none; }
.nav-cta { display: flex; gap: .5rem; align-items: center; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(5, 6, 22, .55); opacity: 0; transition: opacity .25s; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); background: var(--bg);
  padding: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); border-left: 1px solid var(--line);
}
.drawer.open { visibility: visible; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-links a { display: flex; justify-content: space-between; padding: 1rem .25rem; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); letter-spacing: -.02em; }
.drawer-links a:hover { text-decoration: none; color: var(--link); }
.drawer-links .sub a { font-size: 1.1rem; padding-left: 1rem; font-family: var(--font-body); font-weight: 600; color: var(--ink-2); }

@media (max-width: 960px) {
  .nav-links, .nav-cta .hide-sm { display: none; }
  .nav-burger { display: inline-grid; }
  .nav-tools { margin-left: auto; }
  :root { --header-h: 66px; }
}

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 300; top: calc(var(--header-h) + 12px); right: 16px; display: grid; gap: .6rem; width: min(92vw, 400px); }
.toast {
  display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--blue); box-shadow: var(--shadow-md);
  font-size: .96rem; animation: toast-in .35s cubic-bezier(.2, .8, .2, 1);
}
.toast.success { border-left-color: var(--green); } .toast.error, .toast.danger { border-left-color: var(--red); } .toast.warning { border-left-color: var(--yellow); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--ink-3); font-size: 1.2rem; line-height: 1; padding: 0 .25rem; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 140px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--ink-2); max-width: 54ch; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2rem; }
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .34em; background: var(--yellow); z-index: -1; border-radius: 4px; transform-origin: left; animation: hl-draw .8s .5s cubic-bezier(.2, .8, .2, 1) both; }
:root[data-theme="dark"] .hl::after { opacity: .9; }
@keyframes hl-draw { from { transform: scaleX(0); } }
.hero-proof { display: flex; align-items: center; gap: 1rem; margin-top: 2.25rem; color: var(--ink-2); font-size: .98rem; }
.hero-proof strong { color: var(--ink); font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -.02em; }
.hero-proof .sep { width: 1px; height: 34px; background: var(--line-strong); }

.stage { position: relative; aspect-ratio: 4 / 4.6; width: 100%; max-width: 520px; margin-inline: auto; }
.stage .rays { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stage .rays .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: ray-grow .9s cubic-bezier(.2, .9, .3, 1) both; }
.stage .rays .bar:nth-of-type(1) { animation-delay: .1s; } .stage .rays .bar:nth-of-type(2) { animation-delay: .2s; }
.stage .rays .bar:nth-of-type(3) { animation-delay: .3s; } .stage .rays .bar:nth-of-type(4) { animation-delay: .4s; }
.stage .rays .bar:nth-of-type(5) { animation-delay: .5s; }
@keyframes ray-grow { from { transform: scaleY(0); opacity: 0; } }
.stage .person { height: auto; position: absolute; bottom: 0; left: 50%; width: 122%; max-width: none; transform: translateX(-50%); filter: drop-shadow(0 20px 30px rgba(12, 14, 44, .28)); pointer-events: none; }
.stage-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.chip-float {
  position: absolute; z-index: 3; padding: .55rem .9rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-md); font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap;
}
.chip-float small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--ink-3); }
.chip-float.c1 { top: 8%; left: -4%; } .chip-float.c2 { top: 36%; right: -6%; } .chip-float.c3 { bottom: 12%; left: -6%; }
.chip-float i { color: var(--blue); margin-right: .35rem; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stage { max-width: 380px; }
  .chip-float.c1 { left: 0; } .chip-float.c2 { right: 0; } .chip-float.c3 { left: 0; }
}

/* ---------- marquee strip ---------- */
.strip { border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.strip-inner { display: flex; gap: 3rem; padding: 1rem 0; width: max-content; animation: marquee 38s linear infinite; }
.strip span { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 3rem; white-space: nowrap; }
.strip span::after { content: ""; width: 9px; height: 9px; background: var(--yellow); border-radius: 2px; transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- section heads ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; max-width: 18ch; }
.section-head p { margin: .75rem 0 0; color: var(--ink-2); }
.kicker { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; color: var(--link); margin-bottom: .75rem; }
.kicker::before { content: ""; width: 22px; height: 4px; border-radius: 2px; background: var(--yellow); }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 1.3rem; margin-bottom: 1.1rem; }
.ico.y { background: var(--yellow-soft); color: #a07800; } :root[data-theme="dark"] .ico.y { color: var(--yellow); }
.ico.r { background: rgba(239, 58, 45, .12); color: var(--red); }

/* learning-path cards: big, one per level */
.path-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 260px; padding: 2rem; border-radius: var(--r-lg); color: #fff; background: var(--blue); isolation: isolate; transition: transform .25s; }
.path-card:hover { transform: translateY(-4px); text-decoration: none; }
.path-card:nth-child(2) { background: #0d1050; } .path-card:nth-child(3) { background: var(--yellow); color: #0c0e2c; }
:root[data-theme="dark"] .path-card:nth-child(1) { background: #3340d8; } :root[data-theme="dark"] .path-card:nth-child(2) { background: #1a1d42; }
.path-card h3 { color: inherit; font-size: 1.7rem; }
.path-card p { opacity: .85; margin-top: auto; }
.path-card .big { position: absolute; z-index: -1; right: -10px; top: -26px; font-family: var(--font-display); font-weight: 800; font-size: 11rem; line-height: 1; opacity: .13; letter-spacing: -.06em; pointer-events: none; }
.path-card .go { margin-top: 1.25rem; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.path-card:nth-child(3) .go { background: rgba(12, 14, 44, .12); }

/* ---------- course card ---------- */
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; height: 100%; }
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--blue); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.course-card:hover .thumb img { transform: scale(1.05); }
.thumb-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; position: relative; background: linear-gradient(135deg, #2a38ee, #121a9e); overflow: hidden; }
.thumb-fallback::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 28px 28px; }
.thumb-fallback b { position: relative; font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 5rem); font-weight: 800; letter-spacing: -.05em; color: var(--yellow); }
.thumb-fallback.v1 { background: linear-gradient(135deg, #0d1050, #2a38ee); }
.thumb-fallback.v2 { background: linear-gradient(135deg, #b81f16, #ef3a2d 70%, #ff7a45); } .thumb-fallback.v2 b { color: #fff; }
.thumb-fallback.v3 { background: linear-gradient(135deg, #0a7a46, #16b46b); } .thumb-fallback.v3 b { color: #fff; }
.tag { position: absolute; top: 12px; left: 12px; padding: .3rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #0c0e2c; font-weight: 700; font-size: .8rem; }
.tag.price { left: auto; right: 12px; background: var(--yellow); }
.tag.price.free { background: #20d27b; }
.course-body { display: flex; flex-direction: column; gap: .6rem; padding: 1.25rem 1.35rem 1.35rem; flex: 1; }
.course-body h3 { font-size: 1.22rem; margin: 0; }
.course-body h3 a { color: var(--ink); }
.course-body h3 a::after { content: ""; position: absolute; inset: 0; }
.course-card { position: relative; }
.course-body p { color: var(--ink-2); font-size: .96rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--ink-3); font-size: .88rem; font-weight: 600; margin-top: auto; padding-top: .5rem; border-top: 1px dashed var(--line); }
.meta i { margin-right: .3rem; color: var(--blue); }
.level { display: inline-flex; align-items: center; gap: .35rem; }
.level::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.level.intermediate::before { background: var(--yellow); } .level.advanced::before { background: var(--red); }

/* chips / filters */
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .94rem; transition: .15s; }
.chip:hover { text-decoration: none; border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.badge { display: inline-block; padding: .22rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--blue-soft); color: var(--blue); }
.badge.ok { background: rgba(18, 161, 92, .14); color: var(--green); } .badge.warn { background: var(--yellow-soft); color: #946f00; } .badge.bad { background: rgba(239, 58, 45, .13); color: var(--red); }
:root[data-theme="dark"] .badge.warn { color: var(--yellow); }

/* ---------- forms ---------- */
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-weight: 700; font-size: .93rem; }
.input, .field input, .field textarea, .field select, .search input, .select {
  width: 100%; padding: .85rem 1rem; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .search input:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.pw { position: relative; }
.pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-3); padding: .5rem; border-radius: 8px; }
.pw button:hover { color: var(--ink); }
.pw input { padding-right: 3rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--blue); flex: none; }
.search { position: relative; }
.search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 2.75rem; border-radius: 999px; }
.select { padding-right: 2rem; appearance: auto; border-radius: 999px; width: auto; }

/* ---------- auth ---------- */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #0b0d3d; color: #fff; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 36px 36px; }
.auth-art h2 { color: #fff; font-size: clamp(2rem, 1rem + 3vw, 3.4rem); max-width: 13ch; }
.auth-art p { color: #c9cdf5; }
.auth-art .rays-bg { position: absolute; z-index: -1; right: -90px; bottom: -40px; width: 520px; opacity: .95; }
.auth-art ul li { display: flex; gap: .7rem; align-items: center; padding: .4rem 0; color: #e6e8ff; }
.auth-art ul i { color: var(--yellow); }
.auth-form { display: grid; place-items: center; padding: clamp(1.5rem, 4vw, 3rem); }
.auth-box { width: min(100%, 440px); }
.auth-box h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); margin-bottom: .3em; }
.auth-foot { margin-top: 1.5rem; text-align: center; color: var(--ink-2); }
.form-links { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- page heads (inner pages) ---------- */
.page-head { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.2rem, 1.2rem + 4vw, 4rem); max-width: 16ch; }
.page-head p { color: var(--ink-2); font-size: 1.15rem; max-width: 58ch; }
.crumbs { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .92rem; color: var(--ink-3); margin-bottom: 1.25rem; font-weight: 600; }
.crumbs a { color: var(--ink-2); } .crumbs span::before { content: "/"; margin-right: .5rem; color: var(--line-strong); }

/* ---------- course detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.buy { position: sticky; top: calc(var(--header-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.buy-body { padding: 1.5rem; }
.price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price.free { color: var(--green); }
.facts li { display: flex; gap: .8rem; align-items: center; padding: .65rem 0; border-top: 1px dashed var(--line); color: var(--ink-2); font-size: .98rem; }
.facts i { width: 20px; text-align: center; color: var(--blue); }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } .buy { position: static; order: -1; } }
.prose { max-width: 68ch; } .prose p { color: var(--ink-2); }
.prose h2, .prose h3 { margin-top: 1.5em; }
.acc { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.acc details + details { border-top: 1px solid var(--line); }
.acc summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.35rem; cursor: pointer; font-weight: 700; list-style: none; font-family: var(--font-display); font-size: 1.08rem; letter-spacing: -.01em; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--blue); transition: transform .25s; flex: none; }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc summary small { color: var(--ink-3); font-family: var(--font-body); font-weight: 500; margin-left: auto; font-size: .85rem; }
.acc details[open] > summary { background: var(--surface-2); }
.lesson-row { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.35rem; border-top: 1px solid var(--line); color: var(--ink); font-size: .98rem; }
a.lesson-row:hover { background: var(--surface-2); text-decoration: none; }
.lesson-row .dur { margin-left: auto; color: var(--ink-3); font-size: .86rem; font-variant-numeric: tabular-nums; }
.lesson-row .state { color: var(--blue); width: 20px; text-align: center; }
.lesson-row.locked { color: var(--ink-3); } .lesson-row.locked .state { color: var(--ink-3); }

/* ---------- cart / checkout ---------- */
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2rem; align-items: start; }
@media (max-width: 960px) { .cart-grid { grid-template-columns: 1fr; } }
.line-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 1.25rem; align-items: center; padding: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.line-item + .line-item { margin-top: 1rem; }
.line-item .thumb { border-radius: 12px; }
.line-item h3 { font-size: 1.1rem; margin: 0 0 .25rem; } .line-item h3 a { color: var(--ink); }
.line-item .amt { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; text-align: right; }
.line-item .rm { color: var(--ink-3); font-size: .88rem; font-weight: 600; display: block; text-align: right; margin-top: .3rem; }
.line-item .rm:hover { color: var(--red); }
@media (max-width: 560px) { .line-item { grid-template-columns: 84px 1fr; } .line-item .amt { grid-column: 2; text-align: left; } .line-item .rm { text-align: left; } }
.summary { position: sticky; top: calc(var(--header-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.summary h2 { font-size: 1.4rem; }
.sum-row { display: flex; justify-content: space-between; padding: .6rem 0; color: var(--ink-2); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: 1rem; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; }
.secure { display: flex; gap: .6rem; align-items: center; justify-content: center; color: var(--ink-3); font-size: .86rem; margin-top: 1rem; }
.empty { text-align: center; padding: clamp(3rem, 8vw, 6rem) 1rem; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface); }
.empty .ico { margin-inline: auto; width: 68px; height: 68px; font-size: 1.7rem; border-radius: 20px; }
.empty p { margin-inline: auto; color: var(--ink-2); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; padding: .35rem; background: var(--surface-2); border-radius: 999px; width: fit-content; max-width: 100%; border: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: .6rem 1.15rem; border-radius: 999px; font-weight: 700; color: var(--ink-2); font-size: .95rem; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tab-panel[hidden] { display: none; }
.tab-panel { animation: panel-in .3s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.ticks li { display: flex; gap: .7rem; padding: .5rem 0; align-items: flex-start; }
.ticks li::before { content: "\f00c"; font-family: "Font Awesome 5 Pro"; font-weight: 900; color: var(--green); font-size: .85rem; margin-top: .35rem; flex: none; }

/* ---------- dashboard (student) ---------- */
.dash { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2rem; align-items: start; }
.dash-side { position: sticky; top: calc(var(--header-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; }
.avatar { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--blue); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; letter-spacing: -.03em; }
:root[data-theme="dark"] .avatar { background: var(--yellow); color: #0c0e2c; }
.side-nav { margin-top: 1.25rem; display: grid; gap: .25rem; }
.side-nav button, .side-nav a { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; padding: .7rem .9rem; border-radius: 12px; border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: .98rem; }
.side-nav button:hover, .side-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side-nav button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.side-nav i { width: 18px; text-align: center; }
@media (max-width: 960px) { .dash { grid-template-columns: 1fr; } .dash-side { position: static; } .side-nav { grid-auto-flow: column; overflow-x: auto; } .side-nav button, .side-nav a { white-space: nowrap; width: auto; } }
.stat { padding: 1.4rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: 2.6rem; letter-spacing: -.04em; line-height: 1; }
.stat span { color: var(--ink-2); font-size: .95rem; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--yellow)); border-radius: 4px; width: 0; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl th { text-align: left; font-size: .85rem; color: var(--ink-3); padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.tbl td { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: 0; background: #080a2e; color: #c7caf0; position: relative; overflow: hidden; isolation: isolate; }
:root[data-theme="dark"] .site-footer { background: #05061a; border-top: 1px solid var(--line); }
.site-footer::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 36px 36px; }
.cta-band { max-height: 120px; background: var(--blue); color: #fff; border-radius: var(--r-lg); padding: clamp(2rem, 5vw, 3.5rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; position: relative; overflow: hidden; isolation: isolate; }
:root[data-theme="dark"] .cta-band { background: #1b2088; }
.cta-band h2 { color: #fff; margin: 0; max-width: 20ch; font-size: clamp(1.8rem, 1rem + 2.5vw, 2.8rem); }
.cta-band p { color: #dfe2ff; margin: .6rem 0 0; }
.cta-band .rays-bg { position: absolute; right: -30px; bottom: -60px; width: 340px; z-index: -1; opacity: .35; }
.footer-top { padding-block: 4rem 2.5rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #c7caf0; } .site-footer a:hover { color: var(--yellow); }
.site-footer li { padding: .28rem 0; }
.site-footer .brand { color: #fff; } .site-footer .brand small { color: #a2a6d6; }
.socials { display: flex; gap: .5rem; margin-top: 1.25rem; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .18); color: #fff; }
.socials a:hover { background: var(--yellow); color: #0c0e2c; border-color: var(--yellow); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .92rem; color: #9094c4; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- player (learn page) ---------- */
body.learning .site-footer, body.learning .cta-wrap { display: none; }
.learn { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: calc(100vh - var(--header-h)); }
.learn-main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 3rem; min-width: 0; }
.player-shell { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #05061a; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; }
.player-shell video, .player-shell iframe, .player-shell .plyr { width: 100%; height: 100%; border: 0; }
.player-shell .plyr { --plyr-color-main: #2a38ee; --plyr-video-control-color-hover: #fff; --plyr-range-fill-background: #ffd23f; --plyr-menu-background: #12142e; --plyr-menu-color: #f3f4ff; --plyr-font-family: var(--font-body); }
.player-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #c7caf0; padding: 2rem; }
.learn-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.25rem 0 .5rem; flex-wrap: wrap; }
.learn-bar h1 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); letter-spacing: -.03em; margin: 0; line-height: 1.15; }
.learn-side { border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h)); position: sticky; top: var(--header-h); }
.learn-side header { padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--line); }
.learn-side header h2 { font-size: 1.15rem; margin-bottom: .75rem; }
.learn-list { overflow-y: auto; flex: 1; }
.learn-list details > summary { padding: .95rem 1.25rem; font-size: 1rem; }
.learn-list .lesson-row { cursor: pointer; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; padding: .8rem 1.25rem; }
.learn-list .lesson-row:hover { background: var(--surface-2); }
.learn-list .lesson-row.active { background: var(--blue-soft); box-shadow: inset 4px 0 0 var(--blue); font-weight: 700; }
.learn-list .lesson-row.done .state { color: var(--green); }
@media (max-width: 1000px) { .learn { grid-template-columns: 1fr; } .learn-side { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); } }
kbd { font-family: var(--font-body); font-size: .78rem; padding: .1rem .45rem; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 700; }

/* ---------- misc ---------- */
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 .8rem; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; color: var(--ink); }
.pager .cur { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager a:hover { text-decoration: none; border-color: var(--ink); }
.quote { position: relative; padding: 2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.quote::before { content: "\201C"; position: absolute; top: -10px; left: 18px; font-family: var(--font-display); font-size: 6rem; line-height: 1; color: var(--yellow); font-weight: 800; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.portrait { position: relative; aspect-ratio: 1 / 1; max-width: 460px; margin-inline: auto; width: 100%; }
.portrait .blob { position: absolute; inset: 6% 6% 0; border-radius: 40% 40% var(--r-lg) var(--r-lg); background: var(--blue); }
.portrait .blob.y { transform: rotate(-5deg); background: var(--yellow); inset: 8% 10% 0 4%; }
.portrait img { height: auto; position: absolute; bottom: 0; left: 50%; width: 112%; max-width: none; transform: translateX(-50%); }
.portrait .clip { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.steps { counter-reset: s; display: grid; gap: 1.25rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 1.1rem; align-items: start; }
.steps li::before { content: counter(s); width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--yellow); color: #0c0e2c; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.steps h3 { margin-bottom: .2rem; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--ink-2); }
.err-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(7rem, 24vw, 15rem); letter-spacing: -.07em; line-height: .85; color: var(--blue); }
:root[data-theme="dark"] .err-code { color: var(--yellow); }
.contact-line { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-top: 1px dashed var(--line); }
.contact-line .ico { margin: 0; width: 46px; height: 46px; flex: none; font-size: 1.1rem; }
.contact-line b { display: block; font-family: var(--font-display); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .toasts { display: none; } }
