/* CraftsmanAcademy — the Skool classroom shape in the look of OCP's Field and Measure apps (Adrian chose it 2026-09-24:
   "that looks much better"). The brand book's type: Newsreader for titles, DM Sans for everything else, Big Shoulders
   only for short uppercase labels. Field's surfaces: a light cream page, white cards with a thin olive line, round
   pills; Forest Olive for text and the one selected thing, Brick as a single accent. Phone first; sizes in rem so the
   phone's own text-size setting carries through; nothing has a fixed height. */

@font-face { font-family: "Newsreader"; src: url("/static/fonts/Newsreader-var.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/static/fonts/DMSans-var.woff2") format("woff2");
  font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("/static/fonts/BigShoulders-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --olive: #292B1C;
  --cream: #F0E9C8;
  --brick: #A8412C;
  --tan: #B89968;

  --ground: #F8F5EA;              /* Field's light cream working surface */
  --surface: #FFFDF8;             /* cards */
  --raised: #F1EDDF;
  --chip: var(--cream);
  --text: var(--olive);
  --muted: #454A35;
  --soft: #6B6F5A;
  --line: rgba(41, 43, 28, .16);
  --line-strong: rgba(41, 43, 28, .30);
  --action: var(--brick);
  --on-action: #FFFFFF;
  --selected: var(--olive);
  --on-selected: var(--cream);
  --done: var(--olive);
  --here: rgba(41, 43, 28, .06);
  --track: rgba(41, 43, 28, .10);
  --ok: #2E5A36;
  --ok-soft: rgba(46, 90, 54, .10);
  --bad: var(--brick);
  --bad-soft: rgba(168, 65, 44, .09);

  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, serif;
  --label: "Big Shoulders", "DM Sans", ui-sans-serif, sans-serif;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem;
  --radius: 16px;
  --small-radius: 12px;
  --gutter: max(16px, env(safe-area-inset-left));
  --max: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #16170E;
    --surface: #1F2018;
    --raised: #2A2B20;
    --chip: #34362A;
    --text: var(--cream);
    --muted: rgba(240, 233, 200, .74);
    --soft: rgba(240, 233, 200, .62);
    --line: rgba(240, 233, 200, .14);
    --line-strong: rgba(240, 233, 200, .32);
    --action: #C0533B;
    --selected: var(--cream);
    --on-selected: var(--olive);
    --done: var(--cream);
    --here: rgba(240, 233, 200, .07);
    --track: rgba(240, 233, 200, .14);
    --ok: #8CC79B;
    --ok-soft: rgba(140, 199, 155, .12);
    --bad: #E0876F;
    --bad-soft: rgba(224, 135, 111, .12);
  }
}

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

/* The iPhone's text size (Settings › Display › Text Size) sets the base; the rest scales from it. */
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@supports (font: -apple-system-body) { html { font: -apple-system-body; } }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--sans); font-size: 1.0625rem;
  font-weight: 400; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 var(--s4); }
a { color: inherit; }
strong, b { font-weight: 600; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: 6px; }
svg { flex: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--s4); top: var(--s2); background: var(--surface); padding: var(--s2) var(--s4); z-index: 10; }
.chev { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.label { font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .09em; font-size: .875rem;
  line-height: 1.2; margin: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; min-height: 1.65rem; padding: 0 .6rem; border-radius: 8px; background: var(--chip);
  color: var(--text); font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  font-size: .82rem; line-height: 1; white-space: nowrap; }

/* ---------------------------------------------------------------- top bar and tabs: light, like Field's screens */
.top { background: var(--ground); padding-top: env(safe-area-inset-top); }
.topbar, .tabs { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 4rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; min-height: 44px; min-width: 0; flex: 0 1 auto; }
.brand img { border-radius: 9px; width: 2.1rem; height: 2.1rem; }
.brand span { font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .09em; font-size: 1.05rem;
  min-width: 0; overflow-wrap: anywhere; }
.lang, .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px;
  padding: 0 1.1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  text-decoration: none; font-weight: 600; font-size: .98rem; white-space: nowrap; }
.lang:hover, .btn:hover { border-color: var(--line-strong); }
/* Skool's tab row: words, the current one underlined — only on the main screens. */
.tabs { display: flex; gap: var(--s5); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0 2px; text-decoration: none; white-space: nowrap;
  color: var(--soft); font-weight: 500; font-size: 1rem; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--selected); }
/* Inside a course or a lesson: one row, like Skool's app — back arrow, badge, where you are, language. */
.top.inner { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); }
.top.inner .topbar { flex-wrap: nowrap; gap: var(--s3); min-height: 3.5rem; }
.backbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  margin-left: -10px; color: var(--text); border-radius: 50%; }
.backbtn .chev { width: 1.45rem; height: 1.45rem; }
.top.inner .brand { flex: none; min-width: 0; }
.top.inner .brand img { width: 1.9rem; height: 1.9rem; }
.where { flex: 1; min-width: 0; font-weight: 600; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top.inner .lang { min-height: 36px; padding: 0 .8rem; font-size: .88rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
main { padding-bottom: var(--s7); }
.foot { max-width: var(--max); margin: 0 auto; padding: var(--s5) var(--gutter) var(--s7); color: var(--soft); font-size: .88rem; }

/* ---------------------------------------------------------------- progress: a thin bar and a percentage */
.progress { display: flex; align-items: center; }
.progress .bar { position: relative; flex: 1 1 auto; min-width: 5rem; height: 1.45rem; border-radius: 999px; background: var(--track);
  overflow: hidden; }
.progress .fill { position: absolute; inset: 0 auto 0 0; display: block; width: 0; background: var(--done); border-radius: 999px;
  transition: width .6s cubic-bezier(.3, .7, .2, 1); }
.progress .pct { position: relative; display: flex; align-items: center; height: 100%; padding: 0 .65rem; font-size: .8rem;
  font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress .pct b { font-weight: 700; }
.progress.lit .pct { color: var(--on-selected); }
@media (prefers-reduced-motion: reduce) { .progress .fill { transition: none; } }

/* ---------------------------------------------------------------- the Aula: course cards */
.pagehead { padding: var(--s4) 0 var(--s3); max-width: 42rem; }
.pagehead h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); margin-bottom: var(--s2); }
.pagehead p { color: var(--muted); font-size: 1rem; margin: 0; }
.sectlabel { margin: var(--s4) 0 var(--s3); }
.coursegrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
@media (min-width: 640px) { .coursegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .coursegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.coursegrid > li { min-width: 0; }
.coursecard a { display: flex; flex-direction: column; height: 100%; text-decoration: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cardrow { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s4); flex: 1; }
/* The lettered cover (Adrian chose it over photos, 2026-09-24): short name in Big Shoulders, a tan rule, the icon. */
.thumb { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); aspect-ratio: 16 / 9;
  padding: 0 1.25rem; background: var(--ground); border-bottom: 1px solid var(--line); }
.thumb .tl { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.thumb .brandl { font-family: var(--label); font-weight: 700; letter-spacing: .14em; font-size: .72rem; color: var(--soft);
  text-transform: uppercase; }
.thumb .big { font-family: var(--label); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: 2.3rem;
  line-height: .95; color: var(--text); overflow-wrap: normal; }
.thumb .big.long { font-size: 1.75rem; }
.thumb .rule { width: 2.4rem; height: 3px; background: var(--tan); border-radius: 2px; margin-top: .25rem; }
.coverglyph { width: 4.2rem; height: 4.2rem; flex: none; fill: currentColor; color: var(--text); }
.coursecard a:hover { border-color: var(--line-strong); }
.cicon { width: 1.75rem; height: 1.75rem; color: var(--text); fill: currentColor; margin-top: .1rem; }
.cbody { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.clabel { font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; color: var(--soft); }
.ctitle { display: block; font-weight: 600; font-size: 1.06rem; line-height: 1.3; }
.cwhy { color: var(--muted); font-size: .94rem; line-height: 1.42;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coursecard .chips { margin-top: var(--s2); }
.coursecard .progress { margin-top: var(--s3); }
.soonbadge .lock, .lock { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--soft); stroke-width: 1.6; stroke-linejoin: round; }

/* An optional track: its own section under the core courses, a label, a title and who it's for; the Optional chip
   on its card says it in words. */
.optsection { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.optsection h2 { font-size: 1.6rem; margin: var(--s2) 0 var(--s2); }
.optsection > p { color: var(--muted); font-size: .96rem; margin: 0 0 var(--s2); max-width: 42rem; }
.optsection > p.label { color: var(--text); }
.optsection > p b { color: var(--text); font-weight: 600; }
.optsection .coursegrid { margin-top: var(--s4); }
.optmeta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: 0 0 var(--s4);
  font-size: .94rem; color: var(--muted); }
.optmeta a { color: var(--text); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px;
  text-decoration-color: var(--line-strong); }

/* ---------------------------------------------------------------- a course: module list beside the lesson */
.crumbs { padding: var(--s2) 0 var(--s2); }
.crumbs a { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 1rem 0 .7rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--text); }
.crumbs a:hover { border-color: var(--line-strong); }
.classroomview { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; }
.classroomview.at-course .pane { display: none; }          /* phone: the list is the course screen */
.classroomview.at-lesson .modules { display: none; }       /* phone: the lesson opens full width */
@media (min-width: 960px) {
  .classroomview, .classroomview.at-course, .classroomview.at-lesson { grid-template-columns: 21rem minmax(0, 1fr); }
  .classroomview.at-lesson .modules { display: block; }
  .classroomview.at-course > .pane { display: grid; grid-template-columns: minmax(0, 58rem); }
  .modules { position: sticky; top: var(--s4); max-height: calc(100vh - 2rem); overflow: auto; }
  .page-course .crumbs, .page-lessonpage .crumbs, .page-soon .crumbs { visibility: hidden; height: var(--s4); padding: 0; }
}
.modules { padding: var(--s2) 0; }
.mhead { padding: var(--s4) var(--s4) var(--s4); border-bottom: 1px solid var(--line); }
.modules { overflow: hidden; }
.modules > .thumb { margin-top: calc(-1 * var(--s2)); }
.mwhy { color: var(--muted); font-size: .96rem; line-height: 1.45; margin: 0 0 var(--s3); }
.continue { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; width: 100%; margin-top: var(--s4);
  min-height: 3.4rem; padding: .45rem 1rem .45rem 1.2rem; border-radius: var(--small-radius); background: var(--selected);
  color: var(--on-selected); border-color: var(--selected); text-align: left; white-space: normal; }
.continue:hover { border-color: var(--selected); }
.continue .k { grid-column: 1; font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  font-size: .78rem; opacity: .8; }
.continue .t { grid-column: 1; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.continue .chev { grid-column: 2; grid-row: 1 / span 2; }
.continue[hidden] { display: none; }
.ctile { display: inline-flex; align-items: center; justify-content: center; width: 4.5rem; height: 4.5rem; border-radius: 20px;
  background: var(--ground); border: 1px solid var(--line); margin-bottom: var(--s3); }
.ctile .cicon { width: 2.3rem; height: 2.3rem; margin: 0; }
.ctile:empty { display: none; }
.mtitle { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.7rem; line-height: 1.1; letter-spacing: -.01em;
  text-decoration: none; margin-bottom: var(--s3); }
.mhead .chips { margin-bottom: var(--s3); }
.mhead .optmeta { margin: 0 0 var(--s3); }
.set { border-bottom: 1px solid var(--line); }
.set:last-child { border-bottom: 0; }
.set summary { list-style: none; display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); min-height: 3rem;
  cursor: pointer; font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .09em; font-size: .9rem; }
.set summary::-webkit-details-marker { display: none; }
.setname { flex: 1; }
.set .count { font-family: var(--sans); font-weight: 400; letter-spacing: 0; text-transform: none; font-size: .85rem; color: var(--soft);
  font-variant-numeric: tabular-nums; }
.set .down { transition: transform .15s; color: var(--soft); }
.set[open] .down { transform: rotate(180deg); }
.rows { list-style: none; margin: 0; padding: 0 0 var(--s2); }
.rows li + li a { border-top: 1px solid var(--line); }
.rows a { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 3.4rem;
  text-decoration: none; font-size: .98rem; line-height: 1.35; }
.rows a:hover { background: var(--here); }
.rows a[aria-current="page"] { background: var(--here); box-shadow: inset 3px 0 0 var(--selected); font-weight: 600; }
.rows .n { flex: none; min-width: 2.2rem; font-family: var(--label); font-weight: 700; letter-spacing: .06em; font-size: .92rem; color: var(--soft); }
.rows .t { flex: 1; min-width: 0; }
.rows .soon .t { color: var(--soft); }
.rows .state { display: inline-flex; }
.tick { width: 1.5rem; height: 1.5rem; }
.tick circle { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.tick path { fill: none; stroke: transparent; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.is-done .tick circle { fill: var(--done); stroke: var(--done); }
.is-done .tick path { stroke: var(--surface); }

/* ---------------------------------------------------------------- the lesson card */
.lessoncard { padding: var(--s5) var(--s4) var(--s6); min-width: 0; }
@media (min-width: 640px) { .lessoncard { padding: var(--s6) var(--s6) var(--s7); } }
.lchips { margin: 0 0 var(--s3); }
.lhead { display: flex; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s3); }
.lhead h1 { flex: 1; min-width: 0; font-size: clamp(1.9rem, 8vw, 2.4rem); line-height: 1.08; }
.markdot { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 50%; color: var(--text); }
.markdot .tick { width: 2rem; height: 2rem; }
.markdot:hover .tick circle { stroke: var(--text); }
.markdot.on .tick circle { fill: var(--done); stroke: var(--done); }
.markdot.on .tick path { stroke: var(--surface); }

.media { margin: var(--s2) 0 var(--s2); }
.menunext { display: flex; justify-content: space-between; align-items: center; margin: 0 0 var(--s5); }
.menunext a { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; padding: 0 2px; text-decoration: none;
  font-weight: 600; font-size: 1rem; color: var(--text); }
.menunext a:last-child:not(:first-child) { margin-left: auto; }
.video { aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--ground); border: 1px solid var(--line); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); padding: var(--s4); text-align: center; }
.video .play { width: 3rem; height: 3rem; fill: none; stroke: var(--soft); stroke-width: 1.2; }
.video .play path { fill: var(--soft); stroke: none; }
.video p { margin: 0; font-size: .92rem; color: var(--muted); }
.audio { display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s3); padding: var(--s3) var(--s4);
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--small-radius); font-size: .95rem; }
.audio > div { flex: 1; min-width: 0; }
.audio p { margin: 0; }
.audio audio { display: block; width: 100%; margin-top: var(--s2); }
.glyph { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; margin-top: .1rem; }

.prose section, .lessoncard > section { margin-top: var(--s5); }
/* A lesson's diagram (tools/diagrams.py): drawn on its own light card, full column width, its caption under it. */
.diagramfig { margin: var(--s4) 0 var(--s5); }
.diagramfig svg { display: block; width: 100%; max-width: 30rem; height: auto; }
.diagramfig figcaption { margin-top: var(--s2); font-size: .88rem; color: var(--soft); max-width: 30rem; }
.prose section:first-child { margin-top: 0; }
.lessoncard h2 { font-size: 1.45rem; margin-bottom: var(--s2); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 var(--s4); }
.prose li { margin-bottom: var(--s2); }
.prose li > ul, .prose li > ol { margin: var(--s2) 0 0; }
.tablewrap { overflow-x: auto; margin: var(--s2) 0 var(--s4); }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th { text-align: left; font-weight: 600; font-size: .85rem; padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1.5px solid var(--line-strong); }
.prose td { padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
/* On a phone, a five-column money table (8.15, 15.1) fits the screen instead of scrolling sideways: smaller type,
   tighter cells, and headers that may break a long word. */
@media (max-width: 30rem) {
  .prose table { font-size: .8rem; }
  .prose th { font-size: .72rem; padding-right: .35rem; hyphens: auto; -webkit-hyphens: auto; }
  .prose td { padding-right: .35rem; }
  .prose th:first-child { hyphens: manual; -webkit-hyphens: manual; white-space: nowrap; }
  .prose td:first-child { hyphens: auto; -webkit-hyphens: auto; }
}
.prose .right { text-align: right; }

.visual { margin: var(--s5) 0 0; }
.visual img { display: block; width: 100%; height: auto; border-radius: var(--small-radius); border: 1px solid var(--line); background: #FFFDF8; }
.visual figcaption { color: var(--soft); font-size: .85rem; margin-top: var(--s2); }

.res { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--small-radius);
  background: var(--surface); overflow: hidden; }
.res li + li a { border-top: 1px solid var(--line); }
.res a { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); column-gap: var(--s3); align-items: center;
  padding: var(--s3) var(--s4); text-decoration: none; min-height: 3.25rem; }
.res a:hover { background: var(--here); }
.res .kind { grid-row: span 2; justify-self: start; display: inline-flex; align-items: center; min-height: 1.6rem; padding: 0 .5rem;
  border-radius: 7px; background: var(--chip); font-family: var(--label); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: .78rem; }
.res .rt { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; font-size: .98rem; }
.res .rn { color: var(--soft); font-size: .82rem; line-height: 1.35; }
.tool-limit { margin-top: var(--s5); }
.tool-unavailable { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius); }
.tool-unavailable p { margin: var(--s2) 0 0; font-size: .9rem; }
.muted { color: var(--muted); }

.check-lead { color: var(--muted); }
.q { border: 0; margin: 0 0 var(--s5); padding: 0; min-width: 0; }
.q legend { display: flex; gap: var(--s3); padding: 0; margin-bottom: var(--s3); font-weight: 500; line-height: 1.45; }
.qn { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--chip); display: inline-flex;
  align-items: center; justify-content: center; font-family: var(--label); font-size: .95rem; font-weight: 700; }
.opts { display: grid; gap: var(--s2); }
.opt { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); min-height: 3rem;
  border: 1px solid var(--line-strong); border-radius: var(--small-radius); background: var(--surface); cursor: pointer; line-height: 1.4; }
.opt > span { min-width: 0; overflow-wrap: anywhere; }
.opt input { accent-color: var(--selected); width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; flex: none; }
.opt:has(input:focus-visible) { outline: 3px solid var(--action); outline-offset: 2px; }
.opt.is-right { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt:has(input:disabled) { cursor: default; }
.feedback { margin-top: var(--s3); padding: var(--s1) 0 var(--s1) var(--s4); border-left: 4px solid var(--bad); }
.feedback.right { border-left-color: var(--ok); }
.feedback.right .answer-line { display: none; }
.verdict { margin-bottom: var(--s2); }
.verdict strong { margin-right: var(--s2); }
.explain { margin-bottom: var(--s3); }
.retry { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px; min-height: 44px; padding: 0 var(--s4); cursor: pointer; }
.js .nojs-answer { display: none; }
.nojs-answer { margin-top: var(--s3); }
.plainqs li { margin-bottom: var(--s3); }

/* "Do this today": the page's one brick accent — a rule down its side. */
.lessoncard .today { background: var(--ground); border: 1px solid var(--line); border-left: 4px solid var(--brick);
  border-radius: var(--small-radius); padding: var(--s4) var(--s4) var(--s1); }
.sheetbtn { margin-top: var(--s1); }

.finish { margin-top: var(--s6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.finish p { margin: 0; font-weight: 500; }
.mark { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 3.25rem; padding: var(--s2) var(--s5);
  border: 1px solid var(--selected); border-radius: 999px; background: var(--selected); color: var(--on-selected); font-family: var(--sans);
  font-size: 1rem; font-weight: 600; cursor: pointer; }
.mark .tick circle, .mark .tick path { stroke: currentColor; }
.mark.on { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.mark.on .tick circle { fill: var(--done); stroke: var(--done); }
.mark.on .tick path { stroke: var(--surface); }
.after { margin-top: var(--s5); }
.nextlink { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: var(--s3); padding: var(--s3) var(--s4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.nextlink:hover { border-color: var(--line-strong); }
.nextlink .k { grid-column: 1; font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  font-size: .8rem; color: var(--soft); }
.nextlink .t { grid-column: 1; font-weight: 600; line-height: 1.3; }
.nextlink .chev { grid-column: 2; grid-row: 1 / span 2; }

/* ---------------------------------------------------------------- still being written, empty, not found */
.tag { display: inline-flex; align-items: center; gap: var(--s1); font-size: .8rem; font-weight: 600; color: var(--muted);
  background: var(--chip); border-radius: 8px; padding: 3px var(--s3) 3px var(--s2); }
.tag.big { font-size: .92rem; margin: 0 0 var(--s4); }
.idea { margin: var(--s4) 0 0; padding-left: var(--s4); border-left: 3px solid var(--line-strong); font-family: var(--serif);
  font-size: 1.25rem; line-height: 1.4; font-weight: 500; }
.empty { padding: var(--s6) var(--s5); color: var(--muted); margin-top: var(--s5); }

/* ---------------------------------------------------------------- the other tabs */
.tabpage { max-width: 44rem; margin: var(--s4) auto 0; padding: var(--s6) var(--s5); }
.tabpage .lhead h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
.tabsoon { text-align: center; }
.tabsoon h1 { font-size: 1.9rem; margin: var(--s3) 0 var(--s3); }
.tabsoon .tag.big { margin: 0 0 var(--s4); }
.tabsoon p { max-width: 32rem; margin-left: auto; margin-right: auto; }
.tabglyph { width: 3rem; height: 3rem; fill: none; stroke: var(--soft); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.tabpage .btn { margin-top: var(--s3); }
.tabpage .btn .chev { margin-right: calc(-1 * var(--s1)); }
.aboutcounts { color: var(--muted); font-size: .92rem; margin-top: calc(-1 * var(--s2)); }

/* ---------------------------------------------------------------- the browser on a computer
   Adrian, 2026-09-25/26: "on browser not as much", then "still looks AI-ish … the left scroll gets stuck … weird
   tabs", then "look at other courses that are popular, maybe Coursera, and take the good design" (the goal and the
   sites looked at: docs/design/DESKTOP_GOAL.md). Everything above is the phone, unchanged; this is the computer:
   - one header row: badge, tabs, language;
   - inside a course, the whole window is the classroom (Google's ML course, web.dev): the lesson list flush left and
     full height, scrolling on its own; the lesson on a sheet at a reading width; "En esta lección" at the right;
   - a course opens on its front page (Coursera, Udemy, Codecademy): cover, name, what it's for, Start, the facts,
     what you'll learn;
   - plain words for tags and labels; brick only on "Hazlo hoy". */
.top.desk, .deskonly { display: none; }
@media (min-width: 960px) {
  /* one header row */
  .top.inner { display: none; }
  .top:not(.inner) { display: flex; align-items: stretch; gap: var(--s6); height: 4rem;
    padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); border-bottom: 1px solid var(--line); }
  .top:not(.inner) .topbar { display: contents; }
  .top:not(.inner) .brand { align-self: center; }
  .top:not(.inner) .tabs { order: 1; max-width: none; margin: 0; padding: 0; border: 0; gap: var(--s5); }
  .top:not(.inner) .lang { order: 2; align-self: center; margin-left: auto; }
  body:not(.page-course):not(.page-lessonpage):not(.page-soon) main { padding-top: var(--s5); }

  /* the classroom grid: shorter covers that don't repeat the brand line, or the icon under them */
  .coursecard .thumb { aspect-ratio: auto; min-height: 8.5rem; padding: var(--s4) 1.25rem; }
  .coursecard .thumb .brandl { display: none; }
  .coursecard .cardrow .cicon { display: none; }
  .tabpage { max-width: 48rem; margin-left: 0; margin-right: auto; }

  /* inside a course: the whole window */
  .page-course .top, .page-lessonpage .top, .page-soon .top { position: sticky; top: 0; z-index: 10; padding: 0 var(--s5); }
  .page-course main .wrap, .page-lessonpage main .wrap, .page-soon main .wrap { max-width: none; padding: 0; }
  .page-course main, .page-lessonpage main, .page-soon main { padding-bottom: 0; }
  .classroomview, .classroomview.at-course, .classroomview.at-lesson { grid-template-columns: 19rem minmax(0, 1fr); gap: 0; }
  .classroomview.at-lesson .modules { display: block; }
  .classroomview.at-course > .pane { display: grid; grid-template-columns: minmax(0, 58rem); }

  /* the list: flush left, full height under the header, its own scroll that hands back to the page at the end */
  .classroomview > .modules.card { position: sticky; top: 4rem; align-self: start; height: calc(100vh - 4rem);
    overflow-y: auto; padding: 0 0 var(--s6); border: 0; border-right: 1px solid var(--line); border-radius: 0;
    background: var(--ground); }
  .modules > .thumb { display: none; }
  .mhead { padding: var(--s4) var(--s5) var(--s4); border-bottom: 0; }
  .mback { display: inline-flex; align-items: center; gap: var(--s1); min-height: 36px; margin: 0 0 var(--s2) -4px;
    font-size: .9rem; color: var(--muted); text-decoration: none; }
  .mback:hover { color: var(--text); }
  .mback .chev, .mback svg { width: 1.1rem; height: 1.1rem; }
  .mtitle { font-size: 1.3rem; line-height: 1.2; margin-bottom: var(--s3); }
  .mhead .mwhy, .mhead .chips, .mhead .continue, .mhead .optmeta { display: none; }
  .set { border-bottom: 0; border-top: 1px solid var(--line); }
  .set summary { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .95rem;
    min-height: 2.75rem; padding: var(--s3) var(--s5); }
  .rows { padding: 0 0 var(--s3); }
  .rows li + li a { border-top: 0; }
  .rows a { min-height: 2.5rem; padding: .45rem var(--s5); font-size: .94rem; gap: var(--s3); }
  .rows .n { font-family: var(--sans); font-weight: 500; letter-spacing: 0; font-size: .85rem; min-width: 1.9rem;
    font-variant-numeric: tabular-nums; }
  .tick { width: 1.25rem; height: 1.25rem; }

  /* the lesson (or the course's front page) on a sheet */
  .classroomview > .pane { display: grid; grid-template-columns: minmax(0, 50rem); justify-content: center;
    column-gap: var(--s6); padding: var(--s6) var(--s6) var(--s7); }
  .classroomview > .pane > .card { border-radius: 12px; }
  .lessoncard { padding: var(--s6) var(--s7) var(--s7); }
  .lcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); font-size: .88rem;
    color: var(--soft); }
  .lcrumbs a { color: var(--muted); text-decoration: none; }
  .lcrumbs a:hover { color: var(--text); text-decoration: underline; }
  .lchips { display: none; }
  .lmeta { display: block; margin: 0 0 var(--s2); font-size: .92rem; color: var(--muted); }
  .lessoncard .lhead { margin-bottom: var(--s5); }
  .lessoncard .lhead h1 { font-size: 2.6rem; }
  .lessoncard .media { max-width: 34rem; margin-bottom: var(--s5); }
  .lessoncard .media .audio p { font-size: .88rem; }
  .menunext { display: none; }
  .prose p, .prose ul, .prose ol, .prose h2, .today p, .lessoncard .check-lead { max-width: 38rem; }
  .nextlink .k, .continue .k { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 500;
    font-size: .85rem; }

  /* a course's front page */
  .front { padding: var(--s6) var(--s7) var(--s7); }
  .fhero { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: var(--s6); align-items: center;
    margin: 0 0 var(--s6); }
  .fhero .thumb { aspect-ratio: 16 / 11; min-height: 0; border: 1px solid var(--line); border-radius: 12px; }
  .fhero .thumb .brandl { display: none; }
  .fhero .thumb .big.long { font-size: 1.5rem; }
  .fwords h1 { font-size: 2.6rem; line-height: 1.05; margin: 0 0 var(--s3); overflow-wrap: normal; hyphens: manual; }
  .fwhy { font-size: 1.1rem; line-height: 1.45; color: var(--muted); margin: 0 0 var(--s4); max-width: 34rem; }
  .fwords .optmeta { margin: 0 0 var(--s4); }
  .fwords .continue { width: auto; max-width: 26rem; margin-top: 0; }
  .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 var(--s6);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .facts > div { padding: var(--s4) var(--s4) var(--s4) 0; min-width: 0; }
  .facts > div + div { padding-left: var(--s4); border-left: 1px solid var(--line); }
  .facts dt { margin: 0 0 .25rem; font-size: .85rem; color: var(--muted); }
  .facts dd { margin: 0; font-weight: 600; }
  .front h2 { font-size: 1.6rem; margin: 0 0 var(--s2); }
  .front h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--muted); margin: var(--s5) 0 var(--s1); }
  .learn { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--s6); }
  .learn li { break-inside: avoid; }
  .learn a { display: flex; align-items: flex-start; gap: var(--s3); padding: .6rem 0; border-bottom: 1px solid var(--line);
    text-decoration: none; }
  .learn a:hover .t { text-decoration: underline; }
  .learn .n { min-width: 2.2rem; padding-top: .1rem; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
  .learn .t { flex: 1; min-width: 0; }
  .learn .soon .t { color: var(--soft); }
  .learn .state { display: inline-flex; }
}
@media (min-width: 960px) and (max-width: 1199.98px) {
  /* a laptop: the badge without its name, so the tabs fit on one row; the course's front page stacked tighter */
  .top:not(.inner) .brand span { display: none; }
  .fhero { grid-template-columns: 14rem minmax(0, 1fr); gap: var(--s5); }
  .fhero .thumb .big { font-size: 1.7rem; }
  .fhero .thumb .big.long { font-size: 1.2rem; }
  .fhero .coverglyph { width: 3rem; height: 3rem; }
  .fwords h1 { font-size: 2.1rem; }
  .learn { columns: 1; }
  .front { padding: var(--s6) var(--s6) var(--s7); }
}
@media (min-width: 1200px) {
  /* "En esta lección": the parts of the lesson, the one you're reading marked */
  .classroomview > .pane:has(> .toc) { grid-template-columns: minmax(0, 50rem) 13rem; }
  .toc { display: block; position: sticky; top: calc(4rem + var(--s6)); align-self: start; font-size: .9rem; }
  .toc p { margin: 0 0 var(--s2); font-weight: 600; }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .toc a { display: block; margin-left: -1px; padding: .32rem 0 .32rem var(--s3); border-left: 2px solid transparent;
    color: var(--muted); text-decoration: none; line-height: 1.3; }
  .toc a:hover { color: var(--text); }
  .toc a[aria-current] { color: var(--text); font-weight: 600; border-left-color: var(--selected); }
}
