/* Rowaniteit Academy — DAW-style lesson UI.
   Shared by the academy landing page and every lesson page. */

/* Segoe UI is the site font. Windows uses its own Segoe UI; every other device (phones,
   Macs) gets these small Latin-only copies of your licensed Segoe UI files, loaded only when they are needed. */
@font-face {
  font-family: 'Segoe Web';
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  src: url('fonts/segoe-ui-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Segoe Web';
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
  src: url('fonts/segoe-ui-bold.woff2') format('woff2');
}
/* The name in the top bar is set in Neue Haas Grotesk Display Pro Bold (Latin letters only, see NOTICE.md) */
@font-face {
  font-family: 'Neue Haas Grotesk';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/neue-haas-display-bold.woff2') format('woff2');
}

:root {
  --bg: #1f2428;
  --panel: #2c3339;
  --glass-tint: rgba(44, 51, 57, .66);   /* the grey, half see-through backdrop of the content cards: more tint = easier to read */
  --panel-head: #3a434a;
  --panel-deep: #262c31;
  --well: #14181b;
  --line: #14181b;
  --line-soft: #3d464e;
  --text: #e8edf0;
  --text-body: #d7dee3;
  --text-mute: #a9b4bc;
  --text-dim: #8d99a3;
  --orange: #ff9f2e;
  --orange-soft: #ffb35c;
  --green: #8fe04a;
  --blue: #7da4f2;
  --blue-soft: #9dbaf5;
  --purple: #b58cf0;
  --purple-soft: #c9b0f5;
  --yellow: #e0c24a;
  --teal: #4fc1b0;
  /* Segoe UI for all text (see the @font-face rules above for the web copies used off Windows). */
  --font-ui: 'Segoe UI', 'Segoe Web', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-display: var(--font-ui);
  --font-body: var(--font-ui);
  --font-mono: var(--font-ui);
  --font-heading: var(--font-ui);
}

.lcd, .lcd-big, .ruler, .rack-nums, .beats, .idx, .kicker, .time, .drawn-meta, .head-meta, .track .name b, .reason b, .term b, code {
  font-variant-numeric: tabular-nums;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--panel); }   /* the colour of the top bar: what shows when the page bounces past its top or bottom */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; }

a { color: var(--orange-soft); }
a:hover { color: #ffd08f; }
ul { margin: 0; padding-left: 18px; }
li { margin: 0 0 8px; line-height: 1.55; }
li::marker { color: var(--orange); }
h1, h2, h3, p { margin: 0; }
code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--well);
  padding: 2px 6px;
  border-radius: 3px;
}

:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 30;
  padding: 8px 14px; background: var(--orange); color: #6a2c00;
  border-radius: 4px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---------- Transport bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
/* Pulling the page down past the top (the rubber band on iPhones and Macs) moves the bar down with it and opens a gap above it.
   lesson.js shows this cap, as tall as the gap, in the colour of the bar: behind the bars, above the Playlist background. */
.pull-cap { display: none; position: fixed; z-index: 14; left: 0; right: 0; top: 0; background: var(--panel); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 6px; background: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.brand-mark.fl { width: 34px; height: 34px; border-radius: 0; background: none; }   /* the FL Studio icon on the lesson pages */
.brand-mark.fl img { display: block; width: 34px; height: 34px; }
.brand-mark.cap { width: 32px; height: 32px; border-radius: 0; background: none; }   /* the blue student cap on the landing page: just the icon, no button */
.brand-name { font-family: 'Neue Haas Grotesk', 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1; }
.brand-by { font-family: 'Neue Haas Grotesk', 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0; color: #b4bec4; white-space: nowrap; }

.tb {
  display: flex; align-items: center; justify-content: center;
  min-width: 44px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel-head); color: #c9d2d8;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .08em;
  cursor: pointer;
}
.tb:hover { background: #465058; }
.tb.lit { background: var(--orange); color: #6a2c00; border-color: #ffcf94; }

.lcd {
  display: flex; align-items: center; gap: 18px; height: 38px; padding: 0 16px;
  background: var(--well); border: 1px solid #0c0f11; border-radius: 4px;
  font-family: var(--font-mono);
}
.lcd-item { display: flex; flex-direction: column; line-height: 1.1; }
.lcd-label { font-size: 10px; color: var(--text-dim); letter-spacing: .1em; }
.lcd-value { font-size: 16px; font-weight: 700; color: var(--green); }
.lcd-value small { font-size: inherit; color: #5f6b62; font-weight: 700; }
.lcd-value.warm { color: var(--orange-soft); }
.spacer { flex-grow: 1; }
.teacher { font-size: 13px; color: var(--text-mute); white-space: nowrap; }
.teacher strong { color: var(--text); font-weight: 600; }

/* ---------- Layout ---------- */

.app {
  --sbw: 280px;                    /* width of the Browser column */
  position: relative; min-height: calc(100vh - 60px);
  display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr);
}
.bg-stick { --sbw: 280px; }          /* the Playlist background sits next to .app, so it gets its own copy of the numbers */
.app, .bg-stick { --ox: 0px; }                 /* where bar 1 starts: after the track headers when these are shown */

/* ---------- Browser (left column, styled after the FL Studio Browser) ---------- */

.browser {
  --rh: 26px;                      /* row height; the tree lines are drawn from it */
  --bw-line: #34414a;
  position: sticky; top: 60px; z-index: 2; align-self: start;
  height: calc(100vh - 60px); overflow: hidden;
  display: flex; flex-direction: column;
  background: #172025; border-right: 1px solid #0d1215;
}
.browser .browser-title {
  display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 6px 0 9px; flex-shrink: 0;
  background: #3f484d; border-bottom: 1px solid #2a3338;
  font-family: var(--font-ui); font-weight: 400; font-size: 12px; letter-spacing: 0; color: #dfe5e8;
}
.browser-title .rail-toggle {
  margin-left: auto; display: none; align-items: center; justify-content: center;   /* phones only (see the media query below): on a desktop the Browser is always open */
  width: 24px; height: 22px; padding: 0; border: 0; border-radius: 3px;
  background: transparent; color: #b7c1c6; cursor: pointer;
}
.browser-title .rail-toggle:hover { background: #4d585e; color: #fff; }
.rail-burger { display: none; }

.bw { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.bw-tabs { display: flex; gap: 2px; padding: 6px 4px; background: #1f282d; flex-shrink: 0; }
.bw-tab {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 28px; min-width: 0; padding: 0 3px; border: 1.5px solid transparent; border-radius: 6px;
  background: transparent; color: #8f9ba1; cursor: pointer; white-space: nowrap;
  font: 700 10px var(--font-ui); letter-spacing: .03em;
}
.bw-tab .ic { width: 14px; height: 14px; flex-shrink: 0; }
.bw-tab:hover { color: #d3dadd; }
.bw-tab[aria-selected="true"] { border-color: #f08838; color: #f6a35e; background: rgba(240, 136, 56, .07); }

.bw-tree { flex: 1; overflow-y: auto; padding: 0 0 10px; scrollbar-width: thin; scrollbar-color: #3a454c #172025; }
.bw-list, .bw-kids { list-style: none; margin: 0; padding: 0; }
.bw-li { margin: 0; line-height: normal; position: relative; }
.bw-kids[hidden], .bw-list[hidden] { display: none; }

.bw-head {
  display: flex; align-items: center; gap: 8px; width: 100%; height: var(--rh); padding: 0 9px;
  border: 0; background: #262f34; color: #eef3f5; cursor: pointer; text-align: left;
  font: 600 14px var(--font-ui); letter-spacing: .01em;
}
.bw-head .chev { margin-left: auto; color: #7d8a91; transition: transform .15s; }
.bw-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.bw-head:hover { background: #2c373d; }

.bw-row {
  display: flex; align-items: center; gap: 7px; width: 100%; height: var(--rh); padding: 0 9px;
  border: 0; background: none; color: var(--rc, #a6b8bd); cursor: pointer; text-align: left; text-decoration: none;
  font: 400 14px/1 var(--font-ui); letter-spacing: .01em; white-space: nowrap;
}
.bw-row .lbl { flex: 1 1 0; min-width: 0; overflow: hidden; contain: paint; }   /* contain: the widened text below must never count towards the page width, in any browser */
/* Narrow letters like the FL Studio Browser: the text is laid out wider, then squeezed back to fit */
.bw-row .sq {
  display: block; width: 125%; transform: scaleX(.8); transform-origin: 0 50%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.4;   /* the box clips (for the ...), so it must be tall enough for letters with tails such as g, j, p, y */
}
.bw-row .ic { width: 16px; height: 16px; flex-shrink: 0; }
.bw-row:hover { background: #212b31; color: #fff; }
.bw-row.active { background: #26353d; color: #fff; font-weight: 600; }
.bw-exp { flex-shrink: 0; color: #7d8a91; transition: transform .15s; }
.bw-row[aria-expanded="true"] > .bw-exp { transform: rotate(90deg); }

/* The tree lines between a folder and what is inside it */
.bw-kids { margin-left: 21px; }
.bw-kids > .bw-li::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--bw-line);
}
.bw-kids > .bw-li:last-child::before { bottom: auto; height: calc(var(--rh) / 2); }
.bw-kids > .bw-li::after {
  content: ''; position: absolute; left: 0; top: calc(var(--rh) / 2); width: 9px; border-top: 1px solid var(--bw-line);
}
.bw-kids > .bw-li > .bw-row { padding-left: 14px; }

.fold-all { display: flex; gap: 6px; padding: 10px 8px 6px; flex-shrink: 0; background: #172025; border-top: 1px solid #0d1215; }
.fold-all button {
  flex: 1; height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel-head); color: #c9d2d8; font-family: var(--font-display); font-weight: 600;
  font-size: 11px; letter-spacing: .06em; cursor: pointer;
}
.fold-all button:hover { background: #465058; color: #fff; }

.progress {
  margin: 0 8px 8px; padding: 14px 12px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  display: flex; flex-direction: column; gap: 10px;
}
.progress-title { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--text-dim); }
.progress-bar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.progress-bar span { height: 10px; border-radius: 2px; background: var(--panel-head); }
.progress-bar span.done { background: var(--green); }
.progress-note { font-size: 13px; color: #c9d2d8; }

.content {
  position: relative; z-index: 1;
  padding: 32px 40px 80px; max-width: 1180px; width: 100%; margin-inline: auto;   /* centred in the space beside the navigation */
  display: flex; flex-direction: column; gap: 32px;
}

/* Page background: the FL Studio Playlist (bar ruler on top, lanes of 90px, a darker block every four bars).
   Built by lesson.js into .app; it sits behind the Browser and the content, and the track headers line up with its lanes. */
.playlist-bg {
  --bar: 40px;
  --pl-base: #243139; --pl-dark: #202b32; --pl-line: #172229; --pl-beat: rgba(6, 12, 16, .2);
  /* One layer the size of the window, fixed in place; lesson.js slides it with a transform (the parallax). The extra 90px is one lane. */
  position: fixed; z-index: 0; left: var(--sbw); right: 0; top: 60px; height: calc(100vh - 60px + 90px); overflow: hidden; pointer-events: none;
  will-change: transform;
  background-color: var(--pl-base);
  background-image:
    linear-gradient(to bottom, transparent 89px, var(--pl-line) 89px),
    linear-gradient(to right, var(--pl-line) 1px, transparent 1px),
    linear-gradient(to right, var(--pl-beat) 1px, transparent 1px),
    linear-gradient(to right, var(--pl-base) 0, var(--pl-base) calc(var(--bar) * 4), var(--pl-dark) calc(var(--bar) * 4));
  background-size: 100% 90px, var(--bar) 100%, calc(var(--bar) / 4) 100%, calc(var(--bar) * 8) 100%;
  background-position: 0 22px, var(--ox) 0, var(--ox) 0, var(--ox) 0;
  transition: left .2s ease;
}
.pl-ruler {   /* colours taken from the FL Studio Playlist ruler: flat dark blue-grey, light edge on top, dark line below, no gradient */
  position: absolute; z-index: 1; left: var(--sbw); right: 0; top: 0; height: 22px; overflow: hidden; pointer-events: none; transition: left .2s ease;   /* overflow: the bar numbers run past the right edge and would make the page scroll sideways */
  background: #1f2c33; border-top: 1px solid #515e65; border-bottom: 1px solid #19262d;
  box-shadow: inset 0 2px 0 #354249;
}
.pl-ruler::before {   /* above the track headers: the corner of the Playlist, no bar numbers */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--ox);
  background: #1f2c33; box-shadow: inset -1px 0 0 #19262d;
}
.pl-ruler span {      /* bar numbers: small and dim, every fourth one larger, bolder and brighter; no tick lines */
  position: absolute; top: 8px; padding-left: 3px; font: 400 8px/1 var(--font-ui); color: #7a8b96;
}
.pl-ruler span.q { top: 6px; font-size: 10px; font-weight: 700; color: #b4c3cc; }
.pl-head { position: absolute; top: 0; bottom: 0; width: 1px; background: #55666f; }
.pl-flag {
  position: absolute; top: 0; width: 0; height: 0;
  border: 5px solid transparent; border-top: 8px solid #a8cb64; border-bottom: 0;
}
@media (max-width: 900px) {
  .bg-stick { position: sticky; top: 60px; z-index: 0; height: 0; }   /* pinned under the top bar like the bar itself; holds the background */
  .bg-stick .playlist-bg { position: absolute; top: 0; left: 0; right: 0; }
  .playlist-bg { left: 0; }
  .pl-ruler, .pl-head { display: none; }
  .pl-ruler { left: 0; }
}

/* Decorative playlist track headers (Track 1, Track 2, ...), at the left edge of the Playlist in the empty space beside the
   lesson content on wide screens. The bars and the lane lines of .playlist-bg start right where they end. */
.gutter {
  display: none; position: fixed; z-index: 1; left: var(--sbw); top: 60px; bottom: 0; overflow: hidden; pointer-events: none;
  width: calc((100% - var(--sbw) - 1180px) / 2 - 8px);
  transition: left .2s ease;
}
.tk-rows { will-change: transform; }
@media (min-width: 1692px) { .gutter { display: block; } .app, .bg-stick { --ox: 108px; } }
.tk {
  position: relative; width: 108px; height: 90px;
  /* FL Studio track header: the fade from lighter (top) to darker (bottom) is the only separation between two tracks */
  background: linear-gradient(#3e464a 0%, #3c4448 30%, #394145 62%, #353d41 100%);
  border-radius: 0 6px 6px 0;
  box-shadow: inset 1px 0 0 #151d21;
}
.tk b {
  position: absolute; left: 5px; top: 1px; font: 400 12px var(--font-ui); color: #6f7a80; white-space: nowrap;
  transform: scaleX(.8); transform-origin: 0 0;   /* narrow letters like FL Studio */
}
.tk i {   /* the three small dots in the bottom left corner */
  position: absolute; left: 11px; bottom: 8px; width: 2px; height: 2px; border-radius: 50%; font-size: 0;
  background: #2e363b; box-shadow: 4px 0 #2e363b, 8px 0 #2e363b;
}
.tk u {
  position: absolute; right: 9px; bottom: 4px; width: 8px; height: 8px; border-radius: 50%; text-decoration: none;
  background: radial-gradient(circle at 50% 60%, #c4ea83 0%, #a3dd4f 45%, #78bf27 100%);
  border: 1px solid #142f17;               /* thin dark outline ... */
  box-shadow: 0 0 0 1px #787e82;           /* ... then a thin lighter grey highlight */
}

/* ---------- Hero / overview ---------- */

.hero { display: flex; flex-direction: column; gap: 24px; }
.hero-text { display: flex; flex-direction: column; gap: 10px; }
.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; color: var(--orange-soft); }
h1 {
  font-family: var(--font-heading); font-weight: 700; font-size: 52px; line-height: 1.02; letter-spacing: -.01em;
}
.lead { max-width: 720px; font-size: 18px; line-height: 1.55; color: #c9d2d8; }

/* ---------- Panels ---------- */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px;
  background: var(--panel-head); border-bottom: 1px solid var(--line);
}
.panel-head.short { min-height: 36px; padding: 0 14px; }
.panel-head h2 {
  font-family: var(--font-heading); font-weight: 600; font-size: 15px; letter-spacing: .1em; color: var(--text);
}
.panel-head .panel-title {
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .1em; color: #c9d2d8;
}
.swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.head-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.head-hint { font-size: 12px; color: var(--text-dim); }

/* Collapsible panels: the title bar toggles the body. */
.panel-head[data-fold] { cursor: pointer; transition: background .15s; }
.panel-head[data-fold]:hover { background: #414b53; }
.panel-head h2 { display: flex; align-items: center; min-width: 0; }
.fold {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  margin: 0; padding: 0; background: none; border: 0; border-radius: 4px;
  color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer;
}
.fold .chev { flex-shrink: 0; color: var(--text-dim); transition: transform .2s ease; }
.fold:hover .chev { color: var(--text); }
.panel.collapsed .fold .chev { transform: rotate(-90deg); }

.panel-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .25s ease; }
.panel-inner { overflow: hidden; min-height: 0; }
.panel.collapsed .panel-body { grid-template-rows: 0fr; }
.panel.collapsed:not(#recap) > .panel-head { border-bottom-color: transparent; }
.panel-body + .row { border-top: 1px solid var(--line-soft); }
.no-anim, .no-anim * { transition: none !important; }

/* Playlist (course overview) */

.playlist { padding: 0 16px 16px; }
.ruler {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; height: 28px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); border-bottom: 1px solid #454e56;
}
.clips { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; padding-top: 12px; }
/* Clips copy FL Studio's lit orange button: a solid dark border, then orange edges fading inwards to a pale
   yellow centre. Finished lessons use FL's light green the same way. Text is a dark shade of the same colour.
   The colours are variables: --k-out border, --k-edge edge colour, --k-c0..c2 centre to outside, --k-text. */
.clip {
  --k-out: #b34f06; --k-edge: #f08838; --k-c0: #ffde8b; --k-c1: #fec570; --k-c2: #f6a756; --k-text: #6a2c00;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 92px; padding: 11px; border-radius: 4px; color: var(--k-text); text-decoration: none;
  border: 2px solid var(--k-out);
  background: radial-gradient(ellipse at 50% 50%, var(--k-c0) 0%, var(--k-c1) 55%, var(--k-c2) 100%);
  box-shadow: inset 0 0 0 1px var(--k-edge), inset 0 0 14px 1px var(--k-edge);
}
.clip.done { --k-out: #4c8a1c; --k-edge: #86cc45; --k-c0: #f3fcd0; --k-c1: #cdee98; --k-c2: #a9e070; --k-text: #1f4a08; }
.clip:hover { filter: brightness(1.05); color: var(--k-text); }
/* Card text is Segoe UI squeezed to about 3/4 width (FL's UI font is a narrow one). Segoe UI is only on Windows,
   so everything else gets the small Segoe web copies (see the @font-face rules at the top). The box is made wider by the same factor first, so the text
   wraps as if it had the room, then squeezed back to fit the card. */
.clip b, .clip span {
  display: block; width: 130%; transform: scaleX(.77); transform-origin: 0 0;
  font-family: var(--font-ui); font-size: 15px; line-height: 1.25;
}
.clip b { font-weight: 700; letter-spacing: .02em; }
.clip span { font-weight: 600; }
.clip.optional { border-style: dashed; }
.clip[aria-current="page"] { outline: 1px solid #a8e070; outline-offset: 2px; }

/* A lesson that is not open for this student yet (assets/browser.js, from the access the server sends): dimmed, same size, still a working link */
.bw-row.locked { opacity: .45; }
.bw-row.locked:hover { opacity: .75; }
.clip.locked { opacity: .5; filter: saturate(.35); }
.clip.locked:hover { opacity: .75; filter: saturate(.5); }

/* Intro: the eight clips bounce in from nothing, one after another (0.05s apart, 0.65s each: about 1s in all).
   Uses the individual scale/rotate properties. "backwards" (not "both") so nothing is left holding the
   final value,. */
@keyframes clip-pop {
  0%   { scale: 0;    rotate: -16deg; animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  32%  { scale: 1.2;  rotate: 6deg;   animation-timing-function: ease-in-out; }
  52%  { scale: .92;  rotate: -3.5deg; }
  70%  { scale: 1.05; rotate: 1.6deg; }
  86%  { scale: .99;  rotate: -.5deg; }
  100% { scale: 1;    rotate: 0deg; }
}
.clips .clip { animation: clip-pop .65s backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.clips .clip:nth-child(2) { --i: 1; } .clips .clip:nth-child(3) { --i: 2; } .clips .clip:nth-child(4) { --i: 3; }
.clips .clip:nth-child(5) { --i: 4; } .clips .clip:nth-child(6) { --i: 5; } .clips .clip:nth-child(7) { --i: 6; }
.clips .clip:nth-child(8) { --i: 7; }

/* The pulse beat: a soft brightness beat every 1.5 s = 40 BPM, no glow. Only the selected lesson pulses
   (the upcoming L2 card no longer does by default). */
@keyframes clip-pulse-current {
  0%, 100% { filter: brightness(1); }
  14%      { filter: brightness(1.27); }
}
.clips .clip[aria-current="page"] {
  animation: clip-pop .65s calc(var(--i, 0) * 50ms) backwards, clip-pulse-current 1.5s ease-in-out .8s infinite;
}
/* The bounce-in only plays the first time the course arrangement is shown in a visit (a head script on each
   lesson page adds .no-intro afterwards); the pulse keeps running, starting straight away. */
.no-intro .clips .clip { animation: none; }
.no-intro .clips .clip[aria-current="page"] { animation: clip-pulse-current 1.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .clips .clip, .clips .clip[aria-current="page"] { animation: none; } }

/* ---------- Topic rows: text left, screenshot right ---------- */

.row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px;
  padding: 32px; align-items: start;
}
.row + .row, .panel-intro + .row, .row + .row-full { border-top: 1px solid var(--line-soft); }
.row.tight { padding: 28px 32px; }
.row.tinted { background: #283036; }
.row-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.idx { font-family: var(--font-mono); font-size: 12px; color: var(--orange-soft); letter-spacing: .1em; }
h3 { font-family: var(--font-heading); font-weight: 600; font-size: 24px; }
.row-text > ul, .row-text > p { font-size: 16px; color: var(--text-body); line-height: 1.55; }
.panel-intro { padding: 24px 32px 0; font-size: 18px; line-height: 1.55; color: var(--text-body); }

/* Screenshot placeholder. Drop a file with the matching name into /images
   and the <img> covers the placeholder; if the file is missing it removes itself. */
figure { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.shot {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border: 1.5px dashed #5d6973; border-radius: 6px; color: var(--text-dim);
  background-color: var(--panel-deep);
  background-image:
    linear-gradient(#2f363c 1px, transparent 1px),
    linear-gradient(90deg, #2f363c 1px, transparent 1px);
  background-size: 24px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.shot span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; }
.shot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: var(--panel-deep);
}
.shot:has(img) { border-style: solid; border-color: var(--line); }
figcaption { font-size: 13px; color: var(--text-mute); line-height: 1.5; }

/* Explainer animation in place of a screenshot (assets/anim/*.html, drawn at 640x400).
   lesson.js scales the frame to the width of the box (--k) and only loads it while it is on screen. */
.anim {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; contain: paint;   /* the 640px frame inside is scaled down; it must not widen the page */
  border: 1px solid var(--line); border-radius: 6px; background: #4b555c;
}
.anim iframe {
  position: absolute; left: 0; top: 0; width: 640px; height: 400px; border: 0;
  transform-origin: 0 0; transform: scale(var(--k, .7)); pointer-events: none;
}

/* Inline figure (drawn in the page rather than a screenshot) */
.drawn {
  padding: 16px; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 6px;
  display: flex; flex-direction: column; gap: 12px;
}
.drawn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawn-title { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; color: var(--text-dim); }
.drawn-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

/* ---------- Small components ---------- */

.card {
  padding: 14px 16px; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 6px;
  font-size: 15px; line-height: 1.5; color: var(--text-body);
}
.card strong.lbl { color: var(--orange-soft); }
.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 4px 10px; border-radius: 3px; background: var(--panel-head); font-size: 13px; }
.chip-label { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; }

.mode-tag {
  align-self: start; padding: 3px 10px; border-radius: 3px; color: #1a1d20;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .08em;
}
.mode-card { padding: 16px; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; gap: 8px; }
.mode-card p { font-size: 15px; line-height: 1.5; color: var(--text-body); }

.warn {
  display: flex; gap: 10px; padding: 12px 14px;
  background: #3b2f26; border: 1px solid #6b4a2a; border-radius: 6px;
  font-size: 15px; line-height: 1.5; color: #f3dcc3;
}
.warn svg { flex-shrink: 0; margin-top: 2px; }

.lesson-list { display: flex; flex-direction: column; gap: 8px; }
.lesson-list > div {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 14px;
  background: var(--panel-deep); border: 1px solid var(--line); border-radius: 4px;
  font-size: 15px; line-height: 1.45; color: var(--text-body);
}
.lesson-list strong { color: var(--blue-soft); }

.flow { display: flex; flex-direction: column; gap: 6px; }
.flow > div { padding: 10px 14px; background: var(--panel-head); border: 1px solid var(--line); border-radius: 4px; font-weight: 400; font-size: 15px; overflow: hidden; }
.flow > div.end { background: var(--orange); color: #6a2c00; border-color: #ffcf94; font-weight: 700; }
.flow > span { padding-left: 18px; color: var(--text-dim); font-size: 14px; line-height: 1; }

/* Step sequencer */
.rack { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; align-items: center; row-gap: 6px; }
.rack-name { padding: 6px 8px; border-radius: 3px; background: var(--panel-head); font-size: 13px; font-weight: 600; }
.rack-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.steps { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
.st { aspect-ratio: 1 / 1.3; border-radius: 3px; background: #4b545c; border: 1px solid #1c2124; }
.st.alt { background: #5e4b4f; }
.st.on { background: var(--orange); border-color: #ffcf94; }
.beats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.beats div {
  padding: 8px; border-radius: 3px; background: var(--panel-head); text-align: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
}
.beats div:nth-child(even) { background: #4a3f45; }

/* ---------- Homework ---------- */

.task { display: flex; gap: 14px; align-items: start; }
.chk { width: 22px; height: 22px; accent-color: var(--orange); margin: 2px 0 0; cursor: pointer; flex-shrink: 0; }
.task-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.task-title { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; }
.task-title b { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.time { padding: 2px 8px; border-radius: 3px; background: var(--well); color: var(--green); font-family: var(--font-mono); font-size: 12px; }
.task-body p { font-size: 16px; line-height: 1.55; color: var(--text-body); }
.task-body ul { font-size: 16px; color: var(--text-body); }
.task.final { padding: 24px 32px; border-top: 1px solid var(--line-soft); background: #283036; }
.task.final label { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.task.final label b { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.task.final label span { font-size: 16px; line-height: 1.55; color: var(--text-body); }
.task.done .task-title b { text-decoration: line-through; text-decoration-color: var(--text-dim); color: var(--text-mute); }

.callout-purple {
  padding: 16px; background: #2f2a3b; border: 1px solid #54467a; border-radius: 6px;
  display: flex; flex-direction: column; gap: 6px;
}
.callout-purple .lbl { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .12em; color: var(--purple-soft); }
.callout-purple .txt { font-size: 16px; line-height: 1.55; color: #e6def7; }
.term { padding: 16px; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; gap: 6px; }
.term b { font-family: var(--font-mono); font-weight: 700; font-size: 18px; color: var(--purple-soft); }
.term span { font-size: 15px; line-height: 1.5; color: var(--text-body); }

/* ---------- How many lessons ---------- */

.count { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; padding: 32px; align-items: start; }
.lcd-big { padding: 24px; background: var(--well); border: 1px solid #0c0f11; border-radius: 6px; display: flex; flex-direction: column; gap: 8px; }
.lcd-big .tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--text-dim); }
.lcd-big .num { font-family: var(--font-mono); font-weight: 700; font-size: 64px; line-height: 1; color: var(--green); }
.lcd-big .num small { font-size: 32px; color: var(--yellow); }
.lcd-big p { font-size: 14px; line-height: 1.5; color: #c9d2d8; }
.count-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.count-body > p:first-child { font-size: 18px; line-height: 1.55; color: var(--text-body); }
.reason { padding: 16px; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; gap: 8px; }
.reason b { font-family: var(--font-mono); font-size: 14px; color: var(--yellow); }
.reason strong { font-size: 16px; }
.reason span { font-size: 14px; line-height: 1.5; color: #c9d2d8; }
.fine { font-size: 15px; line-height: 1.55; color: var(--text-mute); }

/* ---------- Learning plan ---------- */

.plan-intro { padding: 28px 32px 8px; display: flex; flex-direction: column; gap: 18px; }
.plan-intro > p { font-size: 18px; line-height: 1.55; color: var(--text-body); }
.small-caps { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; color: var(--text-dim); }
.pattern { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.pattern div { padding: 10px 8px; border-radius: 3px; background: #4b545c; text-align: center; font-size: 13px; font-weight: 600; }
.pattern div.key { background: var(--orange); color: #6a2c00; font-weight: 700; }
.pattern div.end { background: #5e4b4f; }

.tracks { padding: 16px 32px 28px; display: flex; flex-direction: column; gap: 6px; }
.track-head, .track {
  display: grid; grid-template-columns: 200px minmax(0, 1.2fr) minmax(0, 1fr) 190px; gap: 16px; align-items: start;
}
.track-head { padding: 0 14px 6px; font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; color: var(--text-dim); }
.track {
  padding: 14px; background: var(--panel-deep); border: 1px solid var(--line);
  border-left: 6px solid var(--c, var(--orange)); border-radius: 4px;
}
.track.optional { background: var(--panel); border: 1.5px dashed #6b7780; }
.track .name { display: flex; flex-direction: column; gap: 4px; }
.track .name b { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--cs, var(--orange-soft)); }
.track .name span { font-weight: 600; font-size: 16px; }
.track .cell { font-size: 14px; line-height: 1.5; color: var(--text-body); display: flex; flex-direction: column; gap: 8px; }
.track .cell.plug { color: #c9d2d8; }
.track .cell.none { color: var(--text-dim); }
.new-tag { padding: 1px 6px; border-radius: 3px; background: #e9c75a; color: #1a1d20; font-weight: 700; font-size: 12px; }

.question {
  margin: 10px 0 0; padding: 20px; background: #2f2a3b; border: 1px solid #54467a; border-radius: 6px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.question legend { padding: 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .12em; color: var(--purple-soft); }
.question .q { font-size: 18px; line-height: 1.5; color: #f0eafb; font-weight: 600; }
.question .qs { font-size: 15px; line-height: 1.55; color: #e6def7; }
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.options label {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  background: var(--panel-deep); border: 1px solid #54467a; border-radius: 4px; font-size: 15px; cursor: pointer;
}
.options input { width: 18px; height: 18px; accent-color: var(--purple); margin: 0; }
.options label:has(input:checked) { border-color: var(--purple); background: #332d44; }

.habits { padding: 8px 32px 32px; display: flex; flex-direction: column; gap: 12px; }

footer.page-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 4px; font-size: 13px; color: var(--text-dim);
}

/* ---------- Academy landing ---------- */

.landing { max-width: 960px; margin: 0 auto; padding: 56px 24px 80px; display: flex; flex-direction: column; gap: 32px; }
.course-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 24px; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--orange);
  border-radius: 8px; text-decoration: none; color: var(--text);
}
.course-card:hover { background: #323a41; color: var(--text); }

/* The Continue card on the start page: lit orange like the course arrangement cards (dark orange text); a calm grey one when there is nothing to continue */
#continue { display: block; }
#continue[hidden] { display: none; }
.continue-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 22px 24px;
  border-radius: 8px; text-decoration: none; color: #6a2c00; border: 1px solid #b34f06;
  background: radial-gradient(ellipse at 50% 50%, #ffde8b 0%, #fec570 55%, #f6a756 100%);
  box-shadow: inset 0 0 0 1px #ffc17a, inset 0 0 18px 1px #f08838, 0 8px 22px rgba(0, 0, 0, .35);
}
.continue-card:hover { color: #6a2c00; filter: brightness(1.06); }
.continue-card .kicker { color: #6a2c00; opacity: .85; }
.continue-card h2 { font-family: var(--font-heading); font-weight: 700; font-size: 24px; margin: 4px 0; }
.continue-card p { font-size: 15px; line-height: 1.5; margin: 0; }
.continue-card .go { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .08em; white-space: nowrap; }
.continue-card.wait { color: var(--text); background: var(--panel); border-color: var(--line); box-shadow: none; }
.continue-card.wait .kicker { color: var(--text-dim); opacity: 1; }
.continue-card.wait p { color: var(--text-mute); }

/* The login page that stands in for a lesson when nobody is logged in (assets/gate.html) */
.gate-card { max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--orange); border-radius: 8px; }
.gate-card [hidden] { display: none; }
.gate-card .acct-note:empty { display: none; }
.gate-back { font-size: 14px; color: var(--text-dim); text-decoration: none; }
.gate-back:hover { color: var(--text); }
@media (max-width: 560px) { .continue-card { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* "Lesson done!" message when the last homework box of a lesson is ticked (lesson.js): lit green like the finished lesson cards */
.done-toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 6px; color: #1f4a08; border: 1px solid #4c8a1c;
  background: radial-gradient(ellipse at 50% 50%, #f3fcd0 0%, #cdee98 55%, #a9e070 100%);
  box-shadow: inset 0 0 0 1px #e3f7b4, inset 0 0 14px 1px #86cc45, 0 10px 28px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translate3d(-50%, 24px, 0);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .2s linear, visibility 0s linear .35s;
}
.done-toast.show { opacity: 1; visibility: visible; transform: translate3d(-50%, 0, 0); transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .2s linear, visibility 0s; }
.done-toast svg { flex: none; }
.done-toast > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.done-toast .dt-title { font-family: var(--font-heading); font-weight: 700; font-size: 17px; }
.done-toast .dt-text { font-size: 14px; }
.done-toast .dt-close { flex: none; width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.done-toast .dt-close:hover { background: rgba(31, 74, 8, .15); }
@media (prefers-reduced-motion: reduce) { .done-toast, .done-toast.show { transition: none; } }
.course-card h2 { font-family: var(--font-heading); font-weight: 600; font-size: 24px; margin: 6px 0; }
.course-card p { font-size: 15px; line-height: 1.5; color: var(--text-mute); }
.course-card .go { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .08em; color: var(--orange-soft); white-space: nowrap; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .content { padding: 28px 24px 64px; }
  .track-head { display: none; }
  .track { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .track .cell::before {
    content: attr(data-label); font-family: var(--font-display); font-weight: 600; font-size: 11px;
    letter-spacing: .12em; color: var(--text-dim);
  }
  .track .cell.none { display: none; }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clips, .ruler { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ruler span:nth-child(n+5) { display: none; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* The Browser is a slim bar under the top bar; the tree drops down from it when you open it. */
  .browser {
    --rh: 30px;
    position: sticky; top: 60px; z-index: 15; height: auto; overflow: visible;
    border-right: 0; border-bottom: 1px solid #0d1215;
  }
  .browser .browser-title { height: 52px; cursor: pointer; font-size: 15px; }   /* a comfortable bar for a thumb */
  /* The menu button looks like the back-to-top button: grey with a vignette, lit orange while the list is open (and while it is pressed) */
  .browser-title .rail-toggle {
    display: flex; width: 44px; height: 40px; border-radius: 5px; color: #c9d2d8; border: 1px solid var(--line);
    background: radial-gradient(ellipse at 50% 50%, #424b52 0%, #333b42 55%, var(--panel-deep) 100%);
    box-shadow: inset 0 0 0 1px #3d464d, inset 0 0 12px 1px rgba(0, 0, 0, .35);
    -webkit-tap-highlight-color: transparent;
  }
  .browser-title .rail-toggle:hover { color: #c9d2d8; background: radial-gradient(ellipse at 50% 50%, #424b52 0%, #333b42 55%, var(--panel-deep) 100%); }   /* no "hover" colour on a touch screen */
  .browser-title .rail-toggle[aria-expanded="true"], .browser-title .rail-toggle:active, .browser-title .rail-toggle[aria-expanded="true"]:hover {
    color: #6a2c00; border-color: #b34f06;
    background: radial-gradient(ellipse at 50% 50%, #ffde8b 0%, #fec570 55%, #f6a756 100%);
    box-shadow: inset 0 0 0 1px #ffc17a, inset 0 0 14px 1px #f08838;
  }
  .rail-burger { display: block; }
  .progress, .fold-all { display: none; }
  /* The list slides down from behind the bar. Only transform and opacity change (the two things the browser animates on the graphics card,
     without redoing layout or paint on every frame), so it stays smooth on a phone. The list is always there, just moved up and invisible;
     the .browser clip below cuts off whatever sticks out above the bar. */
  .browser { clip-path: inset(0 0 -100vh 0); }
  .app, .bg-stick { --sbw: 0px; }   /* no Browser column beside the page on a phone */
  .bw {
    overflow: hidden; display: flex; position: absolute; left: 0; right: 0; top: 100%; z-index: -1;   /* z-index: slides out from under the bar, not over it */
    max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); background: #172025;   /* the whole list fits on a phone: nothing to scroll inside it */
    border-bottom: 1px solid #0d1215; box-shadow: 0 16px 30px rgba(0, 0, 0, .55);
    visibility: hidden; pointer-events: none; opacity: 0;
    transform: translate3d(0, -100%, 0); will-change: transform, opacity;
    transition: transform .2s cubic-bezier(.4, 0, 1, 1), opacity .2s linear, visibility 0s linear .2s;   /* closing: quick, then hidden for good */
  }
  .app.mopen .bw {
    visibility: visible; pointer-events: auto; opacity: 1; transform: translate3d(0, 0, 0);
    transition: transform .34s cubic-bezier(.22, 1, .36, 1), opacity .18s linear, visibility 0s;           /* opening: fast start, soft landing */
  }
  @media (prefers-reduced-motion: reduce) { .bw, .app.mopen .bw { transition: none; } }
  .bw-row, .bw-head { font-size: 15px; }
  html { scroll-padding-top: 124px; }
  .teacher { display: none; }

  .row, .row.tight, .count { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 20px; }
  .panel-intro { padding: 20px 20px 0; }
  .plan-intro, .tracks, .habits { padding-left: 20px; padding-right: 20px; }
  .task.final { padding: 20px; }
  h1 { font-size: 38px; }
  .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .pattern { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-card { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .brand-name { font-size: 16px; }
  .content { padding: 20px 12px 56px; gap: 24px; }
  h1 { font-size: 32px; }
  .lead, .panel-intro, .plan-intro > p { font-size: 16px; }
  .cards-2, .cards-4 { grid-template-columns: minmax(0, 1fr); }
  .clips, .ruler { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ruler span:nth-child(n+3) { display: none; }
  .lesson-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lcd-big .num { font-size: 52px; }
  .panel-head { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
}

/* Narrow screens: keep the LCD readout (lesson / date / homework) in the top bar and make room for it. */
/* Top bar, from wide to narrow: drop the decorative bits first so the LCD readout always fits. */
@media (max-width: 1100px) {
  .teacher { display: none; }
}
@media (max-width: 760px) {
  .brand-name, .brand-by { display: none; }
}

@media (max-width: 560px) {
  .topbar { gap: 8px; }
  .lcd { gap: 10px; padding: 0 10px; height: 36px; min-width: 0; }
  .lcd-label { font-size: 9px; letter-spacing: .06em; }
  .lcd-value { font-size: 14px; }
}

@media (max-width: 400px) {
  .topbar { padding: 0 8px; gap: 6px; }
  .lcd { gap: 8px; padding: 0 8px; }
}

/* Mobile: floating button that jumps back to the lesson tabs at the top of the page. */
.to-top { display: none; }
@media (max-width: 900px) {
  .to-top {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25;
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px;
    border-radius: 22px; background: var(--orange); color: #6a2c00; border: 1px solid #ffcf94;
    font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
    /* --fab runs 0 to 1 with the scroll position (set in lesson.js): the button fades and rises in as you scroll down */
    opacity: var(--fab, 0); visibility: hidden;
    transform: translateY(calc((1 - var(--fab, 0)) * 16px)) scale(calc(.9 + .1 * var(--fab, 0)));
    transition: opacity .12s linear, transform .12s ease-out;
  }
  .to-top.show { visibility: visible; }
  /* Default look: a square button with a thick, filled up arrow, grey like the cards. Lit orange (like the course arrangement cards) while it is tapped. */
  .to-top {
    width: 44px; height: 44px; padding: 0; gap: 0; justify-content: center; font-size: 0;
    border-radius: 5px; color: #c9d2d8; border: 1px solid var(--line);
    background: radial-gradient(ellipse at 50% 50%, #424b52 0%, #333b42 55%, var(--panel-deep) 100%);   /* a vignette: lighter in the middle, the card colour at the edges */
    box-shadow: inset 0 0 0 1px #3d464d, inset 0 0 12px 1px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .45);
    -webkit-tap-highlight-color: transparent;
  }
  .to-top:hover { color: #c9d2d8; }   /* a touch screen keeps "hover" after a tap: no colour change from it */
  .to-top:active, .to-top.tapped, .to-top.tapped:hover {
    color: #6a2c00; border: 1px solid #b34f06;
    background: radial-gradient(ellipse at 50% 50%, #ffde8b 0%, #fec570 55%, #f6a756 100%);
    box-shadow: inset 0 0 0 1px #ffc17a, inset 0 0 14px 1px #f08838, 0 6px 18px rgba(0, 0, 0, .45);
  }
  .to-top svg { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel-body, .app, .fold .chev, .to-top { transition: none; }
}

/* ---------- Placeholder lesson pages ---------- */

.status-chip {
  display: inline-block; align-self: start; padding: 3px 10px; border-radius: 3px;
  background: var(--well); color: var(--yellow); font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em;
}

.skeleton { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.skeleton span { height: 12px; border-radius: 6px; background: var(--panel-head); }
.skeleton span:nth-child(1) { width: 92%; }
.skeleton span:nth-child(2) { width: 78%; }
.skeleton span:nth-child(3) { width: 86%; }
.skeleton span:nth-child(4) { width: 52%; }
.soon-note {
  padding: 14px 16px; border: 1.5px dashed #6b7780; border-radius: 6px;
  font-size: 15px; line-height: 1.5; color: var(--text-mute);
}

.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pager a {
  padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 15px;
}
.pager a:hover { background: #323a41; color: var(--text); }
.pager small { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--text-dim); font-weight: 400; }
.pager .next { margin-left: auto; text-align: right; }

.lesson-list.tall > div { grid-template-columns: 170px minmax(0, 1fr); }
@media (max-width: 560px) {
  .lesson-list.tall > div { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Step sequencer (homework: Basic loop) ---------- */

.seq-wrap { grid-column: 1 / -1; min-width: 0; }
.seq {
  --label: 92px; --gap: 10px; --stepmin: 21px;
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: var(--panel-deep); border: 1px solid var(--line); border-radius: 6px;
}
.seq {
  --label: 196px; background: #59626a; border: 1px solid #23292d; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* the control strip is the Channel rack's title bar */
.seq-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.seq-bar {
  margin: -16px -16px 0; padding: 10px 16px; background: #3b4348; border-bottom: 1px solid #23292d; border-radius: 3px 3px 0 0;
}
.seq-play.lit svg { fill: #6a2c00; }
.seq-bpm { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--text-dim); }
.seq-bpm-input {
  width: 68px; height: 36px; padding: 0 6px; background: var(--well); border: 1px solid #0c0f11; border-radius: 4px;
  color: var(--green); font-family: var(--font-mono); font-weight: 700; font-size: 16px; text-align: center;
}
.seq-len { display: flex; }
.seq-len-btn {
  height: 36px; padding: 0 12px; background: var(--panel-head); border: 1px solid var(--line); color: #c9d2d8;
  font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .08em; cursor: pointer;
}
.seq-len-btn:first-child { border-radius: 4px 0 0 4px; }
.seq-len-btn:last-child { border-radius: 0 4px 4px 0; border-left: 0; }
.seq-len-btn:hover { background: #465058; }
.seq-len-btn[aria-pressed="true"] { background: var(--orange); color: #6a2c00; border-color: #ffcf94; }
.seq-reset {
  height: 36px; padding: 0 12px; background: transparent; border: 1px solid #454e56; border-radius: 4px;
  color: var(--text-mute); font-size: 13px; cursor: pointer;
}
.seq-reset:hover { background: var(--panel-head); color: var(--text); }

.seq-grid {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  min-width: calc(var(--label) + var(--gap) + var(--n, 16) * var(--stepmin));
}
.seq-row { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); column-gap: var(--gap); align-items: center; }
.seq-steps, .seq-timeline { display: grid; grid-template-columns: repeat(var(--n, 16), minmax(0, 1fr)); gap: 3px; }

/* Which bars are on screen: bar 2 only in 2-bar mode; when paged (narrow screens) just one bar at a time */
.seq:not(.two):not(.wide) .b2 { display: none; }   /* narrow screen, 1 bar: bar 2 does not fit */
/* Wide screen, 1 bar: bar 2 stays on screen but dimmed and unlit; clicking a step in it switches to 2 bars */
.seq.wide:not(.two) .b2 { opacity: .3; }
.seq.wide:not(.two) .b2.seq-step.alt, .seq.wide:not(.two) .b2.seq-step.on { background: linear-gradient(#485157, #394147); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13); }
.seq.wide:not(.two) .b2.seq-step.on::after { background: rgba(0, 0, 0, .42); }
.seq.wide:not(.two) .b2:hover { opacity: .55; }
/* Two bars next to each other: a small extra gap between the bars. A column of its own (not a margin on the first step of bar 2, which made that one step narrower) */
.seq.wide .seq-steps, .seq.wide .seq-timeline { grid-template-columns: repeat(16, minmax(0, 1fr)) 3px repeat(16, minmax(0, 1fr)); }
.seq.wide .b2-first { grid-column-start: 18; }
.seq.paged:not(.view-2) .b2 { display: none; }
.seq.paged.view-2 .b1 { display: none; }

.seq-corner { display: flex; align-items: center; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .12em; color: var(--text-dim); }
.seq-view { display: none; }
.seq.paged .seq-view { display: flex; }
.seq.paged .seq-corner-text { display: none; }
.seq-view button {
  width: 30px; height: 26px; padding: 0; background: var(--panel-head); border: 1px solid var(--line); color: #c9d2d8;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; cursor: pointer;
}
.seq-view button:first-child { border-radius: 4px 0 0 4px; }
.seq-view button:last-child { border-radius: 0 4px 4px 0; border-left: 0; }
.seq-view button[aria-pressed="true"] { background: var(--orange); color: #6a2c00; border-color: #ffcf94; }

.seq-timeline { position: relative; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.seq-tick {
  height: 26px; display: flex; align-items: center; padding-left: 4px; border-radius: 3px 3px 0 0;
  background: #20262a; color: var(--text-dim); font-family: var(--font-mono); font-size: 11px;
}
.seq-tick:nth-child(4n+1) { box-shadow: inset 1px 0 0 #5d6973; }
.seq-tick.now { background: var(--panel-head); color: #fff; }
.seq-tick { background: #3b4348; color: #aeb9c0; }
.seq-tick:nth-child(4n+1) { box-shadow: inset 1px 0 0 #6b767e; }
.seq-tick.now { background: #566067; color: #fff; }

.seq-step {
  height: 32px; padding: 0; border: 1px solid #1c2124; border-radius: 3px; background: #4b545c; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.seq-step.alt { background: #5e4b4f; }
.seq-step:hover { filter: brightness(1.18); }
.seq-step.now:not(.on) { background: #6b7780; }
.seq-step.on { background: var(--orange); border-color: #ffcf94; }

/* Default look: FL Studio's step buttons, rounded with a slot at the top. Lit beats alternate light / pink */
.seq-step {
  position: relative; border: 1px solid #1d2327; border-radius: 4px;
  background: linear-gradient(#485157, #394147); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13);
}
.seq-step::after {
  content: ""; position: absolute; left: 28%; right: 28%; top: 4px; height: 3px; border-radius: 1px;
  background: rgba(0, 0, 0, .42); pointer-events: none;
}
.seq-step.alt { background: linear-gradient(#614e52, #4c3c40); }
.seq-step.now:not(.on) { background: linear-gradient(#485157, #394147); filter: brightness(1.45); }
.seq-step.now:not(.on).alt { background: linear-gradient(#614e52, #4c3c40); }
.seq-step.on { background: linear-gradient(#e6edf1, #b9c5cc); border-color: #1d2327; box-shadow: inset 0 1px 0 #fff; }
.seq-step.on.alt { background: linear-gradient(#f3cfcf, #d19aa0); }
.seq-step.on::after { background: rgba(60, 70, 78, .55); }
.seq-step.on.now { box-shadow: inset 0 1px 0 #fff, 0 0 7px 1px rgba(255, 255, 255, .75); }

.seq-label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.seq-led, .seq-knob, .seq-num { display: none; }
.seq-led, .seq-num { display: flex; }
.seq-knob { display: block; }
.seq-led {
  flex: none; width: 10px; height: 10px; border-radius: 50%; background: #8fd14f; border: 1px solid #2a3035;
  box-shadow: 0 0 4px rgba(143, 209, 79, .6);
}
.seq-knob {
  position: relative; flex: none; width: 14px; height: 14px; border-radius: 50%; background: #262c30; border: 1px solid #6a747a;
}
.seq-knob::after { content: ""; position: absolute; left: 5px; top: 1px; width: 2px; height: 5px; background: #c9d2d7; border-radius: 1px; }
.seq-knob + .seq-knob { margin-left: -2px; }
.seq-num {
  flex: none; width: 24px; height: 24px; align-items: center; justify-content: center;
  background: #2f373c; border: 1px solid #1d2327; border-radius: 3px; color: #9aa6ad; font-size: 12px;
}
.seq-name {
  flex: 1; min-width: 0; height: 32px; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: var(--panel-head); border: 1px solid var(--line); border-radius: 3px;
  color: var(--text); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.seq-name:hover { background: #465058; }
.seq-name:active { background: #55646e; }
.seq-name {
  background: linear-gradient(#636c73, #525b61); border: 1px solid #2a3035; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #e6ebee; font-weight: 400; text-align: center;
}
.seq-name:hover { background: linear-gradient(#636c73, #525b61); filter: brightness(1.12); }
.seq-name:active { background: linear-gradient(#636c73, #525b61); filter: brightness(1.3); }

/* Playback marker: a line through every row, draggable by its handle or the ruler */
.seq-lane { position: absolute; z-index: 2; left: calc(var(--label) + var(--gap)); right: 0; top: 0; bottom: 0; pointer-events: none; }
.seq-lane.off .seq-line, .seq-lane.off .seq-handle { opacity: 0; pointer-events: none; }
.seq-line {
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--orange);
  transform: translateX(calc(var(--x, 0px) - 1px));
}
.seq-handle {
  position: absolute; left: 0; top: 0; width: 22px; height: 26px; display: flex; justify-content: center;
  transform: translateX(calc(var(--x, 0px) - 11px)); pointer-events: auto; cursor: ew-resize; touch-action: none;
}
.seq-handle::before {
  content: ""; width: 0; height: 0; margin-top: 2px;
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 13px solid var(--orange);
}
.seq-handle.dragging::before { border-top-color: #ffd08f; }
.seq-handle:focus-visible { outline: 2px solid #fff; outline-offset: 0; border-radius: 3px; }

.seq-hint { font-size: 13px; line-height: 1.5; color: var(--text-mute); }
.seq-corner { color: #d3dade; }
.seq-hint { color: #e1e7ea; }
.seq-hint-touch, .seq-hint-paged { display: none; }
.seq.paged .seq-hint-paged { display: inline; }
@media (pointer: coarse) {
  .seq-hint-mouse { display: none; }
  .seq-hint-touch { display: inline; }
}

/* Phones: one bar (16 steps) always fits on screen, no sideways scrolling */
@media (max-width: 900px) {
  .seq { --label: 140px; }
  .seq-knob { display: none; }
}
@media (max-width: 700px) {
  .seq { --stepmin: 0px; }
  .seq { --label: 108px; }
  .seq-num { display: none; }
}
@media (max-width: 560px) {
  .seq-wrap { margin: 0 -12px; }
  .seq { padding: 10px 8px; --label: 62px; --gap: 6px; }
  .seq { --label: 62px; }
  .seq-bar { margin: -10px -8px 0; padding: 8px; }
  .seq-led { display: none; }
  .seq-steps, .seq-timeline { gap: 2px; }
  .seq-step { height: 38px; border-radius: 2px; }
  .seq-name { height: 38px; padding: 0 4px; font-size: 11px; text-align: center; }
  .seq-tick { padding-left: 2px; font-size: 10px; }
  .seq-corner { justify-content: center; }
  .seq-view button { width: 26px; }
  .seq-bar { gap: 8px; }
}

/* A phone has no room next to the lesson-tab strip for much; keep the LCD from shrinking */
@media (max-width: 560px) {
  .lcd { flex-shrink: 0; }
}

/* ---------- Titles in bold ---------- */
:is(
  h1, h2, h3, .progress-title, .panel-head h2, .panel-head .panel-title, .drawn-title, .chip-label,
  .task-title b, .task.final label b, .callout-purple .lbl, .small-caps, .track-head, .question legend, .course-card h2
) { font-weight: 700; }

/* ---------- Vignette on the dark grey cards (same idea as the course arrangement cards: lighter in the middle, darker towards the edges,
   with a thin light edge like the FL Studio buttons) ---------- */
.card, .drawn, .mode-card, .lesson-list > div, .term, .reason, .track {
  background: radial-gradient(closest-side, rgba(54, 62, 69, .6) 0%, rgba(48, 56, 62, .64) 55%, rgba(41, 49, 55, .7) 100%);   /* a little see-through: the panel's glass shows behind it */
  background-size: 100% 100%;
  border: 2px solid rgba(26, 32, 36, .9);   /* dark outline, like the dark orange one on the course arrangement cards */
  box-shadow: inset 0 0 0 1px #3a444b, inset 0 0 19px 1px rgba(0, 0, 0, .25);   /* thin lighter line just inside it */
}
.track { border-left: 6px solid var(--c, var(--orange)); }
.track.optional {
  background: radial-gradient(closest-side, rgba(64, 73, 80, .6) 0%, rgba(58, 67, 73, .64) 55%, rgba(50, 57, 63, .7) 100%);
}

/* Step-by-step card inside an orange "warn" card, and the switch above an animation */
.warn.howto strong { color: #ffd39c; }
.warn.howto > div > strong:first-child { display: block; margin-bottom: 6px; letter-spacing: .04em; }
.warn.howto ol { margin: 0; padding-left: 20px; }
.warn.howto li { margin: 0 0 4px; line-height: 1.5; }
.warn.howto li::marker { color: var(--orange); font-weight: 700; }

.anim-switch {
  display: inline-flex; align-self: flex-start; gap: 4px; padding: 3px;
  background: var(--well); border: 1px solid var(--line); border-radius: 6px;
}
.anim-switch button {
  height: 30px; padding: 0 14px; border: 0; border-radius: 4px; cursor: pointer;
  background: transparent; color: #c9d2d8; font: 600 12px var(--font-display); letter-spacing: .05em;
}
.anim-switch button:hover { background: #343c43; color: #fff; }
.anim-switch button[aria-pressed="true"] { background: var(--orange); color: #6a2c00; }

/* ---------- Vignette on the orange cards and buttons (the same lit-orange look as the course arrangement cards) ---------- */
.flow > div.end, .pattern div.key, .tb.lit, .anim-switch button[aria-pressed="true"],
.seq-len-btn[aria-pressed="true"], .seq-view button[aria-pressed="true"] {
  background: radial-gradient(ellipse at 50% 50%, #ffde8b 0%, #fec570 55%, #f6a756 100%);
  border-color: #b34f06;
  box-shadow: inset 0 0 0 1px #f08838, inset 0 0 9px 1px #f08838;
}
/* The orange note cards (dark brown with an orange edge): lighter in the middle, darker towards the edges */
.warn {
  background: radial-gradient(closest-side, #4a3a2d 0%, #3f3228 55%, #31261e 100%);
  border: 2px solid #26190f;
  box-shadow: inset 0 0 0 1px #7a5530, inset 0 0 19px 1px rgba(0, 0, 0, .25);
}

/* ---------- Liquid glass: the panels are see-through; the Playlist background (lanes, bars, track headers) shows through, softly blurred,
   with a light edge on the top and the left like a glass pane.
   The blur is put on the blocks INSIDE a panel (title bar, topics, tasks: a few hundred pixels tall each) and not on the whole panel (up to 5000px tall):
   the browser then only has to blur the blocks that are on screen, and it does one blur pass per block (no extra saturate/brightness passes). ---------- */
.panel {
  background: transparent;
  border-color: rgba(10, 14, 17, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 1px 0 0 rgba(255, 255, 255, .07), inset -1px -1px 0 rgba(255, 255, 255, .04),
              0 12px 32px rgba(0, 0, 0, .28);
}
.panel > .panel-head, .panel > .playlist, .panel > .row, .panel-inner > * {
  background: var(--glass-tint);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.panel-head { border-bottom-color: rgba(10, 14, 17, .55); }
.panel-head[data-fold]:hover { background: rgba(70, 81, 89, .55); }
.panel > .panel-head { background: rgba(62, 71, 78, .5); }
.row.tinted, .task.final { background: rgba(44, 52, 58, .5); }
.row + .row, .panel-intro + .row, .row + .row-full, .panel-body + .row { border-top-color: rgba(255, 255, 255, .08); }

/* The Playlist background and the track headers are a touch out of focus, so they stay a backdrop */
/* (No blur filter on .playlist-bg and .gutter any more: they are as tall as the whole page, up to 40 megapixels on a wide screen, and blurring that
   made scrolling very slow. The grid lines are drawn soft instead.) */

/* FL-chan stands on the top edge of the course arrangement panel (lesson.js places her inside the content, so she scrolls with it).
   She can be picked up and moved (lesson.js); .held is set while she hangs from the pointer. */
.fruity {
  display: none; position: absolute; z-index: 3; left: 0; top: 0; width: 190px; height: auto;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  opacity: 0; transition: opacity .6s ease; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35));
}
.fruity.on { opacity: 1; }
.fruity.held { cursor: grabbing; z-index: 40; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .4)); }
@media (min-width: 1400px) { .fruity { display: block; } }
@media print { .fruity { display: none; } }

/* ---------- Login box in the top bar (assets/account.js) ---------- */
.acct { position: relative; flex: none; }
/* The key button: grey with a vignette like the other buttons; a green outline while its box is open; a lit green button when logged in. */
.acct-btn {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 5px; color: #c9d2d8; font: inherit; font-size: 13px; cursor: pointer;
  background: radial-gradient(ellipse at 50% 50%, #424b52 0%, #333b42 55%, var(--panel-deep) 100%);
  box-shadow: inset 0 0 0 1px #3d464d, inset 0 0 12px 1px rgba(0, 0, 0, .35);
  -webkit-tap-highlight-color: transparent;
}
.acct-btn:hover { color: #c9d2d8; }   /* no "hover" colour: a touch screen keeps it after a tap */
.acct-btn[aria-expanded="true"], .acct-btn:active {   /* selected: still grey, with a green outline */
  border-color: #4c8a1c; box-shadow: inset 0 0 0 1px #86cc45, inset 0 0 12px 1px rgba(0, 0, 0, .35);
}
.acct-btn.in, .acct-btn.in:hover, .acct-btn.in[aria-expanded="true"], .acct-btn.in:active {   /* logged in: the green of the finished lesson cards */
  color: #1f4a08; border-color: #4c8a1c;
  background: radial-gradient(ellipse at 50% 50%, #f3fcd0 0%, #cdee98 55%, #a9e070 100%);
  box-shadow: inset 0 0 0 1px #e3f7b4, inset 0 0 14px 1px #86cc45;
}
.acct-btn.in { transition: filter .12s ease-out; }
.acct-btn.in[aria-expanded="true"], .acct-btn.in:active { filter: brightness(1.27); }   /* tapped while logged in: lit up, held steady (the same brightness the lesson card beats up to) */
.acct-box {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 300px; padding: 16px;
  background: #2c3339; border: 1px solid #14181b; border-radius: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-body);
}
.acct-box[hidden], .acct-form[hidden], .acct-out[hidden], .acct-adminlink[hidden] { display: none; }
.acct-form, .acct-out, .ask-form { display: flex; flex-direction: column; gap: 10px; }
.ask-form label, .acct-form label { font-size: 12px; letter-spacing: .08em; color: var(--text-dim); }
.acct-form input {
  height: 40px; padding: 0 12px; background: #1f2428; border: 1px solid #454e56; border-radius: 4px; color: var(--text);
  font: 600 16px var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
}
.acct-form input:focus, .ask-form textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.ask-form textarea {   /* the question field: same dark field as the code field, but in the normal text font */
  padding: 10px 12px; background: #1f2428; border: 1px solid #454e56; border-radius: 4px; color: var(--text);
  font: 400 15px/1.45 var(--font-body); resize: vertical; min-height: 110px; max-height: 40vh;
}
.ask-box { width: 340px; }
.acct-go, .acct-logout, .send-btn {
  height: 38px; padding: 0 16px; border-radius: 4px; border: 1px solid #14181b; font: 700 13px var(--font-ui); letter-spacing: .06em; cursor: pointer;
  background: radial-gradient(ellipse at 50% 50%, #ffde8b 0%, #fec570 55%, #f6a756 100%); color: #6a2c00; border-color: #b34f06;
  box-shadow: inset 0 0 0 1px #f08838, inset 0 0 9px 1px #f08838;
}
.acct-logout { background: transparent; color: var(--text); border-color: #454e56; box-shadow: none; }
.acct-logout:hover { background: var(--panel-head); }
.acct-note, .acct-msg, .acct-out p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.acct-msg:empty { display: none; }
.acct-msg { color: #ffd39c; }
.send-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.send-btn:disabled { opacity: .45; cursor: default; filter: grayscale(.4); }
/* Narrow capitals like the text on the course arrangement cards: the text is laid out 30% wider and squeezed back to fit. Used inside the
   the login buttons and the signal flow cards (it needs the box around it to clip). */
.nar { display: block; flex: none; width: 130%; transform: scaleX(.77); transform-origin: 0 50%; text-transform: uppercase; white-space: nowrap; letter-spacing: .03em; font-weight: 700; }
.acct-go, .acct-logout { display: flex; align-items: center; justify-content: center; overflow: hidden; text-decoration: none; }
.acct-go .nar, .acct-logout .nar { text-align: center; transform-origin: 50% 50%; }
.flow .nar { font-weight: 400; }   /* the signal flow cards: normal weight, like most of the text on the page */
.flow > div.end .nar { font-weight: 700; }   /* only the last one, Master, is bold */
.send-note { font-size: 14px; color: #e6def7; }
@media (max-width: 560px) {
  .acct-box { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .acct-label { display: none; }
  .acct-btn { padding: 0 9px; }
}

/* Edit mode bar on the lesson pages (assets/content.js) */
.ec-bar {
  position: fixed; z-index: 90; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100vw - 24px);
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 12px;
  background: #1f2428; border: 1px solid #454e56; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; color: var(--text-body);
}
.ec-bar button, .ec-admin {
  height: 32px; padding: 0 14px; border-radius: 4px; border: 1px solid #454e56; background: transparent; color: var(--text); font: 600 13px var(--font-ui); cursor: pointer;
  display: inline-flex; align-items: center; text-decoration: none;
}
.ec-bar button:hover, .ec-admin:hover { background: var(--panel-head); }
.ec-bar button[hidden] { display: none; }
.ec-toggle[aria-pressed="true"] { background: #f6a756; color: #6a2c00; border-color: #b34f06; }
.ec-status { min-width: 0; color: var(--text-dim); }
.ec-status.bad { color: #ffb4b4; }
.ec-editing [contenteditable="true"] { outline: 1px dashed rgba(246, 167, 86, .55); outline-offset: 2px; cursor: text; border-radius: 2px; }
.ec-editing [contenteditable="true"]:hover { outline-color: #f6a756; background: rgba(246, 167, 86, .08); }
.ec-editing [contenteditable="true"]:focus { outline: 2px solid #f6a756; background: rgba(246, 167, 86, .12); }
.ec-editing [data-edited] { outline-color: rgba(125, 164, 242, .7); }
@media (max-width: 560px) { .ec-status { display: none; } }

/* ---------- Light look (the default, set by lesson.js; ?lite=0 gives the full glass look): the same page without the expensive effects ---------- */
.lite .panel { background: rgba(44, 51, 57, .78); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }   /* still a little see-through, without the blur */
.lite .panel > .panel-head, .lite .panel > .playlist, .lite .panel > .row, .lite .panel-inner > * { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lite .panel > .panel-head { background: rgba(58, 67, 74, .95); }
.lite .row.tinted, .lite .task.final { background: rgba(40, 48, 54, .6); }
.lite .fruity, .lite .fruity.held { filter: none; }

/* ---------- Baked glass (?glass=baked): the same frosted look without backdrop-filter ----------
   backdrop-filter has to blur a copy of everything behind a block again on every scrolled frame, and Chrome does that much slower than other browsers.
   Here the background is a fixed picture that does not move, and every block gets a fixed layer with a pre-blurred (soft) version of that
   same picture, clipped to the block: you see the frosted background through the block while the block scrolls over it. Nothing is
   blurred while scrolling; the layers are only moved by the browser. The edges of a block are plain HTML, so they always move exactly with the page. */
html.baked .panel > .panel-head, html.baked .panel > .playlist, html.baked .panel > .row, html.baked .panel-inner > * {
  background: var(--glass-tint);   /* plain grey backdrop; the fixed soft layer below paints over it, so the text is readable even if that layer is missing */
  -webkit-backdrop-filter: none; backdrop-filter: none;
  position: relative; clip-path: inset(0);
}
html.baked .panel > .panel-head::before, html.baked .panel > .playlist::before, html.baked .panel > .row::before, html.baked .panel-inner > *::before {
  content: ''; position: fixed; z-index: -1; pointer-events: none;
  left: var(--sbw); right: 0; top: 60px; bottom: -90px;                       /* 90px extra: one lane, for the parallax slide */
  will-change: transform; transform: translate3d(0, calc(var(--par, 0px) * -1), 0);   /* --par: the parallax offset, set by lesson.js */
  background:
    linear-gradient(var(--glass-tint), var(--glass-tint)),                                                          /* the tint of the glass */
    linear-gradient(to bottom, transparent 0, rgba(6, 12, 16, .07) 21px, transparent 42px, transparent 90px),       /* soft lane bands (the lane lines, blurred) */
    linear-gradient(to right, var(--pl-base) 0, var(--pl-dark) 30px, var(--pl-dark) 160px, var(--pl-base) 190px, var(--pl-base) 320px);   /* soft dark blocks every 4 bars */
  background-size: 100% 100%, 100% 90px, 320px 100%;
  background-position: 0 0, 0 0, calc(var(--ox) + 145px) 0;
}

/* ---------- Glass drawn by the video card (?glass=gl, assets/glass-gl.js) ----------
   One canvas behind the page draws the Playlist background and, at every panel, the frosted and refracting glass. The panels are plain transparent HTML. */
.glass-gl {
  position: fixed; z-index: 0; left: var(--sbw); top: 60px;
  width: calc(100% - var(--sbw)); height: calc(100vh - 60px); pointer-events: none; transition: left .2s ease;
}
html.gl .playlist-bg { display: none; }
html.gl .panel { background: transparent; border-color: rgba(10, 14, 17, .7); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }   /* keeps the dark outline */
html.gl .panel > .panel-head, html.gl .panel > .playlist, html.gl .panel > .row, html.gl .panel-inner > * { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.gl .row.tinted, html.gl .task.final { background: rgba(0, 0, 0, .1); }
@media (max-width: 900px) { .glass-gl { left: 0; width: 100%; } }

/* ---------- The "next lesson" block sits in the panel but outside its folding part. With the real glass (backdrop-filter) Edge did not blur it,
   so in that look this one block uses the baked technique (a fixed soft layer clipped to the block), which works the same in every browser. ---------- */
html:not(.baked):not(.lite):not(.gl) .panel > .row {
  background: var(--glass-tint); -webkit-backdrop-filter: none; backdrop-filter: none;
  position: relative; clip-path: inset(0);
}
html:not(.baked):not(.lite):not(.gl) .panel > .row::before {
  content: ''; position: fixed; z-index: -1; pointer-events: none;
  left: var(--sbw); right: 0; top: 60px; bottom: -90px;
  will-change: transform; transform: translate3d(0, calc(var(--par, 0px) * -1), 0);
  background:
    linear-gradient(var(--glass-tint), var(--glass-tint)),
    linear-gradient(to bottom, transparent 0, rgba(6, 12, 16, .07) 21px, transparent 42px, transparent 90px),
    linear-gradient(to right, var(--pl-base) 0, var(--pl-dark) 30px, var(--pl-dark) 160px, var(--pl-base) 190px, var(--pl-base) 320px);
  background-size: 100% 100%, 100% 90px, 320px 100%;
  background-position: 0 0, 0 0, calc(var(--ox) + 145px) 0;
}

/* A phone held sideways: the page fills the whole screen, under the notch and the rounded corners (viewport-fit=cover in every page).
   So that text and buttons do not end up under the notch, the edges of the bars and the content get the width of that area on top. */
@supports (padding: env(safe-area-inset-left)) {
  .topbar { padding-left: calc(20px + env(safe-area-inset-left)); padding-right: calc(20px + env(safe-area-inset-right)); }
  .content { padding-left: calc(40px + env(safe-area-inset-left)); padding-right: calc(40px + env(safe-area-inset-right)); }
  .landing { padding-left: calc(24px + env(safe-area-inset-left)); padding-right: calc(24px + env(safe-area-inset-right)); }
  @media (max-width: 900px) {
    .browser-title { padding-left: calc(9px + env(safe-area-inset-left)); padding-right: calc(6px + env(safe-area-inset-right)); }
    .bw { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    .to-top { right: calc(16px + env(safe-area-inset-right)); }
  }
  @media (max-width: 560px) {
    .topbar { padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }
    .content { padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }
  }
}

/* The scrollbar of the page, drawn after the FL Studio scrollbar: dark outline, a ticked dark track, a flat grey thumb with a light edge and
   a small button with an arrow at each end. Computers only: phones draw their own thin bar that cannot be styled.
   Chrome, Edge, Opera and Safari use the ::-webkit-scrollbar pieces; Firefox cannot draw shapes, only colours and thickness. */
@media (hover: hover) and (pointer: fine) {
  html::-webkit-scrollbar { width: 21px; height: 21px; background: #1d262b; }
  html::-webkit-scrollbar-track {
    border-left: 1px solid #1d262b; border-right: 1px solid #1d262b;
    background: #323a3f repeating-conic-gradient(#384146 0 25%, #323a3f 0 50%) 0 0 / 2px 2px;   /* the 1px checker of the FL track */
    box-shadow: inset 1px 0 0 #2b3338, inset -1px 0 0 #2b3338;
  }
  html::-webkit-scrollbar-thumb {
    border-left: 1px solid #1d262b; border-right: 1px solid #1d262b;
    background: #50595e; box-shadow: inset 0 0 0 1px #636c71, 0 1px 0 #283035, 0 -1px 0 #283035;
  }
  html::-webkit-scrollbar-corner { background: #1d262b; }
  html::-webkit-scrollbar-button:single-button {
    display: block; width: 21px; height: 17px; background-color: #50595e; background-repeat: no-repeat; background-position: 50% 50%;
    border-left: 1px solid #1d262b; border-right: 1px solid #1d262b; box-shadow: inset 0 0 0 1px #636c71;
  }
  html::-webkit-scrollbar-button:single-button:vertical:decrement {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M.7 5L4.5 1.2 8.3 5' fill='none' stroke='%231f292e' stroke-width='1.6'/%3E%3C/svg%3E");
  }
  html::-webkit-scrollbar-button:single-button:vertical:increment {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M.7 1L4.5 4.8 8.3 1' fill='none' stroke='%231f292e' stroke-width='1.6'/%3E%3C/svg%3E");
  }
  html::-webkit-scrollbar-button:single-button:horizontal { display: none; }   /* the page never scrolls sideways */
  @supports (-moz-appearance: none) {   /* Firefox: the closest it can do, thumb and track colour (not in Chrome: there it would switch the shapes above off) */
    html { scrollbar-color: #50595e #323a3f; scrollbar-width: auto; }
  }
}

/* The page never scrolls sideways: decoration that runs past the edge of the window is clipped.
   The root is "hidden" (the window itself then refuses to scroll sideways: iPhones and iPads need this, they ignore "clip" there);
   the body is "clip" so it does not become a scroll box of its own, which would break the sticky bars. */
html { overflow-x: hidden; overscroll-behavior-x: none; }
body { overflow-x: clip; }

/* ---------- Lesson 2: small drawn figures (inline SVG and the channel -> Mixer list) ---------- */
.routes { display: flex; flex-direction: column; gap: 6px; }
.route { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr); gap: 10px; align-items: center; }
.route span { white-space: nowrap; padding: 6px 10px; background: var(--panel-head); border: 1px solid var(--line); border-radius: 3px; font-size: 13px; font-weight: 600; }
.route span + i + span { border-left: 4px solid var(--orange); }
.route i { font-style: normal; color: var(--text-dim); }
.fig-svg { display: block; width: 100%; height: auto; }
.fig-svg text { font-family: var(--font-ui); font-size: 11px; fill: var(--text-dim); }
.fig-svg text.hi { fill: var(--text); font-weight: 600; }
.fig-svg text.dark { fill: #6a2c00; font-weight: 700; }
.fig-svg text.mid { text-anchor: middle; dominant-baseline: central; }
.fig-svg .box { fill: var(--panel-head); stroke: var(--line); }
.fig-svg .box.bus { stroke: var(--blue-soft); }
.fig-svg .box.master { fill: var(--orange); stroke: #ffcf94; }
.fig-svg .wire { fill: none; stroke: var(--text-dim); stroke-width: 1.5; }
.fig-svg .grid { stroke: var(--line); stroke-width: 1; }
.fig-svg .dash { stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 4 4; fill: none; }
.fig-svg .curve { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fig-svg .curve.soft { stroke: var(--blue-soft); }
/* Lesson 2: FL-style Piano Roll figures (static, scoped to .fig-svg.pr; every shape is drawn in code, no images) */
.fig-svg.pr .pr-bg { fill: #2a323a; stroke: #151a1e; }
.fig-svg.pr .pr-bar { fill: #2f3a44; }
.fig-svg.pr .pr-ic { fill: none; stroke: #e6edf1; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fig-svg.pr .pr-icf { fill: #e6edf1; }
.fig-svg.pr .pr-thick { stroke-width: 2.4; }
.fig-svg.pr .pr-pen { stroke: #f7d94a; fill: #f7d94a; stroke-width: 1; }
.fig-svg.pr .pr-penbg { fill: #3d4a55; stroke: none; }
.fig-svg.pr .pr-tab { fill: #a9e3a4; }
.fig-svg.pr .pr-tabic { fill: none; stroke: #ffffff; stroke-width: 1.6; stroke-linecap: round; }
.fig-svg.pr .pr-tabic2 { fill: #ffffff; }
.fig-svg.pr .pr-ruler { fill: #232b32; }
.fig-svg.pr .pr-ph { fill: #f5a53a; }
.fig-svg.pr .pr-rt { fill: #dfe7ec; font-size: 10px; font-weight: 600; }
.fig-svg.pr .pr-rw { fill: #3b4b56; }
.fig-svg.pr .pr-rb { fill: #34424c; }
.fig-svg.pr .pr-in { fill: #4a5f6d; }
.fig-svg.pr .pr-root { fill: #56707a; }
.fig-svg.pr .pr-out { fill: #232c32; }
.fig-svg.pr .pr-h { stroke: #2b373f; stroke-width: 1; }
.fig-svg.pr .pr-step { stroke: #2f3d47; stroke-width: 1; }
.fig-svg.pr .pr-beat { stroke: #526471; stroke-width: 1; }
.fig-svg.pr .pr-bar-l { stroke: #151b20; stroke-width: 1.6; }
.fig-svg.pr .pr-kw { fill: #dde2e5; }
.fig-svg.pr .pr-kb { fill: #20262a; }
.fig-svg.pr .pr-ksep { stroke: #8d979d; stroke-width: 1; }
.fig-svg.pr .pr-kl { fill: #3a454c; font-size: 10px; font-weight: 600; text-anchor: end; dominant-baseline: central; }
.fig-svg.pr .pr-n { stroke-width: 1; }
.fig-svg.pr .pr-n.pr-g { fill: #b9f0b6; stroke: #6aa86a; }
.fig-svg.pr .pr-n.pr-s { fill: #f5a3a3; stroke: #b95f5f; }
.fig-svg.pr .pr-nt { font-size: 10px; font-weight: 600; dominant-baseline: central; }
.fig-svg.pr .pr-nt.pr-gt { fill: #1f4a24; }
.fig-svg.pr .pr-nt.pr-st { fill: #6a1f1f; }
.fig-svg.pr .pr-lane { fill: #2b363f; stroke: #151b20; }
.fig-svg.pr .pr-lanek { fill: #2f3a44; }
.fig-svg.pr .pr-ll { fill: #dfe7ec; font-size: 10px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.fig-svg.pr .pr-stem { stroke-width: 1.6; }
.fig-svg.pr .pr-stem.pr-g { stroke: #b9f0b6; }
.fig-svg.pr .pr-stem.pr-s { stroke: #f5a3a3; }
.fig-svg.pr .pr-head.pr-g { fill: #b9f0b6; }
.fig-svg.pr .pr-head.pr-s { fill: #f5a3a3; }
.fig-svg .clip-bg { fill: var(--purple-soft); fill-opacity: .16; stroke: var(--purple-soft); }
.fig-svg .pt { fill: var(--purple-soft); stroke: #2f2a3b; stroke-width: 2; }
.fig-svg .knob { fill: var(--panel-head); stroke: var(--text-dim); stroke-width: 2; }
.fig-svg .knob-tick { stroke: var(--orange); stroke-width: 3; stroke-linecap: round; }
.steps-list { margin: 0; padding-left: 20px; font-size: 16px; color: var(--text-body); line-height: 1.55; }
.steps-list li::marker { color: var(--orange); font-weight: 700; }

/* Modifier keys (lesson 2) */
kbd { display: inline-block; padding: 1px 7px; font: 600 .86em var(--font-mono); color: var(--text); background: var(--panel-head); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; white-space: nowrap; }
.keycaps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.keycap { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px 12px; text-align: center; background: var(--panel-head); border: 1px solid var(--line); border-bottom-width: 5px; border-radius: 8px; }
.keycap b { font: 700 22px var(--font-mono); color: var(--text); }
.keycap i { font: normal 600 12px var(--font-mono); color: var(--text-dim); letter-spacing: .06em; }
.keycap span { margin-top: 6px; font-size: 12px; line-height: 1.35; color: var(--text-body); }
.keycap.ctrl { border-bottom-color: var(--blue-soft); }
.keycap.shift { border-bottom-color: var(--orange); }
.keycap.alt { border-bottom-color: var(--green); }
.keycard { padding: 16px; background: var(--panel-deep); border: 1px solid var(--line); border-top-width: 4px; border-radius: 6px; display: flex; flex-direction: column; gap: 10px; }
.keycard.ctrl { border-top-color: var(--blue-soft); }
.keycard.shift { border-top-color: var(--orange); }
.keycard.alt { border-top-color: var(--green); }
.keycard > b { font: 700 16px var(--font-mono); color: var(--text); }
.keycard ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--text-body); }
.keys-list { display: flex; flex-direction: column; }
.keys-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.keys-list > div:first-child { border-top: 0; }
.keys-list span { color: var(--text-body); }
.keys-list em { font-style: normal; color: var(--text-dim); text-align: right; }
.plugshot { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel-deep); }
.plugshot img { display: block; width: 100%; height: auto; }
.plugshot span { display: block; padding: 8px 12px; font-size: 13px; line-height: 1.5; color: var(--text-mute); border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .keycards.cards-3 { grid-template-columns: minmax(0, 1fr); } }
.row.row-wide { grid-template-columns: minmax(0, 1fr); }
.keys-list.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.keys-list.two > div:nth-child(2) { border-top: 0; }
@media (max-width: 760px) { .keys-list.two { grid-template-columns: minmax(0, 1fr); } .keys-list.two > div:nth-child(2) { border-top: 1px solid var(--line); } }

/* Start page backdrop: the program a course is about, blurred, fades in behind the page while the mouse is over that course (landing-bg.js) */
.cbg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.cbg-layer { position: absolute; inset: -24px; opacity: 0; transition: opacity .55s ease; filter: blur(6px); }
.cbg-layer.on { opacity: 1; }
.cbg-layer svg { display: block; width: 100%; height: 100%; }
.cbg::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease; background: radial-gradient(ellipse at 50% 30%, rgba(32, 43, 50, .38), rgba(32, 43, 50, .8)); }
.cbg.on::after { opacity: 1; }
.cbg-ph { animation: cbg-ph 22s linear infinite; }
@keyframes cbg-ph { from { transform: translateX(108px); } to { transform: translateX(1600px); } }
.cbg-m { transform-box: fill-box; transform-origin: 50% 100%; animation: cbg-m 1.7s ease-in-out infinite alternate; }
.cbg-m1 { animation-duration: 1.1s; animation-delay: -.4s; } .cbg-m2 { animation-duration: 2.3s; } .cbg-m3 { animation-duration: 1.4s; animation-delay: -.9s; }
@keyframes cbg-m { from { transform: scaleY(.18); } to { transform: scaleY(.8); } }
.landing { position: relative; z-index: 1; }
@media (hover: none) { .cbg { display: none; } }
@media (prefers-reduced-motion: reduce) { .cbg-ph, .cbg-m { animation: none; } .cbg-layer, .cbg::after { transition: none; } }
.fig-note { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--text-mute); }
