/* Stacks Academy. Since 2026-10-25 the interface follows Khan Academy's (Jakob: "update the site to look more like
   khan academy, and copy the interface of the way that looks"): a navy bar, white learning pages, a sidebar of
   units, lesson rows with drawn icons, a square per lesson, "Up next" pinned at the foot of a lesson. The colours,
   fonts and name are the Academy's own: violet is this product's colour (Stacks AI is red, Fintavo green), Sora
   for headings, Karla for text. Nothing of Khan Academy's own (logo, name, illustrations, colours) is used.
   No style is written inline anywhere: the pages' policy only allows this file. */
:root {
  --navy: #0d1830; --navy-2: #13234a;
  --ink: #0d1424; --ink-soft: #4e586f; --line: #dce1eb; --line-strong: #b8c2d4;
  --bg: #ffffff; --surface: #ffffff; --wash: #f5f6fa; --wash-2: #eceff5;
  --on-navy: #f2f5fb; --on-navy-soft: #b4c0da;
  /* violet: white on --accent is 6.7:1, --accent as text on white is 6.2:1, --accent-hi on navy is 9.6:1 */
  --accent: #5b3fd6; --accent-dark: #4a31b8; --accent-hi: #c4b5fd; --accent-tint: #efebff; --accent-line: #cfc4fb;
  --note: #8a4b00; --note-bg: #fff7e6; --note-line: #f3d19c;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --text: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px; --radius-sm: 8px; --radius-xs: 5px; --gutter: 24px;
  --shadow: 0 1px 2px rgba(13, 20, 36, .05), 0 4px 14px rgba(13, 20, 36, .05);
  --bar: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--line-strong) transparent; scroll-padding-top: 16px; }
/* the course page sits on a cool grey ground, so its panels read as white surfaces; a lesson stays white to read */
body:has(.course) { background: var(--wash); }
body { font: 1rem/1.6 var(--text); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; accent-color: var(--accent); }
::selection { background: var(--accent-tint); color: var(--ink); }
input, textarea { caret-color: var(--accent); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.01em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.45rem); font-weight: 700; }
h2 { font-size: clamp(1.2rem, 1.08rem + .5vw, 1.45rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 600; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }
p + p { margin-top: .8em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
.top :focus-visible { outline-color: var(--accent-hi); }
.soft { color: var(--ink-soft); font-size: .94rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 40; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }

.wrap { max-width: 1060px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

/* ---- the bar across the top: the name on the left, Account alone on the right (2026-10-26) ---- */
.top { position: relative; z-index: 20; min-height: var(--bar); background: var(--navy); color: var(--on-navy); padding: 10px var(--gutter);
       display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; color: var(--on-navy); text-decoration: none; font: 700 1.08rem var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.by { color: var(--on-navy-soft); font: 500 .8rem var(--text); padding-left: 10px; border-left: 1px solid rgba(242, 245, 251, .2); }
.top > :last-child { justify-self: end; }
.account { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.account a, .account button { color: var(--on-navy); font: 700 .95rem var(--text); }
.account button, .plain { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.account a:hover, .account button:hover { color: #fff; }
.account .account__button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: var(--radius-xs); background: var(--accent); color: #fff; text-decoration: none; }
.account .account__button:hover { background: var(--accent-dark); color: #fff; }
/* signed in: Account opens a menu, with no script (a details element) */
.account--menu { position: relative; display: block; }
.account--menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--on-navy); font: 700 .95rem var(--text); }
.account--menu > summary::-webkit-details-marker { display: none; }
.account--menu > summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform .15s ease-out, margin .15s ease-out; }
.account--menu[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.account--menu > summary:hover { color: #fff; }
.account__menu { position: absolute; right: -8px; top: calc(100% + 8px); z-index: 30; min-width: 240px; display: grid; padding: 8px;
                 background: var(--navy); border: 1px solid rgba(242, 245, 251, .16); border-radius: var(--radius-sm); box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .55); }
.account__menu a, .account__menu button { display: block; width: 100%; padding: 10px 12px; border-radius: var(--radius-xs); text-align: left; text-decoration: none; font: 600 .95rem var(--text); color: var(--on-navy); white-space: nowrap; }
.account__menu a:hover, .account__menu button:hover { background: rgba(242, 245, 251, .1); color: #fff; }
.account__menu form { margin: 0; }
.plain { color: var(--accent); font: inherit; }
.plain:hover { color: var(--accent-dark); }

/* ---- the header that opens the other pages (team, desk, agents, certificate, a lesson for teams) ---- */
.band { background: var(--surface); color: var(--ink); padding: 44px 0 36px; border-bottom: 1px solid var(--line); }
.band h1 { max-width: 24ch; }
.band .lede { margin-top: 14px; color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }
.band__after { margin-top: 10px; color: var(--ink-soft); font-size: .95rem; }
.crumb { margin-bottom: 14px; font-size: .92rem; font-weight: 700; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb a::before { content: "\2190\00a0"; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .01em; padding: 1px 9px; border-radius: var(--radius-xs);
       color: var(--accent-dark); background: var(--accent-tint); margin-right: 6px; vertical-align: 1px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 24px; padding: 10px 22px; border-radius: var(--radius-xs);
          background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button:hover { background: var(--accent-dark); color: #fff; }
.button:active { transform: scale(.98); }
button.button { border: 0; font: 700 1rem var(--text); cursor: pointer; }
.button--quiet { margin-top: 14px; background: var(--surface); color: var(--accent-dark); box-shadow: inset 0 0 0 1.5px var(--accent); }
.button--quiet:hover { background: var(--accent-tint); color: var(--accent-dark); }
.button--small { min-height: 36px; margin-top: 0; padding: 6px 14px; font-size: .9rem; }

.block { padding-top: 48px; }
.block > h2 + .soft { margin-top: 8px; }
.block > h2 + p:not(.soft) { margin-top: 10px; }
.block > h3 { margin: 30px 0 8px; }
.block.last { padding-bottom: 12px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; }

/* ---- the sidebar: the course, then its units (the course page) or one unit's lessons (a lesson) ---- */
.side__course { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none;
                background: var(--accent-tint); border-radius: var(--radius-sm); }
.side__course:hover { color: var(--ink); background: #e6e0ff; }
.side__course img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.side__name { display: block; font: 700 1rem/1.25 var(--display); }
.side__sub { display: block; color: var(--ink-soft); font-size: .85rem; }
.side__units { list-style: none; padding: 0; margin-top: 8px; }
.side__units li + li { border-top: 1px solid var(--line); }
.side__units a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 10px; padding: 12px 16px; border-radius: var(--radius-xs); color: var(--ink); text-decoration: none; }
.side__units a:hover { background: var(--wash); color: var(--ink); }
.side__title { grid-column: 1; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.side__count { grid-column: 2; grid-row: 1; align-self: center; color: var(--ink-soft); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ---- the course page ---- */
.course { max-width: 1280px; margin-inline: auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.course .side { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 24px 16px 32px; border-right: 1px solid var(--line); align-self: stretch; }
.course__main { padding: 32px 40px 0; display: grid; gap: 20px; min-width: 0; }
.course__head { padding-bottom: 4px; }
.course__head .lede { margin-top: 12px; color: var(--ink-soft); font-size: 1.08rem; max-width: 62ch; }
.course__facts { margin-top: 10px; font-weight: 700; color: var(--ink); font-size: .95rem; }

.progress { padding-bottom: 16px; }
.progress__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.legend { list-style: none; padding: 0; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: var(--ink-soft); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.grid__row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.grid__unit { flex: none; width: 54px; font-weight: 700; font-size: .9rem; }
.squares { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sq { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-xs);
      border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); transition: transform .15s cubic-bezier(.2, .8, .2, 1), border-color .15s; }
a.sq:hover { border-color: var(--accent); transform: translateY(-1px); }
.sq--done { background: var(--accent); border-color: var(--accent); color: #fff; }
a.sq--done:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.sq--locked { background: var(--wash); border-style: dashed; }
.sq--next { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.sq__lock { width: 15px; height: 15px; }
.sq--key { width: 18px; height: 18px; border-radius: 4px; }
.sq--key .sq__lock { width: 12px; height: 12px; }

.next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; border-color: var(--accent-line); }
.next__text { flex: 1 1 320px; min-width: 0; }
.next h2 { font-size: 1.2rem; }
.next .soft { margin-top: 4px; }
.next .button { margin-top: 0; }

.assistant .soft { margin-top: 6px; }

.units { display: grid; gap: 20px; padding-top: 12px; }
.units > h2 { margin-bottom: -4px; }
.unit { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; scroll-margin-top: 16px; }
.unit__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--wash); }
.unit__head h3 { font-size: 1.08rem; }
.unit__count { color: var(--ink-soft); font-size: .88rem; font-variant-numeric: tabular-nums; }
.unit__body { display: grid; gap: 18px 36px; padding: 18px 22px 22px; }
.unit__body--two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.unit__body h4 { color: var(--ink-soft); font-family: var(--text); font-weight: 700; font-size: .88rem; margin-bottom: 6px; }

/* the lesson rows in a unit: a drawn icon, the number, the title, then the skill, the length and the rest */
.unit .cards { list-style: none; padding: 0; display: grid; gap: 2px; }
.unit .card { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; row-gap: 1px; padding: 10px 10px; margin-inline: -10px;
              border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.unit .card:hover { background: var(--wash); color: var(--ink); }
.unit .card:hover .card__title { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.card__icon { grid-column: 1; grid-row: 1 / span 2; width: 22px; height: 22px; margin-top: 1px; color: var(--ink-soft); }
.card.is-done .card__icon { color: var(--accent); }
.unit .card__title { grid-column: 2; font: 600 1rem/1.35 var(--text); }
.unit .card__meta { grid-column: 2; margin-top: 3px; padding: 0; color: var(--ink-soft); font-size: .85rem; }
.unit .card__meta .tag { display: inline-block; margin: 0 6px 0 0; }
.unit .card__meta strong { color: var(--accent-dark); }

/* a lesson's questions, as a practice card beside the rows */
.drills { list-style: none; padding: 0; display: grid; gap: 10px; }
.drill { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--wash); }
.drill__icon { width: 22px; height: 22px; color: var(--ink-soft); }
.drill__text { min-width: 0; display: grid; }
.drill__title { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.drill .soft { font-size: .85rem; }
.drill--locked .drill__title { color: var(--ink-soft); }
.drill__done { color: var(--accent-dark); font-weight: 700; }
.drill .button--quiet { background: var(--surface); }

.agents-offer p { margin-top: 8px; }
/* what a company gets for its seats (course page, for anyone without a seat) */
.offer { border-color: var(--accent-line); }
.offer__list { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.offer__price { margin-top: 14px; }
.offer__go { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.offer__go .button { margin-top: 0; }
/* the invite a manager sends their staff */
#invite-text { min-height: 15em; font-size: .95rem; }
.code.code--link { white-space: normal; overflow-wrap: anywhere; }

/* the generic lists of cards on other pages (the agent desk, a team's lessons) */
.cards { list-style: none; padding: 0; margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
        background: var(--surface); color: var(--ink); text-decoration: none; }
.card:hover { border-color: var(--accent); color: var(--ink); }
.card__n { font-size: .82rem; font-weight: 700; color: var(--accent); }
.card__title { font: 700 1.08rem/1.3 var(--display); letter-spacing: -.005em; }
.card__meta { margin-top: auto; padding-top: 4px; color: var(--ink-soft); font-size: .9rem; }
.unit .cards { margin-top: 0; grid-template-columns: none; }
.unit .card { height: auto; border: 0; background: none; }

/* ---- choosing an assistant ---- */
.picker { list-style: none; padding: 0; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.picker a { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border-radius: var(--radius-xs); border: 1.5px solid var(--line-strong);
            background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.picker a:hover { border-color: var(--accent); color: var(--accent-dark); }
.picker a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
/* a tick drawn in CSS: the policy refuses image data written into the page */
.picker a[aria-current="true"]::before { content: ""; width: 6px; height: 11px; margin: -4px 10px 0 2px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tour { margin-top: 14px; font-weight: 700; }

/* ---- one lesson: the unit's lessons on the left, the lesson in the middle, the way on pinned at the foot ---- */
.lesson { max-width: 1280px; margin-inline: auto; padding: 24px var(--gutter) 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 36px; align-items: start; }
.side--lesson { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.side__unit { margin: 14px 8px 6px; font: 700 .95rem/1.3 var(--display); }
.side__items { list-style: none; padding: 0; }
.side__items > li { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: var(--radius-xs); color: var(--ink); text-decoration: none; line-height: 1.35; }
.item:hover { background: var(--wash); color: var(--ink); }
.item__icon { width: 22px; height: 22px; flex: none; color: var(--ink-soft); }
.item__title { flex: 1; min-width: 0; }
.item__done { width: 18px; height: 18px; flex: none; color: var(--accent); }
.is-current > .item { background: var(--accent-tint); box-shadow: inset 4px 0 0 var(--accent); color: var(--accent-dark); font-weight: 700; }
.is-current > .item .item__icon { color: var(--accent); }
.side__parts { list-style: none; padding: 4px 0 10px 46px; display: grid; gap: 2px; }
.side__parts a { display: block; padding: 4px 8px; border-radius: var(--radius-xs); color: var(--ink-soft); font-size: .9rem; text-decoration: none; }
.side__parts a:hover { background: var(--wash); color: var(--accent-dark); }
/* The parts of a lesson in its three phases (learn, try, check), each phase a small sentence-case label. */
.side__phase { display: grid; gap: 2px; }
.side__phase + .side__phase { margin-top: 6px; }
.side__phase-name { padding: 2px 8px; font-size: .8rem; font-weight: 700; color: var(--ink); }
.side__phase ul { list-style: none; padding: 0; display: grid; gap: 2px; }

.lesson__main { min-width: 0; max-width: 780px; width: 100%; justify-self: center; }
.lesson__head { text-align: center; padding: 8px 0 26px; border-bottom: 1px solid var(--line); }
.lesson__head h1 { max-width: 26ch; margin-inline: auto; }
.lesson__head .lede { margin-top: 12px; color: var(--ink-soft); }
.lesson__head .crumb { margin-bottom: 10px; }
/* Learn, Try, Check under a lesson's title: three links in order, each with its numbered disc. */
.phases ol { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.phases a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 14px 4px 6px; border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-xs); color: var(--ink); font-weight: 700; font-size: .92rem; text-decoration: none; background: var(--surface); }
.phases a:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-tint); }
.phases__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-dark); font-size: .82rem; }

.lesson__body { padding-bottom: 4px; }
.part { padding-top: 40px; scroll-margin-top: 16px; }
.part > h2 { margin-bottom: 12px; }
.part > h3 { margin: 22px 0 8px; }
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.example__box { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 16px 18px; }
.example__box--after { border-color: var(--accent); background: var(--accent-tint); }
.example__box h3 { font-size: .85rem; color: var(--ink-soft); margin-bottom: 8px; }
.example__box--after h3 { color: var(--accent-dark); }
.prompt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; }

.steps { margin-top: 40px; padding: 26px; border-radius: var(--radius); background: var(--wash); border: 1px solid var(--line); scroll-margin-top: 16px; }
.steps > h2 { color: var(--accent-dark); }
.where { margin-top: 4px; }
.how { margin-top: 14px; padding-left: 0; list-style: none; counter-reset: step; }
.how li { counter-increment: step; position: relative; padding: 4px 0 12px 44px; }
.how li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%;
                  background: var(--accent); color: #fff; font: 700 .9rem/30px var(--display); text-align: center; }
.how--welcome li { padding-bottom: 22px; }
.how--welcome h2 { font-size: 1.2rem; margin-bottom: 6px; }
.how--welcome p + p { margin-top: 8px; }
.steps h3 { margin: 12px 0 6px; }
.notes { padding-left: 1.2em; }
.notes li + li { margin-top: 4px; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--note-bg); border: 1px solid var(--note-line); color: var(--note); }
.checked { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sources { margin-top: 6px; padding-left: 1.2em; font-size: .95rem; overflow-wrap: anywhere; }
.switch { margin-top: 22px; }
.switch + nav .picker { margin-top: 8px; }
.steps .picker a { min-height: 40px; padding: 6px 14px; font-size: .95rem; }

.video { margin: 32px 0 0; scroll-margin-top: 16px; }
.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--navy); }
.video figcaption { margin-top: 10px; color: var(--ink-soft); font-size: .94rem; }
.gate { margin-top: 40px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.gate > h2 { margin-bottom: 10px; }
.gate > h3 { margin: 26px 0 6px; }
.gate .button { margin-top: 6px; }

.checklist { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.checklist input { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.checklist label:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }

/* the way on, pinned to the foot of the window while the lesson is read */
.pager { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 48px 0 0; padding: 12px 0 14px;
         background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); box-shadow: 0 -10px 18px -14px rgba(13, 20, 36, .18); }
@supports (backdrop-filter: blur(8px)) { .pager { background: rgba(255, 255, 255, .84); backdrop-filter: blur(10px) saturate(1.2); } }
.pager__link { display: flex; flex-direction: column; min-width: 0; max-width: 48%; padding: 6px 4px; color: var(--ink); font-weight: 700; text-decoration: none; line-height: 1.3; }
.pager__link:hover { color: var(--accent-dark); }
.pager__label { font-weight: 500; font-size: .82rem; color: var(--ink-soft); }
.pager__link--next { flex-direction: row; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-xs); background: var(--accent); color: #fff; text-align: left; }
.pager__link--next:hover { background: var(--accent-dark); color: #fff; }
.pager__link--next .pager__label { color: #fff; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.pager__link--next .pager__label::after { content: ":"; }
.pager__title { min-width: 0; }

.foot { margin-top: 72px; background: var(--wash); border-top: 1px solid var(--line); padding: 28px var(--gutter); display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--ink-soft); font-size: .88rem; }
.foot__note { flex: 1 1 260px; text-align: center; }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--accent-dark); }

/* ---- teams: forms, and the manager's table ---- */
.form { margin-top: 18px; max-width: 420px; display: grid; gap: 6px; }
.form label { font-weight: 700; margin-top: 10px; }
.form input, .form select { font: inherit; color: var(--ink); min-height: 46px; padding: 9px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); width: 100%; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form .check input { width: 22px; min-height: 22px; height: 22px; padding: 0; flex: none; }
.form .button { justify-self: start; margin-top: 18px; }
.form .notice { margin-top: 12px; }
.form__after { margin-top: 22px; }
.done { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-tint); border: 1px solid var(--accent); font-weight: 700; }
/* ---- the agent desk ---- */
.form textarea, .draft { font: inherit; color: var(--ink); padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--surface); width: 100%; resize: vertical; line-height: 1.5; }
.form--wide { max-width: none; }
.form .soft { margin-top: 8px; }
.draft { margin-top: 14px; }
details > summary { cursor: pointer; font-weight: 700; }
details > .prompt { margin-top: 10px; white-space: pre-wrap; }
/* ---- the page offering agents built to order ---- */
.steps-list { margin-top: 14px; padding-left: 1.4em; display: grid; gap: 12px; }
.plans { list-style: none; padding: 0; margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.plan__price { font: 700 2rem/1.1 var(--display); color: var(--accent-dark); }
.plan__from, .plan__unit { font: 400 .95rem/1.3 var(--text); color: var(--ink-soft); }
.plan ul { margin-top: auto; padding: 12px 0 0 1.1em; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; display: grid; gap: 4px; }
/* the agents: a card per group, each agent a row with its price and its own link to ask for it */
.catalog__group > h3 { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.plan .catalog { list-style: none; margin: 4px 0 0; padding: 0; border-top: 0; display: grid; gap: 0; color: var(--ink); font-size: 1rem; }
.catalog li { display: grid; gap: 2px; padding: 12px 0; }
.catalog li + li { border-top: 1px solid var(--line); }
.catalog__name { font-weight: 700; line-height: 1.35; }
.catalog__price { font: 700 1rem/1.3 var(--display); color: var(--accent-dark); font-variant-numeric: tabular-nums; }
/* ---- a lesson's questions, and ideas by kind of work ---- */
.quiz { margin-top: 18px; display: grid; gap: 16px; }
.quiz fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 16px 16px 14px; display: grid; gap: 6px; min-width: 0; }
/* floated, so a question that runs to two lines sits inside its box instead of across the top edge */
.quiz legend { float: left; width: 100%; font-weight: 700; padding: 0; }
.quiz label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-xs); border: 1.5px solid transparent; cursor: pointer; }
.quiz label:hover { background: var(--wash); }
.quiz label:has(input:checked) { background: var(--accent-tint); border-color: var(--accent-line); }
.quiz input { flex: none; width: 20px; height: 20px; margin-top: 3px; }
.quiz__mark { margin-top: 4px; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--note-bg); border: 1px solid var(--note-line); color: var(--note); }
.quiz__mark--right { background: var(--accent-tint); border-color: var(--accent); color: var(--ink); }
.quiz .button { justify-self: start; margin-top: 6px; }
/* celebrations (CELEBRATIONS; public/celebrate.js): the Sound effects button, the canvas the confetti is drawn on, and
   the line that was celebrated. Under reduced motion nothing moves: the line keeps a still ring instead. */
.sounds { margin-top: 12px; }
.sounds__toggle { gap: 8px; }
.sounds__toggle .icon { width: 18px; height: 18px; }
.sounds__toggle[aria-pressed="true"] .sounds__off, .sounds__toggle[aria-pressed="false"] .sounds__on { display: none; }
.sounds__toggle[aria-pressed="false"] { color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.sounds__state { min-width: 2.6em; padding: 0 8px; border-radius: 999px; background: var(--accent-tint); font-size: .8rem; text-align: center; }
.sounds__toggle[aria-pressed="false"] .sounds__state { background: var(--wash-2); }
.cheer { position: fixed; inset: 0; z-index: 50; width: 100%; height: 100%; pointer-events: none; }
.is-cheered { animation: ac-cheer .6s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes ac-cheer { 0% { transform: scale(.97); box-shadow: 0 0 0 0 rgba(91, 63, 214, .45); } 70% { box-shadow: 0 0 0 10px rgba(91, 63, 214, 0); } 100% { transform: none; box-shadow: 0 0 0 0 rgba(91, 63, 214, 0); } }
@media (prefers-reduced-motion: reduce) { .is-cheered { animation: none; box-shadow: 0 0 0 3px var(--accent-line); } }
.jobs { margin-top: 10px; display: grid; gap: 10px; }
.jobs > div { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.jobs dt { font-weight: 700; }
.jobs dd { margin: 2px 0 0; color: var(--ink-soft); }
/* Find a lesson by task, on the course page: what you need to do, and the lesson links beside it. */
.tasks .tasks__list { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0 28px; }
.tasks__list > div { padding: 10px 0; border-top: 1px solid var(--line); }
.tasks__list dt { font-weight: 700; }
.tasks__list dd { margin: 2px 0 0; font-size: .95rem; }
.ticks { margin-top: 14px; padding-left: 1.6em; display: grid; gap: 8px; }
.ticks .soft { display: block; }
.scroll { position: relative; margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .98rem; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: .85rem; color: var(--ink-soft); white-space: nowrap; background: var(--wash); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { font-weight: 700; }
/* The manager's lesson-by-lesson grid: a square per person and lesson, the course page's squares at a smaller size. */
.table--grid th, .table--grid td { padding: 8px 6px; text-align: center; vertical-align: middle; }
.table--grid th[scope="row"] { text-align: left; padding-left: 16px; white-space: nowrap; }
.table--grid abbr { text-decoration: none; }
.table--grid tfoot td, .table--grid tfoot th { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 700; }
.sq--cell { width: 20px; height: 20px; vertical-align: middle; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; white-space: nowrap; }

/* ---- narrower screens: on a lesson the unit's panel follows the lesson; the course page needs no sidebar ---- */
@media (max-width: 1080px) {
  .course { grid-template-columns: 1fr; }
  .course .side { display: none; }
  .course__main { padding: 28px var(--gutter) 0; }
}
@media (max-width: 960px) {
  .lesson { grid-template-columns: 1fr; gap: 28px; }
  .side--lesson { position: static; max-height: none; order: 2; }
  .lesson__main { justify-self: stretch; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .unit__body--two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  /* the name already leads back to the course, so a phone's bar holds just the name and the account */
  .top { grid-template-columns: minmax(0, 1fr) auto; padding-block: 8px; }
  .brand { justify-self: start; font-size: 1rem; }
  .by { display: none; }
  .account { gap: 14px; }
  .account a, .account button { font-size: .9rem; white-space: nowrap; }
  .account .account__button { min-height: 38px; padding: 0 14px; }
  /* the way on: the next lesson in full, the previous one left to the unit list below */
  .pager { padding: 10px 0 12px; }
  .pager__link:not(.pager__link--next) { display: none; }
  .pager__link--next { max-width: none; width: 100%; padding: 12px 16px; }
  /* on a phone, Up next comes straight after the course title */
  .course__head { order: -2; }
  .next { order: -1; }
  .foot__note { text-align: left; flex-basis: 100%; }
  .band { padding: 32px 0 28px; }
  .example { grid-template-columns: 1fr; }
  .steps { padding: 20px; }
  .panel { padding: 18px; }
  .unit__head, .unit__body { padding-inline: 16px; }
  .drill { grid-template-columns: 22px minmax(0, 1fr); }
  .drill .button { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media (forced-colors: active) { .sq--done { background: CanvasText; } .is-current > .item { outline: 2px solid CanvasText; } }

/* Moving between pages: a cross-fade with the top bar held still (cross-document view transitions; a browser
   without them just loads the page). */
@view-transition { navigation: auto; }
.top { view-transition-name: academy-top; }
::view-transition-old(root) { animation: ac-page-out .14s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: ac-page-in .32s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes ac-page-out { to { opacity: 0; } }
@keyframes ac-page-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes ac-page-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-new(root) { animation-name: ac-page-fade; } }
