/* ============================================================================
   studio_app_b2.css — BAND B2 of the app→web transfer, 2026-09-23:
   THE LEARN HUB + THE WEB MENU.

   Markup: assets/js/studio/studio_app_b2.js. Sources, read rather than
   remembered:
     hta-mobile\app\lib\features\learn\learn_hub.dart        (the hub)
     hta-mobile\app\lib\design\system\shell.dart             (the five entries,
       AppTab L18-31 · NavArt L1088-1134 · _DockTab L583-709 · _DockTone L513)
     hta-mobile\app\lib\design\system\components.dart
       (Heading L631-810 · LaunchTile L1176-1258 · Meter)
     output\design\WEB_TRANSFER_2026-09-23.md  §A tokens · §B elements · §E
     the owner's captures: learn / sounds / read / playlists, light + dark

   ⛔ SCOPE. Every rule is under `body.hts-studio` — the class gate.js adds
      only for /me.preview === true. Without it this sheet matches nothing.

   ⛔ SPECIFICITY + ORDER. The same triple class studio_app.css uses, and
      LINKED AFTER it (and after studio_app_b1.css) in app.html, so an
      equal-specificity declaration here wins on order.

   ⛔ COLOUR: `--app-*` ONLY, NEVER A NEW HEX. Where the app's palette has no
      token for a role the value is a `color-mix` of the tokens that exist —
      which is the same formula palette.dart's own `wash()` is
      (Color.alphaBlend of an accent over a bed).

   ⛔ THE ACCENT FAMILY SPLITS ALONG ONE LINE (palette.dart, accentInk): an
      accent at 3:1 may be a rule, an icon or a meter fill; a SENTENCE takes
      the ink twin. So a track's rule and glyph are `--app-track-*` and a
      figure printed in a track's colour is its ink — brandInk for Sounds,
      violetInk for Read, positiveInk for Fluency, and the accent ITSELF for
      words/practice, because accentInk returns the accent for those two.

   ⛔ NO ADDED ELEMENTS. The selected dock entry is the cell that was already
      there wearing a bed and brand ink — the app's own state contract
      (_DockTone.bed = wash(brand,.14) over surfaceRaised; .selected =
      brandInk). Nothing is injected on selection and no box moves.
   ============================================================================ */

/* ========================================================================== */
/* 1. THE MENU                                                                */
/* ========================================================================== */

/* The dock's five glyphs. studio_app.css already sizes `#device-dock
   .st-appart` at the app's 37x31; nothing here re-states it. What this adds is
   the app's SELECTED paint on the cell studio.css already lays out: a bed of
   the Explore colour at 14% over the raised rung, at the app's own 16px
   radius, with the label in brand ink. */
body.hts-studio.hts-studio.hts-studio #device-dock a.active,
body.hts-studio.hts-studio.hts-studio #device-dock button.active{
  background:color-mix(in srgb,var(--app-brand) 14%,var(--app-surface-raised));
  color:var(--app-brand-ink);
  border-radius:16px;
  font-weight:600;
}
/* The label: the app's caption step, one line, never wrapped into a second
   that would change the capsule's height when a tab is chosen. */
body.hts-studio.hts-studio.hts-studio #device-dock a > span,
body.hts-studio.hts-studio.hts-studio #device-dock button > span{
  font-size:var(--app-size-caption);
  line-height:var(--app-lh-caption);
  white-space:nowrap;
}

/* The desktop primary group: the five entries at the top of the sidebar's own
   nav, above the web's labelled groups. `.nav-link.active` already carries the
   app's selected state (the studio's `--soft-orange` bed resolves to
   `--app-wash-brand`, its `--orange` ink to `--app-brand`), so a state stays a
   class on the element that is already there. */
body.hts-studio.hts-studio.hts-studio .b2-primary{
  display:block;
  padding-bottom:var(--app-gap-s);
  margin-bottom:var(--app-gap-s);
  border-bottom:1px solid var(--app-line);
}
body.hts-studio.hts-studio.hts-studio .b2-nav{
  font-size:var(--app-size-label);
  font-weight:600;
}
/* The nav illustration takes the slot the row's 18px glyph had. It is art, so
   it is never tinted and never the tap target — the row is. */
body.hts-studio.hts-studio.hts-studio .st-appart--nav{
  width:26px;
  height:22px;
  flex:0 0 26px;
}

/* ========================================================================== */
/* 2. THE LEARN HUB                                                           */
/* ========================================================================== */
body.hts-studio.hts-studio.hts-studio .b2-learn{
  display:flex;
  flex-direction:column;
  /* the heading supplies its own top gap, so the page does not stack two */
  gap:0;
}
body.hts-studio.hts-studio.hts-studio .b2-head{
  padding:0 0 var(--app-gap-m);
}
body.hts-studio.hts-studio.hts-studio .b2-head h1{
  margin:0;
  font-size:var(--app-size-title-xl);
  line-height:var(--app-lh-title-xl);
  letter-spacing:var(--app-track-title-xl);
  font-weight:600;
  color:var(--app-ink);
}

/* --------------------------------------------------------------- tracks --- */
body.hts-studio.hts-studio.hts-studio .b2-tracks{
  display:grid;
  gap:var(--app-gap-m);
}
/* One card, three columns: the accent rule, the text, the drawing in its own
   RESERVED column. The r3 motif that bled behind the text was deleted rather
   than layered over, and the web does not reintroduce it. */
body.hts-studio.hts-studio.hts-studio .b2-track{
  display:grid;
  grid-template-columns:4px minmax(0,1fr) auto;
  align-items:center;
  gap:0;
  background:var(--app-surface);
  border:1px solid var(--app-line-strong);
  border-radius:var(--app-r-card);
  box-shadow:var(--app-shadow-card);
  overflow:hidden;
  color:var(--app-ink);
  text-decoration:none;
  min-height:var(--app-touch-large);
}
body.hts-studio.hts-studio.hts-studio .b2-track:hover{
  border-color:color-mix(in srgb,var(--b2-accent) 55%,var(--app-line-strong));
}
/* each track's own accent, looked up by the track it belongs to, so a colour
   cannot drift from the thing it names */
body.hts-studio.hts-studio.hts-studio .b2-track--sounds{--b2-accent:var(--app-track-sounds);--b2-accent-ink:var(--app-brand-ink);}
body.hts-studio.hts-studio.hts-studio .b2-track--read{--b2-accent:var(--app-track-read);--b2-accent-ink:var(--app-violet-ink);}
body.hts-studio.hts-studio.hts-studio .b2-track--fluency{--b2-accent:var(--app-track-fluency);--b2-accent-ink:var(--app-positive-ink);}
body.hts-studio.hts-studio.hts-studio .b2-track__rule{
  align-self:stretch;
  background:var(--b2-accent);
}
body.hts-studio.hts-studio.hts-studio .b2-track__text{
  display:block;
  min-width:0;
  padding:var(--app-gap-m);
}
body.hts-studio.hts-studio.hts-studio .b2-track__top{
  display:flex;
  align-items:center;
  gap:var(--app-gap-s);
  min-width:0;
}
/* the glyph is a GRAPHIC: the accent at 3:1, not its ink */
body.hts-studio.hts-studio.hts-studio .b2-track__top .icon{
  width:22px;height:22px;flex:0 0 22px;color:var(--b2-accent);
}
body.hts-studio.hts-studio.hts-studio .b2-track__top b{
  font-size:var(--app-size-title-l);
  line-height:var(--app-lh-title-l);
  letter-spacing:var(--app-track-title-l);
  font-weight:600;
  /* two lines where one used to be: "Fluency Rules" wraps rather than
     becoming "Fluency Rul…", and the card grows for it */
  min-width:0;
}
body.hts-studio.hts-studio.hts-studio .b2-track__text > small{
  display:block;
  margin-top:2px;
  font-size:var(--app-size-body-s);
  line-height:var(--app-lh-body-s);
  color:var(--app-ink-muted);
}
body.hts-studio.hts-studio.hts-studio .b2-track__foot{
  display:flex;
  align-items:center;
  gap:var(--app-gap-m);
  margin-top:var(--app-gap-s);
}
/* Meter.bar: a track at the `line` step, a fill at the group's accent. A
   divider-weight track is exactly what the app draws here. */
body.hts-studio.hts-studio.hts-studio .b2-meter{
  flex:1 1 auto;
  min-width:0;
  height:6px;
  border-radius:var(--app-r-pill);
  background:var(--app-line);
  overflow:hidden;
}
body.hts-studio.hts-studio.hts-studio .b2-meter i{
  display:block;
  height:100%;
  border-radius:var(--app-r-pill);
  background:var(--b2-accent);
}
/* ⛔ RESERVED, not measured on arrival. The caption goes "7 lessons" ->
   "2 of 7 opened" the moment the history loads, and a caption that widens
   would steal the width back off the meter beside it. The slot is sized by the
   longest string this card can print. */
body.hts-studio.hts-studio.hts-studio .b2-track__count{
  flex:0 0 auto;
  min-width:11ch;
  text-align:right;
  font-size:var(--app-size-caption);
  line-height:var(--app-lh-caption);
  color:var(--app-ink-muted);
  white-space:nowrap;
}
/* the reserved 100x80 column, at the files' own 5:4 — contained, never
   covered, never stretched, never tinted */
body.hts-studio.hts-studio.hts-studio .st-appart--track{
  width:100px;
  height:80px;
  flex:0 0 100px;
  margin:var(--app-gap-m) var(--app-gap-m) var(--app-gap-m) 0;
}

/* -------------------------------------------------------- section heads --- */
/* The app's ONE section heading: the title, the figure, and nothing else. ⛔
   The tinted plate behind it is GONE (owner, item 8: "this strange colored
   background with 0 padding between then it and the next element") and the
   drawn ridge went with it. The space ABOVE a heading is larger than the space
   below it — a heading belongs to what follows it (H.5.1). */
body.hts-studio.hts-studio.hts-studio .b2-sec{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:var(--app-gap-m);
  padding-top:var(--app-gap-section);
  padding-bottom:var(--app-gap-s);
}
body.hts-studio.hts-studio.hts-studio .b2-sec h2{
  margin:0;
  font-size:var(--app-size-title-l);
  line-height:var(--app-lh-title-l);
  letter-spacing:var(--app-track-title-l);
  font-weight:600;
  color:var(--app-ink);
}
body.hts-studio.hts-studio.hts-studio .b2-sec span{
  flex:0 0 auto;
  font-size:var(--app-size-caption);
  line-height:var(--app-lh-caption);
  color:var(--app-ink-muted);
}

/* ------------------------------------------------------------- the rail --- */
/* ⛔ NOT a fixed-height rail. A declared height cannot hold a title that wraps
   to three lines beside an 84px illustration, so the height comes from the
   CARDS — `align-items:stretch` is the web's IntrinsicHeight, and it is also
   what keeps their bottoms aligned. */
body.hts-studio.hts-studio.hts-studio .b2-rail{
  display:flex;
  align-items:stretch;
  gap:var(--app-gap-m);
  overflow-x:auto;
  padding-bottom:var(--app-gap-xs);
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}
body.hts-studio.hts-studio.hts-studio .b2-path{
  display:flex;
  align-items:center;
  gap:var(--app-gap-m);
  flex:0 0 clamp(232px,60vw,296px);
  scroll-snap-align:start;
  padding:var(--app-gap-m);
  background:var(--app-surface);
  border:1px solid var(--app-line-strong);
  border-radius:var(--app-r-control);
  box-shadow:var(--app-shadow-card);
  color:var(--app-ink);
  text-decoration:none;
}
body.hts-studio.hts-studio.hts-studio .b2-path:hover{
  border-color:color-mix(in srgb,var(--app-brand) 55%,var(--app-line-strong));
}
body.hts-studio.hts-studio.hts-studio .b2-path__text{
  display:block;
  min-width:0;
  flex:1 1 auto;
}
/* A 26x3 accent STROKE, not a box: its thickness is the design, and it is the
   one place a path card spends its identity colour now that the drawn route is
   gone. ⛔ ONE hue for the whole rail — the hashed per-card accent was ruled
   out as a class ("this rainbow color system is very ugly"). */
body.hts-studio.hts-studio.hts-studio .b2-path__rule{
  display:block;
  width:26px;
  height:3px;
  border-radius:var(--app-r-pill);
  background:var(--app-brand);
}
body.hts-studio.hts-studio.hts-studio .b2-path__text b{
  display:block;
  margin-top:var(--app-gap-s);
  font-size:var(--app-size-title-m);
  line-height:var(--app-lh-title-m);
  font-weight:600;
}
body.hts-studio.hts-studio.hts-studio .b2-path__text small{
  display:block;
  margin-top:3px;
  font-size:var(--app-size-caption);
  line-height:var(--app-lh-caption);
  color:var(--app-ink-muted);
}
/* the 84 x 67.2 column, vertically centred */
body.hts-studio.hts-studio.hts-studio .st-appart--path{
  width:84px;
  height:67.2px;
  flex:0 0 84px;
}

/* -------------------------------------------------- the reference shelf --- */
/* The app's tile, centred (LaunchTile.centred): the drawing takes the card's
   centre line, the title composes UNDER it on the same axis, and the meta is
   pinned to the bottom — on the web by a `1fr` row between them, which is the
   Spacer the Dart uses. Every tile in a row then puts those three marks at the
   same y, which is the defect the owner reported when one-line titles floated
   down the card. */
body.hts-studio.hts-studio.hts-studio .b2-refs{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(128px,1fr));
  gap:var(--app-gap-m);
}
body.hts-studio.hts-studio.hts-studio .b2-ref{
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  justify-items:center;
  text-align:center;
  gap:0;
  min-height:130px;
  padding:var(--app-gap-m) 10px;
  background:var(--app-surface);
  border:1px solid var(--app-line-strong);
  border-radius:var(--app-r-control);
  box-shadow:var(--app-shadow-card);
  color:var(--app-ink);
  text-decoration:none;
}
body.hts-studio.hts-studio.hts-studio .b2-ref:hover{
  border-color:color-mix(in srgb,var(--b2-accent) 55%,var(--app-line-strong));
}
/* the family each guide belongs to — the letters you READ, the machinery that
   decides how a syllable SOUNDS, the one that is a RULE you apply, the one
   that is a run of WORDS, and the free build. accentInk() returns the accent
   itself for words and practice, so those two spend the track colour. */
body.hts-studio.hts-studio.hts-studio .b2-ref--read{--b2-accent:var(--app-track-read);--b2-accent-ink:var(--app-violet-ink);}
body.hts-studio.hts-studio.hts-studio .b2-ref--sounds{--b2-accent:var(--app-track-sounds);--b2-accent-ink:var(--app-brand-ink);}
body.hts-studio.hts-studio.hts-studio .b2-ref--fluency{--b2-accent:var(--app-track-fluency);--b2-accent-ink:var(--app-positive-ink);}
body.hts-studio.hts-studio.hts-studio .b2-ref--words{--b2-accent:var(--app-track-words);--b2-accent-ink:var(--app-track-words);}
body.hts-studio.hts-studio.hts-studio .b2-ref--practice{--b2-accent:var(--app-track-practice);--b2-accent-ink:var(--app-track-practice);}
/* the 60x48 slot, with the designer's 6px clearance before the title carried
   by the ART rather than by a distributed gap */
body.hts-studio.hts-studio.hts-studio .st-appart--ref{
  width:60px;
  height:48px;
  margin-bottom:6px;
}
body.hts-studio.hts-studio.hts-studio .b2-ref b{
  font-size:var(--app-size-label);
  line-height:var(--app-lh-label);
  font-weight:600;
}
body.hts-studio.hts-studio.hts-studio .b2-ref small{
  grid-row:4;
  font-size:var(--app-size-caption);
  line-height:var(--app-lh-caption);
  /* a figure in the family's colour, held to a body-text contrast by the
     palette's own twin — never the accent where its ink belongs */
  color:var(--b2-accent-ink);
}

/* ------------------------------------------------------------- the wide --- */
/* The web's own layout at a mouse width: the same ORDER and the same grouping,
   in the room a desktop has. Nothing is added and nothing is dropped. */
@media (min-width:900px){
  body.hts-studio.hts-studio.hts-studio .b2-tracks{
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
  }
  body.hts-studio.hts-studio.hts-studio .b2-track{
    grid-template-columns:4px minmax(0,1fr);
    grid-template-rows:auto auto;
    align-items:start;
  }
  body.hts-studio.hts-studio.hts-studio .b2-track__rule{grid-row:1 / span 2;}
  body.hts-studio.hts-studio.hts-studio .st-appart--track{
    grid-column:2;
    justify-self:end;
    margin:0 var(--app-gap-m) var(--app-gap-m) 0;
  }
  body.hts-studio.hts-studio.hts-studio .b2-refs{
    grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  }
}
/* Sidebar Explore disc (owner 2026-09-28): the app's dock seats Explore's art on a
   filled brand disc (64px, art 43 wide = 0.67 of it; #1B63CC light / #7FB4FF dark =
   --app-brand). The sidebar slot keeps its box: the disc is a pseudo-element 120% of
   the slot, centred behind it, and the art is scaled .8 inside the same box, so the
   art-to-disc ratio is the app's .67 and nothing in the row moves. Both themes, both
   states (the art is always the -selected drawing, as on the app's disc). */
body.hts-studio.hts-studio.hts-studio #sidebar .st-appart--nav.st-appart--disc{position:relative;isolation:isolate;overflow:visible}
body.hts-studio.hts-studio.hts-studio #sidebar .st-appart--nav.st-appart--disc::before{content:"";position:absolute;left:50%;top:50%;width:120%;height:auto;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:var(--app-brand);z-index:-1}
body.hts-studio.hts-studio.hts-studio #sidebar .st-appart--nav.st-appart--disc img{transform:scale(.8)}
