/* GeoCalc Studio — base stylesheet.
   Palette, scale, grid, running head, sticky summary, breakpoints, print.
   Identity-bearing rules (number rail, margin note, double rule, small-caps lexicon)
   live in geocalc.identity.css and nowhere else.

   PALETTE (2026-09-12, third and final revision): Azure / SaaS blue + white. Two earlier
   passes (turquoise, then a sky blue) were shown to the user side-by-side
   with four other blue directions on a comparison page; "Azure / SaaS" (#1d6fd6 on that
   page) was the one picked. It is deepened here to #1660c4 — same hue and family, tuned
   so the accent-on-its-own-tint pattern (the bound badge, the flash highlight) clears
   4.5:1 as comfortably as every other pair, which the lighter swatch on the comparison
   page did not. Soil hatching keeps its original earth tones (draw/hatch.js is
   untouched): the chrome around the drawing reads as software, the drawing itself still
   reads as ground. The --earth/--earth-soft token NAMES are kept as-is (renaming touches
   draw/svg.js's token map and every rule that references them, for no functional gain)
   but their VALUES are azure, not literal earth-brown — read them as "brand accent", not
   literally "earth". --water is kept a distinct, more muted navy so the groundwater line
   never reads as the same colour as the brand accent. */
:root {
  --paper: #ffffff;
  --sheet: #ffffff;      /* WHITE — panels are not tinted at all; separated by borders only. Do not put any hue back here. */
  --rule: #dcdde0;
  --rule-2: #e5e5e8;

  --ink: #17262b;        /* 15.6:1 on paper */
  --ink-2: #46595f;      /*  7.4:1 */
  --ink-3: #5f7278;      /*  5.0:1 — text: rail numbers, note icon, dimension labels */
  --ink-3-line: #70878d; /*  3.8:1 — LINES/ARROWS/GRID ONLY, never text */

  --earth: #1660c4;      /*  5.7:1 — brand accent (Azure/SaaS blue), focus, links, bound badge */
  --earth-soft: #e3ecf8;
  --water: #2e4a7a;      /*  8.4:1 — groundwater and pore pressure ONLY, deliberately more muted than the brand accent */
  --water-soft: rgba(46, 74, 122, 0.12);

  --failure: #b3261e;    /*  6.5:1 */
  --pass: #2f6b45;       /*  6.3:1 */
  --caution: #8a5407;    /*  6.3:1 */
  --hl: #e3ecf8;         /* interpolated table row, result flash */

  --font-text: Arial, Helvetica, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, 'SF Mono', Menlo, monospace;
  --font-math: Arial, Helvetica, 'Segoe UI', sans-serif;

  --rail: 56px;
  --note-col: 320px;
  --head-h: 44px;
  --gap: 28px;
  --measure: 760px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --ctrl-h: 38px;
  --shadow-sm: 0 1px 2px rgba(23, 38, 43, 0.06);
  --shadow-md: 0 4px 16px rgba(23, 38, 43, 0.08);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Numerals: tabular everywhere a value can be compared down a column. */
.mono, input[type=number], .val, .num, td.num, th.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a { color: var(--earth); text-decoration: none; border-bottom: 1px solid var(--earth-soft); }
a:hover { border-bottom-color: var(--earth); }

:focus-visible { outline: 2px solid var(--earth); outline-offset: 2px; }

/* ------------------------------------------------------- running head */
/* Book page header, not a nav bar: section left, tool right, utilities far right. */
.run-head {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.run-head .rh-section { font-weight: 600; color: var(--ink); white-space: nowrap; }
.run-head .rh-section button {
  font: inherit; font-weight: 600; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.run-head .rh-tool { color: var(--ink-2); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.run-head .rh-sep { color: var(--ink-3); flex: none; }
.run-head .rh-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.rh-btn {
  height: var(--ctrl-h);
  display: inline-flex;
  align-items: center;
  font: 500 12px/1 var(--font-text);
  letter-spacing: 0.02em;
  color: var(--ink-2);
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}
.rh-btn:hover { background: var(--earth-soft); border-color: var(--ink-3-line); color: var(--ink); }
.rh-btn[aria-pressed=true] { background: var(--earth-soft); border-color: var(--earth); color: var(--earth); }
.rh-btn .kbd { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }

/* Contents drop-down opened from the section name. */
.rh-menu {
  position: absolute;
  top: var(--head-h);
  left: 12px;
  min-width: 280px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(15, 32, 36, 0.10);
  padding: 8px 0;
}
.rh-menu a { display: block; padding: 7px 16px; border: 0; color: var(--ink); font-size: 14px; }
.rh-menu a:hover { background: var(--earth-soft); }
.rh-menu .rh-menu-h { padding: 4px 16px 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* ------------------------------------------------------------- sheet */
.sheet-wrap { max-width: 1400px; margin: 0 auto; padding: 0 18px 120px; }

/* Three columns: number rail / text / margin note. */
.sheet {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--note-col);
  column-gap: var(--gap);
  background: var(--sheet);
  border-left: 1px solid var(--rule-2);
  border-right: 1px solid var(--rule-2);
  padding: 34px 30px 60px;
}
.sheet > .col-rail { grid-column: 1; }
.sheet > .col-main { grid-column: 2; max-width: var(--measure); }
.sheet > .col-note { grid-column: 3; }

/* A block spans rail+main and carries its own margin note. */
.blk { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) var(--note-col); column-gap: var(--gap); grid-column: 1 / -1; }
.blk > .b-rail { grid-column: 1; text-align: right; padding-top: 2px; }
.blk > .b-main { grid-column: 2; min-width: 0; max-width: var(--measure); }
.blk > .b-note { grid-column: 3; min-width: 0; }

/* ------------------------------------------------------- title block */
.title-blk { margin-bottom: 26px; }
.title-blk h1 { font-size: 30px; line-height: 1.2; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.title-blk .method {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2);
  margin: 0 0 10px;
}
.title-blk .scope { font-size: 15px; color: var(--ink-2); margin: 0 0 14px; max-width: 62ch; }

/* --------------------------------------------------------- sections */
.sec-h {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3);
  margin: 30px 0 12px;
}
.step-h { font-size: 17px; font-weight: 600; margin: 0 0 8px; }

/* --------------------------------------------------------- figure */
.figure { margin: 6px 0 10px; }
.figure svg { width: 100%; height: auto; display: block; background: var(--sheet); }
.figure .cap { font-size: 13px; color: var(--ink-2); margin-top: 7px; }
.figure .cap b { font-weight: 600; }

/* ----------------------------------------------------------- given */
.given-grp { margin-bottom: 16px; }
.given-grp > h4 {
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin: 0 0 6px;
  border-bottom: 1px solid var(--rule-2); padding-bottom: 4px;
}
/* a Greek symbol in a group name ("Skin friction — K-δ", "… — β method") keeps its case —
   uppercase would print Δ and Β, other symbols; the words around it stay in capitals */
.given-grp > h4 .nocase { text-transform: none; }
.given-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 108px 62px;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}
.given-row .g-sym { font-family: var(--font-math); font-size: 15px; color: var(--ink); }
.given-row .g-desc { font-size: 13.5px; color: var(--ink-2); }
.given-row .g-unit { font-size: 12.5px; color: var(--ink-3); }
.given-row input[type=number] {
  width: 100%; height: var(--ctrl-h); text-align: right;
  font-size: 15px; padding: 0 8px;
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 1px rgba(23, 38, 43, .04);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.given-row input[type=number]:focus {
  border-color: var(--earth); outline: none;
  box-shadow: inset 0 1px 1px rgba(23, 38, 43, .04), 0 0 0 3px var(--earth-soft);
}
.given-row.hl .g-sym, .given-row.hl .g-desc { color: var(--earth); }
.given-row.hl input[type=number] { border-color: var(--earth); background: var(--earth-soft); }
.given-row select {
  height: var(--ctrl-h);
  font: 13.5px/1.3 var(--font-text); color: var(--ink);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 0 6px;
}
.g-bind {
  font-size: 11px; font-family: var(--font-mono);
  color: var(--earth); border: 1px solid var(--earth); border-radius: 2px;
  padding: 1px 4px; margin-left: 6px; white-space: nowrap;
}
.g-bind.off { color: var(--ink-3); border-color: var(--rule); text-decoration: line-through; }
.g-derived { font-size: 12.5px; color: var(--ink-3); font-family: var(--font-mono); }

/* choices (segmented) */
.choices { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 14px; }
.choice > span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.seg button {
  font: 13px/1 var(--font-text); color: var(--ink-2);
  background: var(--sheet); border: 0; border-right: 1px solid var(--rule);
  padding: 6px 11px; cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed=true] { background: var(--earth); color: #f4fbfc; }

/* -------------------------------------------------------- equations */
.eq {
  font-family: var(--font-math); font-size: 16px; line-height: 1.7;
  margin: 2px 0;
}
.eq-sub { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-2); margin: 2px 0; }
.eq-val { font-family: var(--font-mono); font-size: 15px; margin: 4px 0 0; }
.eq-val b { font-weight: 600; }
.eq-val .unit { color: var(--ink-3); font-size: 13px; margin-left: 3px; }

/* --------------------------------------------------------- tables */
table.gc {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px; margin: 8px 0;
}
table.gc th, table.gc td { padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--rule-2); }
table.gc th:first-child, table.gc td:first-child { text-align: left; }
/* Header cells name their column by symbol and unit (σ′v, ur, γsat, φ′ (°), kN/m³, Nq), where
   case is meaning — uppercase would print Σ′V, UR, Γ, KN/M³. No case transform here, on screen,
   in print and in the report window; the small, muted, lightly spaced label look stays. */
table.gc thead th {
  font-size: 11px; letter-spacing: .02em; text-transform: none;
  color: var(--ink-3); font-weight: 600;
  border-bottom: 1px solid var(--rule);
}
table.gc td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
table.gc td.lab { font-family: var(--font-text); }
table.gc tr.hl td { background: var(--hl); }
table.gc tr.sum td { border-top: 1px solid var(--rule); border-bottom: 0; font-weight: 600; }

/* ---------------------------------------------------------- answer */
.answer { margin: 8px 0 0; }
.answer .a-row { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; }
.answer .a-sym { font-family: var(--font-math); font-size: 16px; color: var(--ink-2); min-width: 80px; }
.answer .a-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 18px; }
.answer .a-row.primary .a-val { font-size: 28px; font-weight: 600; }
.answer .a-val .unit { font-size: 13px; color: var(--ink-3); margin-left: 4px; font-weight: 400; }
.answer.empty .a-val { color: var(--ink-3); }
.answer .invalid .a-val { text-decoration: line-through; color: var(--ink-3); }
.empty-note { font-size: 12.5px; color: var(--ink-3); font-style: italic; margin: 4px 0 0; }

.flash { animation: gcflash 400ms ease-out; }
@keyframes gcflash { from { background: var(--hl); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* ---------------------------------------------------------- badges */
.badge {
  display: inline-block;
  font: 600 11px/1 var(--font-text); letter-spacing: .09em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid; border-radius: var(--radius-sm);
}
.badge-pass    { color: var(--pass);     border-color: var(--pass);     background: rgba(47, 107, 69, .08); }
.badge-fail    { color: var(--failure);  border-color: var(--failure);  background: rgba(179, 38, 30, .08); }
.badge-check   { color: var(--caution);  border-color: var(--caution);  background: rgba(138, 84, 7, .08); }
.badge-invalid { color: var(--ink-3);    border-color: var(--ink-3);    background: rgba(23, 38, 43, .04); }

/* --------------------------------------------------------- warnings */
.warn { display: flex; gap: 8px; font-size: 13.5px; margin: 8px 0; }
.warn .w-ico { flex: none; font-family: var(--font-mono); }
.warn-note { color: var(--ink-3); }
.warn-info { color: var(--pass); }          /* a statement of what was assumed, not a warning */
.warn-caution { color: var(--caution); }
.warn-stop { color: var(--failure); }
.warn b { font-weight: 600; }
.warn .w-ref { color: var(--ink-3); font-size: 12.5px; }

/* ------------------------------------------------- verification strip */
.verify {
  margin: 26px 0 0; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  background: var(--paper);
  font-size: 13px;
}
.verify.pending { border-color: var(--caution); background: #fdf6e6; color: var(--caution); }
.verify .v-num { font-family: var(--font-mono); }
.verify .v-meta { color: var(--ink-3); font-size: 12px; margin-top: 4px; }

/* ------------------------------------------------------ sticky summary */
.sticky {
  position: sticky; top: calc(var(--head-h) + 16px);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 12px 14px; margin-bottom: 18px;
}
.sticky .s-lab { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.sticky .s-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 22px; margin: 2px 0 6px; }
.sticky .s-val .unit { font-size: 12px; color: var(--ink-3); }
.sticky.empty .s-val { color: var(--ink-3); }
.sticky .s-val.invalid { text-decoration: line-through; color: var(--ink-3); }
.sticky .s-second { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }

/* the walk-through of the model panel (draw/model_flow.js): the pair at the foot of a
   section that closes it and opens the one before or after */
.gc-flow { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 2px; }
.gc-flow .gc-flow-next { min-width: 132px; }
.gc-flow .gc-flow-back { min-width: 96px; }
.input-section.is-collapsed .gc-flow { display: none !important; }

/* actions */
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn {
  height: var(--ctrl-h);
  display: inline-flex; align-items: center;
  font: 500 13px/1 var(--font-text);
  color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: 0 14px; cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.btn:hover { border-color: var(--ink-3-line); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--earth); border-color: var(--earth); color: #f4fbfc; box-shadow: var(--shadow-sm); }
.btn-primary:hover {
  background: #124f9e; /* FIX: was #733e22, a leftover from the old earth-brown palette */
  border-color: #124f9e;
  box-shadow: 0 2px 6px rgba(22, 96, 196, .28);
}
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.gate-line { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* --------------------------------------------------------- ground drawer */
.drawer-back { position: fixed; inset: 0; background: rgba(15, 32, 36, .30); z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
  width: min(980px, 96vw);
  background: var(--sheet); border-left: 1px solid var(--rule);
  box-shadow: -8px 0 30px rgba(15, 32, 36, .15);
  display: flex; flex-direction: column;
}
.drawer header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--rule);
}
.drawer header h2 { font-size: 17px; margin: 0; font-weight: 600; }
.drawer header .sp { margin-left: auto; }
.drawer .dbody { overflow: auto; padding: 14px 18px 40px; }
.layers { width: 100%; border-collapse: collapse; font-size: 13px; }
.layers th {
  font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3);
  font-weight: 600; padding: 4px 5px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap;
}
.layers th.l, .layers td.l { text-align: left; }
.layers td { padding: 2px 5px; border-bottom: 1px solid var(--rule-2); }
.layers input, .layers select {
  width: 100%; min-width: 54px;
  font: 13px/1.3 var(--font-mono); font-variant-numeric: tabular-nums;
  text-align: right; color: var(--ink);
  background: var(--sheet); border: 1px solid transparent; border-radius: 2px; padding: 3px 4px;
}
.layers input:hover, .layers select:hover { border-color: var(--rule); }
.layers input:focus, .layers select:focus { border-color: var(--earth); outline: none; }
.layers td.derived { font-family: var(--font-mono); color: var(--ink-3); text-align: right; }
.layers th.need, .layers td.need { background: var(--earth-soft); }
.layer-cards { display: none; }

/* ------------------------------------------------------- breakpoints */
/* 820–1180: margin note collapses to an ⓘ popover in the rail; sticky moves to a top strip. */
@media (max-width: 1180px) {
  :root { --rail: 40px; --note-col: 0px; --gap: 18px; }
  .sheet, .blk { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .sheet > .col-note, .blk > .b-note { display: none; }
  .sticky { position: static; margin: 0 0 18px; }
  .sheet-wrap { padding: 0 10px 120px; }
  .sheet { padding: 24px 16px 48px; }
}
@media (max-width: 820px) {
  :root { --rail: 32px; }
  body { font-size: 15px; }
  .title-blk h1 { font-size: 25px; }
  .given-row { grid-template-columns: 56px minmax(0, 1fr) 92px 52px; gap: 7px; }
  .given-row .g-desc { font-size: 12.5px; }
  .answer .a-row.primary .a-val { font-size: 24px; }
  /* bottom sticky strip */
  .sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    margin: 0; border: 0; border-top: 1px solid var(--rule);
    border-radius: 0; box-shadow: none;
    display: flex; align-items: baseline; gap: 12px;
    padding: 8px 14px;
  }
  .sticky .s-lab { order: 1; }
  .sticky .s-val { order: 2; font-size: 19px; margin: 0; }
  .sticky .s-second { order: 3; }
  .sticky .acts { order: 4; margin: 0 0 0 auto; }
  .sticky .acts .btn { height: auto; padding: 6px 9px; font-size: 12px; }
  .sheet { padding: 20px 12px 96px; }
  .drawer { width: 100vw; }
  .layers { display: none; }
  .layer-cards { display: block; }
}

/* ------------------------------------------------------------- print */
@media print {
  .run-head, .sticky, .acts, .drawer, .drawer-back { display: none !important; }
  html, body { background: #fff; }
  .sheet { border: 0; padding: 0; display: block; }
  .blk { display: block; }
  .blk > .b-rail { display: none; }
  .blk > .b-note { display: block; max-width: none; font-size: 11px; color: #555; }
  .sheet > .col-main, .blk > .b-main { max-width: none; }
}

/* ---------------------------------------------------- tool shell (split view) */
/* Figure fixed on the left; a Model / Calculations / Results tabbed panel on the
   right. Used by core/engine.js for the interactive tool page — the reference-sheet
   layout above (.sheet/.blk three columns) stays as the printed-report reading order. */
.tool-shell {
  max-width: 1400px; margin: 0 auto;
  padding: 26px 18px 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.9fr);
  gap: 24px;
  align-items: start;
}
.tool-figure-pane { position: sticky; top: calc(var(--head-h) + 18px); display: flex; flex-direction: column; gap: 14px; }
.tool-figure-pane .title-blk { margin-bottom: 0; }
.tool-figure-pane .title-blk h1 { font-size: 24px; }
.tool-figure-pane .figure {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 10px;
}
.tool-figure-pane .figure svg { background: var(--sheet); }

.tool-panel {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; min-height: 440px;
}
.tool-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}
.tool-tabs button {
  flex: 1; font: 600 12.5px var(--font-text); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); background: none; border: 0;
  padding: 14px 8px; cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.tool-tabs button:hover { color: var(--ink); background: var(--earth-soft); }
.tool-tabs button[aria-selected=true] {
  color: var(--earth);
  box-shadow: inset 0 -2px 0 var(--earth);
}
.tool-tabpage { padding: 18px 22px 26px; }
.tool-tabpage[hidden] { display: none; }
.tool-tabpage .given-grp:first-child { margin-top: 0; }

/* Theory tab: running prose, not a form — a slightly wider measure and more line-height
   than the numeric Given/Calculations content either side of it. */
.tool-tabpage[data-tabpage="theory"] { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.tool-tabpage[data-tabpage="theory"] p { margin: 0 0 12px; }
.tool-tabpage[data-tabpage="theory"] .eq { font-size: 17px; color: var(--ink); margin: 14px 0; text-align: center; }
.tool-tabpage[data-tabpage="theory"] .sec-h { margin-top: 22px; }
.tool-tabpage[data-tabpage="theory"] ul { margin: 0 0 4px; padding-left: 20px; }
.tool-tabpage[data-tabpage="theory"] li { margin-bottom: 8px; }
.tool-tabpage[data-tabpage="theory"] em { font-style: italic; color: var(--ink); }
.tool-tabpage[data-tabpage="theory"] strong { color: var(--ink); font-weight: 600; }
.tool-tabpage[data-tabpage="theory"] .th-figure {
  margin: 16px 0 20px; padding: 14px 14px 10px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md);
}
.tool-tabpage[data-tabpage="theory"] .th-fig { width: 100%; height: auto; display: block; }
.tool-tabpage[data-tabpage="theory"] .th-figure figcaption {
  font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.5;
}
.tool-tabpage[data-tabpage="theory"] .th-cta {
  margin: 26px 0 4px; padding: 12px 14px;
  background: var(--earth-soft); border: 1px solid var(--earth);
  font-size: 13.5px; color: var(--ink);
}
.tool-tabpage[data-tabpage="theory"] .th-cta a { font-weight: 600; }

/* Calculations tab: a clear rhythm between steps, and the substituted-numbers line and
   the final value visually distinct from the symbolic equation above them. */
.tool-panel .blk { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule-2); }
.tool-panel .blk:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.tool-panel .step-h { font-size: 15px; letter-spacing: .003em; color: var(--ink); margin-bottom: 10px; }
.tool-panel .eq { font-size: 17px; line-height: 1.6; color: var(--ink); }
.tool-panel .eq-sub { font-size: 13px; line-height: 1.6; color: var(--ink-3); margin: 6px 0 0; padding-left: 1px; }
.tool-panel .eq-val {
  font-size: 15px;
  margin-top: 10px; padding: 8px 0 0;
  border-top: 1px solid var(--rule-2);
}
.tool-panel .eq-val b { color: var(--ink); font-weight: 700; font-size: 1.05em; }
.tool-panel table.gc { font-size: 13px; }
/* Narrative sentences inside a step — the "why", written out like a worked answer,
   not just the bare formula. Sits between eq/sub/val lines, quieter than the formula. */
.tool-panel .step-note { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); margin: 8px 0; }
.tool-panel .step-note:first-child { margin-top: 0; }

/* Summary / Detailed toggle for Calculations. Pure CSS: Summary hides the worked-answer
   narration (.step-note) and any block that is narration-only (.step-narrative), leaving
   just the numbered rail, the formula, the substituted numbers and the result — still
   fully worked, just without the sentence explaining why. */
.calc-mode-toggle {
  display: flex; gap: 0;
  width: max-content;
  margin: 0 0 16px auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.calc-mode-toggle button {
  font: 600 11.5px/1 var(--font-text); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-2); background: var(--sheet); border: 0; border-right: 1px solid var(--rule);
  padding: 6px 12px; margin-right: 0; cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.calc-mode-toggle button:last-child { border-right: 0; }
.calc-mode-toggle button:hover { color: var(--ink); background: var(--earth-soft); }
.calc-mode-toggle button[aria-selected=true] { background: var(--earth); color: #f4fbfc; }
#solution[data-calc-mode="summary"] .step-note { display: none; }
#solution[data-calc-mode="summary"] .blk.step-narrative { display: none; }
/* Given / Find block at the top of Calculations */
.tool-panel .gf-block {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px; margin-bottom: 16px;
}
.tool-panel .gf-block .gf-lab { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.tool-panel .gf-block .gf-lab:not(:first-child) { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule-2); }
.tool-panel .gf-block .gf-row { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; line-height: 1.6; }
.tool-panel .gf-block .gf-row span { margin-right: 0; }
/* final boxed answer sentence at the end of the derivation */
.tool-panel .gf-answer {
  background: var(--earth-soft); border-left: 3px solid var(--earth);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; margin-top: 10px; font-size: 14px; color: var(--ink);
}
/* informational engineering design note — neutral slate, deliberately unlike a warning */
.tool-panel .calc-design-note {
  background: #f6f8fa; border: 1px solid #dfe6ec; border-left: 3px solid #5b7a8c;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px; margin: 14px 0 6px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
  break-inside: avoid;
}
.tool-panel .calc-design-note .dn-title { font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: .01em; }
.tool-panel .calc-design-note p { margin: 0 0 8px; }
.tool-panel .calc-design-note p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
  .tool-shell { grid-template-columns: 1fr; padding: 16px 12px 90px; }
  .tool-figure-pane { position: static; }
}
@media (max-width: 560px) {
  .run-head { padding: 0 10px; gap: 8px; }
  .run-head .rh-tool, .run-head .rh-sep { display: none; }
}


/* Theory tab, textbook devices: numbered section heads, tinted display equations with
   the book's equation number at the right, stacked fractions, example boxes, the full
   factor table in two halves. */
.tool-tabpage[data-tabpage="theory"] .th-lead { font-size: 13.5px; color: var(--ink-3); border-left: 3px solid var(--rule); padding-left: 12px; margin-bottom: 18px; }
.tool-tabpage[data-tabpage="theory"] .th-h2 { display: flex; gap: 10px; align-items: baseline; font-size: 17px; font-weight: 700; color: var(--ink); margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.tool-tabpage[data-tabpage="theory"] .th-h2 .th-num { font-family: var(--font-mono); font-size: 13px; color: var(--earth); }
.tool-tabpage[data-tabpage="theory"] .th-h2 .th-num:empty { display: none; }
.th-eq { display: flex; align-items: center; gap: 14px; background: var(--earth-soft); border-left: 3px solid var(--earth); padding: 10px 14px; margin: 12px 0; }
.th-eq-b { flex: 1; text-align: center; font-family: var(--font-math); font-size: 16.5px; line-height: 1.5; color: var(--ink); }
.th-eq-n { font-family: var(--font-text); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.th-eq-n:empty { display: none; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 4px; line-height: 1.15; font-size: 0.92em; }
.frac .fn { border-bottom: 1px solid currentColor; padding: 0 4px 1px; }
.frac .fd { padding: 1px 4px 0; }
.th-ex { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 12px 16px 6px; margin: 14px 0; }
.th-ex h4 { font-size: 14px; font-weight: 700; color: var(--earth); margin: 0 0 8px; letter-spacing: .02em; }
.th-ex .th-eq { background: var(--paper); font-size: 14px; }
.th-ex .th-eq-b { font-size: 14.5px; }
.th-table { margin: 16px 0 18px; }
.th-table-cap { font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.th-table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; overflow-x: auto; }
.th-table table.gc { margin: 0; font-size: 12.5px; }
.th-table table.gc th, .th-table table.gc td { padding: 2px 6px; }
.th-table table.gc thead th { text-transform: none; letter-spacing: 0; font-family: var(--font-math); font-size: 13px; color: var(--ink); }
.th-table-note { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 560px) { .th-table-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- contents */
.contents { max-width: 1180px; margin: 0 auto; padding: 40px 18px 100px; }
.contents h1 { font-size: 34px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.012em; }
.contents .lead { font-size: 17px; color: var(--ink-2); max-width: 64ch; margin: 0 0 34px; }
.sec-grp { margin-bottom: 34px; }
.sec-grp > h2 { font-size: 20px; font-weight: 600; margin: 0 0 2px; }
.sec-grp > .sub { font-size: 13.5px; color: var(--ink-3); margin: 0 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1px; background: var(--rule-2); border: 1px solid var(--rule-2); }
.card {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px;
  background: var(--sheet); padding: 12px; border: 0;
}
.card:hover { background: var(--paper); }
.card .thumb { width: 96px; }
.card .thumb svg { width: 96px; height: 64px; display: block; }
.card h3 { font-size: 14.5px; font-weight: 600; margin: 0 0 3px; }
.card p { font-size: 12.5px; color: var(--ink-2); margin: 0 0 6px; }
.card .c-foot { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }
.card.soon { opacity: .55; }
.pill {
  font: 600 10px/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 5px; border: 1px solid; border-radius: 2px; margin-left: 6px;
}
.pill-free { color: var(--pass); border-color: var(--pass); }
.pill-pro { color: var(--earth); border-color: var(--earth); }
.pill-soon { color: var(--ink-3); border-color: var(--rule); }


/* ---------------------------------------------------- studio (staged modelling) */
/* core/studio.js — design modules built up in stages. Drawing left (sticky, large),
   stepper + stage form right. Reuses .tool-panel/.tool-tabs/.given-row from above so a
   worked step, a badge or an input looks the same on either page type. */
.studio {
  max-width: 1480px; margin: 0 auto;
  padding: 22px 18px 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(400px, 0.85fr);
  gap: 22px;
  align-items: start;
}
.studio-stage, .studio-panel { min-width: 0; }
.studio-stage { position: sticky; top: calc(var(--head-h) + 14px); display: flex; flex-direction: column; gap: 12px; }
.studio-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.studio-title > div { min-width: 0; flex: 1; }
.studio-title h1 { font-size: 22px; line-height: 1.25; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
.studio-title .method { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-canvas {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 8px; min-height: 200px;
}
.studio-canvas svg { width: 100%; height: auto; display: block; background: var(--sheet); }
.studio-canvas [data-drag] { cursor: ns-resize; touch-action: none; }
.studio-canvas.dragging { cursor: ns-resize; user-select: none; }
.studio-canvas { position: relative; }
.studio-readout { position: absolute; top: 10px; left: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; padding: 0; min-height: 0; pointer-events: none; }
.studio-readout .ro { display: flex; align-items: baseline; gap: 8px; }
.studio-readout .ro-sym { font-family: var(--font-math); font-size: 13px; color: var(--ink-3); }
.studio-readout .ro-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 600; color: var(--ink); }
.studio-readout .ro-val .unit { font-size: 11.5px; color: var(--ink-3); margin-left: 3px; font-weight: 400; }
.studio-readout .ro-err { font-size: 13px; color: var(--failure); }
.studio-readout .badge { align-self: center; }

/* stepper */
.stepper {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
}
.stepper li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 10px; cursor: pointer;
  border-bottom: 2px solid var(--rule); color: var(--ink-3);
  transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
.stepper li:hover { background: var(--earth-soft); color: var(--ink); }
.stepper li .st-n {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 11.5px var(--font-mono); border: 1px solid var(--rule); color: var(--ink-3); background: var(--sheet);
}
.stepper li .st-t { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; }
.stepper li.current { color: var(--earth); border-bottom-color: var(--earth); }
.stepper li.current .st-n { background: var(--earth); border-color: var(--earth); color: #f4fbfc; }
.stepper li.done { color: var(--ink-2); border-bottom-color: var(--pass); }
.stepper li.done .st-n { color: var(--pass); border-color: var(--pass); }

/* stage form */
.st-head { margin-bottom: 14px; }
.st-head h2 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.st-blurb { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 60ch; }
.st-fields { margin-bottom: 12px; }
.st-fields .given-row .g-desc small { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.35; margin-top: 1px; }
.st-row-choice { grid-template-columns: 1fr; row-gap: 4px; }
.st-row-choice .g-sym { display: none; }
.st-row-choice .g-desc { grid-column: 1; }
.st-fields .st-sep { border-top: 1px dashed var(--rule); padding-top: 10px; margin-top: 6px; }
.st-fields + .st-list { border-top: 1px dashed var(--rule); padding-top: 10px; }
.st-row-choice .st-choice-ctl { grid-column: 1; display: flex; align-items: center; gap: 8px; }
.st-row-choice.st-choice-side { grid-template-columns: 1fr auto; column-gap: 14px; align-items: center; }
.st-row-choice.st-choice-side .st-choice-ctl { grid-column: 2; }
.st-info {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rule); background: var(--sheet);
  color: var(--earth); font: 600 12px/1 var(--font-text); cursor: pointer; padding: 0; flex: none;
}
.st-info:hover, .st-info:focus-visible { border-color: var(--earth); background: var(--earth-soft); outline: none; }
.st-info-back { position: fixed; inset: 0; background: rgba(20, 28, 34, 0.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.st-info-win { background: var(--sheet); color: var(--ink); border-radius: var(--radius-sm); box-shadow: 0 18px 48px rgba(0,0,0,0.28); max-width: 600px; width: 100%; max-height: 90vh; overflow: auto; padding: 16px 20px 18px; }
.st-info-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.st-info-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.st-info-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 2px 6px; }
.st-info-x:hover { color: var(--ink); }
.st-info-fig { margin: 4px 0 12px; }
.st-info-body { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.st-info-body p { margin: 0 0 8px; }
.st-note { font-size: 13px; color: var(--ink-2); background: var(--earth-soft); border-left: 3px solid var(--earth); padding: 8px 12px; margin: 6px 0 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* repeating rows (layers, struts) */
.st-list { margin: 6px 0 4px; }
.st-list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.st-list-lab { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.st-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.st-item {
  border: 1px solid var(--rule); border-radius: var(--radius-md);
  padding: 8px 12px 10px; margin-bottom: 8px; background: var(--sheet);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.st-item:focus-within { border-color: var(--earth); box-shadow: 0 0 0 3px var(--earth-soft); }
.st-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.st-item-lab { font-size: 13px; font-weight: 600; color: var(--ink); }
.st-item-sum { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-left: auto; }
.st-del {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: none; border: 1px solid transparent; color: var(--ink-3);
  font: 16px/1 var(--font-mono); cursor: pointer;
}
.st-del:hover { color: var(--failure); border-color: var(--failure); }
.st-del:disabled { opacity: .3; cursor: not-allowed; }
.st-item-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px 12px; align-items: end; }
.st-item-body .given-row { grid-column: 1 / -1; grid-template-columns: 0 minmax(0, 1fr) auto; gap: 0 8px; padding: 0 0 2px; }
.st-item-body .given-row .g-desc { font-size: 12.5px; }
.st-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-cell-lab { font-family: var(--font-math); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-cell-lab small { font-family: var(--font-text); font-size: 11px; color: var(--ink-3); }
.st-cell-in { display: flex; align-items: center; gap: 5px; }
.st-cell-in input[type=number] {
  width: 100%; min-width: 0; height: 34px; text-align: right;
  font-size: 14px; padding: 0 7px;
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 1px rgba(23, 38, 43, .04);
}
.st-cell-in input[type=number]:focus { border-color: var(--earth); outline: none; box-shadow: inset 0 1px 1px rgba(23, 38, 43, .04), 0 0 0 3px var(--earth-soft); }
.st-cell-in .st-unit { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.st-add { width: 100%; justify-content: center; border-style: dashed; margin-top: 2px; }
.st-add:disabled { border-style: solid; }

/* compact one-number rows (strut depths): everything on one line */
.st-item-compact { display: grid; grid-template-columns: 74px minmax(0, 1fr) 150px auto 24px; align-items: center; gap: 10px; padding: 6px 10px 6px 12px; }
.st-item-compact .st-cell-lab { font-size: 12.5px; }
.st-item-compact .st-cell-in input[type=number] { height: 32px; }
.st-item-compact .st-item-sum { margin-left: 0; text-align: right; white-space: nowrap; }
@media (max-width: 560px) { .st-item-compact { grid-template-columns: 64px minmax(0, 1fr) auto 24px; } .st-item-compact .st-item-sum { display: none; } }

.st-cell-static .st-static { display: flex; align-items: center; height: 34px; font-size: 12px; color: var(--ink-3); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* a wide worked-step table scrolls inside its own block, never the page */
.tool-panel .blk > .b-main { min-width: 0; overflow-x: auto; }

/* worked-step diagrams inside Calculations (Detailed only): one under the other, full
   width, captioned like the figures of a calculation note */
.tool-panel figure.calc-fig { margin: 14px 0 10px; padding: 4px 0 0; border: 0; background: none; }
.tool-panel figure.calc-fig svg { width: 100%; height: auto; display: block; }
.tool-panel figure.calc-fig figcaption { font-size: 12.5px; color: var(--ink-2); margin: 8px 6px 0; line-height: 1.5; padding-bottom: 8px; border-bottom: 1px solid var(--rule-2); }
.tool-panel figure.calc-fig figcaption b { color: var(--ink); font-weight: 700; }
#solution[data-calc-mode="summary"] figure.calc-fig { display: none; }

/* calculation-note header at the top of Detailed */
.tool-panel .calc-doc-head { margin: 0 0 18px; padding: 0 0 12px; border-bottom: 3px double var(--rule); }
.tool-panel .calc-doc-head .cdh-kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.tool-panel .calc-doc-head .cdh-title { font-size: 19px; font-weight: 700; margin: 4px 0 6px; color: var(--ink); }
.tool-panel .calc-doc-head .cdh-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
#solution[data-calc-mode="summary"] .calc-doc-head { display: none; }

/* alerts + navigation */
.st-alerts:empty { display: none; }
.st-alerts { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule-2); }
/* an input named by a stop warning (a calculation the method refuses): red frame and symbol.
   A state style, so it must win over the UI skin in every state — the skin's own input
   :focus rules are !important, hence !important here too (higher specificity breaks the tie). */
.given-row.invalid .g-sym { color: var(--failure) !important; }
.given-row.invalid input[type=number],
.given-row.invalid input[type=number]:hover,
.given-row.invalid input[type=number]:focus { border-color: var(--failure) !important; box-shadow: 0 0 0 2px rgba(179, 38, 30, 0.16) !important; }
/* the Model-tab alert area sits ABOVE the inputs, so it is seen without scrolling */
#modelAlerts.st-alerts { margin: 0 0 12px; padding: 0 0 10px; border-top: 0; border-bottom: 1px solid var(--rule-2); }
.stage-nav { display: flex; gap: 8px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.stage-nav .btn-quiet { margin-left: auto; margin-right: 8px; border-color: transparent; color: var(--ink-3); }
.stage-nav .btn-quiet:hover { color: var(--ink); border-color: var(--rule); }

/* results cards */
.st-card { border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 10px 14px 12px; margin-bottom: 12px; background: var(--sheet); box-shadow: var(--shadow-sm); }
.st-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.st-card-t td { padding: 3px 6px; }
.st-card-t td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.st-card-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.45; }

/* never let the page scroll sideways: tabs, stepper and the mono method line shrink */
.studio { overflow-x: clip; }
.studio-title .method { overflow-wrap: anywhere; }
.studio-tabs button { min-width: 0; padding-left: 4px; padding-right: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li { min-width: 0; }
.stepper li .st-t { overflow-wrap: anywhere; }
@media (max-width: 1180px) {
  .studio { grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); }
  .stepper li .st-t { font-size: 11px; }
}
@media (max-width: 980px) {
  .studio { grid-template-columns: 1fr; padding: 16px 12px 90px; }
  .studio-stage { position: static; }
}
@media (max-width: 560px) {
  .studio-tabs button { font-size: 11px; letter-spacing: .03em; }
  .stepper { gap: 2px; }
  .stepper li { flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px 4px 8px; }
  .stepper li .st-t { font-size: 10.5px; }
}
