/* All Cloud Academy
   One stylesheet for the whole site. Friendly, calm and easy to read.
   Headings: Nunito. Body: Atkinson Hyperlegible, a typeface designed to be easy to read. */

:root {
  --ink: #1b2440;
  --ink-soft: #4a5470;
  --line: #dfe5f0;
  --paper: #ffffff;
  --canvas: #f5f8fd;

  --sky: #2563eb;
  --sky-deep: #1d4ed8;
  --sky-soft: #e4edff;
  --mint: #0b7a5a;
  --mint-soft: #dcf5ec;
  --sun: #b45309;
  --sun-bright: #f5a524;
  --sun-soft: #fff1d6;
  --violet: #6d4ae0;
  --violet-soft: #ece6ff;
  --coral: #c2410c;
  --coral-soft: #ffe6dc;

  --font-head: "Nunito", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 36, 64, .06), 0 6px 20px rgba(27, 36, 64, .06);
  --wrap: 1120px;
  --read: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--canvas);
  position: relative;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* A tech backdrop: a blueprint grid with small circuit-style dots at the
   intersections, plus two soft, static glows. It lives on <html>, fixed and
   behind everything. Section panels (.section--white, cards, the header
   and footer) let a hint of it show through their own background instead of
   fully hiding it, via a translucent (not fully opaque) background-color —
   see each one below — so the pattern reads as part of the whole page
   rather than only appearing in the gaps between sections. */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, .16), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(109, 74, 224, .14), transparent 44%),
    radial-gradient(circle at 50% 95%, rgba(11, 122, 90, .1), transparent 40%),
    repeating-linear-gradient(0deg, rgba(37, 99, 235, .12) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, .12) 0 1px, transparent 1px 44px),
    radial-gradient(circle, rgba(37, 99, 235, .3) 1.7px, transparent 1.8px);
  background-size: auto, auto, auto, auto, auto, 44px 44px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: var(--sky-deep); }
:focus-visible { outline: 3px solid var(--sun-bright); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.read { max-width: var(--read); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--white { background: rgba(255, 255, 255, .93); }
.section__head { max-width: 640px; margin-bottom: 32px; }
.section__head p { color: var(--ink-soft); font-size: 1.15rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.muted { color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo svg { width: 40px; height: 40px; }
.logo__text { font-family: var(--font-head); font-weight: 900; font-size: 1.25rem; line-height: 1; }
.logo__text span { color: var(--sky); font-weight: 800; }
.nav__menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link { display: block; padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; }
.nav__link:hover { background: var(--sky-soft); color: var(--ink); }
.nav__link--active { background: var(--sky-soft); color: var(--sky-deep); }
.nav__menu li:last-child .nav__link { background: var(--sky); color: #fff; margin-left: 6px; }
.nav__menu li:last-child .nav__link:hover { background: var(--sky-deep); }
.nav__toggle { display: none; background: none; border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; font: 700 1rem var(--font-head); color: var(--ink); cursor: pointer; }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; box-shadow: var(--shadow); }
  .nav__menu.is-open { display: flex; }
  .nav__link { padding: 14px 16px; font-size: 1.1rem; }
  .nav__menu li:last-child .nav__link { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px; border: 2px solid transparent; font: 800 1.08rem var(--font-head); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--sky); color: #fff; }
.btn--primary:hover { background: var(--sky-deep); color: #fff; }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn--light:hover { border-color: var(--sky); color: var(--ink); }
.btn--success { background: var(--mint); color: #fff; }
.btn--success:hover { background: #086248; color: #fff; }
.btn--block { width: 100%; }
.btn--small { padding: 10px 18px; font-size: .98rem; }
.btn--loading { opacity: .75; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { background: linear-gradient(180deg, rgba(228, 237, 255, .9) 0%, rgba(245, 248, 253, .85) 100%); padding: 72px 0 56px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero__lead { font-size: 1.28rem; color: var(--ink-soft); max-width: 34em; margin-bottom: 28px; }
.hero__art { position: relative; }
.hero__note { margin-top: 18px; font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 820px) {
  .hero { padding: 48px 0 40px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 340px; margin: 0 auto; order: -1; }
}

.page-hero { background: rgba(228, 237, 255, .9); padding: 48px 0 40px; }
.page-hero p { font-size: 1.2rem; color: var(--ink-soft); max-width: 40em; margin: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sun-soft); color: var(--sun); font: 900 1.2rem var(--font-head); margin-bottom: 14px; }
.step p { color: var(--ink-soft); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* Course cards */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .course-grid { grid-template-columns: 1fr; } }
.course-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.course-card:hover { transform: translateY(-3px); border-color: var(--sky); color: var(--ink); }
.course-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.course-card h3 { margin-bottom: 8px; }
.course-card p { color: var(--ink-soft); font-size: 1.02rem; flex: 1; }
.course-card__meta { display: flex; justify-content: space-between; align-items: center; font-size: .98rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.course-card__go { font-family: var(--font-head); font-weight: 800; color: var(--sky); }

.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.icon-tile svg { width: 28px; height: 28px; }
.tone-sky { background: var(--sky-soft); color: var(--sky); }
.tone-mint { background: var(--mint-soft); color: var(--mint); }
.tone-sun { background: var(--sun-soft); color: var(--sun); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-coral { background: var(--coral-soft); color: var(--coral); }

.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font: 800 .88rem var(--font-head); }
.tag--free { background: var(--mint-soft); color: var(--mint); }
.tag--paid { background: var(--sun-soft); color: var(--sun); }
.tag--soon { background: var(--canvas); color: var(--ink-soft); border: 1px solid var(--line); }

/* Bundle band */
.bundle { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 32px; margin-top: 28px; }
.bundle h3 { color: #fff; margin-bottom: 6px; }
.bundle p { color: #c9d2e6; margin: 0; max-width: 36em; }
.bundle__price { font: 900 2.4rem var(--font-head); color: #fff; margin-right: 16px; }

/* Price comparison */
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 820px) { .compare { grid-template-columns: 1fr; } }
.compare__row { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; }
.compare__row:first-child { border-color: var(--sky); background: var(--sky-soft); }
.compare__label h3 { font-size: 1.15rem; margin-bottom: 2px; }
.compare__label p { color: var(--ink-soft); font-size: .98rem; margin: 0 0 14px; }
.compare__price { font: 900 1.9rem var(--font-head); color: var(--ink); }
.compare__price small { font: 700 1rem var(--font-head); color: var(--ink-soft); margin-left: 2px; }
.compare__note { color: var(--ink-soft); font-size: .96rem; margin: 10px 0 0; }
.compare__disclaimer { color: var(--ink-soft); font-size: .92rem; margin-top: 16px; max-width: 46em; }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--ink-soft); }

/* Split panel */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel--sun { background: var(--sun-soft); border-color: #f6dfae; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Prose pages */
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }

/* Breadcrumb */
.crumbs { font-size: .98rem; padding: 18px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--ink-soft); }
.crumbs [aria-current] { color: var(--ink-soft); }

/* Course page */
.course-hero { padding: 24px 0 40px; background: rgba(255, 255, 255, .93); border-bottom: 1px solid var(--line); }
.course-hero__row { display: flex; gap: 20px; align-items: flex-start; margin-top: 18px; }
.course-hero__row .icon-tile { width: 68px; height: 68px; flex: none; }
.course-hero__row .icon-tile svg { width: 36px; height: 36px; }
.course-hero p { font-size: 1.18rem; color: var(--ink-soft); max-width: 40em; }
.course-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 22px; }
.course-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr; } }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 92px; }
.side-card__price { font: 900 2.2rem var(--font-head); margin: 4px 0 2px; }
.side-card p { font-size: 1rem; color: var(--ink-soft); }
.note { background: var(--sun-soft); border-radius: var(--radius-sm); padding: 16px 18px; font-size: 1.02rem; margin-bottom: 24px; }

.lesson-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lesson-list__section { padding: 14px 20px 6px; font: 800 .95rem var(--font-head); color: var(--violet); background: var(--canvas); border-top: 1px solid var(--line); }
.lesson-row { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lesson-list > li:first-child .lesson-row { border-top: 0; }
a.lesson-row:hover { background: var(--canvas); color: var(--ink); }
.lesson-row__num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky); font: 900 1rem var(--font-head); }
.lesson-row.is-done .lesson-row__num { background: var(--mint); color: #fff; }
.lesson-row__title { font: 800 1.1rem var(--font-head); display: block; }
.lesson-row__sum { display: block; color: var(--ink-soft); font-size: 1rem; margin-top: 2px; }
.lesson-row__end { margin-left: auto; flex: none; align-self: center; }

/* Lesson page */
.lesson-head { background: rgba(255, 255, 255, .93); border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.lesson-head__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 12px; }
.lesson-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-bottom: 0; }
.lesson { padding: 36px 0 24px; }
.lesson-content h2 { margin-top: 1.8em; font-size: 1.6rem; }
.lesson-content h3 { margin-top: 1.4em; }
.lesson-content ul, .lesson-content ol { padding-left: 1.3em; }
.lesson-content li { margin-bottom: .45em; }
.lesson-content figure { margin: 28px 0; }
.lesson-content figcaption { font-size: .98rem; color: var(--ink-soft); margin-top: 8px; text-align: center; }
.lesson-content code { background: var(--canvas); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; font-size: .92em; }
.lesson-content pre { background: var(--ink); color: #e4edff; border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; margin: 20px 0; }
.lesson-content pre code { background: none; border: 0; padding: 0; color: inherit; }

/* Code playground */
.playground { background: var(--paper); border: 2px solid var(--violet); border-radius: var(--radius); overflow: hidden; margin: 28px 0; }
.playground__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--violet-soft); }
.playground__label { font: 800 1rem var(--font-head); color: var(--violet); margin-right: auto; }
.playground__run, .playground__reset { border: 0; border-radius: 999px; padding: 8px 18px; font: 800 .96rem var(--font-head); cursor: pointer; }
.playground__run { background: var(--violet); color: #fff; }
.playground__run:disabled { opacity: .6; cursor: default; }
.playground__reset { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.playground__code { display: block; width: 100%; box-sizing: border-box; border: 0; border-top: 1px solid var(--line); background: var(--ink); color: #e4edff; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 1rem; line-height: 1.6; padding: 16px 18px; resize: vertical; min-height: 96px; }
.playground__code:focus { outline: 2px solid var(--violet); outline-offset: -2px; }
.playground__output { margin: 0; padding: 14px 18px; background: #12172b; color: #c9d2e6; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .96rem; white-space: pre-wrap; word-break: break-word; border-top: 1px solid rgba(255, 255, 255, .1); max-height: 220px; overflow-y: auto; }

/* Typing test */
.typing-test { background: var(--mint-soft); border: 2px solid var(--mint); border-radius: var(--radius); padding: 22px 24px; margin: 28px 0; }
.typing-test__prompt { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 1.25rem; line-height: 1.8; letter-spacing: .02em; background: var(--paper); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 16px; }
.typing-test__ch--pending { color: var(--ink-soft); }
.typing-test__ch--correct { color: var(--mint); }
.typing-test__ch--incorrect { color: #9b1c1c; background: #fde8e8; border-radius: 3px; }
.typing-test__ch--current { color: var(--ink); background: var(--sun-soft); border-radius: 3px; outline: 2px solid var(--sun-bright); outline-offset: -1px; }
.typing-test__input { width: 100%; box-sizing: border-box; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 1.1rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); resize: vertical; }
.typing-test__input:focus { outline: none; border-color: var(--mint); }
.typing-test__input:disabled { background: var(--canvas); color: var(--ink-soft); }
.typing-test__stats { display: flex; gap: 24px; margin: 14px 0 4px; font: 800 1rem var(--font-head); color: var(--mint); }
.typing-test__stats strong { font-size: 1.3rem; }
.typing-test__status { color: var(--ink-soft); font-size: .98rem; margin: 4px 0 14px; }

.box { border-radius: var(--radius); padding: 22px 24px; margin: 28px 0; }
.box > :last-child { margin-bottom: 0; }
.box__label { display: block; font: 900 .95rem var(--font-head); margin-bottom: 8px; }
.big-idea { background: var(--sky-soft); font-size: 1.2rem; }
.big-idea .box__label { color: var(--sky-deep); }
.try-this { background: var(--sun-soft); border: 2px dashed #f0c46c; }
.try-this .box__label { color: var(--sun); }
.try-this ol { margin-bottom: 0; }
.remember { background: var(--mint-soft); }
.remember .box__label { color: var(--mint); }
.remember ul { margin-bottom: 0; }

.words-to-know { background: var(--paper); border: 1px solid var(--line); }
.words-to-know dl { margin: 0; }
.words-to-know dt { font: 800 1.08rem var(--font-head); margin-top: 12px; }
.words-to-know dt:first-child { margin-top: 0; }
.words-to-know dd { margin: 2px 0 0; color: var(--ink-soft); }

.quick-check { background: var(--violet-soft); }
.quick-check .box__label { color: var(--violet); }
.quick-check details { background: var(--paper); border-radius: var(--radius-sm); padding: 14px 18px; margin-top: 12px; }
.quick-check summary { cursor: pointer; font-weight: 700; list-style: none; }
.quick-check summary::-webkit-details-marker { display: none; }
.quick-check summary::after { content: "Show answer"; display: block; font: 800 .9rem var(--font-head); color: var(--violet); margin-top: 6px; }
.quick-check details[open] summary::after { content: "Hide answer"; }
.quick-check details p { margin: 10px 0 0; }

.lesson-done { text-align: center; margin: 40px 0 8px; }
.lesson-done .btn.is-done { background: var(--mint); color: #fff; }

.lesson-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0 8px; }
.lesson-nav a { display: block; max-width: 48%; text-decoration: none; font-family: var(--font-head); font-weight: 800; }
.lesson-nav small { display: block; font: 400 .92rem var(--font-body); color: var(--ink-soft); }
.lesson-nav__next { margin-left: auto; text-align: right; }

.locked { text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 28px; }
.locked .icon-tile { margin: 0 auto 16px; }
.locked p { color: var(--ink-soft); }
.locked__login { font-size: 1rem; margin-top: 16px; }

/* Read aloud (bar is built by read-aloud.js) */
.read-aloud-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 28px; font-size: 1rem; }
.read-aloud-bar__label { font: 800 1rem var(--font-head); margin-right: auto; }
.read-aloud-btn { border: 0; border-radius: 999px; padding: 8px 16px; font: 800 .98rem var(--font-head); cursor: pointer; background: var(--sky); color: #fff; }
.read-aloud-btn--stop { background: var(--canvas); color: var(--ink); border: 1px solid var(--line); }
.read-aloud-speed, .read-aloud-voice { font: inherit; font-size: .95rem; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); max-width: 220px; }
.read-aloud-active { background: var(--sun-soft); box-shadow: -8px 0 0 var(--sun-soft), 8px 0 0 var(--sun-soft); border-radius: 4px; }

/* Word list */
.word-search { width: 100%; font: inherit; font-size: 1.15rem; padding: 14px 18px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); }
.word-search:focus { border-color: var(--sky); outline: none; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 8px; }
.letters a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font: 800 1rem var(--font-head); }
.word-group h2 { font-size: 1.6rem; color: var(--sky); border-bottom: 2px solid var(--line); padding-bottom: 6px; margin: 36px 0 8px; scroll-margin-top: 90px; }
.word { padding: 14px 0; border-bottom: 1px solid var(--line); }
.word dt { font: 800 1.15rem var(--font-head); }
.word dd { margin: 2px 0 0; color: var(--ink-soft); }
.word dd small { display: block; margin-top: 4px; font-size: .95rem; }
.word-empty { display: none; padding: 24px 0; color: var(--ink-soft); }

/* Forms, auth, checkout, account */
.form-page { padding: 48px 0 72px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); max-width: 480px; margin: 0 auto; }
.card--wide { max-width: 720px; }
.card + .card { margin-top: 20px; }
.card-head { text-align: center; margin-bottom: 24px; }
.card-head p { color: var(--ink-soft); margin: 0; }
.form-group { margin-bottom: 18px; text-align: left; }
.form-label { display: block; font: 800 1rem var(--font-head); margin-bottom: 6px; }
.form-input { width: 100%; font: inherit; font-size: 1.08rem; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.form-input:focus { border-color: var(--sky); outline: none; }
.form-hint { display: block; font-size: .95rem; color: var(--ink-soft); margin-top: 6px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 18px 0; }
textarea.form-input { resize: vertical; min-height: 110px; }
.tabs { display: flex; background: var(--canvas); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.tab { flex: 1; border: 0; background: none; padding: 10px; border-radius: 999px; font: 800 1rem var(--font-head); color: var(--ink-soft); cursor: pointer; }
.tab--active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.auth-view { display: none; }
.auth-view--active { display: block; }
.auth-links { text-align: center; margin-top: 18px; font-size: 1rem; }
.alert { display: none; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 1rem; }
.alert--visible { display: block; }
.alert--error { background: #fde8e8; color: #9b1c1c; }
.alert--success { background: var(--mint-soft); color: #065f46; }
.alert--info { background: var(--sky-soft); color: var(--sky-deep); }
.price { font: 900 2.6rem var(--font-head); margin: 6px 0 0; }
.price-note { color: var(--ink-soft); font-size: 1rem; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.course-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.course-item:first-child { border-top: 0; }
.course-item__title { font: 800 1.08rem var(--font-head); }
.course-item__date { font-size: .95rem; color: var(--ink-soft); }
.empty { text-align: center; color: var(--ink-soft); padding: 16px 0; }
.btn--danger { background: #fde8e8; color: #9b1c1c; }
.btn--danger:hover { background: #fbd5d5; color: #9b1c1c; }

.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(37, 99, 235, .25); border-top-color: var(--sky); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
.spinner--lg { width: 36px; height: 36px; }
.spinner--center { display: block; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin tables */
.admin-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.admin-table th { font-family: var(--font-head); background: var(--canvas); }
.table-scroll { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--sky-soft); color: var(--sky-deep); }
.badge--success { background: var(--mint-soft); color: var(--mint); }
.badge--warning { background: var(--sun-soft); color: var(--sun); }

/* Footer */
.site-footer { background: var(--ink); color: #c9d2e6; padding: 48px 0 28px; margin-top: 40px; font-size: 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__grid h4 { color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; }
.footer__grid li { margin-bottom: 8px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer .logo__text span { color: #93b4ff; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 20px; font-size: .95rem; }

.error-page { text-align: center; padding: 96px 0; }

/* Scroll reveal, and a slow drift on the backdrop glows.
   Both are gated behind html.js, set by an inline script in <head> before
   first paint (see tools/build.mjs). If that script never runs — JS
   disabled, blocked, or fails — [data-reveal] elements simply have no
   starting "hidden" state at all, so the page renders fully visible
   rather than stuck at opacity 0. Motion is skipped under
   prefers-reduced-motion, matching html's own scroll-behavior rule above. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { transition: none; opacity: 1; transform: none; }
  html::before { animation: none !important; }
}

@keyframes drift {
  0%, 100% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  50% { background-position: 3% -2%, -2% 3%, 0 0, 0 0, 0 0, 0 0; }
}
html::before { animation: drift 50s ease-in-out infinite; }

.reading-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--sky); z-index: 60; transition: width .1s linear; }
@media (prefers-reduced-motion: reduce) { .reading-bar { transition: none; } }
