/* ============================================================================
   studio_snd.css — HAND-WRITTEN, the second mapping sheet (studio_qx.css is the
   first). Where studio_qx.css dresses the ROUND DOM, this one dresses the
   production DOM the phase-3 RESTYLE wraps keep whole: the Sounds sub-pages, the
   tone-formula matrices, the Fluency rule reader, Grammar, and the Read stages.

   Contract: STUDIO_MISSING_SCREENS_SPEC_2026-09-06.md §B and §C. The production
   markup is never edited — it keeps its DOM and its capability and takes the
   nearest Codex component's styling. Every value below is quoted from the
   READ-ONLY prototype sheets with the source rule named above it.

   Loaded after the generated studio.css; scoped `body.hts-studio .st-page`.
   Without both the body class and the page wrapper this sheet matches nothing.
   ============================================================================ */

/* ---- production page chrome the studio heading replaces --------------------
   A restyle wrap puts his heading() above the ORIGINAL page string, which still
   carries its own masthead / breadcrumb / page title. Two titles is not the
   design, so production's are hidden — never deleted from the DOM, so nothing
   the shipped code queries or wires can go missing. */
body.hts-studio .st-page .masthead,
body.hts-studio .st-page .breadcrumb,
body.hts-studio .st-page .pg-title,
body.hts-studio .st-page .chap-head,
body.hts-studio .st-page .wing-head,
/* ⛔ .formula-hero joined this list in phase 7. It is production’s near-BLACK hero
   (rgb(10,14,22), white type) and it was the ONLY production dark-chrome ground left
   anywhere in the studio — found by sweeping all 33 routes in the LIGHT theme for a
   dark ground that is not one of HIS (--purple/--navy, .atlas-map, .home-hero). It also
   duplicated what is directly above it: his heading carries the title, and his interactive
   formula block already offers the same four dimensions its chip row linked to. */
body.hts-studio .st-page .formula-hero { display: none !important; }

/* ---- section heads inside a restyled production page -----------------------
   studio.css .section-heading{...} — production's c.sectionHead lands here. */
body.hts-studio .st-page .sec-head,
body.hts-studio .st-page .section__head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 18px; margin: 40px 0 18px;
}
body.hts-studio .st-page .sec-head h2,
body.hts-studio .st-page .section__head h2 { font-size:max(14px,calc(21px * var(--type-k))); font-weight: 500; letter-spacing: -.4px; }
body.hts-studio .st-page .sec-head .sub,
body.hts-studio .st-page .section__head .sub { font-size: 12px; color: var(--muted); }

/* ---- §B tones — the grid and the minimal-set rows -------------------------
   studio.css .sound-grid / .sound-tile (padding 23px 18px, min-height 175,
   h3 12px/500, Thai 36-40px, small 12-14px muted, .tone-curve 35px brand). */
body.hts-studio .st-page .sgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px;
}
/* ⛔ the TONE cards need their own floor. The 180px floor above fits two tracks at
   a 380px content width (an iPhone Max, 430 viewport), but a tone card’s min-content is
   227px — its hear button then hangs 44px past the card and the page scrolled sideways
   by 24px, in both themes, ONLY in the 420-430 band (measured on the live deploy at
   430/390/375). The floor is the MEASURED min-content, and min(100%, ...) keeps the
   floor itself from overflowing a narrower screen. Same family as his .sound-tile,
   which he pairs with min-width:0 for exactly this reason. */
body.hts-studio .st-page .tone-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 228px), 1fr)); gap: 14px;
}
body.hts-studio .st-page .tone-card,
body.hts-studio .st-page .sound-tile,
body.hts-studio .st-page .letter-card { min-width: 0; }
body.hts-studio .st-page .tone-row,
body.hts-studio .st-page .tcard {
  padding: 23px 18px; min-height: 175px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 9px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
body.hts-studio .st-page .tone-row:hover,
body.hts-studio .st-page .tcard:hover { border-color: var(--orange); }
body.hts-studio .st-page .tc-name,
body.hts-studio .st-page .tone-row h3 { font-size: 12px; font-weight: 500; color: var(--ink); }
body.hts-studio .st-page .tone-row .thai,
body.hts-studio .st-page .tc-thai { font-size:max(14px,calc(40px * var(--type-k-thai))); line-height: 1.5; }
body.hts-studio .st-page .tc-en,
body.hts-studio .st-page .tone-row small { font-size:max(13px,calc(14px * var(--type-k))); color: var(--muted); }
/* ⛔ NO ROMANIZATION anywhere in the studio (owner law). */
body.hts-studio .st-page .tc-roman { display: none !important; }
/* studio.css .tone-curve{height:35px;stroke:var(--orange);stroke-width:2} */
body.hts-studio .st-page .tc-wave svg,
body.hts-studio .st-page .tone-glyph { height: 35px; width: auto; }
body.hts-studio .st-page .tc-wave svg path,
body.hts-studio .st-page .tone-glyph path { stroke: var(--orange); stroke-width: 2; fill: none; }
/* the minimal-set carousel rows → his reference-list
   studio.css .reference-row{padding:21px;border:1px solid var(--line);border-radius:7px}  */
body.hts-studio .st-page .set-carousel,
body.hts-studio .st-page .set-slide,
body.hts-studio .st-page .ladgrid,
body.hts-studio .st-page .reference-list--prod { display: block; }
body.hts-studio .st-page .tone-set-row,
body.hts-studio .st-page .ladcard,
body.hts-studio .st-page .tmark {
  padding: 21px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); margin-bottom: 10px; display: flex; gap: 18px; align-items: center;
}
body.hts-studio .st-page .tmark__mark { font-size:max(14px,calc(37px * var(--type-k))); line-height: 1.4; min-width: 60px; text-align: center; }
body.hts-studio .st-page .tmark__name { font-size:max(14px,calc(16px * var(--type-k))); font-weight: 500; }
body.hts-studio .st-page .tmark__note { font-size:max(13px,calc(14px * var(--type-k))); color: var(--muted); line-height: 1.7; }

/* ---- §B letters (vowels / livedead / classes / consonants) -----------------
   studio.css .alphabet-grid / .letter-card (Thai 37px, small 13px, padding 18px 8px,
   hover brand border). */
body.hts-studio .st-page .ccard,
body.hts-studio .st-page .vcard,
body.hts-studio .st-page .letter-tile {
  padding: 18px 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; text-align: center;
}
body.hts-studio .st-page .ccard:hover,
body.hts-studio .st-page .vcard:hover { border-color: var(--orange); }
body.hts-studio .st-page .cchar,
body.hts-studio .st-page .ccard .thai { font-size:max(14px,calc(37px * var(--type-k-thai))); line-height: 1.5; display: block; }
body.hts-studio .st-page .cname,
body.hts-studio .st-page .cmeta { font-size: 13px; color: var(--muted); }
/* studio.css .badge{display:inline-flex;border:1px solid var(--line);border-radius:4px;padding:5px 8px;font-size:12px} */
body.hts-studio .st-page .cbadge,
body.hts-studio .st-page .ccl-count,
body.hts-studio .st-page .tag,
body.hts-studio .st-page .lvl {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
  border-radius: 4px; padding: 5px 8px; font-size: 12px; font-weight: 500; letter-spacing: .4px;
  background: none; color: var(--muted);
}
/* studio.css .lesson-tip{background:var(--soft-green);color:var(--green)} */
body.hts-studio .st-page .tonerule,
body.hts-studio .st-page .note--amber,
body.hts-studio .st-page .brk-tip {
  background: var(--soft-green); color: var(--green); border: 0; border-radius: 8px;
  padding: 20px; font-size:max(13px,calc(14px * var(--type-k))); line-height: 1.8;
}
body.hts-studio .st-page .tonerule b,
body.hts-studio .st-page .brk-tip__k { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; display: block; margin-bottom: 6px; }

/* ---- §B classes — three panel columns -------------------------------------
   studio.css .category-grid (3-up) + .panel */
body.hts-studio .st-page .ccl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
body.hts-studio .st-page .ccl {
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 25px;
}
body.hts-studio .st-page .ccl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
body.hts-studio .st-page .ccl-t { font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 600; color: var(--muted); }
body.hts-studio .st-page .ccl-gist { font-size:max(13px,calc(14px * var(--type-k))); color: var(--muted); line-height: 1.7; }

/* ---- §B pairs / groups ----------------------------------------------------
   studio.css .word-grid of .vocab-card; the `vs` divider = a 1px line + 12px label */
body.hts-studio .st-page .pairgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
body.hts-studio .st-page .paircard {
  padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
body.hts-studio .st-page .pcell .thai { font-size:max(14px,calc(27px * var(--type-k-thai))); display: block; }
body.hts-studio .st-page .pairvs,
body.hts-studio .st-page .vs {
  font-size: 12px; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase;
  border-top: 1px solid var(--line); margin: 14px 0; padding-top: 12px; text-align: center;
}

/* ---- §B formula matrices (a capability — kept, dressed) --------------------
   his .syllable-table: head 12px muted on --bg, cells 14px, class tags. */
body.hts-studio .st-page .tfm-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); margin: 18px 0;
}
body.hts-studio .st-page .tfm { width: 100%; border-collapse: collapse; font-size:max(13px,calc(14px * var(--type-k))); }
body.hts-studio .st-page .tfm th,
body.hts-studio .st-page .tfm td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; }
body.hts-studio .st-page .tfm thead th {
  background: var(--bg); font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
body.hts-studio .st-page .tfm thead th span { display: block; letter-spacing: 0; text-transform: none; font-weight: 400; }
body.hts-studio .st-page .tfm tbody tr:last-child th,
body.hts-studio .st-page .tfm tbody tr:last-child td { border-bottom: 0; }
/* his .class-tag / .class-high / .class-low colour tokens */
body.hts-studio .st-page .tfm__cls,
body.hts-studio .st-page .tfm__rowh {
  font-size: 12px; font-weight: 500; letter-spacing: .4px;
}
/* studio.css .formula-result{background:var(--soft-green);…} — his own block sits
   above the matrices and is already generated; nothing to add here. */

/* ---- §C the fluency rule reader (#/pattern/:id) ---------------------------
   his patternDetail(): heading block · .badge.orange formula in a .sentence-stage ·
   .sentence-note two-column · .text-link foot. */
body.hts-studio .st-page .pat-hero { background: none; border: 0; padding: 0; margin-bottom: 8px; }
body.hts-studio .st-page .pat-title { font-size:max(14px,calc(38px * var(--type-k))); font-weight: 500; letter-spacing: -1px; line-height: 1.15; }
/* studio.css .page-heading p{font-size:max(13px,calc(15px * var(--type-k)));color:var(--muted)} */
body.hts-studio .st-page .pat-tldr { font-size:max(13px,calc(15px * var(--type-k))); color: var(--muted); line-height: 1.8; margin-top: 10px; }
/* his .sentence-stage — the example lives in it */
body.hts-studio .st-page .pat-example,
body.hts-studio .st-page .pat-eg {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px; text-align: center; margin: 22px 0;
}
body.hts-studio .st-page .pat-example .thai,
body.hts-studio .st-page .pat-eg .thai { font-size:max(14px,calc(32px * var(--type-k-thai))); line-height: 1.7; display: block; }
/* studio.css .badge.orange + his patternDetail formula chip sizing */
body.hts-studio .st-page .pat-formula {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--soft-orange); color: var(--orange); border: 1px solid var(--orange);
  border-radius: 4px; font-size: 14px; padding: 15px 23px; font-weight: 500; letter-spacing: .4px;
}
/* studio.css .sentence-note{display:grid;grid-template-columns:1fr 1fr;gap:…} */
body.hts-studio .st-page .pat-sec {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
  border-top: 1px solid var(--line); padding-top: 25px; margin-top: 25px;
}
body.hts-studio .st-page .pat-sec h3 { font-size:max(14px,calc(18px * var(--type-k))); font-weight: 500; margin-bottom: 10px; }
body.hts-studio .st-page .pat-prose,
body.hts-studio .st-page .pat-sec p { font-size:max(13px,calc(15px * var(--type-k))); color: var(--muted); line-height: 1.8; }
body.hts-studio .st-page .pat-foot { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 25px; }
body.hts-studio .st-page .pat-foot a,
body.hts-studio .st-page .pat-chip {
  display: inline-flex; align-items: center; gap: 9px; font-size:max(13px,calc(14px * var(--type-k))); font-weight: 500;
  color: var(--ink); background: none; border: 0; padding: 0;
}

/* ---- §C grammar + sentence sets -------------------------------------------
   his .reference-list rows; the rule formula sits in the row's number slot as a .token. */
body.hts-studio .st-page .gx-row,
body.hts-studio .st-page .gx-card,
body.hts-studio .st-page .ss-row {
  padding: 21px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
  display: flex; gap: 18px; align-items: center; margin-bottom: 10px;
}
body.hts-studio .st-page .ss-row__thai { font-size:max(14px,calc(27px * var(--type-k))); line-height: 1.7; overflow-wrap: anywhere; }
body.hts-studio .st-page .ss-row__en { font-size:max(13px,calc(15px * var(--type-k))); color: var(--muted); line-height: 1.7; }
body.hts-studio .st-page .ss-row__w { font-size: 12px; color: var(--muted); }

/* ---- §C the reading sandbox (#/read/syllables) ----------------------------
   his .study-sentence + .sentence-stage + .formula-controls/.formula-result. */
body.hts-studio .st-page .decoder,
body.hts-studio .st-page .syl-sandbox {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px;
}
body.hts-studio .st-page .decoder .thai { font-size:max(14px,calc(42px * var(--type-k-thai))); line-height: 1.6; }

/* ---- phone (≤700px) — his own breakpoints, nothing new authored ----------- */
@media (max-width: 700px) {
  /* studio.css @media(max-width:1000px) .category-grid → 2-up; ≤700 → 1 */
  body.hts-studio .st-page .ccl-grid { grid-template-columns: 1fr; }
  /* desktop-revision.css @media(max-width:700px) .vocab-card{padding:18px 13px} */
  body.hts-studio .st-page .paircard { padding: 18px 13px; }
  body.hts-studio .st-page .tone-row,
  body.hts-studio .st-page .tcard { min-height: 150px; padding: 20px 14px; }
  /* devices.css .reference-row{padding:17px 15px;gap:14px} */
  body.hts-studio .st-page .tone-set-row,
  body.hts-studio .st-page .ladcard,
  body.hts-studio .st-page .tmark,
  body.hts-studio .st-page .gx-row,
  body.hts-studio .st-page .ss-row { padding: 17px 15px; gap: 14px; }
  /* his patternDetail two-column note stacks (studio.css .sentence-note ≤700) */
  body.hts-studio .st-page .pat-sec { grid-template-columns: 1fr; gap: 22px; }
  body.hts-studio .st-page .pat-title { font-size:max(14px,calc(30px * var(--type-k))); }
  body.hts-studio .st-page .pat-example,
  body.hts-studio .st-page .pat-eg { padding: 24px 16px; }
  body.hts-studio .st-page .tfm th,
  body.hts-studio .st-page .tfm td { padding: 11px 12px; font-size: 13px; }
}
