/* modellab-studio.css — the post-build "understand, prepare, change" surface.
 *
 * One shell, three views (Read / Prep / Workbook) and one Change drawer. Kept
 * separate from the interview shell (modellab.html) so it can be iterated without
 * touching the authenticated build flow, exactly as modellab-guide.css was.
 *
 * The platform is light-only by design (TFS_STATUS.md, UI Theme — CANONICAL), so
 * every surface here paints an explicit background rather than inheriting one.
 */

.mls{
  --g:#2D8A5E;            /* platform indigo-green */
  --g-dark:#1A3C2A;
  --g-light:#D6F0E0;
  --g-wash:#EDF7F1;
  --g-line:#BFE0CE;
  --clay:#A8642A;         /* investor questions only — never the model itself */
  --clay-wash:#FBF1E7;
  --navy:#132E57;         /* workbook section bands, as written by ModelGen */
  --excel:#107C41;

  --ink:#0E1512;
  --ink-2:#33453D;
  --muted:#65786F;
  --faint:#8C9C94;
  --line:#E0E7E3;
  --line-2:#CBD6D0;
  --surface:#FFFFFF;
  --surface-2:#F7FAF8;
  --surface-3:#EDF2EF;
  --mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace;

  position:fixed; inset:0; z-index:9200;
  display:none; flex-direction:column;
  background:var(--surface); color:var(--ink);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:15px; line-height:1.55;
}
.mls.is-open{display:flex;}
.mls *,.mls *::before,.mls *::after{box-sizing:border-box;}
.mls h1,.mls h2,.mls h3,.mls h4{font-family:"Space Grotesk",Inter,sans-serif; font-weight:700; line-height:1.15; margin:0; text-wrap:balance;}
/* :where() so this reset carries ZERO specificity of its own. As a plain
   `.mls button` selector it scored (0,1,1) and beat every single-class button rule
   below it — including `.mls__btn--primary{color:#fff}` — so the primary buttons
   rendered as near-black ink on the brand green, and `.mls__btn`'s own --ink-2 was
   dead too. A reset that overrides the components it is resetting is not a reset. */
.mls :where(button,input,textarea){font:inherit; color:inherit;}
.mls button{cursor:pointer;}
.mls :focus-visible{outline:2px solid var(--g); outline-offset:2px;}
@media (prefers-reduced-motion:reduce){.mls *{transition:none!important; animation:none!important;}}

/* ---------------------------------------------------------------- top bar */
.mls__nav{flex:0 0 54px; height:54px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:11px; padding:0 16px; background:var(--surface);}
.mls__mark{width:26px; height:26px; border-radius:7px; background:var(--g); color:#fff; display:grid; place-items:center; font:700 11px "Space Grotesk",sans-serif; flex:0 0 26px;}
.mls__crumb{font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.mls__crumb b{color:var(--ink); font-weight:600;}
.mls__navright{margin-left:auto; display:flex; align-items:center; gap:8px; flex-shrink:0;}
.mls__pill{font-size:10.5px; font-weight:700; border-radius:999px; padding:5px 10px; background:var(--g-wash); color:var(--g-dark); border:1px solid var(--g-line); white-space:nowrap;}
.mls__pill--stale{background:var(--clay-wash); color:var(--clay); border-color:#E7C9A6;}
.mls__btn{border:1px solid var(--line); background:var(--surface); border-radius:9px; padding:7px 12px; font-size:12.5px; font-weight:600; color:var(--ink-2); white-space:nowrap;}
.mls__btn:hover{border-color:var(--line-2); background:var(--surface-2);}
.mls__btn--primary{background:var(--g); border-color:var(--g); color:#fff;}
.mls__btn--primary:hover{background:#25714D; border-color:#25714D;}
.mls__btn--sm{padding:5px 10px; font-size:11.5px; border-radius:7px;}
.mls__btn[disabled]{opacity:.5; cursor:not-allowed;}

/* ------------------------------------------------------------ view switch */
.mls__switch{flex:0 0 46px; height:46px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:9px; padding:0 16px; background:var(--surface-2);}
.mls__seg{display:flex; gap:2px; background:var(--surface-3); border-radius:10px; padding:3px;}
.mls__segbtn{border:0; background:transparent; border-radius:8px; padding:6px 14px; font-size:13px; font-weight:600; color:var(--muted); display:flex; align-items:center; gap:7px;}
.mls__segbtn:hover{color:var(--ink);}
.mls__segbtn[aria-selected="true"]{background:var(--surface); color:var(--ink); box-shadow:0 1px 3px rgba(14,21,18,.1);}
.mls__segbtn small{font-size:10.5px; font-weight:600; color:var(--faint);}
.mls__switchright{margin-left:auto; display:flex; align-items:center; gap:8px;}
.mls__hint{font-size:11.5px; color:var(--faint); white-space:nowrap;}

.mls__body{flex:1; min-height:0; display:flex;}
.mls__view{flex:1; min-width:0; display:none;}
/* The active view sets its own display. Each view rule below deliberately carries
   no `display` of its own: a bare `.mls-prep{display:grid}` sits at the same
   specificity as `.mls__view{display:none}` and, being later in the file, would
   silently show every view at once. */
.mls__view.is-on.mls-read{display:block;}
.mls__view.is-on.mls-prep{display:grid;}
.mls__view.is-on.mls-wb{display:grid;}

/* ============================================================ view: READ */
.mls-read{overflow:auto; background:var(--surface-2);}
.mls-read__hero{padding:34px 40px 26px; background:var(--surface); border-bottom:1px solid var(--line);}
.mls-read__eyebrow{font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--g); font-weight:700;}
.mls-read__hero h2{font-size:30px; letter-spacing:-.03em; margin-top:9px; max-width:20ch;}
.mls-read__hero p{margin:11px 0 0; color:var(--muted); font-size:14px; max-width:64ch;}
.mls-read__kpis{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1px; background:var(--line); border-bottom:1px solid var(--line);}
.mls-read__kpi{background:var(--surface); padding:15px 18px;}
.mls-read__kpi span{font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--faint); font-weight:700;}
.mls-read__kpi b{display:block; font:700 25px "Space Grotesk",sans-serif; letter-spacing:-.03em; margin-top:6px; font-variant-numeric:tabular-nums;}
.mls-read__kpi em{font-style:normal; font-size:11.5px; color:var(--muted); display:block; margin-top:3px;}
.mls-read__flow{padding:0 40px 60px; max-width:1180px;}
.mls-read__sec{display:grid; grid-template-columns:34px minmax(0,1fr); gap:20px; padding-top:32px; scroll-margin-top:20px;}
.mls-read__spine{position:relative;}
.mls-read__spine i{position:absolute; left:16px; top:36px; bottom:-32px; width:1px; background:var(--line);}
.mls-read__dot{width:33px; height:33px; border-radius:50%; border:1px solid var(--g-line); background:var(--g-wash); color:var(--g-dark); display:grid; place-items:center; font-size:11px; font-weight:700; position:relative; z-index:1;}
.mls-read__sec h3{font-size:19px; letter-spacing:-.02em;}
.mls-read__sec > div > p{margin:8px 0 0; color:var(--ink-2); font-size:14.5px; line-height:1.62; max-width:66ch;}
.mls-read__nums{display:flex; gap:26px; flex-wrap:wrap; margin-top:16px; padding:13px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.mls-read__nums div span{display:block; font-size:10px; letter-spacing:.09em; text-transform:uppercase; color:var(--faint); font-weight:700;}
.mls-read__nums div b{font:700 20px "Space Grotesk",sans-serif; letter-spacing:-.02em; font-variant-numeric:tabular-nums;}
.mls-read__peek{margin-top:15px; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface);}
.mls-read__peekhead{display:flex; align-items:center; gap:9px; padding:7px 11px; border-bottom:1px solid var(--line); background:var(--surface-2);}
.mls-read__peekhead code{font-family:var(--mono); font-size:10.5px; color:var(--muted);}
.mls-read__peekhead .mls__btn{margin-left:auto;}
.mls-read__peek .mls-grid__view{max-height:186px;}
.mls-read__calc{margin-top:14px; border-left:2.5px solid var(--g); background:var(--surface-3); border-radius:0 9px 9px 0; padding:10px 12px; font-family:var(--mono); font-size:11.5px; line-height:1.5; color:var(--ink-2); overflow-x:auto;}
.mls-read__qs{margin-top:15px;}
.mls-read__qs > b{font-size:9.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--clay); font-weight:700;}
.mls-read__q{display:flex; gap:9px; align-items:baseline; margin-top:8px; width:100%; text-align:left; border:0; background:transparent; padding:2px 0; font-size:13.5px; color:var(--ink-2);}
.mls-read__q:hover{color:var(--clay);}
.mls-read__q::before{content:"?"; flex:0 0 17px; height:17px; border-radius:50%; background:var(--clay-wash); color:var(--clay); font-size:10px; font-weight:700; display:grid; place-items:center; transform:translateY(2px);}

/* ============================================================ view: PREP */
.mls-prep{grid-template-columns:308px minmax(0,1fr); min-height:0;}
.mls-prep__left{border-right:1px solid var(--line); background:var(--surface-2); display:flex; flex-direction:column; min-height:0;}
.mls-prep__lhead{padding:16px; border-bottom:1px solid var(--line);}
.mls-prep__lhead .lbl{font-size:9.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--clay); font-weight:700;}
.mls-prep__lhead h3{font-size:17px; letter-spacing:-.02em; margin:6px 0 5px;}
.mls-prep__lhead p{margin:0; font-size:11.5px; color:var(--muted);}
.mls-prep__ready{margin-top:13px; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:10px 11px;}
.mls-prep__readytop{display:flex; justify-content:space-between; font-size:10.5px; font-weight:600; color:var(--muted);}
.mls-prep__readytop b{color:var(--ink); font-family:"Space Grotesk",sans-serif;}
.mls-prep__bars{display:flex; gap:3px; margin-top:8px;}
.mls-prep__bars i{flex:1; height:5px; border-radius:2px; background:var(--surface-3);}
.mls-prep__bars i.on{background:var(--clay);}
.mls-prep__list{flex:1; overflow:auto; padding:8px;}
.mls-prep__group{padding:12px 9px 5px; font-size:9.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--faint); font-weight:700;}
.mls-prep__q{width:100%; text-align:left; border:1px solid transparent; background:transparent; border-radius:9px; padding:9px 10px; display:grid; grid-template-columns:16px 1fr; gap:9px; align-items:start; font-size:12.5px; line-height:1.4; color:var(--ink-2);}
.mls-prep__q:hover{background:var(--surface);}
.mls-prep__q[aria-current="true"]{background:var(--surface); border-color:var(--clay); color:var(--ink); font-weight:600;}
.mls-prep__tick{width:15px; height:15px; border-radius:5px; border:1.5px solid var(--line-2); display:grid; place-items:center; font-size:9px; color:transparent; transform:translateY(2px);}
.mls-prep__q.is-done .mls-prep__tick{background:var(--g); border-color:var(--g); color:#fff;}
.mls-prep__right{display:grid; grid-template-rows:auto minmax(0,1fr); min-height:0; min-width:0;
  /* The column matters as much as the rows. A grid with only rows declared gets one
     implicit max-content column, so the evidence table — as wide as the sheet — sized
     this panel and pushed the answer text past the right edge. */
  grid-template-columns:minmax(0,1fr);}
.mls-prep__answer{min-width:0; padding:20px 24px 16px; overflow:auto; max-height:min(52vh,460px); background:var(--surface);}
.mls-prep__qhead{display:flex; gap:12px; align-items:start;}
.mls-prep__qhead h2{font-size:21px; letter-spacing:-.022em; max-width:36ch;}
.mls-prep__from{margin-left:auto; flex:0 0 auto; font-size:10.5px; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:5px 10px; white-space:nowrap;}
.mls-prep__answer > p{margin:12px 0 0; font-size:14px; line-height:1.62; color:var(--ink-2); max-width:74ch;}
.mls-prep__say{margin-top:14px; border:1px solid var(--line); border-left:3px solid var(--clay); border-radius:0 10px 10px 0; background:var(--clay-wash); padding:12px 14px;}
.mls-prep__say b{font-size:9.5px; letter-spacing:.11em; text-transform:uppercase; color:var(--clay); display:block; margin-bottom:6px;}
.mls-prep__say p{margin:0; font-size:13.5px; line-height:1.6; color:var(--ink-2);}
.mls-prep__ev{display:flex; gap:8px; flex-wrap:wrap; margin-top:13px; align-items:center;}
.mls-prep__ev span{font-size:10.5px; color:var(--faint); font-weight:600;}
.mls-prep__ev code{font-family:var(--mono); font-size:11px; background:var(--g-wash); border:1px solid var(--g-line); color:var(--g-dark); border-radius:6px; padding:3px 8px; cursor:pointer;}
.mls-prep__ev code:hover{background:var(--g-light);}

/* ======================================================== view: WORKBOOK */
.mls-wb{grid-template-columns:216px minmax(0,1fr) 330px; min-height:0;}
.mls-wb__outline{border-right:1px solid var(--line); background:var(--surface-2); overflow:auto; padding:10px 8px 20px;}
.mls-wb__ohead{padding:8px 9px 6px; font-size:9.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--faint); font-weight:700;}
.mls-wb__sheetgrp{margin-bottom:6px;}
.mls-wb__sheetbtn{width:100%; text-align:left; border:0; background:transparent; border-radius:8px; padding:7px 9px; font-size:12.5px; font-weight:600; color:var(--ink); display:flex; align-items:center; gap:8px;}
.mls-wb__sheetbtn:hover{background:var(--surface);}
.mls-wb__sheetbtn[aria-current="true"]{background:var(--surface); box-shadow:inset 0 0 0 1px var(--g-line);}
.mls-wb__sheetbtn i{font-style:normal; width:16px; height:16px; border-radius:4px; background:var(--excel); color:#fff; font-size:8.5px; font-weight:700; display:grid; place-items:center; flex:0 0 16px;}
.mls-wb__jump{width:100%; text-align:left; border:0; background:transparent; border-radius:7px; padding:5px 9px 5px 32px; font-size:11.5px; color:var(--muted); display:block;}
.mls-wb__jump:hover{background:var(--surface); color:var(--ink);}
.mls-wb__jump[aria-current="true"]{color:var(--g-dark); font-weight:600; background:var(--g-wash);}
.mls-wb__main{display:flex; flex-direction:column; min-width:0; min-height:0; background:var(--surface-3);}
.mls-wb__insp{border-left:1px solid var(--line); background:var(--surface); display:flex; flex-direction:column; min-height:0;}
.mls-wb__insphead{padding:13px 16px; border-bottom:1px solid var(--line);}
.mls-wb__insphead > span{font-size:9.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--faint); font-weight:700;}
.mls-wb__insphead h3{font-size:16px; margin-top:5px; letter-spacing:-.015em;}
.mls-wb__cell{margin-top:10px; display:grid; grid-template-columns:auto 1fr; gap:5px 11px; font-size:11.5px; align-items:baseline;}
.mls-wb__cell dt{color:var(--faint); font-weight:600;}
.mls-wb__cell dd{margin:0; font-family:var(--mono); font-size:11px; color:var(--ink-2); overflow-wrap:anywhere;}
.mls-wb__inspbody{flex:1; overflow:auto; padding:14px 16px;}
.mls-wb__inspbody h4{font-size:12.5px; margin-bottom:5px;}
.mls-wb__inspbody p{margin:0 0 13px; font-size:12.5px; line-height:1.58; color:var(--ink-2);}
.mls-wb__vc{border-left:2.5px solid var(--clay); background:var(--clay-wash); border-radius:0 9px 9px 0; padding:10px 12px; font-size:12px; line-height:1.5; color:var(--ink-2);}
.mls-wb__vc b{display:block; font-size:9px; letter-spacing:.1em; text-transform:uppercase; color:var(--clay); margin-bottom:5px;}
.mls-wb__editbar{border-top:1px solid var(--line); padding:11px 14px; background:var(--surface-2); display:flex; gap:9px; align-items:center; flex-wrap:wrap;}
.mls-wb__editbar span{flex:1 1 150px; font-size:11.5px; color:var(--muted); line-height:1.35;}

/* -------------------------------------------------------- the grid itself */
.mls-grid{display:flex; flex-direction:column; min-height:0; flex:1;}
.mls-grid__top{min-height:38px; background:var(--surface); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:9px; padding:0 12px;}
.mls-grid__x{width:21px; height:21px; border-radius:4px; background:var(--excel); color:#fff; display:grid; place-items:center; font:700 11px "Space Grotesk",sans-serif; flex:0 0 21px;}
.mls-grid__file{font:600 12px "Space Grotesk",sans-serif; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.mls-grid__ro{font-size:10px; color:var(--faint); border:1px solid var(--line); border-radius:999px; padding:2px 8px; white-space:nowrap;}
.mls-grid__topright{margin-left:auto; display:flex; gap:7px; align-items:center; flex-shrink:0;}
.mls-grid__fbar{min-height:32px; background:var(--surface-2); border-bottom:1px solid var(--line-2); display:flex; align-items:center; gap:8px; padding:0 10px;}
.mls-grid__name{width:132px; flex:0 0 132px; height:23px; background:var(--surface); border:1px solid var(--line-2); border-radius:3px; padding:3px 7px; font:11px var(--mono); color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.mls-grid__fx{font:italic 12px Georgia,serif; color:var(--faint);}
.mls-grid__formula{flex:1; min-width:0; height:23px; background:var(--surface); border:1px solid var(--line-2); border-radius:3px; padding:3px 8px; font:11px var(--mono); color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.mls-grid__view{flex:1; overflow:auto; background:var(--surface); min-height:0; position:relative;}
.mls-grid__table{border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:11.5px; font-variant-numeric:tabular-nums;}
.mls-grid__table th,.mls-grid__table td{height:23px; padding:2px 8px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background:var(--surface); color:var(--ink);}
.mls-grid__table thead th{position:sticky; top:0; z-index:6; height:22px; background:var(--surface-3); color:var(--faint); font:600 9.5px Inter,sans-serif; text-align:center;}
.mls-grid__table thead th.rn{left:0; z-index:8;}
/* THE PERIOD ROW STAYS. A column of five figures means nothing without the year
   over it, and on a 323-row Model sheet that row is off screen by the time you
   reach the statements. These are the rows the workbook itself freezes, so the
   pane pins exactly what Excel pins — `top` is measured and set in renderGrid,
   because the row heights are the workbook's, not this stylesheet's. */
.mls-grid__table tr.pin td{position:sticky; z-index:5; box-shadow:0 1px 0 var(--line-2);}
.mls-grid__table tr.pin td.rn,.mls-grid__table tr.pin td.lbl{z-index:7;}
.mls-grid__table tr.pin + tr:not(.pin) td{border-top:0;}
.mls-grid__table td{text-align:right;}
.mls-grid__table td.rn{position:sticky; left:0; z-index:3; width:36px; min-width:36px; background:var(--surface-3); color:var(--faint); text-align:right; font-size:9.5px;}
.mls-grid__table td.lbl{position:sticky; left:36px; z-index:2; text-align:left; box-shadow:1px 0 0 var(--line);}
.mls-grid__table tr.band td{background:var(--navy)!important; color:#fff; font-weight:700; letter-spacing:.05em; font-size:10px; border-color:var(--navy);}
.mls-grid__table tr.hi td{background:var(--g-wash);}
.mls-grid__table tr.hi td.rn{background:var(--g-light);}
.mls-grid__table td.inp{color:#1740D6;}
.mls-grid__table td.edit{cursor:cell;}
.mls-grid__table td.edit:hover{box-shadow:inset 0 0 0 1px var(--g);}
.mls-grid__table td.sel{box-shadow:inset 0 0 0 2px var(--g); background:var(--g-wash);}
.mls-grid__table td.bold{font-weight:700;}
.mls-grid__tabs{min-height:32px; background:var(--surface-2); border-top:1px solid var(--line-2); display:flex; align-items:stretch; padding:0 8px; gap:2px; overflow-x:auto; flex-shrink:0;}
.mls-grid__tab{border:0; border-bottom:2.5px solid transparent; background:transparent; color:var(--muted); padding:7px 11px 5px; font-size:11px; white-space:nowrap;}
.mls-grid__tab[aria-selected="true"]{background:var(--surface); border-bottom-color:var(--g); color:var(--ink); font-weight:700;}
.mls-grid__count{margin-left:auto; align-self:center; font-size:10px; color:var(--faint); padding:0 6px; white-space:nowrap;}
.mls-grid__empty{padding:40px; text-align:center; color:var(--muted); font-size:13px;}

/* ------------------------------------------------------- the Change drawer */
.mls__scrim{position:absolute; inset:0; background:rgba(14,21,18,.32); opacity:0; pointer-events:none; transition:opacity .18s; z-index:20;}
.mls.is-drawer .mls__scrim{opacity:1; pointer-events:auto;}
.mls__drawer{position:absolute; top:0; right:0; bottom:0; width:428px; max-width:92vw; background:var(--surface); border-left:1px solid var(--line); box-shadow:-16px 0 40px -24px rgba(14,21,18,.4); transform:translateX(100%); transition:transform .2s ease; z-index:21; display:flex; flex-direction:column;}
.mls.is-drawer .mls__drawer{transform:none;}
.mls__dhead{padding:15px 18px; border-bottom:1px solid var(--line); display:flex; align-items:start; gap:10px;}
.mls__dhead h3{font-size:17px; letter-spacing:-.02em;}
.mls__dhead p{margin:5px 0 0; font-size:12px; color:var(--muted); max-width:44ch;}
.mls__dclose{margin-left:auto; border:1px solid var(--line); background:var(--surface); border-radius:8px; width:28px; height:28px; color:var(--muted); flex:0 0 28px;}
.mls__dbody{flex:1; overflow:auto; padding:14px 18px;}
.mls__chat{display:flex; flex-direction:column; gap:11px;}
.mls__msg{border:1px solid var(--line); border-radius:11px; padding:10px 12px; font-size:12.5px; line-height:1.55; color:var(--ink-2); background:var(--surface);}
.mls__msg--me{background:var(--g); border-color:var(--g); color:#fff; margin-left:36px;}
.mls__msg b{display:block; font-size:9px; letter-spacing:.1em; text-transform:uppercase; color:var(--faint); margin-bottom:4px;}
.mls__dfoot{border-top:1px solid var(--line); padding:12px 18px; background:var(--surface-2);}
.mls__composer{display:flex; gap:8px;}
.mls__composer textarea{flex:1; min-width:0; border:1px solid var(--line-2); border-radius:11px; padding:9px 12px; font-size:12.5px; resize:none; height:62px; background:var(--surface);}
.mls__composer textarea:disabled{opacity:.55; cursor:not-allowed;}
.mls__ctools{display:flex; flex-direction:column; gap:6px; justify-content:flex-end;}
.mls__mic{display:inline-flex; align-items:center; justify-content:center; width:36px; height:32px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface); color:var(--muted); cursor:pointer; transition:border-color .15s, color .15s;}
.mls__mic:hover:not(:disabled){border-color:var(--g); color:var(--g);}
.mls__mic:disabled{opacity:.4; cursor:not-allowed;}
.mls__mic.is-recording{border-color:#c0392b; color:#c0392b; background:rgba(192,57,43,.07);}
.mls__mic.is-recording svg{animation:mls-pulse 1.3s ease-in-out infinite;}
.mls__mic.is-transcribing svg{animation:mls-spin .8s linear infinite;}
@keyframes mls-pulse{0%,100%{opacity:1;}50%{opacity:.35;}}
@keyframes mls-spin{to{transform:rotate(360deg);}}
.mls__chint{margin:8px 0 0; font-size:11px; color:var(--muted); line-height:1.45; min-height:1em;}
.mls__dirty{display:flex; gap:10px; align-items:center; margin-top:10px; padding:9px 11px; border:1px solid var(--line-2); border-radius:10px; background:var(--surface);}
.mls__dirty p{margin:0; flex:1; font-size:11.5px; color:var(--ink-2); line-height:1.4;}
.mls__dirty[hidden]{display:none;}
.mls__msg.is-error{border-color:#e2b4ae; background:rgba(192,57,43,.06); color:#8c2c20;}
.mls__msg.is-streaming::after{content:'▍'; display:inline-block; margin-left:1px; animation:mls-pulse 1s steps(2) infinite; color:var(--faint);}
.mls__dots{display:inline-flex; gap:4px; align-items:center;}
.mls__dots i{width:5px; height:5px; border-radius:50%; background:var(--faint); display:block; animation:mls-pulse 1.2s ease-in-out infinite;}
.mls__dots i:nth-child(2){animation-delay:.18s;}
.mls__dots i:nth-child(3){animation-delay:.36s;}

@media (max-width:1180px){
  .mls-wb{grid-template-columns:minmax(0,1fr) 310px;}
  .mls-wb__outline{display:none;}
}
@media (max-width:900px){
  .mls-prep,.mls-wb{grid-template-columns:1fr; overflow:auto;}
  .mls-prep__left{border-right:0; border-bottom:1px solid var(--line);}
  .mls-prep__list{max-height:210px;}
  .mls-prep__answer{max-height:none;}
  .mls-wb__insp{border-left:0; border-top:1px solid var(--line);}
  .mls-wb__main{height:60vh;}
  .mls-read__hero,.mls-read__flow{padding-left:20px; padding-right:20px;}
  .mls__switch{padding:0 10px;}
  .mls__hint{display:none;}
}

/* Exact values cited by Prep, including when their row is not selected. */
.mls-grid td.prep-source{background:#fff0b8 !important;box-shadow:inset 0 0 0 2px #b87716;color:#362606;font-weight:700;}

.mls-prep__sources{margin-top:12px;font-size:12px;}
.mls-prep__sources summary{cursor:pointer;color:var(--clay);font-weight:600;}

.mls-wb__calculation{font-family:var(--mono);font-size:11px!important;overflow-wrap:anywhere;background:var(--surface-2);padding:10px;border-radius:6px;}
.mls-wb__sources{margin:14px 0;font-size:12px;}
.mls-wb__sources summary{cursor:pointer;font-weight:600;color:var(--clay);margin-bottom:8px;}
.mls-wb__sources button{display:block;text-align:left;white-space:normal;overflow-wrap:anywhere;margin:6px 0;width:100%;}

@media(max-width:900px){.mls-wb__insp{min-height:480px;}.mls-wb__inspbody{min-height:220px;}}

.mls-prep__sheet-label{margin-left:auto;display:flex;gap:6px;align-items:center;font-size:12px;}
.mls-prep__sheet-picker{max-width:220px;font:inherit;padding:6px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:6px;}
.mls-prep__sheet-tabs{display:flex;flex-shrink:0;gap:4px;overflow:auto;padding:8px;background:var(--surface);border-top:1px solid var(--line);}
.mls-prep__sheet-tabs button{white-space:nowrap;flex-shrink:0;}
.mls-prep__sheet-tabs button[aria-current="true"]{border-color:var(--clay);background:var(--clay-wash);}
.mls-grid td.prep-focus{outline:2px solid var(--clay);outline-offset:-2px;}
@media(max-width:900px){.mls-prep__evidence{min-height:420px;}.mls-prep__evidence .mls-grid__top{flex-wrap:wrap;padding:8px;}.mls-prep__sheet-label{margin-left:0;}}
