/* The Test Is the Teacher (Harmonized Edition): page styles for njenga.ai.
   100% native njenga.ai color grammar (paper, ink, warm gray, petrol-slate --c / --c-ink, and essay.css's --warn #a63a2b
   used sparingly for dangerous/failing verdicts and empirical regression). Zero foreign fonts or dark-box widgets.
   Every figure is complete in semantic HTML/SVG. Zero words lost with JS off. Zero text smaller than 12px. */

/* ---------------------------------------------------------------- Dual-column masthead + interactive Distribution Shift & Pareto Jump */
.es-hero.tt-hero { grid-template-columns: minmax(0, 1fr) minmax(0, min(46%, 520px)); }
.tt-hero-meta { margin-top: clamp(14px, 1.5vw, 18px); max-width: 40em; font-size: 14px; line-height: 1.5; color: var(--gray); }
.tt-hero-meta a, a.tt-a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .22em;
  transition: color var(--t1) linear, text-decoration-color var(--t1) linear; }
.tt-hero-meta a:hover, a.tt-a:hover { color: var(--ink); text-decoration-color: var(--ink); }

.tt-hero-stage { position: relative; background: var(--paper); }
.tt-hero-fig figcaption { flex-wrap: wrap; gap: 4px 12px; }

.tt-canvas-plate { padding: 8px 0 6px; }
.tt-pareto-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--paper); overflow: hidden; }

.tt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tt-fallback-svg { width: 100%; height: 100%; display: block; }
html:not(.js) .tt-canvas { display: none; }
.is-live > .tt-fallback-svg { display: none; }

/* Whisper-quiet Swiss simulation scrubber bar */
.tt-ctrl { display: flex; align-items: center; gap: 9px; margin-top: 8px; padding: 6px 0 4px; border-bottom: 1px solid var(--rule); }
.tt-ctrl[hidden] { display: none; }
.tt-ctrl-inline { margin-top: 4px; padding: 8px 0 2px; border-top: 1px solid var(--rule); border-bottom: 0; }
.tt-ctrl-btn { flex: none; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper);
  color: var(--ink-2); display: inline-grid; place-items: center; transition: background var(--t1) linear, color var(--t1) linear, border-color var(--t1) linear; }
.tt-ctrl-btn:hover { background: var(--wash); color: var(--ink); border-color: var(--line); }
.tt-ctrl-btn svg { width: 13px; height: 13px; display: block; }
.tt-ctrl .tt-ic-play { display: none; }
.tt-ctrl.is-paused .tt-ic-pause { display: none; }
.tt-ctrl.is-paused .tt-ic-play { display: block; }
.tt-ctrl-lbl { flex: none; font-size: 12px; color: var(--gray); }
.tt-ctrl-state { flex: none; font-size: 12px; font-weight: 500; color: var(--c-ink); min-width: 78px; text-align: right; white-space: nowrap; }

.tt-range { flex: 1 1 auto; min-width: 60px; margin: 0; padding: 8px 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; }
.tt-range::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: var(--rule); }
.tt-range::-moz-range-track { height: 3px; border-radius: 99px; background: var(--rule); border: 0; }
.tt-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; margin-top: -4.5px;
  border-radius: 50%; background: var(--c); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--c);
  transition: transform var(--t1) var(--out), background var(--t1) linear; }
.tt-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--c);
  border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--c); transition: transform var(--t1) var(--out), background var(--t1) linear; }
.tt-range:hover::-webkit-slider-thumb { transform: scale(1.14); background: var(--c-ink); }
.tt-range:hover::-moz-range-thumb { transform: scale(1.14); background: var(--c-ink); }
.tt-range:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
@media (pointer: coarse) {
  .tt-ctrl-btn { width: 34px; height: 34px; }
  .tt-range { padding: 12px 0; }
  .tt-range::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -6.5px; }
  .tt-range::-moz-range-thumb { width: 16px; height: 16px; }
}
@media (max-width: 960px) {
  .es-hero.tt-hero { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .tt-hero-stage { aspect-ratio: 4 / 3; }
  .tt-pareto-stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 400px) {
  .tt-pareto-stage { aspect-ratio: 6 / 5; }
  .tt-ctrl { gap: 7px; }
  .tt-ctrl-lbl { display: none; }
  .tt-ctrl-state { min-width: 72px; }
}

.tt-loop-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.tt-loop-tag { font-family: var(--mono); font-size: 12px; line-height: 1.3; color: var(--c-ink); }
.tt-loop-svg-wrap { padding: 12px 0 8px; background: var(--paper); }
.tt-loop-svg { width: 100%; max-width: 560px; margin: 0 auto; height: auto; display: block; overflow: visible; }
.tt-loop-svg text { font-family: var(--font); }
.tt-loop-svg .svg-mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.03em; }
.tt-loop-svg .svg-b { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.tt-loop-svg .svg-sm { font-size: 13.5px; }
.tt-loop-svg .svg-vert { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.08em; }
.tt-loop-svg .svg-pass { font-family: var(--mono); font-size: 12.5px; font-weight: 500; }

/* Subtle viewport-gated CSS path motion (zero JS rAF loop; pauses off-screen, off for reduced-motion & print) */
@keyframes ttFlow { to { stroke-dashoffset: -44; } }
.tt-loop-svg-wrap.in-view .tt-arc-flow { animation: ttFlow 2.6s linear infinite; }

/* ---------------------------------------------------------------- 5-point summary */
.tt-find { counter-reset: f; display: grid; gap: 0; margin: clamp(20px, 2.4vw, 30px) 0; max-width: var(--es-measure); border-top: 1px solid var(--ink); }
.tt-find li { counter-increment: f; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 8px; padding: 13px 0 14px; border-bottom: 1px solid var(--rule); }
.tt-find li::before { content: counter(f); font-size: 14px; color: var(--c-ink); font-weight: 500; padding-top: 3px; font-variant-numeric: lining-nums tabular-nums; }
.tt-find b { display: block; font-size: clamp(17px, 0.2vw + 16px, 18px); line-height: 1.38; font-weight: 500; color: var(--ink); letter-spacing: -0.008em; }
.tt-find span { display: block; margin-top: 4px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }

/* ---------------------------------------------------------------- inline citation numerals */
a.cite { display: inline-block; position: relative; top: -0.5em; margin: 0 0 0 1px; font-size: max(12px, 0.68em); line-height: 1; font-weight: 500;
  color: var(--c-ink); font-variant-numeric: lining-nums proportional-nums; text-decoration: none; cursor: pointer; }
a.cite:hover, a.cite[aria-expanded="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a.cite::before { content: ""; position: absolute; inset: -6px -7px -6px -3px; }
@media (pointer: coarse) { a.cite::before { inset: -11px -14px -11px -6px; } }
a.cite:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: 2px; }
.ed-fig + .cite-drawer, .tt-find + .cite-drawer { max-width: var(--es-measure); }

/* ---------------------------------------------------------------- shared figures */
.tt-fig { font-variant-numeric: lining-nums tabular-nums; }
/* Figure headings (.rf-h) and captions (.ed-fig-cap) inherit essay.css's 14px / 13px scale for cross-essay parity. */
.tt-sub { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--gray); }
.tt-k { display: block; font-size: 12.5px; line-height: 1.3; color: var(--gray); }
.tt-panel-k { font-size: 12.5px; line-height: 1.35; font-weight: 500; color: var(--gray); margin-bottom: 10px; }

/* Border-drawn bars & dots (print even when background colors are turned off) */
.tt-bar { display: block; flex: none; height: 0; border-top: 10px solid var(--line); width: calc((100% - 76px) * var(--w, 0)); min-width: 3px;
  transform-origin: left center; transition: transform 520ms var(--out); transition-delay: var(--d, 0ms); }
.tt-dot { position: absolute; top: 50%; left: calc(var(--x, 0) * 100%); width: 0; height: 0; margin: -6px 0 0 -6px; border: 6px solid var(--ink-2); border-radius: 50%;
  transition: opacity 260ms linear, transform 320ms var(--out); transition-delay: var(--d, 0ms); }
.js [data-reveal].armed .tt-bar { transform: scaleX(0); }
.js [data-reveal].armed .tt-dot { opacity: .2; transform: scale(.6); }
.tt-slope-line { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 680ms var(--out); }
.tt-slope-line.on { transition-delay: 140ms; }
.js [data-reveal].armed .tt-slope-line { stroke-dashoffset: 1; }
.tt-dot-svg { transition: opacity 260ms linear 420ms; }
.js [data-reveal].armed .tt-dot-svg { opacity: 0; }

/* ---------- Figure 1: Compute crossover slopegraph + R1 vs Beam paired bars */
.tt-f1-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 22px 26px; align-items: start; }
.tt-slope-svg { width: 100%; height: auto; display: block; }
.tt-slope-svg text { font-family: var(--font); }
.tt-slope-svg .svg-mono { font-family: var(--mono); font-size: 12.5px; }
.tt-slope-svg .svg-num { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.tt-slope-svg .svg-sm { font-size: 13px; }
.tt-cmp-grp + .tt-cmp-grp { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.tt-cmp-hd { margin-bottom: 8px; }
.tt-cmp-hd b { display: block; font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.25; }
.tt-cmp-hd span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--gray); line-height: 1.35; }
.tt-cmp-grp.on .tt-cmp-hd span { color: var(--c-ink); font-weight: 500; }
.tt-cmp-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 8px; align-items: center; }
.tt-cmp-row + .tt-cmp-row { margin-top: 6px; }
.tt-cmp-l { font-size: 12.5px; color: var(--gray); }
.tt-cmp-row.prac .tt-cmp-l { color: var(--ink); font-weight: 500; }
.tt-cmp-b { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tt-cmp-bar { width: calc((100% - 70px) * var(--w, 0)); border-top-width: 10px; }
.tt-cmp-row.prac .tt-cmp-bar { border-top-color: var(--c); }
.tt-cmp-b b { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.tt-cmp-row.prac .tt-cmp-b b { color: var(--c-ink); font-weight: 500; }

/* ---------- Figure 2: Three shifts in 18 months */
.tt-waves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.tt-wave { border-top: 2px solid var(--line); padding-top: 10px; }
.tt-wave.now { border-top-color: var(--c); }
.tt-wave-k { display: block; font-family: var(--mono); font-size: 12px; line-height: 1.35; color: var(--gray); }
.tt-wave.now .tt-wave-k { color: var(--c-ink); }
.tt-wave-t { margin-top: 4px; font-size: 15.5px; font-weight: 500; line-height: 1.25; color: var(--ink); }
.tt-wave ul { margin-top: 10px; display: grid; gap: 8px; }
.tt-wave li { position: relative; padding-left: 12px; font-size: 13.5px; line-height: 1.46; color: var(--ink-2); }
.tt-wave li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.tt-wave.now li::before { background: var(--c); }

/* ---------- Figure 3: Swahili 4-stage storyboard with --warn vs --c-ink contrast */
.tt-msg { padding: 0 0 13px; border-bottom: 1px solid var(--rule); }
.tt-msg p { margin-top: 3px; font-size: 16px; line-height: 1.45; color: var(--ink); }
.tt-gloss-line { margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--gray); }
.tt-story > li { display: grid; grid-template-columns: 174px minmax(0, 1fr); column-gap: 18px; padding: 13px 0 14px; border-bottom: 1px solid var(--rule); }
.tt-story > li:last-child { border-bottom: 0; padding-bottom: 2px; }
.tt-st-check { font-size: 15px; line-height: 1.35; font-weight: 500; color: var(--ink); }
.tt-st-check span { font-weight: 400; color: var(--gray); }
.tt-st-reply { font-size: 15.5px; line-height: 1.45; color: var(--ink); }
.tt-st-out { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font-size: 13.5px; line-height: 1.45; }
.tt-v { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12.5px; font-weight: 500; line-height: 1.45; border: 1px solid transparent; }
.tt-v-pass { color: var(--ink-2); background: var(--wash); border-color: var(--rule); }
.tt-v-warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(166, 58, 43, .34); }
.tt-v-ok { color: #fff; background: var(--c); border-color: var(--c); }
.tt-st-why { color: var(--ink-2); }
.tt-story > li.right .tt-st-check, .tt-story > li.right .tt-st-check span { color: var(--c-ink); }

/* ---------- Figure 4: Whole-job log scale with teaching vs building span */
.tt-sc-spans { display: grid; grid-template-columns: 188px minmax(0, 1fr) 144px; column-gap: 14px; margin-bottom: 6px; }
.tt-sc-span-track { position: relative; grid-column: 2; height: 22px; }
.tt-span-t, .tt-span-b { position: absolute; top: 0; height: 18px; border-bottom: 2px solid var(--c); }
.tt-span-b { border-bottom-color: var(--ink-2); }
.tt-span-t b, .tt-span-b b { position: absolute; top: -1px; left: 0; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--c-ink); }
.tt-span-b b { color: var(--ink-2); right: 0; left: auto; }
.tt-scale { display: grid; gap: 0; }
.tt-sc-row { display: grid; grid-template-columns: 188px minmax(0, 1fr) 144px; column-gap: 14px; align-items: center; padding: 6px 0; }
.tt-sc-l { font-size: 14.5px; line-height: 1.3; color: var(--ink-2); }
.tt-sc-l small { display: block; font-size: 12.5px; color: var(--gray); }
.tt-sc-v { font-size: 14.5px; line-height: 1.3; color: var(--ink-2); text-align: right; white-space: nowrap; }
.tt-sc-t { position: relative; height: 26px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule);
  background: linear-gradient(to right, transparent calc(25% - .5px), var(--rule) calc(25% - .5px), var(--rule) calc(25% + .5px), transparent calc(25% + .5px),
    transparent calc(50% - .5px), var(--rule) calc(50% - .5px), var(--rule) calc(50% + .5px), transparent calc(50% + .5px),
    transparent calc(75% - .5px), var(--rule) calc(75% - .5px), var(--rule) calc(75% + .5px), transparent calc(75% + .5px)); }
.tt-sc-row.on .tt-sc-l, .tt-sc-row.on .tt-sc-v { color: var(--ink); font-weight: 500; }
.tt-sc-row.on .tt-dot { border-color: var(--c); }
.tt-sc-axis { display: grid; grid-template-columns: 188px minmax(0, 1fr) 144px; column-gap: 14px; margin-top: 3px; }
.tt-sc-axis > div { position: relative; height: 18px; grid-column: 2; }
.tt-sc-axis span { position: absolute; top: 2px; font-size: 12px; line-height: 1.3; color: var(--gray); white-space: nowrap; transform: translateX(-50%); }
.tt-sc-axis span.m { display: none; }
.tt-sc-axis span:first-child { transform: none; }
.tt-sc-axis span:last-child { transform: translateX(-100%); }
.tt-sc-grp { margin: 10px 0 2px; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--gray); }
.tt-sc-grp:first-child { margin-top: 0; }

/* ---------- Figure 5: Sourced daily P&L vs Kenyan SMS reference band */
.tt-pnl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 14px; }
.tt-pnl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tt-sw-sms, .tt-sw-warn, .tt-sw-c { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.tt-sw-sms { background: var(--c-soft); border-left: 1px dashed var(--c-ink); border-right: 1px dashed var(--c-ink); }
.tt-sw-warn { background: var(--warn); }
.tt-sw-c { background: var(--c); }
.tt-pnl-panel + .tt-pnl-panel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.tt-pnl-hd { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin-bottom: 8px; font-size: 13.5px; }
.tt-pnl-hd b { font-weight: 500; color: var(--ink); }
.tt-pnl-hd span { font-family: var(--mono); font-size: 12px; color: var(--gray); }
.tt-pnl-row { display: grid; grid-template-columns: 188px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 5px 0; }
.tt-pnl-l { font-size: 14.5px; line-height: 1.28; color: var(--ink-2); }
.tt-pnl-l small { display: block; font-size: 12.5px; color: var(--gray); }
.tt-pnl-t { position: relative; display: flex; align-items: center; gap: 8px; min-height: 24px; min-width: 0; }
.tt-sms-band { position: absolute; top: -5px; bottom: -5px; background: var(--c-soft); border-left: 1px dashed var(--c-line); border-right: 1px dashed var(--c-line); pointer-events: none; }
.tt-pnl-row .tt-bar { position: relative; z-index: 1; width: calc((100% - 88px) * var(--w, 0)); }
.tt-pnl-row b { position: relative; z-index: 1; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.tt-pnl-row.warn .tt-bar { border-top-color: var(--warn); }
.tt-pnl-row.warn b { color: var(--warn); }
.tt-pnl-row.on .tt-pnl-l { color: var(--ink); }
.tt-pnl-row.on .tt-bar { border-top-color: var(--c); }
.tt-pnl-row.on b { color: var(--c-ink); }

/* ---------- Figure 6: Four African socioeconomic use cases */
.tt-uc-plate { padding: 14px 0 8px; }
.tt-uc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.tt-uc { border-top: 2px solid var(--ink); padding-top: 11px; }
.tt-uc.accent { border-top-color: var(--c); }
.tt-uc-h { font-size: 16px; font-weight: 500; line-height: 1.28; color: var(--ink); }
.tt-uc-who { margin-top: 3px; font-size: 12.5px; color: var(--gray); }
.tt-uc-who b { font-weight: 500; color: var(--ink-2); }
.tt-uc-row { margin-top: 9px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tt-uc-lbl { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--gray); margin-bottom: 2px; }
.tt-uc-lbl.on { color: var(--c-ink); }

/* ---------- Figure 7: Eight tools tiered ledger */
.tt-led { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.42; }
.tt-led th { text-align: left; font-weight: 400; font-size: 12.5px; color: var(--gray); padding: 0 14px 6px 0; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.tt-led td { padding: 9px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); }
.tt-led th:last-child, .tt-led td:last-child { padding-right: 0; }
.tt-led td:first-child { color: var(--ink); font-weight: 500; }
.tt-led td small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 400; color: var(--gray); }
.tt-led tr:last-child td { border-bottom: 0; }
.tt-led .num { display: inline-block; min-width: 20px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--c-ink); }
.tt-led tr.tt-tier td { padding: 12px 0 5px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--c-ink); border-bottom: 1px solid var(--ink); background: transparent; }
.tt-led tr.tt-tier:first-child td { padding-top: 4px; }
.rf .ed-fig-plate.tt-plate-led { padding: 10px 0 6px; }

/* ---------- Figure 8: HelpMum dumbbell diverging plate */
.tt-hm-leg { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; }
.tt-hm-leg span { display: inline-flex; align-items: center; gap: 6px; }
.tt-hm-lb, .tt-hm-lg, .tt-hm-lr { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.tt-hm-lb { border: 2px solid var(--ink-2); background: var(--paper); }
.tt-hm-lg { background: var(--c); }
.tt-hm-lr { background: var(--warn); }
.tt-hm-row { display: grid; grid-template-columns: 204px minmax(0, 1fr) 136px; column-gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.tt-hm-row:first-of-type { border-top: 0; }
.tt-hm-l b { display: block; font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.28; }
.tt-hm-l small { display: block; font-size: 12.5px; color: var(--gray); line-height: 1.35; margin-top: 2px; }
.tt-hm-t { position: relative; height: 24px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule);
  background: linear-gradient(to right, transparent calc(25% - .5px), var(--rule) calc(25% - .5px), var(--rule) calc(25% + .5px), transparent calc(25% + .5px),
    transparent calc(50% - .5px), var(--rule) calc(50% - .5px), var(--rule) calc(50% + .5px), transparent calc(50% + .5px),
    transparent calc(75% - .5px), var(--rule) calc(75% - .5px), var(--rule) calc(75% + .5px), transparent calc(75% + .5px)); }
.tt-hm-span { position: absolute; top: 50%; margin-top: -2px; height: 0; border-top: 4px solid var(--c); transform-origin: left center; transition: transform 480ms var(--out); transition-delay: var(--d, 0ms); }
.tt-hm-row.good .tt-hm-span { transform-origin: right center; }
.tt-hm-row.bad .tt-hm-span { border-top-color: var(--warn); }
.tt-hm-base { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--ink-2); background: var(--paper); z-index: 2; }
.tt-hm-end { position: absolute; top: 50%; width: 0; height: 0; margin: -6px 0 0 -6px; border: 6px solid var(--c); border-radius: 50%; z-index: 3; transition: opacity 280ms linear, transform 320ms var(--out); transition-delay: var(--d, 0ms); }
.tt-hm-row.bad .tt-hm-end { border-color: var(--warn); }
.tt-hm-v { font-family: var(--mono); font-size: 13px; font-weight: 500; text-align: right; white-space: nowrap; color: var(--c-ink); }
.tt-hm-row.bad .tt-hm-v { color: var(--warn); }
.js [data-reveal].armed .tt-hm-span { transform: scaleX(0); }
.js [data-reveal].armed .tt-hm-end { opacity: .2; transform: scale(.6); }
.tt-hm-axis { display: grid; grid-template-columns: 204px minmax(0, 1fr) 136px; column-gap: 14px; margin-top: 4px; }
.tt-hm-axis > div { position: relative; grid-column: 2; height: 18px; }
.tt-hm-axis span { position: absolute; top: 2px; font-size: 12px; color: var(--gray); transform: translateX(-50%); white-space: nowrap; }
.tt-hm-axis span:first-child { transform: none; }
.tt-hm-axis span:last-child { transform: translateX(-100%); }

/* ---------------------------------------------------------------- Monday roles, glossary, sources */
.tt-role { margin-top: 1.15em; }
html:not(.js) .es-copy-btn { display: none; }

/* Whisper-quiet collapsed engineering glossary (native <details>, zero JS needed) */
.tt-gloss { margin-top: clamp(36px, 4vw, 52px); max-width: var(--es-measure); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tt-gloss summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; cursor: pointer;
  font-size: 14.5px; font-weight: 500; color: var(--ink); }
.tt-gloss summary::-webkit-details-marker { display: none; }
.tt-gloss summary small { font-weight: 400; font-size: 13px; color: var(--gray); margin-left: 6px; }
.tt-gloss summary .chev { width: 14px; height: 14px; flex: none; color: var(--gray); transition: transform var(--t2) var(--out); }
.tt-gloss[open] summary .chev { transform: rotate(180deg); }
.tt-gloss-list { padding: 4px 0 16px; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.tt-gloss-list div { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.tt-gloss-list div:last-child { border-bottom: 0; padding-bottom: 2px; }
.tt-gloss-list dt { font-size: 14px; font-weight: 500; color: var(--ink); }
.tt-gloss-list dd { margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }

.tt-sources { margin-top: clamp(40px, 4.8vw, 64px); padding-top: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--ink); max-width: var(--es-measure); scroll-margin-top: calc(var(--head) + 20px); }
.tt-sources h2 { font-size: clamp(20px, 0.7vw + 17px, 23px); line-height: 1.25; letter-spacing: -0.014em; font-weight: 500; color: var(--ink); }
.tt-sources > p { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--gray); }
.tt-src { margin-top: 14px; counter-reset: s; border-top: 1px solid var(--rule); }
.tt-src-toggle { display: inline-flex; align-items: center; margin-top: 14px; min-height: 40px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--rule);
  background: var(--paper); font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: background var(--t1) linear, color var(--t1) linear, border-color var(--t1) linear; }
.tt-src-toggle:hover { background: var(--wash); color: var(--ink); border-color: var(--line); }
.tt-src-toggle + .tt-src { margin-top: 16px; }
.tt-src[hidden] { display: none; }
.tt-src > li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; padding: 11px 0 12px; border-bottom: 1px solid var(--rule);
  scroll-margin-top: calc(var(--head) + 20px); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tt-src > li::before { content: counter(s); font-size: 12.5px; font-weight: 500; color: var(--c-ink); padding-top: 2px; font-variant-numeric: lining-nums tabular-nums; }
.tt-src > li:target { background: linear-gradient(var(--wash), var(--wash)) padding-box; }
.tt-src-k { display: block; font-size: 12.5px; line-height: 1.4; color: var(--gray); }
.tt-src-t { display: block; margin-top: 1px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.tt-src-s { display: block; margin-top: 3px; }
.tt-src-l { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 5px; font-size: 13px; }
.tt-src-l a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .2em; overflow-wrap: anywhere; }
.tt-src-l a:hover { text-decoration-color: var(--ink); }
.tt-src-l a.back { color: var(--gray); }
.cite-drawer.tt-drawer .cite-drawer-s { margin-top: 5px; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 680px) {
  .tt-find li { grid-template-columns: 26px minmax(0, 1fr); }
  .tt-f1-grid { grid-template-columns: 1fr; gap: 18px; }
  .tt-waves { grid-template-columns: 1fr; gap: 16px; }
  .tt-story > li { grid-template-columns: minmax(0, 1fr); row-gap: 6px; padding: 12px 0 13px; }
  .tt-sc-spans { display: none; }
  .tt-sc-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; padding: 6px 0 5px; align-items: end; }
  .tt-sc-l { grid-column: 1; grid-row: 1; }
  .tt-sc-v { grid-column: 2; grid-row: 1; }
  .tt-sc-t { grid-column: 1 / -1; grid-row: 2; height: 18px; }
  .tt-dot { margin: -5px 0 0 -5px; border-width: 5px; }
  .tt-sc-axis { grid-template-columns: minmax(0, 1fr); }
  .tt-sc-axis > div { grid-column: 1; }
  .tt-pnl-row { grid-template-columns: minmax(0, 1fr); row-gap: 3px; padding: 6px 0; }
  .tt-pnl-l small { display: inline; margin-left: 6px; }
  .tt-uc-grid { grid-template-columns: 1fr; gap: 16px; }
  .tt-hm-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; }
  .tt-hm-l { grid-column: 1; grid-row: 1; }
  .tt-hm-v { grid-column: 2; grid-row: 1; }
  .tt-hm-t { grid-column: 1 / -1; grid-row: 2; height: 20px; }
  .tt-hm-axis { grid-template-columns: minmax(0, 1fr); }
  .tt-hm-axis > div { grid-column: 1; }
  .tt-led thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tt-led, .tt-led tbody, .tt-led tr, .tt-led td { display: block; width: auto !important; }
  .tt-led tr { padding: 10px 0 11px; border-bottom: 1px solid var(--rule); }
  .tt-led tr:last-child { border-bottom: 0; }
  .tt-led td { padding: 0; border: 0; }
  .tt-led td:first-child { font-size: 15.5px; }
  .tt-led td + td { margin-top: 5px; }
  .tt-led td[data-l]::before { content: attr(data-l) ": "; color: var(--gray); }
  .tt-led tr.tt-tier { padding: 12px 0 6px; border-bottom: 1px solid var(--ink); }
  .tt-led tr.tt-tier td { font-size: 12px; }
  .tt-src > li { grid-template-columns: 24px minmax(0, 1fr); }
  .tt-src-l a { padding: 4px 0; }
}

/* ---------------------------------------------------------------- reduced motion & print */
@media (prefers-reduced-motion: reduce) {
  .tt-bar, .tt-dot, .tt-slope-line, .tt-dot-svg, .tt-hm-span, .tt-hm-end { transition: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
  .tt-loop-svg-wrap.in-view .tt-arc-flow { animation: none !important; }
}
@media print {
  .tt-bar, .tt-dot, .tt-slope-line, .tt-dot-svg, .tt-hm-span, .tt-hm-end { opacity: 1 !important; transform: none !important; transition: none !important; stroke-dashoffset: 0 !important; }
  .tt-loop-svg-wrap.in-view .tt-arc-flow { animation: none !important; }
  .tt-canvas, .tt-ctrl { display: none !important; }
  .tt-fallback-svg { display: block !important; }
  .tt-loop-svg .svg-gate { fill: #ffffff !important; stroke: #265363 !important; stroke-width: 2 !important; }
  .tt-loop-svg .svg-gate-txt { fill: #0b0b0a !important; }
  .tt-loop-svg .svg-gate-mut { fill: #1b3d4a !important; }
  .tt-v-ok { background: none !important; color: var(--c-ink) !important; border: 1.5px solid var(--c) !important; }
  .cite-drawer, .tt-src-l a.back, .tt-src-toggle { display: none !important; }
  .tt-src[hidden] { display: block !important; }
  .tt-hero-fig, .tt-pareto-fig, .tt-loop-fig, .tt-find, .tt-story > li, .tt-wave, .tt-uc, .tt-led tr, .tt-hm-row, .tt-src > li { break-inside: avoid; }
  .tt-sources, .tt-find, .tt-gloss { max-width: none !important; }
  .tt-src-l a[href^="http"]::after { content: " (" attr(href) ")"; color: var(--gray); font-size: 12px; }
}
