/*
 * The Academy page kit: every company's Academy home, course and lesson pages (src/academy/pages/render.ts).
 * Brand-neutral: colours, fonts, corner shape and the logo's height come from brand.css (src/academy/pages/brand.ts),
 * which sets --page, --surface, --ink, --muted, --accent, --button, --highlight, --deep and friends on :root.
 * Light only, like our marketing sites. Type stays put from laptop width to 1920 px and grows a little beyond.
 */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (min-width: 1921px) { html { font-size: clamp(100%, 100% + (100vw - 1920px) * 0.0195, 112.5%); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: var(--body-weight);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.ac-i { width: 18px; height: 18px; flex: none; }
.ac-mono { font-family: var(--font-mono); font-weight: 450; letter-spacing: 0; font-feature-settings: "tnum"; }
.ac-hl { color: var(--highlight); font-style: normal; }

.ac-wrap { width: min(100% - 40px, 1180px); margin-inline: auto; }
@media (min-width: 768px) { .ac-wrap { width: min(100% - 80px, 1180px); } }
@media (min-width: 1921px) { .ac-wrap { width: min(100% - 80px, 1320px); } }
.ac-narrow { max-width: 860px; }

.ac-skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--surface); text-decoration: none; }
.ac-skip:focus { top: 12px; }

/* ---------- page textures: the brand's ground ---------- */

.ac-texture-dots .ac-hero,
.ac-texture-dots .ac-page-head {
  background:
    radial-gradient(circle, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.3px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--page), var(--page));
  -webkit-mask-image: none;
}
.ac-texture-dots .ac-hero { position: relative; }
.ac-texture-dots .ac-hero::after,
.ac-texture-dots .ac-page-head::after {
  content: ""; position: absolute; inset: auto 0 0; height: 120px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--page));
}
.ac-texture-dots .ac-page-head { position: relative; }
.ac-texture-dots .ac-page-head > *,
.ac-texture-dots .ac-hero > * { position: relative; z-index: 1; }

.ac-texture-glow .ac-hero,
.ac-texture-glow .ac-page-head {
  background:
    radial-gradient(60% 70% at 85% 10%, color-mix(in srgb, var(--highlight) 13%, transparent), transparent 70%),
    radial-gradient(45% 60% at 0% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
}

/* ---------- preview bar, header, footer ---------- */

.ac-preview {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 20px; background: var(--deep); color: var(--deep-ink); font-size: 0.82rem; line-height: 1.4; text-align: center;
}
.ac-preview strong { font-weight: 600; }
.ac-preview-i { width: 16px; height: 16px; color: var(--deep-accent); }

.ac-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--page) 84%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; }
.ac-top-in { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.ac-logo { display: flex; align-items: center; flex: none; }
.ac-logo-img { height: var(--logo-h); width: auto; }
.ac-logo, .ac-foot-logo { gap: 9px; text-decoration: none; color: var(--ink); }
.ac-foot-logo { display: inline-flex; align-items: center; }
/* A long name gives way before the header's button does. */
.ac-top .ac-logo { flex: 0 1 auto; min-width: 0; }
.ac-top .ac-wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-top-cta, .ac-top-nav { flex: none; }
.ac-wordmark { font-family: var(--font-wordmark, var(--font-display)); font-weight: var(--wordmark-weight, 700); font-size: calc(var(--logo-h) * 0.72); letter-spacing: -0.02em; line-height: 1; }
.ac-foot-logo .ac-wordmark { font-size: 1.05rem; }
.ac-top-sep { width: 1px; height: 22px; background: var(--line-strong); flex: none; }
.ac-top-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.ac-top-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
.ac-top-link { padding: 8px 12px; border-radius: 999px; font-size: 0.92rem; color: var(--muted); text-decoration: none; white-space: nowrap; transition: background-color 160ms, color 160ms; }
.ac-top-link:hover { background: var(--tint); color: var(--accent); }
.ac-top-cta { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: var(--button-radius); background: var(--button); color: var(--button-ink); font-size: 0.92rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform 180ms cubic-bezier(.16,1,.3,1), box-shadow 180ms; }
.ac-top-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px var(--button); }
@media (max-width: 599px) {
  .ac-top-in { gap: 10px; }
  .ac-top-link { display: none; }
  .ac-top-cta { height: 36px; padding: 0 12px; font-size: 0.84rem; }
}
@media (max-width: 419px) { .ac-top-sep, .ac-top-name { display: none; } }

.ac-foot { margin-top: 0; padding: 40px 0 48px; border-top: 1px solid var(--line); background: var(--surface); }
.ac-foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.ac-foot-logo-img { height: 22px; width: auto; }
.ac-foot-line { color: var(--muted); font-size: 0.9rem; }
.ac-foot-nav { display: flex; gap: 20px; margin-left: auto; font-size: 0.9rem; }
.ac-foot-nav a { color: var(--muted); text-decoration: none; }
.ac-foot-nav a:hover { color: var(--accent); }
@media (max-width: 699px) { .ac-foot-nav { margin-left: 0; } }

/* ---------- type ---------- */

.ac-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 18px; color: var(--accent);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
}
.ac-kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--highlight); box-shadow: 0 0 0 4px color-mix(in srgb, var(--highlight) 18%, transparent); }

.ac-h1 {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking);
  font-size: clamp(2.45rem, 1.55rem + 3.4vw, 3.9rem); line-height: 1.03; text-wrap: balance;
}
.ac-h1-page { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.35rem); }
.ac-h1-lesson { font-size: clamp(2rem, 1.45rem + 2.1vw, 3rem); }
.ac-h2 {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking);
  font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.75rem); line-height: 1.08; text-wrap: balance;
}
.ac-h3 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: calc(var(--display-tracking) * 0.6); font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem); line-height: 1.15; }
.ac-lead { margin-top: 20px; max-width: 34rem; color: var(--muted); font-size: clamp(1.03rem, 0.98rem + 0.2vw, 1.15rem); line-height: 1.6; }

/* ---------- buttons ---------- */

.ac-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 30px; }
.ac-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 6px 6px 22px;
  border: 1px solid transparent; border-radius: var(--button-radius);
  font-weight: 600; font-size: 0.98rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform 200ms cubic-bezier(.16,1,.3,1), box-shadow 200ms, background-color 160ms, border-color 160ms;
}
.ac-btn-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: calc(var(--button-radius) * 0.8); flex: none; transition: transform 200ms cubic-bezier(.16,1,.3,1); }
.ac-btn-arrow .ac-i { width: 17px; height: 17px; }
.ac-btn:hover .ac-btn-arrow { transform: translateX(2px); }
.ac-btn:active { transform: translateY(1px) scale(0.99); }
.ac-btn-primary { background: var(--button); color: var(--button-ink); box-shadow: 0 10px 24px -14px var(--button), inset 0 1px 0 rgb(255 255 255 / 0.16); }
.ac-btn-primary .ac-btn-arrow { background: var(--button-ink); color: var(--button); }
.ac-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -16px var(--button), inset 0 1px 0 rgb(255 255 255 / 0.16); }
.ac-btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.ac-btn-quiet .ac-btn-arrow { background: var(--tint); color: var(--accent); }
.ac-btn-quiet:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); color: var(--accent); }
.ac-btn-deep { background: var(--deep-ink); color: var(--deep); }
.ac-btn-deep .ac-btn-arrow { background: var(--deep); color: var(--deep-ink); }
.ac-btn-deep:hover { transform: translateY(-1px); }

/* ---------- frames and posters ---------- */

.ac-frame { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--tint); aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px var(--line), 0 24px 48px -30px color-mix(in srgb, var(--ink) 45%, transparent); }
.ac-poster { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(.16,1,.3,1); }
.ac-poster-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent); }
.ac-poster-mark { width: 34px; height: 34px; opacity: 0.5; }
a:hover > .ac-frame .ac-poster,
a:hover > .ac-frame + * .ac-poster { transform: scale(1.025); }
/* In the corner: posters carry their own title in the middle, which a centred button would cover. */
.ac-play {
  position: absolute; left: clamp(10px, 3%, 18px); bottom: clamp(10px, 3%, 18px); display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--accent);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.45), 0 0 0 1px rgb(255 255 255 / 0.5) inset; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 220ms cubic-bezier(.16,1,.3,1), background-color 160ms;
}
.ac-play .ac-i { width: 22px; height: 22px; margin-left: 3px; }
.ac-play-lg { width: 68px; height: 68px; }
.ac-play-lg .ac-i { width: 28px; height: 28px; }
@media (max-width: 599px) { .ac-play-lg { width: 54px; height: 54px; } .ac-play-lg .ac-i { width: 22px; height: 22px; } }
a:hover .ac-play, button:hover .ac-play { transform: scale(1.07); background: var(--surface); }

/* ---------- home: hero ---------- */

.ac-hero { padding: clamp(36px, 6vw, 84px) 0 clamp(48px, 7vw, 96px); }
.ac-hero-in { display: grid; gap: 44px; align-items: center; }
@media (min-width: 1000px) { .ac-hero-in { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 56px; } }
.ac-hero-copy { min-width: 0; }
.ac-hero-side { min-width: 0; }

.ac-facts { display: flex; flex-wrap: wrap; gap: 0; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.ac-facts > div { min-width: 0; padding: 0 26px; border-left: 1px solid var(--line); }
.ac-facts > div:first-child { padding-left: 0; border-left: 0; }
.ac-facts dt { color: var(--subtle); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.ac-facts dd { margin-top: 4px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.4rem; letter-spacing: -0.01em; }
@media (max-width: 479px) {
  .ac-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .ac-facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* The brand's own links under the facts: quiet text with an arrow, 44 px tall to tap. */
.ac-home-links { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 18px; }
.ac-home-links a { min-height: 44px; padding: 10px 0; color: var(--muted); font-weight: 500; line-height: 1.5; text-decoration: none; transition: color 160ms; }
.ac-home-links a:hover { color: var(--accent); }
/* Inline after the label, not a flex column: a label that wraps keeps its arrow beside its last word. */
.ac-home-arrow { white-space: nowrap; }
.ac-home-links .ac-i { display: inline-block; width: 16px; height: 16px; margin-inline-start: 4px; vertical-align: -0.17em; transition: transform 200ms cubic-bezier(.16,1,.3,1); }
.ac-home-links a:hover .ac-i { transform: translateX(2px); }

.ac-steps {
  padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px color-mix(in srgb, var(--ink) 40%, transparent);
}
.ac-steps-title { margin-bottom: 16px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.ac-steps ol { display: grid; gap: 4px; }
.ac-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: var(--radius-sm); transition: background-color 160ms; }
.ac-steps li:hover { background: var(--tint); }
.ac-steps i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--tint); color: var(--accent); flex: none; transition: transform 220ms cubic-bezier(.16,1,.3,1); }
.ac-steps li:hover i { transform: scale(1.08) rotate(-4deg); }
.ac-steps span { display: grid; gap: 2px; color: var(--muted); font-size: 0.93rem; line-height: 1.45; min-width: 0; }
.ac-steps strong { color: var(--ink); font-weight: 600; font-size: 0.98rem; }

.ac-hero-art img { width: 100%; height: auto; }
.ac-hero-lesson { display: grid; gap: 16px; text-decoration: none; }
.ac-hero-lesson .ac-frame { border-radius: var(--radius-lg); }
.ac-hero-lesson-meta { display: grid; gap: 4px; }
.ac-hero-lesson-meta .ac-mono { color: var(--accent); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ac-hero-lesson-meta strong { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }

/* ---------- sections ---------- */

.ac-section { padding: clamp(56px, 7vw, 104px) 0; }
.ac-section-head { margin-bottom: clamp(32px, 4vw, 52px); }
.ac-section-lead { margin-top: 16px; max-width: 30rem; color: var(--muted); font-size: 1.03rem; }
@media (min-width: 900px) {
  .ac-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: end; }
  .ac-split .ac-section-lead { margin-top: 0; justify-self: end; }
}
.ac-courses { border-top: 1px solid var(--line); background: var(--surface); }
.ac-texture-dots .ac-courses { background: var(--page); }

/* the open courses: a film beside the lesson list, alternating sides */
.ac-course-list { display: grid; gap: clamp(28px, 4vw, 44px); }
.ac-course {
  display: grid; gap: 28px; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -44px color-mix(in srgb, var(--ink) 50%, transparent);
}
.ac-texture-none .ac-courses .ac-course,
.ac-texture-glow .ac-courses .ac-course { background: var(--page); }
@media (min-width: 960px) {
  .ac-course { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: start; }
  .ac-course-flip .ac-course-film { order: 2; }
}
.ac-course-film { display: grid; gap: 12px; text-decoration: none; min-width: 0; }
.ac-course-film-cap { color: var(--muted); font-size: 0.9rem; }
.ac-course-film-cap .ac-mono { color: var(--accent); }
.ac-course-body { min-width: 0; padding: 4px 4px 4px 0; }
.ac-course-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--subtle); font-size: 0.84rem; }
.ac-course-meta > .ac-mono { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ac-course-title { margin-top: 12px; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: calc(var(--display-tracking) * 0.7); font-size: clamp(1.55rem, 1.25rem + 1vw, 2rem); line-height: 1.12; }
.ac-course-title a { text-decoration: none; }
.ac-course-title a:hover { color: var(--accent); }
.ac-course-goal { margin-top: 10px; color: var(--muted); }
.ac-course-body .ac-rows { margin: 22px 0 26px; }

.ac-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.ac-status .ac-i { width: 15px; height: 15px; }
.ac-status-open { color: var(--good); }
.ac-status-soon { color: var(--subtle); }
.ac-live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--good-soft); }

/* lesson rows (course cards and the lesson outline) */
.ac-rows { display: grid; gap: 2px; counter-reset: row; }
.ac-row > a,
.ac-row-soon { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; }
.ac-row > a { transition: background-color 160ms, color 160ms; }
.ac-row > a:hover { background: var(--tint); }
.ac-row > a:hover .ac-row-title { color: var(--accent); }
.ac-row-num { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--tint); color: var(--accent); font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; }
.ac-row-title { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 500; line-height: 1.35; transition: color 160ms; }
.ac-row-meta { flex: none; color: var(--subtle); font-size: 0.8rem; }
.ac-row-soon { color: var(--subtle); }
.ac-row-soon .ac-row-num { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--subtle); }
.ac-row.is-current > a { background: var(--tint-strong); }
.ac-row.is-current .ac-row-num { background: var(--button); color: var(--button-ink); }
.ac-row.is-current .ac-row-title { color: var(--accent); font-weight: 600; }

/* coming next: cards that fill their rows evenly */
.ac-soon-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: clamp(56px, 7vw, 88px) 0 24px; }
.ac-soon-head p { color: var(--muted); font-size: 0.95rem; }
.ac-soon-grid { display: grid; gap: 16px; }
.ac-soon {
  display: flex; flex-direction: column; min-width: 0; padding: 24px; border-radius: var(--radius);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  transition: transform 220ms cubic-bezier(.16,1,.3,1), box-shadow 220ms;
}
.ac-texture-none .ac-soon, .ac-texture-glow .ac-soon { background: var(--page); }
.ac-soon:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line-strong), 0 20px 40px -30px color-mix(in srgb, var(--ink) 50%, transparent); }
.ac-soon-title { margin-top: 12px; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: calc(var(--display-tracking) * 0.5); font-size: 1.22rem; line-height: 1.22; }
.ac-soon-goal { margin-top: 8px; color: var(--muted); font-size: 0.93rem; }
.ac-soon-list { display: grid; gap: 6px; margin-top: auto; padding-top: 18px; border-top: 0; font-size: 0.86rem; color: var(--muted); }
.ac-soon-list li { position: relative; padding-left: 16px; }
.ac-soon-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ac-soon-list .ac-soon-more { color: var(--subtle); }
.ac-soon-list .ac-soon-more::before { display: none; }
.ac-soon-goal + .ac-soon-list { margin-top: 18px; }
@media (min-width: 700px) {
  .ac-soon-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ac-soon { grid-column: span 3; }
}
@media (min-width: 1000px) {
  .ac-soon { grid-column: span 2; }
  /* the last row: two cards share it, one card takes it whole */
  .ac-soon-grid > .ac-soon:nth-child(3n + 1):nth-last-child(2),
  .ac-soon-grid > .ac-soon:nth-child(3n + 2):last-child { grid-column: span 3; }
  .ac-soon-grid > .ac-soon:nth-child(3n + 1):last-child { grid-column: 1 / -1; }
  /* four: two rows of two (beats the last-row rules above) */
  .ac-soon-grid.ac-count-4 > .ac-soon:nth-child(n):nth-child(n) { grid-column: span 3; }
}
@media (min-width: 700px) and (max-width: 999px) {
  .ac-soon-grid > .ac-soon:nth-child(odd):last-child { grid-column: 1 / -1; }
}

/* the cast */
.ac-cast { border-top: 1px solid var(--line); }
.ac-cast-grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .ac-cast-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.ac-person { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.ac-person img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--tint); }
.ac-person-name { margin-top: 16px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.ac-person-role { color: var(--accent); font-size: 0.86rem; font-weight: 500; }
.ac-person-line { margin-top: 8px; color: var(--muted); font-size: 0.93rem; }

/* how lessons work, when the hero's picture is something else */
.ac-how { border-top: 1px solid var(--line); }
.ac-how-in { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .ac-how-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }

/* ---------- inner page heads ---------- */

.ac-page-head { padding: 22px 0 clamp(40px, 5vw, 64px); }
.ac-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: clamp(24px, 3vw, 36px); font-size: 0.86rem; color: var(--subtle); }
.ac-crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ac-crumbs li + li::before { content: "/"; color: var(--line-strong); }
.ac-crumbs a { color: var(--muted); text-decoration: none; }
.ac-crumbs a:hover { color: var(--accent); }
.ac-crumbs [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }

.ac-course-head { display: grid; gap: 36px; align-items: center; }
@media (min-width: 1000px) { .ac-course-head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 56px; } }
.ac-start {
  display: grid; gap: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); text-decoration: none;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px color-mix(in srgb, var(--ink) 45%, transparent);
}
.ac-start .ac-frame { border-radius: 0; box-shadow: none; }
.ac-start-body { display: grid; gap: 6px; justify-items: start; padding: 22px 24px 24px; }
.ac-start-body .ac-mono { color: var(--accent); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ac-start-body strong { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.25; }
.ac-start-line { color: var(--muted); font-size: 0.93rem; }
.ac-start-body .ac-btn { margin-top: 12px; min-height: 46px; }
.ac-start-body .ac-btn-arrow { width: 34px; height: 34px; }

.ac-lessons { padding-top: clamp(24px, 3vw, 40px); }
.ac-lessons .ac-h3 { margin-bottom: 20px; }
.ac-lesson-list { display: grid; border-top: 1px solid var(--line); }
.ac-ll { border-bottom: 1px solid var(--line); }
.ac-ll > a,
.ac-ll > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 12px; text-decoration: none; }
.ac-ll > a { margin-inline: -12px; border-radius: var(--radius-sm); transition: background-color 160ms; }
.ac-ll > div { margin-inline: -12px; }
.ac-ll > a:hover { background: var(--tint); }
.ac-ll > a:hover strong { color: var(--accent); }
.ac-ll-num { color: var(--accent); font-size: 0.86rem; min-width: 2.4em; }
.ac-ll-text { display: grid; gap: 3px; min-width: 0; }
.ac-ll-text strong { font-weight: 600; font-size: 1.04rem; line-height: 1.35; transition: color 160ms; }
.ac-ll-text span { color: var(--muted); font-size: 0.92rem; }
.ac-ll-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--subtle); font-size: 0.86rem; }
.ac-ll-play { width: 30px; height: 30px; padding: 8px; border-radius: 50%; background: var(--tint); color: var(--accent); }
.ac-ll-soon .ac-ll-num, .ac-ll-soon strong { color: var(--subtle); }
@media (max-width: 599px) {
  .ac-ll > a, .ac-ll > div { grid-template-columns: auto minmax(0, 1fr); }
  .ac-ll-meta { grid-column: 2; }
}
.ac-course-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; color: var(--subtle); font-size: 0.92rem; }
.ac-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; text-decoration: none; }
.ac-back:hover { color: var(--accent); }

/* ---------- lesson ---------- */

.ac-lesson-head { padding-bottom: clamp(32px, 4vw, 52px); }
.ac-lesson-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: 28px; }
.ac-lesson-title > div { min-width: 0; max-width: 46rem; }
.ac-lesson-title .ac-kicker { margin-bottom: 12px; }
.ac-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-pills li { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 9px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.ac-pills .ac-i { width: 16px; height: 16px; color: var(--accent); }
.ac-pills .ac-mono { color: var(--ink); }

/* the video and the course outline share one frame */
.ac-stage {
  display: grid; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -50px color-mix(in srgb, var(--ink) 55%, transparent);
}
@media (min-width: 1000px) { .ac-stage { grid-template-columns: minmax(0, 1fr) 330px; } }
.ac-player { position: relative; aspect-ratio: 16 / 9; background: var(--deep); min-width: 0; }
.ac-player-start { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.ac-player-start .ac-poster { position: absolute; inset: 0; }
.ac-player-start:hover .ac-poster { transform: scale(1.015); }
.ac-player-len { position: absolute; right: 14px; bottom: 14px; padding: 4px 9px; border-radius: 8px; background: rgb(0 0 0 / 0.62); color: #fff; font-size: 0.8rem; }
.ac-player video,
.ac-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.ac-player-link { position: absolute; inset: auto 16px 16px; color: #fff; }
.ac-player.is-playing .ac-player-start { display: none; }

.ac-end {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: clamp(18px, 4vw, 48px); background: color-mix(in srgb, var(--deep) 93%, transparent); color: var(--deep-ink);
  animation: ac-fade 280ms cubic-bezier(.16,1,.3,1);
}
.ac-end[hidden] { display: none; }
.ac-end-done { display: inline-flex; align-items: center; gap: 8px; color: var(--deep-accent); font-weight: 600; font-size: 0.9rem; }
.ac-end-done .ac-i { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: color-mix(in srgb, var(--deep-accent) 20%, transparent); }
.ac-end-next { display: grid; gap: 4px; }
.ac-end-next .ac-mono { color: var(--deep-muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ac-end-next strong { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.2rem, 0.9rem + 1.4vw, 2rem); line-height: 1.15; }
.ac-end-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 6px; }
.ac-end-replay { display: inline-flex; align-items: center; gap: 7px; padding: 10px 4px; border: 0; background: none; color: var(--deep-muted); cursor: pointer; }
.ac-end-replay:hover { color: var(--deep-ink); }
@media (max-width: 599px) {
  .ac-end { gap: 8px; }
  .ac-end .ac-btn { min-height: 42px; padding-left: 16px; font-size: 0.9rem; }
  .ac-end .ac-btn-arrow { width: 32px; height: 32px; }
  .ac-end-done { font-size: 0.8rem; }
}
@keyframes ac-fade { from { opacity: 0; } to { opacity: 1; } }

.ac-outline { display: flex; flex-direction: column; min-width: 0; padding: 18px 14px 16px; border-top: 1px solid var(--line); }
@media (min-width: 1000px) { .ac-outline { border-top: 0; border-left: 1px solid var(--line); max-height: 100%; overflow: auto; } }
.ac-outline-head { display: grid; gap: 2px; padding: 0 10px 12px; }
.ac-outline-head .ac-mono { color: var(--subtle); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ac-outline-head a { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.3; text-decoration: none; }
.ac-outline-head a:hover { color: var(--accent); }
.ac-outline .ac-row-title { font-size: 0.9rem; }
.ac-outline-foot { margin-top: auto; padding: 12px 10px 0; color: var(--subtle); font-size: 0.82rem; }

/* the article and its contents */
.ac-read { display: grid; gap: 40px; padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
@media (min-width: 1100px) { .ac-read { grid-template-columns: minmax(0, 720px) 220px; justify-content: space-between; gap: 64px; } }
.ac-article { min-width: 0; max-width: 720px; }
.ac-standfirst { margin-bottom: 30px; font-size: clamp(1.12rem, 1.02rem + 0.4vw, 1.3rem); line-height: 1.55; color: var(--ink); font-weight: 500; text-wrap: pretty; }
.ac-prose { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); font-size: 1.06rem; line-height: 1.72; }
.ac-prose > * + * { margin-top: 1.05em; }
.ac-prose h2 { margin-top: 2.1em; color: var(--ink); font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: calc(var(--display-tracking) * 0.5); font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.7rem); line-height: 1.2; scroll-margin-top: 92px; }
.ac-prose h3 { margin-top: 1.6em; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; }
.ac-prose h2 + *, .ac-prose h3 + * { margin-top: 0.6em; }
.ac-prose strong { color: var(--ink); font-weight: 600; }
.ac-prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ac-prose ul, .ac-prose ol { display: grid; gap: 0.5em; padding-left: 0; }
.ac-prose ul li, .ac-prose ol li { position: relative; padding-left: 1.6em; }
.ac-prose ul li::before { content: ""; position: absolute; left: 0.3em; top: 0.68em; width: 7px; height: 7px; border-radius: 50%; background: var(--highlight); }
.ac-prose ol { counter-reset: item; }
.ac-prose ol li { counter-increment: item; }
.ac-prose ol li::before { content: counter(item); position: absolute; left: 0; top: 0.15em; display: grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%; background: var(--tint); color: var(--accent); font-family: var(--font-mono); font-size: 0.85em; }
.ac-prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--highlight); color: var(--ink); font-family: var(--font-display); font-size: 1.2rem; line-height: 1.45; }
.ac-prose code { padding: 1px 6px; border-radius: 6px; background: var(--tint); font-family: var(--font-mono); font-size: 0.88em; }

.ac-block { margin-top: clamp(40px, 5vw, 56px); }
.ac-block-title { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: calc(var(--display-tracking) * 0.5); font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem); line-height: 1.2; scroll-margin-top: 92px; }
.ac-terms { display: grid; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.ac-terms > div { display: grid; gap: 4px 28px; padding: 15px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .ac-terms > div { grid-template-columns: 190px minmax(0, 1fr); } }
.ac-terms dt { font-weight: 600; }
.ac-terms dd { color: var(--muted); }

.ac-try { position: relative; padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-lg); background: var(--tint); overflow: hidden; scroll-margin-top: 92px; }
.ac-try::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--highlight) 22%, transparent), transparent 70%); pointer-events: none; }
.ac-try-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.ac-try-text { position: relative; margin-top: 12px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.12rem, 1rem + 0.5vw, 1.32rem); line-height: 1.5; color: var(--ink); text-wrap: pretty; }

.ac-check { scroll-margin-top: 92px; }
.ac-check-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
.ac-check-head p { color: var(--subtle); font-size: 0.9rem; }
.ac-questions { display: grid; gap: 28px; margin-top: 22px; }
.ac-q-text { display: flex; gap: 12px; font-weight: 600; font-size: 1.04rem; line-height: 1.45; }
.ac-q-text .ac-mono { display: grid; place-items: center; width: 26px; height: 26px; flex: none; margin-top: -1px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 0.76rem; }
.ac-q-options { display: grid; gap: 8px; margin-top: 14px; padding-left: 38px; }
@media (max-width: 479px) { .ac-q-options { padding-left: 0; } }
.ac-q-option {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); text-align: left; line-height: 1.45; cursor: pointer;
  transition: box-shadow 160ms, background-color 160ms, color 160ms;
}
.ac-q-option:hover:not([disabled]) { box-shadow: inset 0 0 0 1px var(--accent); background: var(--tint); }
.ac-q-mark { width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow 160ms, background-color 160ms; }
.ac-q-option[disabled] { cursor: default; color: var(--subtle); }
.ac-q-option.is-right { color: var(--ink); background: var(--good-soft); box-shadow: inset 0 0 0 1.5px var(--good); }
.ac-q-option.is-right .ac-q-mark { background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat; box-shadow: none; }
.ac-q-option.is-wrong { color: var(--ink); background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); }
.ac-q-option.is-wrong .ac-q-mark { background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7.5 7.5l9 9M16.5 7.5l-9 9'/%3E%3C/svg%3E") center / 11px no-repeat; box-shadow: none; }
.ac-q-why { margin-top: 12px; padding-left: 38px; color: var(--muted); font-size: 0.96rem; animation: ac-rise 260ms cubic-bezier(.16,1,.3,1); }
@media (max-width: 479px) { .ac-q-why { padding-left: 0; } }
.ac-q-why[hidden] { display: none; }
.ac-q-verdict { color: var(--ink); }
.ac-q.is-right .ac-q-verdict { color: var(--good); }
.ac-q.is-wrong .ac-q-verdict { color: var(--bad); }
.ac-check-score { margin-top: 24px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.ac-check-score[hidden] { display: none; }
@keyframes ac-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.ac-doit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.ac-doit > div { min-width: 0; flex: 1 1 280px; }
.ac-doit-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.ac-doit-text { margin-top: 6px; font-weight: 600; font-size: 1.08rem; }

.ac-more { display: grid; gap: 28px; }
@media (min-width: 700px) { .ac-more { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 40px; } }
.ac-more-title { margin-bottom: 10px; color: var(--subtle); font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.ac-more ul { display: grid; border-top: 1px solid var(--line); }
.ac-more li { border-bottom: 1px solid var(--line); }
.ac-more a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; font-weight: 500; text-decoration: none; transition: color 160ms; }
.ac-more a:hover { color: var(--accent); }
.ac-more-i { width: 16px; height: 16px; color: var(--subtle); transition: transform 200ms cubic-bezier(.16,1,.3,1), color 160ms; }
.ac-more a:hover .ac-more-i { color: var(--accent); transform: translateX(2px); }

.ac-note { margin-top: 40px; color: var(--subtle); font-size: 0.86rem; }

.ac-contents { display: none; }
@media (min-width: 1100px) {
  .ac-contents { display: block; position: sticky; top: 96px; align-self: start; padding-left: 18px; border-left: 1px solid var(--line); }
}
.ac-contents-title { margin-bottom: 10px; color: var(--subtle); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.ac-contents ol { display: grid; gap: 2px; }
.ac-contents a { display: block; padding: 6px 0; color: var(--muted); font-size: 0.9rem; line-height: 1.35; text-decoration: none; transition: color 160ms; }
.ac-contents a:hover, .ac-contents a.is-here { color: var(--accent); }
.ac-contents a.is-here { font-weight: 600; }

/* the next lesson: the page's one dark band */
.ac-next-band { padding: 0 0 clamp(56px, 7vw, 96px); }
.ac-next {
  display: grid; gap: 28px; align-items: center; overflow: hidden; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg);
  background: var(--deep); color: var(--deep-ink); text-decoration: none; position: relative;
}
.ac-texture-dots .ac-next { background: radial-gradient(circle, color-mix(in srgb, var(--deep-ink) 10%, transparent) 1px, transparent 1.3px) 0 0 / 22px 22px, var(--deep); }
@media (min-width: 860px) { .ac-next { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 48px; } }
.ac-next-copy { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.ac-next-copy .ac-mono { color: var(--deep-accent); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ac-next-copy strong { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.1; }
.ac-next-line { max-width: 32rem; color: var(--deep-muted); }
.ac-next-copy .ac-btn { margin-top: 14px; }
.ac-next-film { box-shadow: 0 0 0 1px var(--deep-line), 0 30px 60px -30px rgb(0 0 0 / 0.6); }
.ac-next:hover .ac-poster { transform: scale(1.03); }
.ac-next:hover .ac-btn-deep { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
