/* hub ui, the shared look for every page on the site.
   link it LAST in the head, after the page's own style block, so these
   tokens win. it only restyles, it never changes layout structure.
   pair it with /hub-ui.js for the dock, the reveal and the scroll ring.
   no build step, no library. plain css. */

:root{
  color-scheme:dark;

  /* ---- the design tokens. this block is the one source of truth. ----
     change a value here and the whole site follows. the private page
     /styleguide.html shows every one of them next to the parts built
     from them, open it after any change here. */

  /* color. one neutral ramp from near black to soft white, and teal as
     the one accent. contrast on the three surfaces, checked:
     text 16.7 to 18.7, secondary 6.8 to 7.7, muted 5.2 to 5.8, accent 9.5 to 10.7.
     muted is the lightest grey that may carry small text. */
  --ui-bg:#08090A;
  --ui-surface:#0F1011;
  --ui-raised:#17181A;
  --ui-border:rgba(255,255,255,.07);
  --ui-border-2:rgba(255,255,255,.12);
  --ui-border-3:rgba(255,255,255,.24);
  --ui-text:#F7F8F8;
  --ui-secondary:#9BA1A9;
  --ui-muted:#858B94;
  --ui-accent:#4FD1C5;
  --ui-accent-dim:rgba(79,209,197,.12);
  --ui-accent-border:rgba(79,209,197,.36);
  --ui-ink:#08090A;                 /* text on a light or accent fill */
  --ui-ok:#3ECF8E;
  --ui-warn:#E5B567;
  --ui-bad:#F08A6B;

  /* type. two families, nine sizes. nothing on the site is set in a size
     that is not on this list. headlines are weight 600, never heavier. */
  --ui-sans:'Geist','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --ui-mono:'Geist Mono','JetBrains Mono','IBM Plex Mono',ui-monospace,Menlo,monospace;
  --ui-t-xs:12px;                   /* meta, table heads, chips */
  --ui-t-sm:13.5px;                 /* controls, captions */
  --ui-t-base:15px;                 /* body in app screens */
  --ui-t-read:16.5px;               /* body in lessons */
  --ui-t-md:18px;                   /* panel titles, leads */
  --ui-t-lg:22px;                   /* card titles, numbers */
  --ui-t-xl:clamp(26px,3vw,38px);   /* section heads */
  --ui-t-2xl:clamp(32px,4.4vw,56px);/* page heads */
  --ui-t-3xl:clamp(38px,5.2vw,72px);/* hero heads, the ceiling */

  /* space. a 4px grid. gaps and padding come from this list. */
  --ui-s-1:4px; --ui-s-2:8px; --ui-s-3:12px; --ui-s-4:16px; --ui-s-5:24px;
  --ui-s-6:32px; --ui-s-7:48px; --ui-s-8:72px;

  /* corners. controls 10, cards 14, panels 16, pills round. */
  --ui-r-sm:7px; --ui-r-md:10px; --ui-r-lg:14px; --ui-r-xl:16px; --ui-r-pill:999px;
  --ui-radius:14px;

  /* motion. three speeds and two curves. feedback is fast, layout is
     medium, a page entrance is slow. things leave on the in curve, faster
     than they arrive. nothing loops on its own. */
  --ui-ease:cubic-bezier(.2,.8,.2,1);
  --ui-ease-in:cubic-bezier(.4,0,1,1);
  --ui-fast:.16s;
  --ui-med:.28s;
  --ui-slow:.6s;

  /* layers, lowest to highest */
  --ui-z-sticky:40; --ui-z-float:60; --ui-z-dock:90; --ui-z-dialog:200;

  /* the widths content is allowed to be */
  --ui-w-read:720px;                /* a column of prose */
  --ui-w-lesson:1040px;             /* a lesson with tables and instruments */
  --ui-w-app:1180px;                /* an app screen */
  --ui-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 12px 32px -18px rgba(0,0,0,.8);

  /* wings. each wing of the music hub has its own hue, set on
     body[data-wing] as --wing. it colors the kicker dot, the em in the
     hero headline and the top glow. teal is the default and the accent
     every product shares. products (plugins, glow roll) stay teal. */
  --ed-teal:#4FD1C5; --ed-amber:#E5B567; --ed-coral:#F08A6B; --ed-violet:#A99BF5;
  --ed-blue:#7FB0F5; --ed-lime:#B4D97A; --ed-pink:#EE9BC4; --ed-sand:#CFC3A8;
  --ed-display:'Geist','Inter',system-ui,sans-serif;
  --ed-serif:'Geist','Inter',system-ui,sans-serif;
  --ed-ink:#08090A;
  --ed-paper:#F7F8F8;
  --ed-r:16px;

  /* the product layer surfaces: top glow in the wing hue, the faint
     56px line grid, the card fill and the card shadow */
  --pr-glow:radial-gradient(60% 70% at 50% 0%,color-mix(in srgb,var(--wing,#4FD1C5) 16%,transparent),transparent 70%);
  --pr-grid:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px) 0 0/100% 56px,linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px) 0 0/56px 100%;
  --pr-card:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,0) 40%),var(--ui-surface);
  --pr-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 24px 60px -30px rgba(0,0,0,.9);

  /* map the names the older pages use onto the new ramp.
     public pages */
  --bg:var(--ui-bg); --bg0:var(--ui-bg);
  --ink:var(--ui-text); --txt:var(--ui-text);
  --mut:var(--ui-secondary); --dim:var(--ui-muted);
  --card:var(--ui-surface); --card2:var(--ui-raised);
  --line:var(--ui-border); --line2:var(--ui-border-2);
  --sans:var(--ui-sans); --disp:var(--ui-sans); --body:var(--ui-sans);
  --mono:var(--ui-mono);
  /* hub pages, on top of hub-tokens.css */
  --color-bg:var(--ui-bg);
  --color-surface:var(--ui-surface);
  --color-surface-2:var(--ui-raised);
  --color-border:var(--ui-border);
  --color-text:var(--ui-text);
  --color-muted:var(--ui-secondary);
  --bg2:#0E0E10;
}

html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  background:var(--ui-bg);
  font-family:var(--ui-sans);
  font-feature-settings:"ss01","cv11";
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3,h4{font-family:var(--ui-sans);text-wrap:balance}
p,li{text-wrap:pretty}
.mono,.label,.kicker,.sec-num,.sec-note,.pill,.badge,.brand,.hero>.cue{font-family:var(--ui-mono)}
::selection{background:rgba(79,209,197,.26);color:#fff}

/* quiet scrollbars */
*{scrollbar-width:thin;scrollbar-color:var(--ui-border-2) transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--ui-border-2);border-radius:99px;border:3px solid var(--ui-bg)}
::-webkit-scrollbar-track{background:transparent}

/* one focus ring everywhere */
:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px;border-radius:6px}

/* cards feel like surfaces, and answer the pointer */
.card,.share-item,.row,.path,.pdf-card,.cd-card,.nextup{
  border-radius:var(--ui-radius);
  transition:border-color var(--ui-med) var(--ui-ease),
             background-color var(--ui-med) var(--ui-ease),
             transform var(--ui-med) var(--ui-ease),
             box-shadow var(--ui-med) var(--ui-ease);
}
@media (hover:hover){
  .card:hover,.share-item:hover,.path:hover,.pdf-card:hover,.cd-card:hover{
    border-color:var(--ui-border-2);
    box-shadow:var(--ui-shadow);
  }
}

/* buttons press */
button,.btn,.fbtn,.tbtn,[role="button"]{
  transition:background-color var(--ui-fast) var(--ui-ease),
             border-color var(--ui-fast) var(--ui-ease),
             color var(--ui-fast) var(--ui-ease),
             transform var(--ui-fast) var(--ui-ease);
}
button:active,.btn:active,.fbtn:active,.tbtn:active{transform:scale(.97)}
input,select,textarea{transition:border-color var(--ui-fast) var(--ui-ease),box-shadow var(--ui-fast) var(--ui-ease)}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px var(--ui-accent-dim)}

/* sticky bars get glass instead of a flat block */
.topbar,.controls{
  background:color-mix(in srgb,var(--ui-bg) 78%,transparent);
  -webkit-backdrop-filter:saturate(1.4) blur(14px);
  backdrop-filter:saturate(1.4) blur(14px);
}

/* reveal on scroll. hub-ui.js adds .ui-rv, then .ui-in when it is seen.
   nothing is hidden unless the script is running. */
.ui-rv{opacity:0;transform:translateY(14px)}
.ui-rv.ui-in{opacity:1;transform:none;
  transition:opacity var(--ui-slow) var(--ui-ease),transform var(--ui-slow) var(--ui-ease)}

/* soft page to page fade where the browser supports it */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.22s}

/* the dock, a floating pill at the bottom of every page */
.ui-dock{
  position:fixed;z-index:90;left:50%;bottom:max(18px,env(safe-area-inset-bottom));
  transform:translateX(-50%);
  display:flex;align-items:center;gap:2px;padding:5px;
  background:color-mix(in srgb,var(--ui-surface) 86%,transparent);
  -webkit-backdrop-filter:saturate(1.5) blur(18px);
  backdrop-filter:saturate(1.5) blur(18px);
  border:1px solid var(--ui-border-2);border-radius:999px;
  box-shadow:0 18px 40px -14px rgba(0,0,0,.85),0 1px 0 rgba(255,255,255,.05) inset;
  transition:transform var(--ui-med) var(--ui-ease),opacity var(--ui-med) var(--ui-ease);
  max-width:calc(100vw - 20px);
}
.ui-dock.ui-dock-away{transform:translate(-50%,140%);opacity:0;pointer-events:none}
.ui-dock a,.ui-dock button{
  all:unset;box-sizing:border-box;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  height:42px;min-width:42px;padding:0 13px;border-radius:999px;
  font-family:var(--ui-sans);font-size:13px;font-weight:500;letter-spacing:0;
  color:var(--ui-secondary);white-space:nowrap;text-transform:none;
  transition:background-color var(--ui-fast) var(--ui-ease),color var(--ui-fast) var(--ui-ease),transform var(--ui-fast) var(--ui-ease);
}
.ui-dock a:hover,.ui-dock button:hover{color:var(--ui-text);background:var(--ui-raised)}
.ui-dock a:active,.ui-dock button:active{transform:scale(.94)}
.ui-dock a:focus-visible,.ui-dock button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:-2px}
.ui-dock a[aria-current="page"]{color:#06201D;background:var(--ui-accent);font-weight:600}
.ui-dock svg{width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ui-dock-sep{width:1px;height:18px;margin:0 4px;background:var(--ui-border-2);flex-shrink:0}
.ui-dock .ui-ring{position:relative;padding:0;width:42px}
.ui-dock .ui-ring svg.ui-ring-svg{position:absolute;inset:7px;width:28px;height:28px;transform:rotate(-90deg)}
.ui-dock .ui-ring circle{fill:none;stroke-width:2.2}
.ui-dock .ui-ring .ui-ring-bg{stroke:var(--ui-border-2)}
.ui-dock .ui-ring .ui-ring-fg{stroke:var(--ui-accent);stroke-dasharray:75.4;stroke-dashoffset:75.4;transition:stroke-dashoffset .12s linear}
.ui-dock .ui-ring svg.ui-ring-arrow{width:13px;height:13px;position:relative}
@media (max-width:560px){
  .ui-dock a,.ui-dock button{padding:0 10px;font-size:12px}
  .ui-dock a .ui-dock-label{display:none}
  .ui-dock a[aria-current="page"] .ui-dock-label{display:inline}
}
/* leave room so the dock never covers the last line of a page */
body.ui-has-dock{padding-bottom:92px}
/* the hub has its own bottom sheet on phones, the dock steps aside there */
@media (max-width:1023px){
  body.ui-hub .ui-dock{display:none}
  body.ui-hub.ui-has-dock{padding-bottom:0}
}
/* the dock replaces the old back to top button on the book */
body.ui-has-dock #totop{display:none}

/* on the hub the dock centers on the content, not under the sidebar,
   and the toast sits above it */
@media (min-width:1024px){
  body.ui-hub:has(.rd-sidebar) .ui-dock{left:calc(50% + 142px)}
}
/* the toast hides by sliding below the edge, so keep it fully off screen
   until it is shown, then lift it above the dock */
.toast{transform:translate(-50%,160px);opacity:0;transition:transform .3s var(--ui-ease),opacity .2s var(--ui-ease);z-index:95}
.toast.show{transform:translate(-50%,0);opacity:1}
body.ui-has-dock .toast.show{transform:translate(-50%,-66px)}
@media (max-width:1023px){body.ui-hub .toast.show{transform:translate(-50%,-66px)}}


/* ------------------------------------------------------------------
   the hub skin. everything below only applies on the signed in hub
   pages (body.ui-hub, set by hub-ui.js). the idea: quiet like a good
   portfolio. small type, plain text nav with a dot, rows over boxes,
   white as the main ink and teal only where something is alive.
   ------------------------------------------------------------------ */
body.ui-hub{font-size:15px;line-height:1.5}

/* labels drop the spaced mono look, they read as plain small text */
body.ui-hub .label,body.ui-hub .sec-note,body.ui-hub .pill,body.ui-hub .badge,
body.ui-hub .nu-label,body.ui-hub .rd-nav-group-label,body.ui-hub .strip span,
body.ui-hub .strip-refresh,body.ui-hub .tbtn,body.ui-hub .fbtn,body.ui-hub .rd-tab,
body.ui-hub .bar-meta,body.ui-hub .todo-group-meta,body.ui-hub .rd-mobile-groups button,
body.ui-hub footer{font-family:var(--ui-sans);letter-spacing:0}
body.ui-hub .label{font-size:12.5px;color:var(--ui-muted);font-weight:500}
body.ui-hub .sub{font-size:13.5px;color:var(--ui-secondary)}

/* the top strip, one calm line */
body.ui-hub .strip{background:transparent;border-bottom:1px solid var(--ui-border)}
body.ui-hub .strip span,body.ui-hub .strip-refresh{font-size:12px;color:var(--ui-muted)}
body.ui-hub .strip b{color:var(--ui-text);font-weight:500}
body.ui-hub .strip-refresh{color:var(--ui-secondary);font-weight:500}
body.ui-hub .strip-refresh:hover{color:var(--ui-text);text-decoration:none}

/* content sits in a narrower column so lines stay readable */
body.ui-hub .wrap,body.ui-hub .strip-inner{max-width:980px}

/* hero, from a billboard to a greeting */
body.ui-hub .hero{padding:44px 0 4px}
body.ui-hub .hero .cue,body.ui-hub .todo-cue{display:none}
body.ui-hub .hero h1{font-size:clamp(26px,3.2vw,34px);font-weight:600;letter-spacing:-.025em;line-height:1.1;margin:0 0 10px}
body.ui-hub .hero h1 br{display:none}
body.ui-hub .hero h1 em{color:var(--ui-muted);-webkit-text-stroke:0;margin-left:.28em}
body.ui-hub .hero-sub{font-size:15px;line-height:1.55;max-width:560px;color:var(--ui-secondary)}
body.ui-hub .hero-sub strong{color:var(--ui-text);font-weight:500}
body.ui-hub .hero-meta{gap:6px;margin-top:18px}
body.ui-hub .pill{font-size:12.5px;padding:6px 11px;border-color:var(--ui-border);background:transparent;color:var(--ui-muted)}
body.ui-hub .pill b{font-weight:500}
body.ui-hub .pill.teal{color:var(--ui-text);background:var(--ui-surface);border-color:var(--ui-border-2)}

/* section heads, sentence sized */
body.ui-hub section{padding-top:44px}
body.ui-hub .sec-head{margin-bottom:14px;align-items:center}
body.ui-hub .sec-head h2{font-size:18px;font-weight:600;letter-spacing:-.01em;line-height:1.3}
body.ui-hub .sec-num{display:none}
body.ui-hub .sec-note{font-size:12.5px;color:var(--ui-muted)}
body.ui-hub .rd-greet{font-size:15px;font-weight:500}

/* surfaces */
body.ui-hub .card,body.ui-hub .share-item,body.ui-hub .row,body.ui-hub .cd-card,
body.ui-hub .todo-overall,body.ui-hub .rd-finish,body.ui-hub .divider-note{
  background:var(--ui-surface);border-color:var(--ui-border);border-radius:14px}
body.ui-hub .row:hover{background:var(--ui-raised)}
body.ui-hub .card h3,body.ui-hub .row h3,body.ui-hub .share-item h3,body.ui-hub .cd-card h3{font-weight:500;font-size:15px}
body.ui-hub .big-num{font-size:30px;font-weight:600;letter-spacing:-.03em}
body.ui-hub .db-num{font-size:22px;font-weight:600;letter-spacing:-.02em}
body.ui-hub .price{font-family:var(--ui-sans);font-weight:600;font-size:24px}
body.ui-hub .idx{font-family:var(--ui-mono);color:var(--ui-muted);font-size:12px}
body.ui-hub .bar,body.ui-hub .todo-bar,body.ui-hub .todo-group-bar{height:4px;background:var(--ui-raised)}
body.ui-hub ul.clean li::before{content:"";width:4px;height:4px;border-radius:50%;background:var(--ui-muted);margin-top:.62em}

/* next up, the one loud thing on the page stays warm but not neon */
body.ui-hub .nextup{background:var(--ui-surface);border-color:var(--ui-border-2)}
body.ui-hub .nextup .nu-label{font-size:12.5px;color:var(--ui-accent)}
body.ui-hub .nextup h3{font-family:var(--ui-sans);font-size:clamp(18px,2.4vw,22px);font-weight:600;letter-spacing:-.015em;line-height:1.25}
body.ui-hub .cd-time{font-family:var(--ui-mono);font-variant-numeric:tabular-nums}

/* buttons. white is the primary, teal is for state */
body.ui-hub .btn{border-radius:999px;border-color:var(--ui-border-2);font-weight:500;font-size:13px;min-height:36px;padding:0 14px}
body.ui-hub .btn.primary{background:var(--ui-text);color:#0A0A0B;border-color:var(--ui-text)}
body.ui-hub .btn:hover{border-color:var(--ui-muted)}
body.ui-hub .tbtn,body.ui-hub .fbtn,body.ui-hub .rd-tab{font-size:12.5px;font-weight:500;min-height:34px;border-color:var(--ui-border);color:var(--ui-secondary)}
body.ui-hub .tbtn.active,body.ui-hub .fbtn.active,body.ui-hub .rd-tab.active{background:var(--ui-text);color:#0A0A0B;border-color:var(--ui-text);font-weight:500}
body.ui-hub .badge{font-size:11.5px;padding:4px 9px;border-color:var(--ui-border-2)}
body.ui-hub .badge.live{background:var(--ui-accent-dim);color:var(--ui-accent);border-color:var(--ui-accent-border);font-weight:500}
body.ui-hub .search{border-radius:999px;border-color:var(--ui-border);background:var(--ui-surface);font-size:14px;min-height:42px}
body.ui-hub .todo-group-head h3{font-family:var(--ui-sans);font-size:15px;font-weight:600}
body.ui-hub .todo-group-head h3 .gnum{font-family:var(--ui-mono);color:var(--ui-muted);letter-spacing:0}
body.ui-hub .todo-count{font-weight:600;letter-spacing:-.03em}

/* the sidebar becomes a plain text list, the dot marks where you are */
@media (min-width:1024px){
  body.ui-hub .rd-sidebar{background:transparent;border-right:0;width:244px;padding:28px 18px 24px 28px}
  body.ui-hub .rd-side-brand{font-family:var(--ui-sans);letter-spacing:0;font-size:12.5px;color:var(--ui-muted)}
  body.ui-hub .rd-side-owner{font-weight:600;font-size:15px;margin-bottom:10px}
  body.ui-hub .rd-nav-group{margin-top:20px}
  body.ui-hub .rd-nav-group-label{font-size:12px;color:var(--ui-muted);padding:0 10px;margin-bottom:4px}
  body.ui-hub .rd-nav-item{position:relative;min-height:0;height:30px;line-height:30px;padding:0 10px;font-size:13.5px;font-weight:500;
    font-family:var(--ui-sans);color:var(--ui-muted);border-radius:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    transition:color var(--ui-fast) var(--ui-ease),padding-left var(--ui-med) var(--ui-ease)}
  body.ui-hub .rd-nav-item:hover{background:transparent;color:var(--ui-text)}
  body.ui-hub .rd-nav-item.active{background:transparent;color:var(--ui-text);font-weight:500;padding-left:22px}
  body.ui-hub .rd-nav-item.active::before{content:"";position:absolute;left:9px;top:50%;width:5px;height:5px;margin-top:-2.5px;border-radius:50%;background:var(--ui-text)}
  body.ui-hub .rd-side-foot .sub{font-size:12px;color:var(--ui-muted)}
}
@media (max-width:1023px){
  body.ui-hub .rd-sidebar,body.ui-hub .rd-mobile-sheet{background:color-mix(in srgb,var(--ui-bg) 88%,transparent);
    -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
  body.ui-hub .rd-mobile-groups button{font-size:12px;font-weight:500}
  body.ui-hub .rd-mobile-groups button.active{color:var(--ui-text)}
}

/* views. home shows today and the list, a sidebar item opens one focused
   view. hub-ui.js sets these classes, the hub's own filter still decides
   which sections exist. */
body.ui-hub section.ui-off{display:none}
body.ui-view-focus .hero,body.ui-view-focus #live,body.ui-view-focus #dbOverview{display:none}
.ui-viewhead{display:flex;align-items:center;gap:14px;padding:40px 0 0}
.ui-viewhead[hidden]{display:none}
.ui-viewback{all:unset;box-sizing:border-box;cursor:pointer;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;
  border:1px solid var(--ui-border-2);color:var(--ui-secondary);transition:color var(--ui-fast),border-color var(--ui-fast),transform var(--ui-fast)}
.ui-viewback:hover{color:var(--ui-text);border-color:var(--ui-muted)}
.ui-viewback:active{transform:scale(.94)}
.ui-viewback:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.ui-viewback svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ui-viewcrumb{margin:0 0 2px;font-size:12.5px;color:var(--ui-muted)}
.ui-viewtitle{margin:0;font-size:22px;font-weight:600;letter-spacing:-.02em;line-height:1.2}
body.ui-view-focus .controls{margin-top:18px}
.ui-viewmore{all:unset;box-sizing:border-box;cursor:pointer;display:block;margin:36px 0 0;padding:14px 0;width:100%;text-align:center;
  font-size:13px;color:var(--ui-muted);border-top:1px solid var(--ui-border);transition:color var(--ui-fast)}
.ui-viewmore:hover{color:var(--ui-text)}
.ui-viewmore:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px;border-radius:6px}
.ui-viewmore[hidden]{display:none}

@media print{.ui-viewhead,.ui-viewmore{display:none}}

/* ------------------------------------------------------------------
   the app shell. the hub and the learn page share one product look:
   a sidebar of grouped items with icons, a page header with an icon
   tile and a count, panels with their own toolbars, tables with status
   chips. the learn page uses the .app-* classes directly, the hub maps
   its older rd-* markup onto the same look further down.
   ------------------------------------------------------------------ */
.app-ico{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

.app{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}
.app-side{position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column;padding:20px 12px 16px;
  border-right:1px solid var(--ui-border);background:#0C0C0E}
.app-brand{display:flex;align-items:center;gap:10px;padding:4px 10px 18px;font-weight:600;font-size:14px;letter-spacing:-.01em;color:var(--ui-text);text-decoration:none}
.app-brand i{width:26px;height:26px;border-radius:8px;background:var(--ui-text);color:#0A0A0B;display:grid;place-items:center;font:700 12px/1 var(--ui-mono);font-style:normal}
.app-group{margin-top:14px}
.app-group-label{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:6px;width:100%;padding:6px 10px;
  font:600 10.5px/1 var(--ui-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ui-muted)}
.app-group-label::after{content:"";width:5px;height:5px;border-right:1.4px solid currentColor;border-bottom:1.4px solid currentColor;
  transform:rotate(45deg) translateY(-2px);transition:transform var(--ui-med) var(--ui-ease)}
.app-group.closed .app-group-label::after{transform:rotate(-45deg)}
.app-group.closed .app-item{display:none}
.app-group-label:focus-visible{outline:2px solid var(--ui-accent);outline-offset:-2px;border-radius:6px}
.app-item{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:10px;width:100%;height:34px;padding:0 10px;margin-top:2px;
  border-radius:9px;font:500 13.5px/1 var(--ui-sans);color:var(--ui-secondary);
  transition:background-color var(--ui-fast) var(--ui-ease),color var(--ui-fast) var(--ui-ease)}
.app-item:hover{color:var(--ui-text);background:rgba(255,255,255,.035)}
.app-item[aria-current="true"],.app-item.active{color:var(--ui-text);background:var(--ui-raised);box-shadow:0 0 0 1px var(--ui-border) inset}
.app-item:focus-visible{outline:2px solid var(--ui-accent);outline-offset:-2px}
.app-item span.t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-item small{font:500 11px/1 var(--ui-mono);color:var(--ui-muted)}
.app-side-foot{margin-top:auto;padding-top:16px}

.app-main{min-width:0;padding:22px clamp(16px,3vw,36px) 120px}
.app-head{display:flex;align-items:center;gap:14px;padding:6px 0 22px}
.app-tile{width:40px;height:40px;border-radius:11px;border:1px solid var(--ui-border-2);background:var(--ui-surface);display:grid;place-items:center;flex-shrink:0;color:var(--ui-text)}
.app-tile .app-ico{width:18px;height:18px}
.app-head h1{margin:0;font-size:17px;font-weight:600;letter-spacing:-.01em;line-height:1.3;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.app-head p{margin:2px 0 0;font-size:13px;color:var(--ui-muted)}
.app-count{font:600 10.5px/1 var(--ui-mono);padding:4px 6px;border-radius:6px;background:var(--ui-accent-dim);color:var(--ui-accent)}
.app-head .app-actions{margin-left:auto;display:flex;gap:8px;align-items:center}

.app-panel{border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-surface);padding:18px;margin-bottom:14px}
.app-panel-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.app-panel-head h2{margin:0;font-size:15px;font-weight:600;letter-spacing:-.01em}
.app-panel-head p{margin:2px 0 0;font-size:12.5px;color:var(--ui-muted)}
.app-panel-head .app-actions{margin-left:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}

.app-btn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 12px;border-radius:9px;
  font:500 13px/1 var(--ui-sans);color:var(--ui-secondary);border:1px solid var(--ui-border-2);background:var(--ui-raised);white-space:nowrap;
  transition:color var(--ui-fast),border-color var(--ui-fast),background-color var(--ui-fast),transform var(--ui-fast)}
.app-btn:hover{color:var(--ui-text);border-color:var(--ui-muted)}
.app-btn:active{transform:scale(.97)}
.app-btn:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.app-btn.primary{background:var(--ui-accent);border-color:var(--ui-accent);color:#06201D;font-weight:600}
.app-btn.primary:hover{background:#63DCD0;border-color:#63DCD0;color:#06201D}
.app-input{height:34px;padding:0 12px;border-radius:9px;border:1px solid var(--ui-border-2);background:var(--ui-raised);color:var(--ui-text);
  font:400 13px var(--ui-sans);outline:none;min-width:0;width:200px}
.app-input::placeholder{color:var(--ui-muted)}
.app-input:focus{border-color:var(--ui-accent-border)}

.app-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.app-card{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:13px;
  border:1px solid var(--ui-border);background:var(--ui-raised);min-width:0;
  transition:border-color var(--ui-med) var(--ui-ease),transform var(--ui-med) var(--ui-ease)}
.app-card:hover{border-color:var(--ui-border-2);transform:translateY(-2px)}
.app-card:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.app-card-top{display:flex;align-items:center;gap:10px}
.app-card-top .app-tile{width:30px;height:30px;border-radius:8px}
.app-card-top .app-tile .app-ico{width:15px;height:15px}
.app-card strong{font-size:14px;font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-card p{margin:0;font-size:12.5px;line-height:1.45;color:var(--ui-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.app-meter{height:4px;border-radius:99px;background:var(--ui-border);overflow:hidden}
.app-meter i{display:block;height:100%;width:0;border-radius:99px;background:var(--ui-accent);transition:width .7s var(--ui-ease)}

.app-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.app-stat{border:1px solid var(--ui-border);border-radius:13px;background:var(--ui-surface);padding:14px;min-width:0}
.app-stat small{display:block;font-size:12px;color:var(--ui-muted);margin-bottom:8px}
.app-stat b{display:block;font-size:22px;font-weight:600;letter-spacing:-.025em;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-stat a{color:var(--ui-accent);text-decoration:none;font-size:14px;font-weight:500}
.app-stat a:hover{text-decoration:underline}

.app-chip{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;border-radius:6px;font:500 11.5px/1 var(--ui-sans);
  border:1px solid var(--ui-border-2);color:var(--ui-secondary);white-space:nowrap}
.app-chip::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.app-chip.ok{color:#3ECF8E;border-color:rgba(62,207,142,.3);background:rgba(62,207,142,.08)}
.app-chip.todo{color:var(--ui-muted)}
.app-chip.kind{color:#9DB2FF;border-color:rgba(157,178,255,.28);background:rgba(157,178,255,.07)}
.app-chip.kind::before{display:none}

.app-tabs{display:flex;gap:18px;border-bottom:1px solid var(--ui-border);margin:0 0 4px}
.app-tab{all:unset;box-sizing:border-box;cursor:pointer;padding:9px 0;font:500 13px/1 var(--ui-sans);color:var(--ui-muted);
  border-bottom:2px solid transparent;margin-bottom:-1px;transition:color var(--ui-fast)}
.app-tab:hover{color:var(--ui-text)}
.app-tab[aria-selected="true"]{color:var(--ui-text);border-bottom-color:var(--ui-text)}
.app-tab:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px;border-radius:4px}

.app-table{width:100%;border-collapse:collapse}
.app-table th{font:500 12px/1 var(--ui-sans);color:var(--ui-muted);text-align:left;padding:12px 10px;white-space:nowrap}
.app-table td{padding:0 10px;height:46px;border-top:1px solid var(--ui-border);font-size:13.5px;vertical-align:middle}
.app-table tr:hover td{background:rgba(255,255,255,.02)}
.app-table td.c{width:34px;padding-right:0}
.app-table td.r,.app-table th.r{text-align:right}
.app-table a.t{color:var(--ui-text);text-decoration:none;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46ch}
.app-table a.t:hover{color:var(--ui-accent)}
.app-table tr.done a.t{color:var(--ui-muted)}
.app-table .open{color:var(--ui-muted);text-decoration:none;font-size:12.5px}
.app-table .open:hover{color:var(--ui-text)}
.app-check{all:unset;box-sizing:border-box;cursor:pointer;width:34px;height:44px;display:grid;place-items:center}
.app-check i{width:16px;height:16px;border-radius:5px;border:1.5px solid var(--ui-border-2);display:grid;place-items:center;transition:all var(--ui-fast) var(--ui-ease)}
.app-check:hover i{border-color:var(--ui-accent)}
.app-check:focus-visible i{outline:2px solid var(--ui-accent);outline-offset:2px}
.app-check i::after{content:"";width:8px;height:4.5px;border-left:1.8px solid #06201D;border-bottom:1.8px solid #06201D;
  transform:translateY(-1px) rotate(-45deg) scale(0);transition:transform .2s var(--ui-ease)}
.app-check[aria-pressed="true"] i{background:var(--ui-accent);border-color:var(--ui-accent)}
.app-check[aria-pressed="true"] i::after{transform:translateY(-1px) rotate(-45deg) scale(1)}
.app-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:14px;font-size:12.5px;color:var(--ui-muted)}
.app-pager{display:flex;gap:4px;align-items:center}
.app-pager button{all:unset;box-sizing:border-box;cursor:pointer;min-width:30px;height:30px;padding:0 9px;border-radius:8px;text-align:center;
  font:500 12.5px/30px var(--ui-sans);color:var(--ui-secondary);border:1px solid transparent}
.app-pager button:hover{color:var(--ui-text);border-color:var(--ui-border-2)}
.app-pager button[aria-current="true"]{color:var(--ui-text);background:var(--ui-raised);border-color:var(--ui-border-2)}
.app-pager button:disabled{opacity:.35;cursor:default}
.app-pager button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:1px}
.app-empty{padding:36px 0;text-align:center;color:var(--ui-muted);font-size:13.5px}
.app-menu{display:none}

@media (max-width:900px){
  .app{grid-template-columns:1fr}
  .app-side{position:fixed;z-index:80;left:0;top:0;bottom:0;width:min(280px,84vw);transform:translateX(-102%);
    transition:transform var(--ui-med) var(--ui-ease);box-shadow:20px 0 50px -20px rgba(0,0,0,.9)}
  .app.side-open .app-side{transform:none}
  .app-menu{display:inline-flex}
  .app-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .app-table th.h,.app-table td.h{display:none}
  .app-main{padding-top:14px}
}

/* the hub, same shell on the older markup */
@media (min-width:1024px){
  body.ui-hub .rd-sidebar{background:#0C0C0E;border-right:1px solid var(--ui-border);width:264px;padding:20px 12px 16px}
  body.ui-hub .rd-side-head{padding:4px 10px 6px}
  body.ui-hub .rd-nav-group{margin-top:14px}
  body.ui-hub .rd-nav-group-label{cursor:pointer;display:flex;align-items:center;gap:6px;padding:6px 10px;margin:0;
    font:600 10.5px/1 var(--ui-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ui-muted)}
  body.ui-hub .rd-nav-group-label::after{content:"";width:5px;height:5px;border-right:1.4px solid currentColor;border-bottom:1.4px solid currentColor;
    transform:rotate(45deg) translateY(-2px);transition:transform var(--ui-med) var(--ui-ease)}
  body.ui-hub .rd-nav-group.ui-closed .rd-nav-group-label::after{transform:rotate(-45deg)}
  body.ui-hub .rd-nav-group.ui-closed .rd-nav-item{display:none}
  body.ui-hub .rd-nav-group-label:focus-visible{outline:2px solid var(--ui-accent);outline-offset:-2px;border-radius:6px}
  body.ui-hub .rd-nav-item{display:flex;align-items:center;gap:10px;height:34px;line-height:1;padding:0 10px;margin-top:2px;border-radius:9px;
    font-size:13.5px;font-weight:500;color:var(--ui-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.ui-hub .rd-nav-item:hover{color:var(--ui-text);background:rgba(255,255,255,.035)}
  body.ui-hub .rd-nav-item.active{padding-left:10px;color:var(--ui-text);background:var(--ui-raised);box-shadow:0 0 0 1px var(--ui-border) inset}
  body.ui-hub .rd-nav-item.active::before{content:none}
}
body.ui-hub .btn.primary,body.ui-hub .tbtn.active,body.ui-hub .fbtn.active,body.ui-hub .rd-tab.active{
  background:var(--ui-accent);border-color:var(--ui-accent);color:#06201D;font-weight:600}
body.ui-hub .btn{border-radius:9px;background:var(--ui-raised)}
body.ui-hub .tbtn,body.ui-hub .fbtn,body.ui-hub .rd-tab{border-radius:9px}
body.ui-hub .search{border-radius:10px}
body.ui-hub .wrap,body.ui-hub .strip-inner{max-width:1120px}
.ui-viewhead .app-tile{width:40px;height:40px}
.ui-viewtitle{font-size:17px;display:flex;align-items:center;gap:8px}
.ui-viewhead{padding-top:26px}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .ui-rv{opacity:1;transform:none}
  *,*::before,*::after{transition-duration:.01ms !important;animation-duration:.01ms !important}
  @view-transition{navigation:none}
}
@media print{.ui-dock{display:none}body.ui-has-dock{padding-bottom:0}.ui-rv{opacity:1;transform:none}}

/* ==================================================================
   the product layer. the site should read like a pro software site:
   near black, one accent, precise medium sized type, thin borders, and
   real visuals (the diagrams and the tools themselves) doing the
   talking. color is an accent, never a fill. no giant type.
   ================================================================== */
body{--wing:var(--ed-teal)}
body[data-wing="production"]{--wing:var(--ed-amber)}
body[data-wing="tools"]{--wing:var(--ed-violet)}
body[data-wing="loops"]{--wing:var(--ed-coral)}
body[data-wing="glossary"]{--wing:var(--ed-blue)}
h1,h2,h3{font-family:var(--ed-display)}

/* shared pieces */
.pr-btn,.pr-btn-2{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:10px;font:500 14px/1 var(--ui-sans);
  text-decoration:none;white-space:nowrap;transition:background-color var(--ui-fast) var(--ui-ease),border-color var(--ui-fast) var(--ui-ease),transform var(--ui-fast) var(--ui-ease)}
.pr-btn{background:var(--ui-text);color:#08090A;border:1px solid var(--ui-text)}
.pr-btn:hover{background:#fff}
.pr-btn-2{background:var(--ui-raised);color:var(--ui-text);border:1px solid var(--ui-border-2)}
.pr-btn-2:hover{border-color:rgba(255,255,255,.24)}
.pr-btn:active,.pr-btn-2:active{transform:scale(.98)}
.pr-btn:focus-visible,.pr-btn-2:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}

/* the hero art, a stack of real diagrams. hub-ui.js adds it. */
.ui-art{position:relative;height:clamp(220px,26vw,360px);min-width:0;pointer-events:none}
.ui-art img{position:absolute;display:block;width:78%;height:auto;border-radius:10px;border:1px solid var(--ui-border-2);
  box-shadow:0 30px 70px -24px rgba(0,0,0,.95),0 1px 0 rgba(255,255,255,.08) inset;background:#232323}
.ui-art img:nth-child(1){right:0;top:0;transform:rotate(1.2deg)}
.ui-art img:nth-child(2){left:0;top:26%;transform:rotate(-1.6deg);width:72%}
.ui-art img:nth-child(3){right:4%;top:56%;transform:rotate(.6deg);width:66%}
@media (max-width:900px){.ui-art{height:clamp(190px,52vw,300px);margin-top:28px}}

/* ---------- top bar, every public page ---------- */
body:has(.topbar) .topbar{border-bottom:1px solid var(--ui-border);padding-top:12px;padding-bottom:12px;align-items:center}
body:has(.topbar) .brand{font-family:var(--ui-sans);text-transform:none;letter-spacing:-.01em;font-size:15px;font-weight:600}
body:has(.topbar) .brand b{color:var(--ui-muted)}
body:has(.topbar) .topnav a,body:has(.topbar) .nav-group>button{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:13.5px;font-weight:500;color:var(--ui-secondary);border-radius:8px;padding:7px 11px}
body:has(.topbar) .topnav a:hover,body:has(.topbar) .nav-group>button:hover{color:var(--ui-text);background:rgba(255,255,255,.04)}
body:has(.topbar) .topnav a.on,body:has(.topbar) .nav-group.on>button{border-bottom:0;color:var(--ui-text);padding-bottom:7px}
body:has(.topbar) .nav-drop{border-radius:12px;padding:6px;border-color:var(--ui-border-2);background:var(--ui-surface);box-shadow:0 24px 60px -20px rgba(0,0,0,.9)}
body:has(.topbar) .nav-drop a,body:has(.topbar) .nav-drop .soon{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:13.5px;border-left:0;border-radius:8px;padding:9px 11px}
body:has(.topbar) .nav-drop a small,body:has(.topbar) .nav-drop .soon small{font-size:12px;letter-spacing:0}
body:has(.topbar) .menu-btn{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:13.5px;border-radius:8px;padding:7px 12px}
body:has(.topbar) .mnav a,body:has(.topbar) .mnav .mgroup,body:has(.topbar) .mnav .soon{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:14px}
body:has(.topbar) .mnav .mgroup{font-size:12px;color:var(--ui-muted)}
body:has(.topbar) .search{border-radius:8px;font-family:var(--ui-sans);padding:8px 12px;font-size:13.5px}
body:has(.topbar) .kw{font-family:inherit;font-style:normal;font-weight:500;font-size:1em;color:var(--ui-text);text-decoration:none}

/* ---------- music hub home and whats new (pages with the live strip) ---------- */
body:has(.strip.gut){--gutter:clamp(16px,4vw,48px)}
body:has(.strip.gut) .gut{padding-left:var(--gutter);padding-right:var(--gutter)}
body:has(.strip.gut) .strip{border-bottom:0;gap:6px;padding-top:14px;padding-bottom:0;text-transform:none;letter-spacing:0;font-family:var(--ui-sans);font-size:12.5px}
body:has(.strip.gut) .strip span{margin:0;padding:5px 10px;border:1px solid var(--ui-border);border-radius:999px;color:var(--ui-secondary);background:var(--ui-surface)}
body:has(.strip.gut) .strip span:last-child{border-right:1px solid var(--ui-border)}
body:has(.strip.gut) .strip b{font-weight:500;color:var(--ui-text)}
body:has(.strip.gut) .strip .live{color:var(--ed-teal)}

body:has(.strip.gut) .hero{position:relative;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(24px,4vw,64px);align-items:center;
  padding-top:clamp(40px,6vw,88px);padding-bottom:clamp(40px,6vw,88px);border-bottom:1px solid var(--ui-border);
  background:var(--pr-glow),var(--pr-grid);background-color:transparent}
body:has(.strip.gut) .hero>*{grid-column:1}
body:has(.strip.gut) .hero>.ui-art{grid-column:2;grid-row:1 / span 3}
body:has(.strip.gut) .hero h1{font-weight:600;font-size:clamp(40px,5.6vw,80px);line-height:1.02;letter-spacing:-.04em;max-width:14ch;margin:0 0 20px}
body:has(.strip.gut) .hero .deck{font-size:clamp(16px,1.3vw,18px);line-height:1.55;color:var(--ui-secondary);max-width:520px;margin-bottom:28px}
body:has(.strip.gut) .hero-links{gap:8px}
body:has(.strip.gut) .hero-links a{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 16px;border-radius:10px;font:500 14px/1 var(--ui-sans);
  text-transform:none;letter-spacing:0;border:1px solid var(--ui-border-2);background:var(--ui-raised);color:var(--ui-text)}
body:has(.strip.gut) .hero-links a:first-child{background:var(--ui-text);color:#08090A;border-color:var(--ui-text)}
body:has(.strip.gut) .hero-links a b{color:inherit;font-weight:500}
body:has(.strip.gut) .hero-links a:hover{border-color:rgba(255,255,255,.24);color:var(--ui-text)}
body:has(.strip.gut) .hero-links a:first-child:hover{background:#fff;color:#08090A}
@media (max-width:900px){
  body:has(.strip.gut) .hero{grid-template-columns:1fr}
  body:has(.strip.gut) .hero>.ui-art{grid-column:1;grid-row:auto}
}

body:has(.strip.gut) .cue{border-bottom:0;padding-top:clamp(48px,6vw,88px);padding-bottom:0}
body:has(.strip.gut) .cue-label{font-family:var(--ui-sans);font-size:13px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--ui-muted);margin-bottom:18px}
body:has(.strip.gut) .cue-label b{color:var(--ed-teal);font-weight:500}
body:has(.strip.gut) .cue h2{font-weight:600;font-size:clamp(28px,3.4vw,44px);line-height:1.08;letter-spacing:-.035em;margin-bottom:12px}
body:has(.strip.gut) .cue .cue-deck{font-family:var(--ui-sans);font-size:16px;line-height:1.55;color:var(--ui-secondary);max-width:560px}

/* the wings as product cards, each with a real diagram on top */
body:has(.cue-01) .rows{border-top:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body:has(.cue-01) .rows .row{--shot:none;--hue:var(--ed-teal);display:flex;flex-direction:column;gap:0;padding:0;border:1px solid var(--ui-border);border-radius:16px;
  background:var(--pr-card);box-shadow:var(--pr-shadow);overflow:hidden;
  transition:border-color var(--ui-med) var(--ui-ease),transform var(--ui-med) var(--ui-ease)}
body:has(.cue-01) .rows .row::before{content:"";display:block;aspect-ratio:16/7;background:#141516 var(--shot) center 18px/88% auto no-repeat;border-bottom:1px solid var(--ui-border)}
body:has(.cue-01) .rows .row:nth-child(1){--shot:url(img/theory/kb-mode-phrygian.svg)}
body:has(.cue-01) .rows .row:nth-child(2){--shot:url(img/production/gl-bus-chain.svg);--hue:var(--ed-amber)}
body:has(.cue-01) .rows .row:nth-child(3){--shot:url(img/theory/dd-rolling-bass.svg);--hue:var(--ed-coral)}
body:has(.cue-01) .rows .row:nth-child(4){--shot:url(img/theory/kb-natural-minor.svg);--hue:var(--ed-violet)}
body:has(.cue-01) .rows .row:nth-child(5){--shot:url(img/theory/dd-frequency-zones.svg);--hue:var(--ed-blue)}
body:has(.cue-01) .rows a.row:hover{background:var(--pr-card);border-color:var(--ui-border-2);transform:translateY(-3px);box-shadow:var(--pr-shadow)}
body:has(.cue-01) .rows .row:hover h3,body:has(.cue-01) .rows .row:hover .num{transform:none}
body:has(.cue-01) .rows .row .date{display:none}
body:has(.cue-01) .rows .row .num{order:1;font-family:var(--ui-mono);font-size:12px;letter-spacing:0;color:var(--hue);padding:18px 20px 0}
body:has(.cue-01) .rows .row .body{order:2;padding:6px 20px 0}
body:has(.cue-01) .rows .row h3{font-weight:600;font-size:22px;line-height:1.2;letter-spacing:-.025em;margin:0 0 6px}
body:has(.cue-01) .rows .row p{font-family:var(--ui-sans);font-size:14px;line-height:1.5;color:var(--ui-secondary);max-width:none}
body:has(.cue-01) .rows .row .meta{order:3;margin-top:auto;padding:16px 20px 18px;display:flex;align-items:center;justify-content:space-between;gap:10px;
  font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:12.5px;color:var(--ui-muted);text-align:left;white-space:normal}
body:has(.cue-01) .rows .row .meta b{display:inline;margin:0;font-weight:400;color:var(--ui-muted)}
body:has(.cue-01) .rows .row .meta .go{color:var(--ui-text);font-weight:500;white-space:nowrap}
body:has(.cue-01) .rows a.row:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
body:has(.cue-01) .rows .row.soon{opacity:1}
body:has(.cue-01) .rows .row.soon::before{filter:grayscale(1) brightness(.6)}
body:has(.cue-01) .rows .row.soon h3{color:var(--ui-secondary)}
@media (max-width:1000px){body:has(.cue-01) .rows{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){body:has(.cue-01) .rows{grid-template-columns:1fr}}

/* new this morning */
body:has(.cue-01) .latest{position:relative;border:1px solid var(--ui-border);border-radius:16px;background:var(--pr-card);box-shadow:var(--pr-shadow);
  padding:clamp(22px,3vw,36px);overflow:hidden}
body:has(.cue-01) .latest::after{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--ed-teal)}
body:has(.cue-01) .latest .kick{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:13px;color:var(--ui-muted);margin-bottom:14px}
body:has(.cue-01) .latest .kick b{color:var(--ed-teal);font-weight:500}
body:has(.cue-01) .latest h3{font-weight:600;font-size:clamp(24px,2.8vw,36px);line-height:1.12;letter-spacing:-.03em;margin-bottom:12px;max-width:22ch}
body:has(.cue-01) .latest p{font-family:var(--ui-sans);color:var(--ui-secondary);font-size:15.5px;line-height:1.55;max-width:600px;margin-bottom:22px}
body:has(.cue-01) .latest a{display:inline-flex;align-items:center;height:38px;padding:0 14px;margin:0 8px 8px 0;border-radius:10px;font:500 13.5px/1 var(--ui-sans);
  text-transform:none;letter-spacing:0;border:1px solid var(--ui-border-2);background:var(--ui-raised);color:var(--ui-text)}
body:has(.cue-01) .latest a:first-of-type{background:var(--ui-text);color:#08090A;border-color:var(--ui-text)}
body:has(.cue-01) .latest a:hover{border-color:rgba(255,255,255,.24);color:var(--ui-text)}
body:has(.cue-01) .latest a:first-of-type:hover{background:#fff;color:#08090A}

body:has(.cue-01) .grow-row{grid-template-columns:minmax(160px,240px) 1fr;padding:20px 0;border-color:var(--ui-border)}
body:has(.cue-01) .grow-row .k{font-family:var(--ui-sans);text-transform:none;letter-spacing:-.01em;font-size:15px;font-weight:600}
body:has(.cue-01) .grow-row p{font-family:var(--ui-sans);font-size:15px;line-height:1.55;color:var(--ui-secondary)}

body:has(.strip.gut) footer{padding-top:clamp(56px,7vw,96px)}
body:has(.strip.gut) .foot-nav{gap:4px;padding-bottom:24px}
body:has(.strip.gut) .foot-nav a{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:13.5px;font-weight:500;padding:7px 11px;border-radius:8px;color:var(--ui-secondary)}
body:has(.strip.gut) .foot-nav a:hover{color:var(--ui-text);background:rgba(255,255,255,.04)}
body:has(.strip.gut) .foot-meta{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:12.5px;color:var(--ui-muted);border-top:1px solid var(--ui-border);padding-top:18px}
body:has(.strip.gut) .wordmark{display:none}

/* ---------- book, lesson and tools pages ---------- */
body:has(.topbar):not(:has(.strip.gut)) .hero{position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:clamp(24px,4vw,64px);align-items:center;
  margin:0 !important;width:auto;max-width:none;padding:clamp(40px,6vw,84px) clamp(16px,4vw,48px);
  background:var(--pr-glow),var(--pr-grid);border-bottom:1px solid var(--ui-border);overflow:hidden}
body:has(.topbar):not(:has(.strip.gut)) .hero>*{grid-column:1}
body:has(.topbar):not(:has(.strip.gut)) .hero>.ui-art{grid-column:2;grid-row:1 / span 6}
body:has(.topbar):not(:has(.strip.gut)) .hero .kicker{display:inline-flex;align-items:center;gap:8px;justify-self:start;font-family:var(--ui-sans);font-size:12.5px;font-weight:500;
  letter-spacing:0;text-transform:lowercase;color:var(--ui-secondary);margin-bottom:18px;padding:5px 10px 5px 8px;border:1px solid var(--ui-border-2);border-radius:999px;background:var(--ui-surface)}
body:has(.topbar):not(:has(.strip.gut)) .hero .kicker::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--wing)}
body:has(.topbar):not(:has(.strip.gut)) .hero h1{font-weight:600;font-size:clamp(38px,5.2vw,72px);line-height:1.04;letter-spacing:-.04em;max-width:16ch;margin:0 0 18px;color:var(--ui-text)}
body:has(.topbar):not(:has(.strip.gut)) .hero h1 em{font-style:normal;font-weight:600;color:var(--wing);-webkit-text-stroke:0}
body:has(.topbar):not(:has(.strip.gut)) .hero p.lead,body:has(.topbar):not(:has(.strip.gut)) .hero .lead{color:var(--ui-secondary);font-size:clamp(16px,1.3vw,18px);line-height:1.55;max-width:560px;margin-bottom:20px}
body:has(.topbar):not(:has(.strip.gut)) .hero .fine{color:var(--ui-muted);font-family:var(--ui-sans);font-size:13px;letter-spacing:0;text-transform:none}
body:has(.topbar):not(:has(.strip.gut)) .hero .stats{border:0;gap:8px;margin-bottom:24px}
body:has(.topbar):not(:has(.strip.gut)) .hero .stat{display:block;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-surface);padding:12px 16px;margin:0;min-width:104px}
body:has(.topbar):not(:has(.strip.gut)) .hero .stat b{display:block;font-family:var(--ui-sans);font-weight:600;font-size:22px;letter-spacing:-.03em;line-height:1.1;color:var(--ui-text)}
body:has(.topbar):not(:has(.strip.gut)) .hero .stat span{display:block;margin-top:4px;font-family:var(--ui-sans);font-size:12px;letter-spacing:0;text-transform:lowercase;font-weight:400;color:var(--ui-muted)}
body:has(.topbar):not(:has(.strip.gut)) .hero .cta-row{gap:8px}
body:has(.topbar):not(:has(.strip.gut)) .hero .btn{display:inline-flex;align-items:center;height:40px;padding:0 16px;border-radius:10px;font:500 14px/1 var(--ui-sans);
  text-transform:none;letter-spacing:0;border:1px solid var(--ui-border-2);background:var(--ui-raised);color:var(--ui-text)}
body:has(.topbar):not(:has(.strip.gut)) .hero .btn:first-child{background:var(--ui-text);color:#08090A;border-color:var(--ui-text)}
body:has(.topbar):not(:has(.strip.gut)) .hero .btn:hover{text-decoration:none;border-color:rgba(255,255,255,.24)}
@media (max-width:900px){
  body:has(.topbar):not(:has(.strip.gut)) .hero{grid-template-columns:1fr}
  body:has(.topbar):not(:has(.strip.gut)) .hero>.ui-art{grid-column:1;grid-row:auto}
}

body:has(.topbar) .sec-head h2,body:has(.topbar) .mod-head h2{font-weight:600;font-size:clamp(26px,3vw,38px);line-height:1.1;letter-spacing:-.035em}
body:has(.topbar) .sec-head,body:has(.topbar) .mod-head{align-items:center;gap:12px;margin-bottom:10px}
body:has(.topbar) .sec-head .idx,body:has(.topbar) .sec-head .num,body:has(.topbar) .mod-head .num{font-family:var(--ui-mono);font-size:12px;letter-spacing:0;
  color:var(--wing);border:1px solid color-mix(in srgb,var(--wing) 35%,transparent);background:color-mix(in srgb,var(--wing) 8%,transparent);border-radius:6px;padding:4px 7px}
body:has(.topbar) .sec-head .idx::before{content:none}
body:has(.topbar) .sec-head .n{font-family:var(--ui-sans);font-size:13px;letter-spacing:0;text-transform:lowercase;color:var(--ui-muted)}
body:has(.topbar) .sec-sub,body:has(.topbar) .sec-deck,body:has(.topbar) .mod-deck{font-size:16px;line-height:1.55;color:var(--ui-secondary);max-width:640px}
body:has(.topbar) .section,body:has(.topbar) .mod,body:has(.topbar) .sec{padding-top:clamp(48px,6vw,88px)}
body:has(.topbar) .card,body:has(.topbar) .gcard,body:has(.topbar) .tip,body:has(.topbar) .lpcard,body:has(.topbar) .path{border-radius:14px;border-color:var(--ui-border);background:var(--pr-card)}
body:has(.topbar) .card h3.ct,body:has(.topbar) .path h3{font-weight:600;letter-spacing:-.02em;line-height:1.2;font-size:19px}
body:has(.topbar) .card .kicker{font-family:var(--ui-sans);font-size:12.5px;font-weight:500;letter-spacing:0;text-transform:lowercase;color:var(--wing)}
body:has(.topbar) .callout{border-radius:12px}
body:has(.topbar) .toc{border:0;background:transparent;border-bottom:1px solid var(--ui-border)}
body:has(.topbar) .toc-inner{gap:4px;border:0;padding-top:8px;padding-bottom:8px}
body:has(.topbar) .toc-inner a{font-family:var(--ui-sans);text-transform:lowercase;letter-spacing:0;font-size:13px;font-weight:500;padding:6px 11px;border:1px solid transparent;border-radius:8px;color:var(--ui-secondary)}
body:has(.topbar) .toc-inner a:hover{color:var(--ui-text);background:rgba(255,255,255,.04);text-decoration:none}
body:has(.topbar) .toc-inner a.on{background:var(--ui-raised);border-color:var(--ui-border-2);color:var(--ui-text)}
body:has(.topbar) .secnav a{font-family:var(--ui-sans);text-transform:none;letter-spacing:0;font-size:13.5px;font-weight:500;border-radius:10px;padding:10px 14px}

/* the launcher. one panel that lists every product on the site, opened
   from the dock. the list lives in PRODUCTS in hub-ui.js. */
.ui-launch{position:fixed;z-index:89;left:50%;bottom:calc(max(18px,env(safe-area-inset-bottom)) + 64px);
  width:min(620px,calc(100vw - 20px));max-height:min(70vh,640px);overflow-y:auto;
  transform:translate(-50%,14px) scale(.98);opacity:0;visibility:hidden;transform-origin:50% 100%;
  background:color-mix(in srgb,var(--ui-surface) 92%,transparent);-webkit-backdrop-filter:saturate(1.5) blur(22px);backdrop-filter:saturate(1.5) blur(22px);
  border:1px solid var(--ui-border-2);border-radius:18px;padding:16px;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.95),0 1px 0 rgba(255,255,255,.05) inset;
  transition:transform var(--ui-med) var(--ui-ease),opacity var(--ui-med) var(--ui-ease),visibility var(--ui-med)}
.ui-launch.open{transform:translate(-50%,0) scale(1);opacity:1;visibility:visible}
.ui-launch h2{margin:6px 8px 4px;font-family:var(--ui-sans);font-weight:600;font-size:18px;letter-spacing:-.02em;line-height:1;color:var(--ui-text)}
.ui-launch>p{margin:0 8px 12px;font:400 13.5px/1.45 var(--ui-sans);color:var(--ui-muted)}
.ui-launch h3{margin:14px 8px 6px;font:500 12px/1 var(--ui-mono);letter-spacing:0;color:var(--ui-muted)}
.ui-launch-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.ui-launch a,.ui-launch .ui-soon{display:flex;align-items:center;gap:12px;padding:10px;border-radius:10px;text-decoration:none;color:var(--ui-text);min-width:0;
  transition:background-color var(--ui-fast) var(--ui-ease)}
.ui-launch a:hover{background:var(--ui-raised)}
.ui-launch a:focus-visible{outline:2px solid var(--ui-accent);outline-offset:-2px}
.ui-launch a[aria-current="page"]{background:var(--ui-raised)}
.ui-launch .ui-sw{width:34px;height:34px;border-radius:9px;background:color-mix(in srgb,var(--hue) 14%,transparent);border:1px solid color-mix(in srgb,var(--hue) 34%,transparent);color:var(--hue);display:grid;place-items:center;flex-shrink:0}
.ui-launch .ui-sw .app-ico{width:18px;height:18px;stroke-width:1.8}
.ui-launch .ui-tx{min-width:0;flex:1}
.ui-launch .ui-tx b{display:block;font:600 14.5px/1.2 var(--ui-sans);letter-spacing:-.01em}
.ui-launch .ui-tx span{display:block;font:400 12.5px/1.35 var(--ui-sans);color:var(--ui-muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-launch .ui-soon{opacity:.62}
.ui-launch .ui-soon .ui-sw{background:transparent;border:1.5px dashed var(--ui-border-2);color:var(--ui-muted)}
.ui-launch .ui-tag{font:500 10.5px/1 var(--ui-mono);padding:4px 7px;border-radius:6px;border:1px solid var(--ui-border-2);color:var(--ui-muted);flex-shrink:0}
@media (max-width:560px){.ui-launch-grid{grid-template-columns:1fr}}
@media (max-width:1023px){body.ui-hub .ui-launch{display:none}}
@media print{.ui-launch{display:none}}

/* ---------- the hub ---------- */
body.ui-hub .hero{margin-top:18px;padding:clamp(22px,3vw,36px);border:1px solid var(--ui-border);border-radius:16px;background:var(--pr-glow),var(--pr-card);box-shadow:var(--pr-shadow)}
body.ui-hub .hero h1{font-weight:600;font-size:clamp(30px,3.6vw,46px);line-height:1.05;letter-spacing:-.035em;margin:0 0 10px}
body.ui-hub .hero h1 em{font-style:normal;color:var(--ui-muted);margin-left:.25em}
body.ui-hub .sec-head h2{font-weight:600;font-size:clamp(20px,2vw,24px);letter-spacing:-.025em;line-height:1.2}
body.ui-hub .ui-viewtitle{font-weight:600;font-size:clamp(22px,2.4vw,28px);letter-spacing:-.03em;line-height:1.15}
body.ui-hub .card,body.ui-hub .share-item,body.ui-hub .row,body.ui-hub .cd-card,body.ui-hub .todo-overall,body.ui-hub .rd-finish{border-radius:14px;background:var(--pr-card)}
body.ui-hub .big-num{font-weight:600;font-size:30px;letter-spacing:-.035em}
body.ui-hub .nextup{position:relative;background:var(--pr-card);border:1px solid var(--ui-border-2);border-radius:14px;overflow:hidden}
body.ui-hub .nextup::before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--ed-teal)}
body.ui-hub .nextup h3{font-weight:600;font-size:clamp(18px,2vw,22px);letter-spacing:-.02em}
body.ui-hub .rd-side-owner{font-weight:600;font-size:15px;letter-spacing:-.01em}
body.ui-hub .btn.primary,body.ui-hub .tbtn.active,body.ui-hub .fbtn.active,body.ui-hub .rd-tab.active{background:var(--ui-text);border-color:var(--ui-text);color:#08090A;font-weight:500}

/* hero layout fix: the art sits beside the text without stretching the
   text rows. text keeps to the left half, art is pinned to the right.
   the important on padding-right beats the lesson template's own
   .hero{padding-right:...!important}, which let the headline run under the art. */
@media (min-width:901px){
  body:has(.strip.gut) .hero,body:has(.topbar):not(:has(.strip.gut)) .hero{display:block;padding-right:52% !important}
  body:has(.strip.gut) .hero>.ui-art,body:has(.topbar):not(:has(.strip.gut)) .hero>.ui-art{position:absolute;right:clamp(16px,4vw,48px);top:50%;
    width:44%;transform:translateY(-50%)}
  body:has(.topbar):not(:has(.strip.gut)) .hero .stats{display:flex;flex-wrap:wrap}
}

/* ---------- hub play, the real instruments in the heroes ---------- */
.pl{--pl:var(--wing,var(--ed-teal));border:1px solid var(--ui-border-2);border-radius:14px;background:#0E0F11;box-shadow:0 30px 70px -30px rgba(0,0,0,.95),0 1px 0 rgba(255,255,255,.06) inset;
  overflow:hidden;text-align:left;pointer-events:auto;outline:none}
.pl:focus-visible{border-color:var(--pl);box-shadow:0 0 0 3px color-mix(in srgb,var(--pl) 22%,transparent)}
.pl-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;height:44px;padding:0 10px 0 14px;border-bottom:1px solid var(--ui-border);background:#131416}
.pl-title{display:flex;align-items:center;gap:8px;font:500 12.5px/1 var(--ui-mono);color:var(--ui-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-title::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--pl);flex-shrink:0}
.pl-btn{all:unset;box-sizing:border-box;cursor:pointer;height:28px;padding:0 11px;border-radius:7px;font:500 12.5px/28px var(--ui-sans);color:#08090A;background:var(--ui-text);white-space:nowrap;
  transition:background-color var(--ui-fast) var(--ui-ease),transform var(--ui-fast) var(--ui-ease)}
.pl-btn:hover{background:#fff}
.pl-btn:active{transform:scale(.96)}
.pl-btn:focus-visible{outline:2px solid var(--pl);outline-offset:2px}
.pl-btn[aria-pressed="true"]{background:var(--pl)}
.pl-pills{display:flex;gap:4px;flex-wrap:wrap;padding:10px 12px 0}
.pl-pill{all:unset;box-sizing:border-box;cursor:pointer;height:26px;padding:0 9px;border-radius:7px;font:500 12px/24px var(--ui-sans);color:var(--ui-secondary);border:1px solid var(--ui-border);
  transition:color var(--ui-fast),border-color var(--ui-fast),background-color var(--ui-fast)}
.pl-pill:hover{color:var(--ui-text);border-color:var(--ui-border-2)}
.pl-pill[aria-pressed="true"]{color:var(--ui-text);background:var(--ui-raised);border-color:var(--ui-border-2)}
.pl-pill:focus-visible{outline:2px solid var(--pl);outline-offset:1px}
.pl-keys{position:relative;height:clamp(120px,13vw,168px);margin:12px 12px 0;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.pl-key{all:unset;box-sizing:border-box;position:absolute;top:0;cursor:pointer;display:flex;align-items:flex-end;justify-content:center;
  transition:background-color .09s linear,transform .09s var(--ui-ease)}
.pl-w{height:100%;background:#ECEBE8;border:1px solid #0E0F11;border-radius:0 0 5px 5px;padding-bottom:9px}
.pl-b{height:60%;background:#17181B;border:1px solid #0E0F11;border-radius:0 0 4px 4px;z-index:2;padding-bottom:7px}
.pl-key i{width:6px;height:6px;border-radius:50%;background:transparent}
.pl-w.pl-in i{background:rgba(8,9,10,.34)}
.pl-b.pl-in i{background:rgba(255,255,255,.42)}
.pl-key.pl-root{background:var(--pl)}
.pl-key.pl-root i{background:#08090A}
.pl-w:not(.pl-in){background:#B9B8B4}
.pl-b:not(.pl-in){background:#101113}
.pl-key:hover{filter:brightness(1.08)}
.pl-key.pl-down{background:var(--pl);transform:translateY(2px)}
.pl-key:focus-visible{outline:2px solid var(--pl);outline-offset:-3px;z-index:3}
.pl-hint{margin:0;padding:10px 14px 12px;font:400 12px/1.45 var(--ui-sans);color:var(--ui-muted)}
.pl-grid{display:grid;gap:5px;padding:14px 12px 4px}
.pl-row{display:grid;grid-template-columns:38px repeat(16,minmax(0,1fr));gap:3px;align-items:center}
.pl-name{font:500 11px/1 var(--ui-mono);color:var(--ui-muted)}
.pl-step{all:unset;box-sizing:border-box;cursor:pointer;aspect-ratio:1/1.15;min-height:20px;border-radius:4px;background:#191A1D;border:1px solid transparent;
  transition:background-color .08s linear,transform .08s var(--ui-ease)}
.pl-step.pl-beat{background:#202125}
.pl-step:hover{border-color:var(--ui-border-2)}
.pl-step[aria-pressed="true"]{background:var(--pl)}
.pl-step.pl-now{box-shadow:0 0 0 1.5px var(--ui-text) inset}
.pl-step.pl-now[aria-pressed="true"]{transform:scale(1.12);filter:brightness(1.25)}
.pl-step:focus-visible{outline:2px solid var(--ui-text);outline-offset:1px}
.pl-foot{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:8px 12px 12px}
.pl-foot .pl-hint{padding:0;flex:1;min-width:160px}
.pl-swing{display:flex;align-items:center;gap:8px;font:500 12px/1 var(--ui-mono);color:var(--ui-secondary)}
.pl-swing input{width:110px;accent-color:var(--pl)}
.pl-swing b{font-weight:500;min-width:30px;color:var(--ui-text)}

/* the hero slot now holds an instrument, not a stack of pictures */
.ui-art{height:auto;display:grid;align-content:center}
@media (min-width:901px){
  body:has(.strip.gut) .hero>.ui-art,body:has(.topbar):not(:has(.strip.gut)) .hero>.ui-art{width:min(44%,560px)}
}
@media (max-width:900px){.ui-art{height:auto;margin-top:28px}}

/* review pass 1 fixes */
body:has(.cue-01) .rows .row::before{width:100%;flex-shrink:0}
@media (min-width:1001px){
  body:has(.cue-01) .rows{grid-template-columns:repeat(6,minmax(0,1fr))}
  body:has(.cue-01) .rows .row{grid-column:span 2}
  body:has(.cue-01) .rows .row:nth-child(-n+2){grid-column:span 3}
  body:has(.cue-01) .rows .row:nth-child(-n+2)::before{aspect-ratio:16/5.4}
}

/* review pass 2 and 3 fixes */
@media (max-width:640px){
  .ui-dock{gap:0;padding:4px}
  .ui-dock a,.ui-dock button{padding:0;min-width:40px;width:40px;height:40px}
  .ui-dock a .ui-dock-label,.ui-dock button .ui-dock-label,.ui-dock a[aria-current="page"] .ui-dock-label{display:none}
  .ui-dock-sep{margin:0 2px}
  .ui-dock .ui-ring{width:40px}
  .ui-dock .ui-ring svg.ui-ring-svg{inset:6px}
}
body:has(.topbar) .hero .lead,body:has(.topbar) .hero p.lead,body:has(.topbar) .hero .deck{font-family:var(--ui-sans)}
body:has(.topbar) .hero h1{text-wrap:balance}
.pl-keys{min-height:120px}
body:has(.topbar):not(:has(.strip.gut)) .hero h1 em{text-decoration:none;border:0;background:none}

/* lessons table on phones: let titles wrap, drop the extra columns */
@media (max-width:900px){
  .app-table{table-layout:fixed}
  .app-table a.t{white-space:normal;max-width:none;padding:10px 0;line-height:1.35}
  .app-table td{height:auto}
  .app-table th:first-child,.app-table td.c{width:38px}
  .app-table th:nth-child(4),.app-table td:nth-child(4){width:92px}
  .app-table th.r,.app-table td.r{display:none}
  .app-panel{padding:14px}
}

/* whats new: the drop list in the same quiet row style */
body:has(.strip.gut):not(:has(.cue-01)) .rows{border-top:1px solid var(--ui-border)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row{border-color:var(--ui-border);padding:22px 8px;border-radius:0;transition:background-color var(--ui-fast) var(--ui-ease)}
body:has(.strip.gut):not(:has(.cue-01)) .rows a.row:hover{background:rgba(255,255,255,.025);box-shadow:none}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row:hover h3,body:has(.strip.gut):not(:has(.cue-01)) .rows .row:hover .num{transform:none}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row .num{font-family:var(--ui-mono);font-size:12px;letter-spacing:0;color:var(--ui-muted)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row .date{font-family:var(--ui-sans);text-transform:lowercase;letter-spacing:0;font-size:13px;color:var(--ui-secondary)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row h3{font-weight:600;font-size:20px;line-height:1.25;letter-spacing:-.02em;margin-bottom:6px}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row h3 .new{font-family:var(--ui-sans);font-size:11.5px;font-weight:500;letter-spacing:0;text-transform:lowercase;color:var(--ed-teal);
  padding:3px 7px;border:1px solid rgba(79,209,197,.32);border-radius:6px;background:rgba(79,209,197,.08)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row h3 .new i{display:none}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row p{font-family:var(--ui-sans);font-size:14.5px;line-height:1.55;color:var(--ui-secondary)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row .filed{font-family:var(--ui-sans);text-transform:lowercase;letter-spacing:0;font-size:12.5px;color:var(--ui-muted)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row .meta{font-family:var(--ui-sans);text-transform:lowercase;letter-spacing:0;font-size:12.5px;color:var(--ui-muted)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row .meta b{font-weight:500;color:var(--ui-secondary)}
body:has(.strip.gut):not(:has(.cue-01)) .rows .row .meta .go{color:var(--ui-text)}

/* midi downloads under a lesson's "try this" */
.midi-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 0 !important;padding-top:14px;border-top:1px solid var(--ui-border)}
.midi-row>span{font:400 12.5px/1 var(--ui-sans);color:var(--ui-muted);margin-right:4px}
.midi-dl{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px 0 10px;border-radius:9px;border:1px solid var(--ui-border-2);background:var(--ui-raised);
  font:500 13px/1 var(--ui-sans);color:var(--ui-text) !important;text-decoration:none !important;white-space:nowrap;
  transition:border-color var(--ui-fast) var(--ui-ease),transform var(--ui-fast) var(--ui-ease)}
.midi-dl::before{content:"";width:14px;height:14px;flex-shrink:0;background:var(--wing,var(--ui-accent));
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='m6.500 10.500 5.500 5.500 5.500-5.500'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='m6.500 10.500 5.500 5.500 5.500-5.500'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E") center/contain no-repeat}
.midi-dl::after{content:".mid";font:400 11px/1 var(--ui-mono);color:var(--ui-muted)}
.midi-dl:hover{border-color:rgba(255,255,255,.24)}
.midi-dl:active{transform:scale(.97)}
.midi-dl:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}

/* the newsletter link in a public footer, only there once NEWSLETTER_URL is set in hub-ui.js */
.ui-news{color:var(--ed-teal)!important;font-weight:500}
.ui-news:hover{text-decoration:underline}

/* the last dropdown in the top nav opens toward the left. opening to the
   right it hung 17px past the edge of the window and gave the what's new
   page a sideways scroll bar at laptop width. */
.topnav .nav-group:last-of-type .nav-drop{left:auto;right:0}

/* small things, built by buildDetails in hub-ui.js */
.ui-skip{position:fixed;left:12px;top:-60px;z-index:400;padding:10px 14px;border-radius:9px;background:var(--ui-text);color:#08090A!important;font:500 13.5px/1 var(--ui-sans);text-decoration:none!important;transition:top .15s}
.ui-skip:focus{top:12px;outline:2px solid var(--ed-teal);outline-offset:2px}
[id]{scroll-margin-top:84px}
.ui-anchor{all:unset;cursor:pointer;margin-left:10px;padding:2px 7px;border-radius:6px;font:500 11.5px/1.4 var(--ui-mono);letter-spacing:0;text-transform:none;color:var(--ui-muted);opacity:0;transition:opacity .15s,color .15s}
.sub:hover .ui-anchor,.ui-anchor:focus-visible{opacity:1}
.ui-anchor:hover{color:var(--ed-teal)}
.ui-anchor:focus-visible{outline:2px solid var(--ed-teal);outline-offset:1px}
@media (hover:none){.ui-anchor{opacity:.55}}
.ui-continue{display:grid;grid-template-columns:1fr auto;gap:2px 16px;align-items:baseline;margin:0 0 12px;padding:16px 18px;border:1px solid rgba(79,209,197,.32);border-radius:14px;background:rgba(79,209,197,.06);text-decoration:none!important;transition:border-color .15s,transform .15s}
.ui-continue:hover{border-color:var(--ed-teal);transform:translateY(-2px)}
.ui-continue:focus-visible{outline:2px solid var(--ed-teal);outline-offset:3px}
.ui-continue span{grid-column:1 / -1;font:500 11.5px/1.3 var(--ui-mono);letter-spacing:.06em;color:var(--ed-teal)}
.ui-continue b{font:600 17px/1.3 var(--ui-sans);letter-spacing:-.01em;color:var(--ui-text)}
.ui-continue i{font:400 12.5px/1.3 var(--ui-sans);font-style:normal;color:var(--ui-muted);white-space:nowrap}
@media (max-width:640px){.ui-continue{grid-template-columns:1fr}.ui-continue i{white-space:normal}}
/* the section links row on a lesson page scrolls sideways on a phone and keeps the lit one in view */
@media (max-width:640px){.toc-inner.subtabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.toc-inner.subtabs::-webkit-scrollbar{display:none}.toc-inner.subtabs a{flex:0 0 auto}}
/* fingers. the instruments and the module groups were built at mouse size. */
@media (pointer:coarse),(max-width:640px){
  .pl-btn{height:36px;line-height:36px;padding:0 14px}
  .pl-pill{height:34px;line-height:32px;padding:0 12px}
  .pl-step{min-height:34px;aspect-ratio:auto}
  .app-group-label{min-height:36px}
}

/* the explorer on the modules page (hub-play.js, HubPlay.explorer) */
.px{display:block}
.px-set{display:flex;align-items:center;gap:10px;padding:10px 12px 0}
.px-lab{flex:0 0 38px;font:500 11px/1 var(--ui-mono);color:var(--ui-muted)}
.px-opts{display:flex;gap:4px;flex-wrap:wrap;min-width:0}
.px-roots .pl-pill{min-width:34px;text-align:center;padding:0 4px;font-family:var(--ui-mono)}
.px .pl-pill[aria-pressed="true"]{color:#08090A;background:var(--pl);border-color:var(--pl)}
.px-tabs{display:flex;align-items:center;gap:18px;margin:14px 12px 0;border-bottom:1px solid var(--ui-border)}
.px-tab{all:unset;box-sizing:border-box;cursor:pointer;padding:0 0 9px;font:500 12.5px/1 var(--ui-sans);color:var(--ui-muted);border-bottom:2px solid transparent;margin-bottom:-1px;
  transition:color var(--ui-fast) var(--ui-ease),border-color var(--ui-fast) var(--ui-ease)}
.px-tab:hover{color:var(--ui-text)}
.px-tab[aria-selected="true"]{color:var(--ui-text);border-color:var(--pl)}
.px-tab:disabled{opacity:.4;cursor:default}
.px-tab:focus-visible,.px-flip:focus-visible,.px-cell:focus-visible{outline:2px solid var(--pl);outline-offset:2px}
.px-flip{all:unset;box-sizing:border-box;cursor:pointer;margin-left:auto;padding:0 0 9px;font:500 12px/1 var(--ui-mono);color:var(--ui-muted)}
.px-flip:hover{color:var(--ui-text)}
.px-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:4px;padding:12px 12px 0}
.px-cell{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:5px;padding:9px 10px;border:1px solid var(--ui-border);border-radius:8px;background:#131416;min-width:0;
  transition:border-color var(--ui-fast) var(--ui-ease),background-color var(--ui-fast) var(--ui-ease),transform var(--ui-fast) var(--ui-ease)}
.px-cell:hover{border-color:var(--ui-border-2)}
.px-cell:active{transform:scale(.97)}
.px-cell b{font:500 11.5px/1 var(--ui-mono);color:var(--pl)}
.px-cell span{font:600 15px/1.1 var(--ui-sans);letter-spacing:-.01em;color:var(--ui-text);white-space:nowrap}
.px-cell small{font:400 11px/1 var(--ui-mono);color:var(--ui-muted)}
.px-cell[aria-pressed="true"]{border-color:var(--pl);background:color-mix(in srgb,var(--pl) 10%,#131416)}
.px-cell:first-child{border-color:color-mix(in srgb,var(--pl) 40%,transparent)}
.px-more{grid-column:1/-1;display:flex;gap:4px;flex-wrap:wrap;padding-top:4px}
.px-keys{height:clamp(112px,11vw,150px)}
.px-kl{font:500 10px/1 var(--ui-mono);color:rgba(8,9,10,.72);pointer-events:none}
.pl-b .px-kl{color:rgba(255,255,255,.78);font-size:9px}
.px .pl-key.pl-root .px-kl{color:#08090A}
.px .pl-key{transition:background-color .16s var(--ui-ease),transform .06s linear,opacity .16s var(--ui-ease)}
.px .pl-key.px-dim{opacity:.5}
.px .pl-key.px-lit:not(.pl-root){box-shadow:0 -5px 0 var(--pl) inset}
.px-roll{contain:layout paint;position:relative;margin:12px 12px 0;height:200px;border:1px solid var(--ui-border);border-radius:8px;overflow:hidden;background:#0B0C0D}
.px-lanes{position:absolute;inset:0;display:grid;grid-template-rows:repeat(25,1fr)}
.px-lane{border-bottom:1px solid rgba(255,255,255,.035);background:#101113;opacity:.45;transition:background-color .25s var(--ui-ease),opacity .25s var(--ui-ease)}
.px-lane.px-dark{background:#0B0C0D}
.px-lane.px-in{opacity:1;background:#15171A}
.px-lane.px-home{background:color-mix(in srgb,var(--pl) 9%,#15171A)}
.px-notes{position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.1) 1px,transparent 1px) 0 0/25% 100%,linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px) 0 0/6.25% 100%}
.px-note{position:absolute;height:4%;margin-left:1px;border-radius:2px;background:#C9CCD1;color:#08090A;font:600 7.5px/8px var(--ui-mono);padding-left:3px;overflow:hidden;white-space:nowrap;
  transition:top .28s var(--ui-ease),left .28s var(--ui-ease),width .28s var(--ui-ease),opacity .14s ease-in,background-color .16s linear}
.px-note.px-r{background:var(--pl)}
.px-note.px-off{opacity:0;pointer-events:none}
.px-head{position:absolute;top:0;bottom:0;left:0;width:1.5px;background:var(--ui-text);opacity:0;will-change:transform}
.px-say{min-height:3.2em;font-size:13px;color:var(--ui-secondary)}
@media(max-width:640px){
  .px-set{align-items:flex-start;flex-direction:column;gap:6px}
  .px-lab{flex:none}
  .px-opts{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:4px;scrollbar-width:none}
  .px-opts::-webkit-scrollbar{display:none}
  .px-opts .pl-pill{flex-shrink:0}
  .px-strip{grid-template-columns:repeat(4,minmax(0,1fr))}
  .px-kl{font-size:8.5px}
  .pl-b .px-kl{display:none}
  .px-roll{height:170px}
  .px-tabs{gap:14px}
  .px-flip{display:none}
}
@media(prefers-reduced-motion:reduce){.px-note,.px-lane,.px .pl-key{transition:none}}

/* an instrument dropped into a lesson page */
.lesson-play{max-width:980px;margin:22px 0 28px}

/* the feedback button and its form, for the test (hub-ui.js, buildFeedback) */
.ui-fb-open{all:unset;box-sizing:border-box;cursor:pointer;position:fixed;right:16px;bottom:18px;z-index:60;height:34px;padding:0 13px;border-radius:999px;
  border:1px solid var(--ui-border-2);background:color-mix(in srgb,var(--ui-surface) 92%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  font:500 12.5px/32px var(--ui-sans);color:var(--ui-secondary);transition:color var(--ui-fast) var(--ui-ease),border-color var(--ui-fast) var(--ui-ease),transform var(--ui-fast) var(--ui-ease)}
.ui-fb-open:hover{color:var(--ui-text);border-color:var(--ui-accent-border)}
.ui-fb-open:active{transform:scale(.96)}
.ui-fb-open:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.ui-fb{width:min(460px,calc(100vw - 32px));padding:0;border:1px solid var(--ui-border-2);border-radius:16px;background:var(--ui-surface);color:var(--ui-text);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.95)}
.ui-fb::backdrop{background:rgba(0,0,0,.6)}
.ui-fb form{display:flex;flex-direction:column;gap:12px;padding:20px}
.ui-fb h2{margin:0;font:600 18px/1.25 var(--ui-sans);letter-spacing:-.02em}
.ui-fb p{margin:0;font:400 13.5px/1.5 var(--ui-sans);color:var(--ui-secondary)}
.ui-fb-kinds{display:flex;gap:6px;flex-wrap:wrap}
.ui-fb-kinds button{all:unset;box-sizing:border-box;cursor:pointer;height:32px;padding:0 12px;border-radius:9px;border:1px solid var(--ui-border-2);font:500 13px/30px var(--ui-sans);color:var(--ui-secondary);
  transition:color .12s linear,background-color .12s linear,border-color .12s linear}
.ui-fb-kinds button[aria-checked="true"]{color:#06201D;background:var(--ui-accent);border-color:var(--ui-accent)}
.ui-fb-kinds button:focus-visible,.ui-fb-row button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.ui-fb textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:110px;padding:10px 12px;border-radius:10px;border:1px solid var(--ui-border-2);background:var(--ui-raised);
  color:var(--ui-text);font:400 14px/1.5 var(--ui-sans)}
.ui-fb textarea:focus{outline:none;border-color:var(--ui-accent-border)}
.ui-fb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.ui-fb-msg{min-height:1.5em}
.ui-fb-msg.ok{color:#3ECF8E}
.ui-fb-msg.bad{color:var(--ed-coral)}
.ui-fb-row{display:flex;justify-content:flex-end;gap:8px}
.ui-fb-row button{all:unset;box-sizing:border-box;cursor:pointer;height:36px;padding:0 16px;border-radius:10px;border:1px solid var(--ui-border-2);font:500 14px/34px var(--ui-sans);color:var(--ui-text)}
.ui-fb-row .ui-fb-go{background:var(--ui-text);border-color:var(--ui-text);color:#08090A}
.ui-fb-row .ui-fb-go:disabled{opacity:.5;cursor:default}
/* on a phone the pill sat on top of the page right above the dock. it
   shrinks to a round icon (the word stays for screen readers) and hides
   with the dock while you scroll down to read. */
@media(max-width:640px){
  .ui-fb-open{bottom:78px;right:12px;width:40px;height:40px;padding:0;font-size:0;display:grid;place-items:center;
    transition:color var(--ui-fast) var(--ui-ease),border-color var(--ui-fast) var(--ui-ease),transform var(--ui-med) var(--ui-ease),opacity var(--ui-med) var(--ui-ease)}
  .ui-fb-open::before{content:"";width:16px;height:16px;background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.8 7L4 20l1.1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.8 7L4 20l1.1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E") center/contain no-repeat}
  body:has(.ui-dock.ui-dock-away) .ui-fb-open{opacity:0;transform:translateY(140%);pointer-events:none}
}
@media print{.ui-fb-open{display:none}}

/* the account button in the dock and its menu (hub-ui.js, buildAccount) */
.ui-dock .ui-me{padding:0;width:42px;justify-content:center}
.ui-dock .ui-me i{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--ui-accent);color:#06201D;font:600 12px/1 var(--ui-sans);font-style:normal}
.ui-me-menu{position:absolute;right:0;bottom:calc(100% + 10px);min-width:230px;padding:8px;border:1px solid var(--ui-border-2);border-radius:14px;background:var(--ui-surface);
  box-shadow:0 30px 70px -24px rgba(0,0,0,.95);display:flex;flex-direction:column;gap:2px}
.ui-me-menu[hidden]{display:none}
.ui-me-menu p{margin:0;padding:8px 10px 10px;font:400 12.5px/1.4 var(--ui-sans);color:var(--ui-muted);border-bottom:1px solid var(--ui-border);overflow-wrap:anywhere}
.ui-dock .ui-me-menu a,.ui-dock .ui-me-menu button{all:unset;box-sizing:border-box;cursor:pointer;display:block;width:100%;height:36px;padding:0 10px;border-radius:9px;
  font:500 13.5px/36px var(--ui-sans);color:var(--ui-secondary);text-align:left}
.ui-dock .ui-me-menu a:hover,.ui-dock .ui-me-menu button:hover{color:var(--ui-text);background:var(--ui-raised)}
.ui-dock .ui-me-menu a:focus-visible,.ui-dock .ui-me-menu button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:-2px}
.ui-dock .ui-me-menu button{color:var(--ed-coral)}

/* ==================================================================
   the parts. every control on the site is one of these, in one of
   these states. an app page builds from them and adds nothing of its
   own unless it is truly page specific. /styleguide.html shows them all.
   ================================================================== */

/* buttons. default is the quiet outline. solid white is the one main
   action on a screen, teal (.primary) confirms inside a form. */
.app-btn.sm{height:28px;padding:0 10px;font-size:12.5px;border-radius:var(--ui-r-sm)}
.app-btn.lg{height:42px;padding:0 18px;font-size:14.5px;border-radius:11px}
.app-btn.solid{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-ink);font-weight:600}
.app-btn.solid:hover{background:#fff;border-color:#fff;color:var(--ui-ink)}
.app-btn.ghost{border-color:transparent;background:transparent}
.app-btn.ghost:hover{background:var(--ui-raised);border-color:transparent}
.app-btn.danger{color:var(--ui-bad);border-color:color-mix(in srgb,var(--ui-bad) 40%,transparent)}
.app-btn.danger:hover{color:var(--ui-bad);border-color:var(--ui-bad);background:color-mix(in srgb,var(--ui-bad) 10%,transparent)}
.app-btn:disabled,.app-btn[aria-disabled="true"]{opacity:.45;cursor:not-allowed;pointer-events:none}
.app-btn.is-loading{position:relative;color:transparent !important;pointer-events:none}
.app-btn.is-loading::after{content:"";position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;
  border:2px solid var(--ui-secondary);border-top-color:transparent;animation:uiSpin .7s linear infinite}
.app-btn.solid.is-loading::after,.app-btn.primary.is-loading::after{border-color:var(--ui-ink);border-top-color:transparent}
@keyframes uiSpin{to{transform:rotate(360deg)}}

/* fields. a label above, the control, then a hint or an error under it. */
.app-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.app-field>label,.app-label{font:500 var(--ui-t-xs)/1.2 var(--ui-sans);color:var(--ui-secondary)}
.app-hint{font:400 var(--ui-t-xs)/1.4 var(--ui-sans);color:var(--ui-muted);margin:0}
.app-error{font:500 var(--ui-t-xs)/1.4 var(--ui-sans);color:var(--ui-bad);margin:0}
.app-input,.app-select,.app-textarea{font-family:var(--ui-sans);font-size:var(--ui-t-sm);outline:none;
  transition:border-color var(--ui-fast) var(--ui-ease),box-shadow var(--ui-fast) var(--ui-ease)}
.app-select{height:34px;padding:0 30px 0 12px;border-radius:9px;border:1px solid var(--ui-border-2);background-color:var(--ui-raised);color:var(--ui-text);
  -webkit-appearance:none;appearance:none;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--ui-secondary) 50%),linear-gradient(135deg,var(--ui-secondary) 50%,transparent 50%);
  background-position:calc(100% - 15px) 14px,calc(100% - 10px) 14px;background-size:5px 5px;background-repeat:no-repeat}
.app-textarea{min-height:96px;padding:10px 12px;border-radius:9px;border:1px solid var(--ui-border-2);background:var(--ui-raised);color:var(--ui-text);line-height:1.5;resize:vertical}
.app-textarea::placeholder{color:var(--ui-muted)}
.app-input:hover,.app-select:hover,.app-textarea:hover{border-color:var(--ui-border-3)}
.app-input:focus-visible,.app-select:focus-visible,.app-textarea:focus-visible{border-color:var(--ui-accent);box-shadow:0 0 0 3px var(--ui-accent-dim)}
.app-input[aria-invalid="true"],.app-select[aria-invalid="true"],.app-textarea[aria-invalid="true"]{border-color:var(--ui-bad);box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-bad) 14%,transparent)}
.app-input:disabled,.app-select:disabled,.app-textarea:disabled{opacity:.5;cursor:not-allowed}
.app-input.lg,.app-select.lg{height:42px;font-size:var(--ui-t-base);border-radius:var(--ui-r-md)}

/* a switch, for one setting that is on or off. it is a checkbox underneath. */
.app-switch{position:relative;display:inline-flex;align-items:center;gap:10px;cursor:pointer;font:500 var(--ui-t-sm)/1 var(--ui-sans);color:var(--ui-text)}
.app-switch input{position:absolute;opacity:0;width:36px;height:20px;margin:0;cursor:pointer}
.app-switch i{width:36px;height:20px;border-radius:999px;background:var(--ui-raised);border:1px solid var(--ui-border-2);flex-shrink:0;position:relative;
  transition:background-color var(--ui-fast) var(--ui-ease),border-color var(--ui-fast) var(--ui-ease)}
.app-switch i::after{content:"";position:absolute;left:2px;top:2px;width:14px;height:14px;border-radius:50%;background:var(--ui-secondary);
  transition:transform var(--ui-fast) var(--ui-ease),background-color var(--ui-fast) var(--ui-ease)}
.app-switch input:checked + i{background:var(--ui-accent);border-color:var(--ui-accent)}
.app-switch input:checked + i::after{transform:translateX(16px);background:var(--ui-ink)}
.app-switch input:focus-visible + i{outline:2px solid var(--ui-accent);outline-offset:2px}
.app-switch input:disabled + i{opacity:.45}

/* small labels */
.app-chip.warn{color:var(--ui-warn);border-color:color-mix(in srgb,var(--ui-warn) 32%,transparent);background:color-mix(in srgb,var(--ui-warn) 8%,transparent)}
.app-chip.bad{color:var(--ui-bad);border-color:color-mix(in srgb,var(--ui-bad) 32%,transparent);background:color-mix(in srgb,var(--ui-bad) 8%,transparent)}
.app-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--ui-raised);border:1px solid var(--ui-border-2);
  font:500 11px/1 var(--ui-mono);color:var(--ui-secondary);font-variant-numeric:tabular-nums}
.app-badge.on{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-ink)}
.app-kbd{display:inline-block;min-width:20px;padding:2px 6px;border-radius:5px;border:1px solid var(--ui-border-2);border-bottom-width:2px;background:var(--ui-raised);
  font:500 11.5px/1.3 var(--ui-mono);color:var(--ui-secondary);text-align:center}

/* a note inside a page: something to know, a warning, a failure, a success */
.app-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:var(--ui-r-md);border:1px solid var(--ui-border-2);background:var(--ui-surface);
  font:400 var(--ui-t-sm)/1.5 var(--ui-sans);color:var(--ui-secondary)}
.app-note::before{content:"";width:6px;height:6px;border-radius:50%;margin-top:7px;flex-shrink:0;background:var(--ui-secondary)}
.app-note b{color:var(--ui-text);font-weight:600}
.app-note.ok{border-color:color-mix(in srgb,var(--ui-ok) 30%,transparent)} .app-note.ok::before{background:var(--ui-ok)}
.app-note.warn{border-color:color-mix(in srgb,var(--ui-warn) 30%,transparent)} .app-note.warn::before{background:var(--ui-warn)}
.app-note.bad{border-color:color-mix(in srgb,var(--ui-bad) 34%,transparent)} .app-note.bad::before{background:var(--ui-bad)}

/* waiting. a grey bar where the content will be. it does not shimmer for
   people who asked for less motion. */
.app-skeleton{display:block;height:14px;border-radius:6px;background:linear-gradient(90deg,var(--ui-raised) 25%,rgba(255,255,255,.07) 37%,var(--ui-raised) 63%) 0 0/400% 100%;
  animation:uiShimmer 1.4s ease-in-out infinite}
.app-skeleton.title{height:22px;width:40%}
.app-skeleton.block{height:120px;border-radius:var(--ui-r-lg)}
@keyframes uiShimmer{from{background-position:100% 0}to{background-position:0 0}}

/* a dialog. use the real <dialog> element so focus and escape just work. */
.app-dialog{width:min(480px,calc(100vw - 32px));padding:0;border:1px solid var(--ui-border-2);border-radius:var(--ui-r-xl);background:var(--ui-surface);color:var(--ui-text);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.95)}
.app-dialog::backdrop{background:rgba(0,0,0,.6)}
.app-dialog[open]{animation:uiRise var(--ui-med) var(--ui-ease)}
.app-dialog-body{display:flex;flex-direction:column;gap:var(--ui-s-3);padding:var(--ui-s-5)}
.app-dialog h2{margin:0;font:600 var(--ui-t-md)/1.25 var(--ui-sans);letter-spacing:-.02em}
.app-dialog p{margin:0;font:400 var(--ui-t-sm)/1.5 var(--ui-sans);color:var(--ui-secondary)}
.app-dialog-foot{display:flex;justify-content:flex-end;gap:var(--ui-s-2);margin-top:var(--ui-s-2)}
@keyframes uiRise{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}

/* a divider and a section label, for long app screens */
.app-divider{height:1px;border:0;background:var(--ui-border);margin:var(--ui-s-5) 0}
.app-eyebrow{display:inline-flex;align-items:center;gap:8px;font:500 var(--ui-t-xs)/1 var(--ui-mono);color:var(--ui-secondary)}
.app-eyebrow::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--wing,var(--ui-accent))}

@media(max-width:640px){
  /* on a phone a control is at least 40px tall, a finger needs it */
  .app-btn,.app-input,.app-select{min-height:40px}
  .app-btn.sm{min-height:34px}
}
@media(prefers-reduced-motion:reduce){
  .app-btn.is-loading::after{animation-duration:1.6s}
  .app-skeleton{animation:none}
  .app-dialog[open]{animation:none}
}

/* ==================================================================
   lesson and deep dive pages, the last of the old look. the pages were
   written with spaced mono labels, square boxes and square uppercase
   buttons. this brings them onto the same type, corners and buttons as
   the app pages, and gives the text a real reading column.
   ================================================================== */
/* one gutter down the whole page: the hero, the lesson, the summary and the
   next row all start on the same left edge. the right side of a wide screen
   stays free for the section list (see the roadmap, stage 3). */
body:has(.topbar):not(:has(.strip.gut)) .modules,body:has(.topbar):not(:has(.strip.gut)) .sum,body:has(.topbar):not(:has(.strip.gut)) .next,
body:has(.topbar):not(:has(.strip.gut)) .toc{padding-left:clamp(16px,4vw,48px);padding-right:clamp(16px,4vw,48px)}
body:has(.topbar) .sum-inner{max-width:860px}
body:has(.topbar) .mod p.body{font-size:var(--ui-t-read);line-height:1.7;max-width:var(--ui-w-read);color:color-mix(in srgb,var(--ui-text) 86%,var(--ui-bg))}
body:has(.topbar) .mod p.body b{color:var(--ui-text);font-weight:600}
body:has(.topbar) .mod .sub{display:flex;align-items:center;gap:10px;margin:44px 0 14px;font:600 var(--ui-t-md)/1.3 var(--ui-sans);letter-spacing:-.015em;text-transform:lowercase;color:var(--ui-text)}
body:has(.topbar) .mod .sub::before{content:"";width:3px;height:16px;border-radius:2px;background:var(--wing);flex-shrink:0}
body:has(.topbar) table.tbl{width:100%;max-width:860px;border:1px solid var(--ui-border);border-radius:var(--ui-r-lg);border-collapse:separate;border-spacing:0;overflow:hidden;background:var(--ui-surface);margin:14px 0 18px}
body:has(.topbar) table.tbl th{font:500 var(--ui-t-xs)/1.2 var(--ui-sans);letter-spacing:0;text-transform:lowercase;color:var(--ui-muted);text-align:left;padding:11px 14px;background:var(--ui-raised);border:0;border-bottom:1px solid var(--ui-border)}
body:has(.topbar) table.tbl td{font:400 14.5px/1.45 var(--ui-sans);color:var(--ui-secondary);padding:11px 14px;border:0;border-top:1px solid var(--ui-border);vertical-align:top}
body:has(.topbar) table.tbl tr:first-child td,body:has(.topbar) table.tbl tr:nth-child(2) td{border-top:0}
body:has(.topbar) table.tbl td.k,body:has(.topbar) table.tbl td:first-child{color:var(--ui-text);font-weight:600}
body:has(.topbar) .mod .try{border:1px solid var(--ui-border);border-left:1px solid var(--ui-border);border-radius:var(--ui-r-lg);background:var(--pr-card);padding:20px 22px;margin:22px 0;max-width:860px}
body:has(.topbar) .mod .try .t{font:600 var(--ui-t-sm)/1.2 var(--ui-sans);letter-spacing:0;text-transform:lowercase;color:var(--wing);margin-bottom:10px}
body:has(.topbar) .mod .try p{font-size:15px;line-height:1.65;color:color-mix(in srgb,var(--ui-text) 86%,var(--ui-bg))}
body:has(.topbar) .mod .cols{gap:12px;max-width:var(--ui-w-lesson)}
body:has(.topbar) .mod .col{border:1px solid var(--ui-border);border-radius:var(--ui-r-lg);background:var(--pr-card);padding:18px}
body:has(.topbar) .mod .col .t,body:has(.topbar) .mod .col h4{font:600 15px/1.3 var(--ui-sans);letter-spacing:-.01em;text-transform:none;color:var(--ui-text);margin:0 0 6px}
body:has(.topbar) .mod .col p{font-size:14.5px;line-height:1.6;color:var(--ui-secondary)}
body:has(.topbar) .sum-inner{border:1px solid var(--ui-border);border-radius:var(--ui-r-xl);background:var(--pr-card);padding:clamp(22px,3vw,34px)}
body:has(.topbar) .sum-inner h3{font-weight:600;font-size:var(--ui-t-lg);letter-spacing:-.02em;line-height:1.2}
body:has(.topbar) .sum-inner p{font-size:var(--ui-t-read);color:var(--ui-secondary);max-width:var(--ui-w-read)}
body:has(.topbar) .next .row{display:flex;flex-wrap:wrap;gap:8px}
body:has(.topbar) .next .btn,body:has(.topbar) .secnav .btn{display:inline-flex;align-items:center;height:40px;padding:0 16px;border-radius:var(--ui-r-md);font:500 14px/1 var(--ui-sans);
  text-transform:lowercase;letter-spacing:0;border:1px solid var(--ui-border-2);background:var(--ui-raised);color:var(--ui-text);text-decoration:none;
  transition:border-color var(--ui-fast) var(--ui-ease),transform var(--ui-fast) var(--ui-ease)}
body:has(.topbar) .next .btn:hover{border-color:var(--ui-border-3);text-decoration:none}
body:has(.topbar) .next .btn:active{transform:scale(.98)}
body:has(.topbar) .next .btn.primary{background:var(--ui-text);border-color:var(--ui-text);color:var(--ui-ink);font-weight:600}
body:has(.topbar) .next .btn.primary:hover{background:#fff}
@media(max-width:640px){
  /* a wide table scrolls sideways inside its own box, the page never does */
  body:has(.topbar) table.tbl{display:block;overflow-x:auto}
  body:has(.topbar) table.tbl tbody{display:table;width:100%;min-width:max-content}
  body:has(.topbar) .mod .sub{margin-top:34px}
}

/* the key selector and the chord selector. their controls were small spaced
   mono capitals. same job as the explorer's pickers, so the same look. how
   the tools work is untouched, this is paint only. */
.keybtns{gap:4px}
.keybtn{min-width:40px;height:34px;padding:0 8px;border-radius:8px;border:1px solid var(--ui-border);background:transparent;
  font:500 13px/1 var(--ui-mono);letter-spacing:0;color:var(--ui-secondary);
  transition:color var(--ui-fast) var(--ui-ease),border-color var(--ui-fast) var(--ui-ease),background-color var(--ui-fast) var(--ui-ease)}
.keybtn:hover{color:var(--ui-text);border-color:var(--ui-border-2)}
.keybtn.on{color:var(--ui-ink);background:var(--wing);border-color:var(--wing);font-weight:600}
.tablabel{font:500 12px/1 var(--ui-mono);letter-spacing:0;text-transform:lowercase;color:var(--ui-muted)}
.scalepills button,.chordtoggle .pill{height:32px;padding:0 12px;border-radius:8px;border:1px solid var(--ui-border);background:transparent;
  font:500 13px/1 var(--ui-sans);letter-spacing:0;text-transform:lowercase;color:var(--ui-secondary);
  transition:color var(--ui-fast) var(--ui-ease),border-color var(--ui-fast) var(--ui-ease),background-color var(--ui-fast) var(--ui-ease)}
.scalepills button:hover,.chordtoggle .pill:hover{color:var(--ui-text);border-color:var(--ui-border-2)}
.scalepills button.on,.chordtoggle .pill.on{color:var(--ui-ink);background:var(--wing);border-color:var(--wing);font-weight:600}
.keybtn:focus-visible,.scalepills button:focus-visible,.chordtoggle .pill:focus-visible{outline:2px solid var(--wing);outline-offset:2px}

/* the one footer (hub-ui.js, buildFooter). the page's own footer steps aside
   only once this one is in, so a page without the script keeps its own. */
.ui-foot{display:flex;justify-content:space-between;align-items:center;gap:12px 24px;flex-wrap:wrap;margin-top:clamp(48px,6vw,88px);
  padding:20px clamp(16px,4vw,48px) 28px;border-top:1px solid var(--ui-border);font:400 var(--ui-t-xs)/1.5 var(--ui-sans);color:var(--ui-muted)}
.ui-foot nav{display:flex;gap:6px 18px;flex-wrap:wrap}
.ui-foot a{color:var(--ui-secondary);text-decoration:none}
.ui-foot a:hover{color:var(--ui-text);text-decoration:none}
.ui-foot a:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px;border-radius:4px}
.app-main .ui-foot{padding-left:0;padding-right:0}
body.ui-one-foot>footer:not(.ui-foot),body.ui-one-foot main>footer:not(.ui-foot),body.ui-one-foot footer.foot,body.ui-one-foot footer.pl-foot{display:none}
body.ui-has-dock .ui-foot{padding-bottom:96px}


/* ---------- progression player and midi button (hub-play.js) ---------- */
.pl-bar .pl-dl{margin-left:auto;background:transparent;color:var(--ui-secondary);border:1px solid var(--ui-border)}
.pl-bar .pl-dl:hover{color:var(--ui-text);border-color:var(--ui-border-2)}
.pl-bar .pl-dl+.pl-btn{margin-left:6px}
.pg-lab{margin:14px 12px 0;font:400 var(--ui-t-xs)/1.4 var(--ui-sans);color:var(--ui-muted)}
.pg-prog .px-strip{padding-top:8px;grid-template-columns:repeat(7,minmax(0,1fr))}
.pg-prog .px-cell:first-child{border-color:var(--ui-border)}
.pg-prog .px-cell:disabled{opacity:.4;cursor:default}
.pg-line{display:grid;grid-template-columns:repeat(var(--pg-n,4),minmax(0,1fr));gap:4px;padding:8px 12px 0;min-height:66px}
.pg-slot{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:4px;padding:9px 10px;border-radius:8px;min-width:0;
  background:color-mix(in srgb,var(--pl) 9%,#131416);border:1px solid color-mix(in srgb,var(--pl) 34%,transparent);transition:border-color var(--ui-fast),transform var(--ui-fast)}
.pg-slot small{font:400 10.5px/1 var(--ui-mono);color:var(--ui-muted)}
.pg-slot b{font:500 11.5px/1 var(--ui-mono);color:var(--pl)}
.pg-slot span{font:600 15px/1.1 var(--ui-sans);color:var(--ui-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pg-slot:hover{border-color:var(--ui-bad,#E5484D)}
.pg-slot:focus-visible{outline:2px solid var(--pl);outline-offset:2px}
.pg-slot.pg-now{border-color:var(--ui-text);transform:translateY(-2px)}
.pg-empty{align-self:center;font:400 var(--ui-t-sm)/1.4 var(--ui-sans);color:var(--ui-muted)}
.pg-roll{height:190px}
.pg-roll .px-note{padding:0}
.pg-prog .pl-foot{padding-top:12px}
@media (max-width:640px){
  .pg-prog .px-strip{grid-template-columns:repeat(4,minmax(0,1fr))}
  .pg-line{grid-template-columns:repeat(4,minmax(0,1fr))}
  .pg-roll{height:160px}
}
@media (prefers-reduced-motion:reduce){.pg-slot.pg-now{transform:none}}


/* ---------- search (hub-ui.js buildSearch) ---------- */
.ui-dock .ui-dock-find{all:unset;box-sizing:border-box;cursor:pointer;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;color:var(--ui-secondary);transition:color var(--ui-fast),background var(--ui-fast)}
.ui-dock .ui-dock-find:hover{color:var(--ui-text);background:rgba(255,255,255,.06)}
.ui-dock .ui-dock-find:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.ui-dock .ui-dock-find svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ui-dock .ui-dock-find .ui-dock-label{display:none}
.ui-find{width:min(620px,calc(100vw - 24px));margin-top:min(14vh,120px);max-height:min(70vh,640px);overflow:hidden}
.ui-find[open]{display:flex;flex-direction:column}
.ui-find-top{display:flex;gap:var(--ui-s-2);align-items:center;padding:var(--ui-s-3);border-bottom:1px solid var(--ui-border)}
.ui-find-top .app-input{flex:1;min-width:0;height:44px;font-size:16px}
.ui-find-list{list-style:none;margin:0;padding:var(--ui-s-2);overflow-y:auto;flex:1;min-height:0}
.ui-find-list a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;align-items:center;padding:10px 12px;border-radius:var(--ui-r-md);text-decoration:none;color:var(--ui-text)}
.ui-find-list a b{font:500 var(--ui-t-base)/1.3 var(--ui-sans);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-find-list a small{grid-column:1;font:400 var(--ui-t-xs)/1.4 var(--ui-sans);color:var(--ui-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ui-find-list a .app-chip{grid-column:2;grid-row:1/span 2}
.ui-find-list li[aria-selected="true"] a,.ui-find-list a:hover{background:var(--ui-raised)}
.ui-find-foot{margin:0;padding:10px var(--ui-s-4);border-top:1px solid var(--ui-border);font:400 var(--ui-t-xs)/1.4 var(--ui-sans);color:var(--ui-muted)}

/* ---------- glossary links and the reading line on lesson pages ---------- */
a.ui-term{color:inherit;text-decoration:underline dotted;text-decoration-color:var(--ui-muted);text-underline-offset:3px;cursor:help}
a.ui-term:hover{color:var(--ui-accent);text-decoration-color:var(--ui-accent)}
.gcard{scroll-margin-top:90px}
.gcard.ui-term-hit{outline:2px solid var(--ui-accent);outline-offset:3px}
body.ui-lesson .toc{position:sticky;top:var(--ui-read-top,0px);z-index:var(--ui-z-sticky);margin-top:0}
body.ui-lesson .toc.ui-stuck{background:color-mix(in srgb,var(--ui-bg) 88%,transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
body.ui-lesson .toc-inner{align-items:center}
.ui-read{position:absolute;left:0;right:0;bottom:-1px;height:2px;overflow:hidden}
.ui-read i{display:block;height:100%;background:var(--ui-accent);transform-origin:0 50%;transform:scaleX(0)}
.ui-read-where{margin-left:auto;padding-left:12px;flex-shrink:0;font:400 var(--ui-t-xs)/1 var(--ui-mono);color:var(--ui-muted);white-space:nowrap}
body.ui-lesson .mod .sub[id]{scroll-margin-top:var(--ui-read-pad,64px)}
@media (max-width:640px){.ui-read-where{display:none}}
