/* Engineering Mechanics course: design tokens and kit styles.
   GENERATED from design/tokens.ts and design/styles.ts by design/build.ts. Do not edit by hand.
   Light theme only. Every colour pair is checked in design/palette-report.md. */

:root {
  --c-force: #9E1218;
  --c-distance: #0A6CC4;
  --c-moment: #5521A8;
  --c-component: #A65B00;
  --c-resultant: #0D7C4D;
  --c-context: #5D636B;
  --c-red: #9E1218;
  --c-blue: #0A6CC4;
  --c-green: #0D7C4D;
  --c-purple: #5521A8;
  --c-orange: #A65B00;
  --c-ink: #1B1F24;
  --c-ink-muted: #50575F;
  --c-construction: #848C96;
  --c-rule: #D5DAE0;
  --c-object: #EEF0F2;
  --c-object-dark: #D3D8DE;
  --c-surface: #FFFFFF;
  --c-surface-sunk: #F4F6F8;
  --c-focus: #1B1F24;
  --sw-hairline: 1px;
  --sw-construction: 1.25px;
  --sw-geometry: 1.5px;
  --sw-component: 2px;
  --sw-force: 2.5px;
  --sw-resultant: 3.5px;
  --sw-plot: 2px;
  --dash-component: 7 4;
  --dash-construction: 5 4;
  --dash-loa: 10 3 2 3;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-math: KaTeX_Math, "Latin Modern Math", "Cambria Math", "Times New Roman", serif;
  --font-math-upright: KaTeX_Main, "Latin Modern Roman", "Cambria", "Times New Roman", serif;
  --fs-tick: 12px;
  --fs-value: 13px;
  --fs-caption: 14px;
  --fs-readout: 15px;
  --fs-label: 18px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --handle-r: 7px;
  --handle-r-hover: 9px;
  --handle-hit: 22px;
  --handle-ring: 2.5px;
  --dur-fast: 120ms;
  --dur-base: 240ms;
  --dur-slow: 400ms;
  --dur-hint: 1400ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --widget-max: 720px;
  --widget-gutter: 16px;
  --motion-scale: 1;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; --motion-scale: 0; }
}

/* Meaning → colour. A group's semantic class sets currentColor; its parts paint with it. */
.k-force, .k-reaction { color: var(--c-force); }
.k-distance { color: var(--c-distance); }
.k-moment { color: var(--c-moment); }
.k-component { color: var(--c-component); }
.k-resultant { color: var(--c-resultant); }
.k-context { color: var(--c-context); }
.k-ink { color: var(--c-ink); }
.k-construction { color: var(--c-construction); }
.k-red { color: var(--c-red); }
.k-blue { color: var(--c-blue); }
.k-green { color: var(--c-green); }
.k-purple { color: var(--c-purple); }
.k-orange { color: var(--c-orange); }
/* WebKit (Safari) doesn't carry dominant-baseline into a tspan, so a tspan in another font or
   size (an italic variable, a subscript, an upright number) jumps up. This fixes WebKit and
   changes nothing in Chrome or Firefox. */
text tspan { dominant-baseline: inherit; }
/* "One strong colour": everything not in play drops to construction grey. */
.k-dim, .k-dim [class] { color: var(--c-construction); }
.k-dim .k-label, .k-dim .k-value, .k-dim .k-note, .k-dim.k-label { fill: var(--c-ink-muted); }

/* Arrows: shaft + filled head. Weight and dash carry meaning too, so colour is never alone. */
.k-shaft { fill: none; stroke: currentColor; stroke-linecap: butt; stroke-linejoin: round; }
.k-head { fill: currentColor; stroke: none; }
.k-force .k-shaft, .k-reaction .k-shaft { stroke-width: var(--sw-force); }
.k-component .k-shaft { stroke-width: var(--sw-component); stroke-dasharray: var(--dash-component); }
.k-resultant .k-shaft { stroke-width: var(--sw-resultant); }
.k-shaft.k-dashed { stroke-dasharray: var(--dash-component); }
/* A white knock-out under dashed shafts, so a component lying on an axis never reads as a stripe. */
.k-underlay { fill: none; stroke: var(--c-surface); stroke-width: 5px; stroke-linecap: butt; }
.k-shaft.k-solid { stroke-dasharray: none; }
.k-arc { fill: none; stroke: currentColor; stroke-width: var(--sw-force); stroke-linecap: butt; }

/* Lines that are not things: lines of action, projections, guides. */
.k-loa { fill: none; stroke: currentColor; stroke-width: var(--sw-construction); stroke-dasharray: var(--dash-loa); }
.k-cons { fill: none; stroke: var(--c-construction); stroke-width: var(--sw-construction); stroke-dasharray: var(--dash-construction); }
.k-track { fill: none; stroke: var(--c-context); stroke-width: var(--sw-hairline); stroke-dasharray: 2 3; }
.k-angle { fill: none; stroke: currentColor; stroke-width: var(--sw-construction); }
.k-perp { fill: none; stroke: currentColor; stroke-width: var(--sw-construction); stroke-linejoin: miter; }

/* Dimensions: a line with bars. Distances never carry arrowheads; arrowheads mean force. */
.k-dimline { fill: none; stroke: currentColor; stroke-width: var(--sw-geometry); stroke-linecap: butt; }
.k-ext { fill: none; stroke: var(--c-construction); stroke-width: var(--sw-hairline); }

/* Objects: flat fill, one outline weight, hatching for ground and walls. */
.k-obj { fill: var(--c-object); stroke: var(--c-context); stroke-width: var(--sw-geometry); stroke-linejoin: round; }
.k-obj-dark { fill: var(--c-object-dark); stroke: var(--c-context); stroke-width: var(--sw-geometry); stroke-linejoin: round; }
.k-hole { fill: var(--c-surface); stroke: var(--c-context); stroke-width: var(--sw-geometry); }
.k-edge { fill: none; stroke: var(--c-context); stroke-width: var(--sw-geometry); stroke-linecap: round; stroke-linejoin: round; }
.k-hatch { fill: none; stroke: var(--c-context); stroke-width: var(--sw-hairline); }
.k-cable { fill: none; stroke: var(--c-context); stroke-width: var(--sw-geometry); stroke-linecap: round; }
.k-dot { fill: currentColor; stroke: var(--c-surface); stroke-width: 1.5px; }

/* Axes and plots. */
.k-axis { fill: none; stroke: var(--c-ink); stroke-width: var(--sw-construction); stroke-linecap: square; }
.k-chevron { fill: none; stroke: var(--c-ink); stroke-width: var(--sw-construction); stroke-linejoin: miter; }
.k-grid { fill: none; stroke: var(--c-rule); stroke-width: var(--sw-hairline); }
.k-plotline { fill: none; stroke: currentColor; stroke-width: var(--sw-plot); stroke-linejoin: round; stroke-linecap: round; }
.k-plotline.k-dashed { stroke-dasharray: var(--dash-component); stroke-linecap: butt; }
.k-marker { fill: currentColor; stroke: var(--c-surface); stroke-width: 2px; }
.k-drop { fill: none; stroke: currentColor; stroke-width: var(--sw-hairline); stroke-dasharray: 3 3; opacity: 0.85; }

/* Motion (velocity, acceleration) and concept links: open chevrons, never a filled head. */
.k-mshaft, .k-mhead { fill: none; stroke: currentColor; stroke-width: var(--sw-geometry); stroke-linecap: round; stroke-linejoin: round; }
.k-link .k-mshaft, .k-link .k-mhead { stroke-width: var(--sw-construction); }
/* Moment bars: a whole moment solid, a part of one dashed, both lightly filled with their colour. */
.k-mbar { fill: currentColor; fill-opacity: 0.16; stroke: currentColor; stroke-width: var(--sw-geometry); }
.k-mbar.k-part { fill-opacity: 0.08; stroke-dasharray: var(--dash-component); }
.is-hot .k-mbar { stroke-width: calc(var(--sw-geometry) + 1.5px); fill-opacity: 0.24; }
/* Concept-map nodes. */
.k-nodebox { fill: var(--c-surface); stroke: var(--c-construction); stroke-width: var(--sw-construction); }
.k-nodetext { font-family: var(--font-ui); font-size: var(--fs-caption); fill: var(--c-ink); }
.k-node.is-hot .k-nodebox { stroke: var(--c-ink); stroke-width: 2px; }
.k-everyday .k-obj, .k-everyday .k-obj-dark, .k-everyday .k-edge, .k-everyday .k-hole { vector-effect: non-scaling-stroke; }

/* ── Generic parts (T7716) ── */
/* Flows of matter, energy or cause, and links: open chevrons, never a filled head (filled = force). */
.k-flow { fill: none; stroke: currentColor; stroke-width: 1.75px; stroke-linecap: round; stroke-linejoin: round; }
.k-flow.k-dashed { stroke-dasharray: var(--dash-construction); stroke-linecap: butt; }
/* A selected part, bar or cell: a light tint of its hue and a 2 px outline. The soft one is context. */
.k-tint { fill: currentColor; fill-opacity: 0.14; stroke: currentColor; stroke-width: 2px; }
.k-tint-soft { fill: currentColor; fill-opacity: 0.08; stroke: currentColor; stroke-width: 1.25px; }
/* Part labels joined by leader lines; the selected one takes its hue and weight. */
.k-leader { fill: none; stroke: var(--c-construction); stroke-width: 1px; }
.k-leader-dot { fill: var(--c-surface); stroke: var(--c-construction); stroke-width: 1.25px; }
.is-sel .k-leader { stroke: currentColor; stroke-width: 1.5px; }
.is-sel .k-leader-dot { fill: currentColor; stroke: var(--c-surface); stroke-width: 1.5px; }
.k-plabel { font-family: var(--font-ui); font-size: var(--fs-caption); fill: var(--c-ink-muted); font-variant-numeric: tabular-nums;
  paint-order: stroke; stroke: var(--c-surface); stroke-width: 4px; stroke-linejoin: round; }
.is-sel .k-plabel, .k-plabel.is-sel { fill: currentColor; font-weight: 650; }
/* Plots: the exact distribution over observed bars, scatter dots, shaded areas, level lines. */
.k-exact { fill: none; stroke: var(--c-ink); stroke-width: 2px; }
.k-pdot { fill: currentColor; fill-opacity: 0.75; stroke: var(--c-surface); stroke-width: 1px; }
.k-area { fill: currentColor; fill-opacity: 0.12; stroke: none; }
.k-level { fill: none; stroke: var(--c-construction); stroke-width: var(--sw-construction); stroke-dasharray: var(--dash-construction); }
/* Cells (arrays, outcome grids), pointers, graph nodes. */
.k-cell { fill: var(--c-surface); stroke: var(--c-context); stroke-width: var(--sw-geometry); }
.k-cell.k-out { fill: var(--c-object); stroke: var(--c-construction); }
.k-celltext { font-family: var(--font-ui); font-size: var(--fs-caption); fill: var(--c-ink); font-variant-numeric: tabular-nums; }
.k-celltext.k-out { fill: var(--c-ink-muted); }
.k-celltext.is-sel { fill: currentColor; font-weight: 650; }
.k-card .k-cell { stroke: var(--c-construction); }
.k-gnode { fill: var(--c-surface); stroke: var(--c-context); stroke-width: var(--sw-geometry); }
.k-gnode.k-visited { fill: var(--c-object-dark); }
.k-gnode.k-frontier { stroke-dasharray: 3 3; stroke: var(--c-ink); }
/* Random devices and stocks. */
.k-pip { fill: currentColor; }
.k-fill { fill: currentColor; fill-opacity: 0.22; stroke: none; }
/* Time: eras, ranges, the zoom window. */
.k-era { fill: var(--c-object); stroke: none; }
.k-range { fill: var(--c-object-dark); stroke: var(--c-context); stroke-width: 1px; }
.k-window { fill: currentColor; fill-opacity: 0.06; stroke: currentColor; stroke-width: 1.5px; }
/* Step progress: done (dot), now (ring), to come (hollow grey). */
.k-stepdot { fill: currentColor; stroke: none; }
.k-stepnow { fill: var(--c-surface); stroke: var(--c-ink); stroke-width: 2.5px; }
.k-stepnext { fill: var(--c-surface); stroke: var(--c-construction); stroke-width: 1.5px; }

/* Text on drawings. Variables in KaTeX's math italic so they match the equations. */
.k-label { font-family: var(--font-math); font-style: italic; font-size: var(--fs-label); fill: currentColor;
  paint-order: stroke; stroke: var(--c-surface); stroke-width: 4px; stroke-linejoin: round; }
.k-label .k-up { font-family: var(--font-math-upright); font-style: normal; }
.k-label .k-sub { font-size: 0.72em; }
/* Numbers on a drawing use the equation's upright face, so "0.260" looks the same in both places. */
.k-num, .k-label .k-num { font-family: var(--font-math-upright); font-style: normal; font-size: var(--fs-readout);
  font-variant-numeric: tabular-nums; }
.k-value { font-family: var(--font-math-upright); font-size: var(--fs-readout); font-variant-numeric: tabular-nums; fill: currentColor;
  paint-order: stroke; stroke: var(--c-surface); stroke-width: 4px; stroke-linejoin: round; }
/* Words on a static figure: a short note next to what it names, and a panel heading. UI sans.
   15 px, because a 400 px figure is shown at about 0.9× on a 390 px phone. */
.k-note { font-family: var(--font-ui); font-size: var(--fs-readout); fill: currentColor; font-variant-numeric: tabular-nums;
  paint-order: stroke; stroke: var(--c-surface); stroke-width: 4px; stroke-linejoin: round; }
.k-heading { font-family: var(--font-ui); font-size: var(--fs-readout); font-weight: 600; fill: var(--c-ink); }
/* A variable inside a value or a note: "= *F* cos *θ*" sets F and θ in math italic. */
.k-it { font-family: var(--font-math); font-style: italic; }
.k-note .k-it { font-size: 1.12em; }
.k-it .k-sub, .k-note .k-sub { font-size: 0.72em; }
.k-tick { font-family: var(--font-ui); font-size: var(--fs-tick); fill: var(--c-ink-muted); font-variant-numeric: tabular-nums; }
.k-axislabel { font-family: var(--font-ui); font-size: var(--fs-value); fill: var(--c-ink-muted); }
.k-axislabel .k-var { font-family: var(--font-math); font-style: italic; font-size: 15px; fill: var(--c-ink); }

/* Hover-linking: the hot term gets heavier and its label bold; nothing glows. */
.is-hot .k-shaft, .is-hot .k-arc { stroke-width: calc(var(--sw-force) + 1.5px); }
.is-hot .k-dimline { stroke-width: calc(var(--sw-geometry) + 1.5px); }
.is-hot .k-plotline { stroke-width: calc(var(--sw-plot) + 1.5px); }
.is-hot.k-resultant .k-shaft { stroke-width: calc(var(--sw-resultant) + 1.5px); }
.is-hot.k-component .k-shaft { stroke-width: calc(var(--sw-component) + 1.5px); }
.is-hot .k-loa, .is-hot .k-angle, .is-hot .k-perp { stroke-width: 2.25px; }
.is-hot .k-label, .is-hot .k-value { font-weight: 700; }

/* Handles. The widget draws, per handle:
     <g class="k-handle-g k-force" tabindex="0" role="slider" aria-label="…">
       <circle class="k-handle-hit" r="var(--handle-hit)"/>   (44 px target, invisible)
       <circle class="k-handle-focus"/>                       (shown on keyboard focus only)
       <circle class="k-handle"/>                             (the ring you see)
     </g>
   Its colour is the colour of what it moves. Add .k-hint on first view for two soft pulses. */
.k-handle-g { cursor: grab; outline: none; touch-action: none; }
.k-handle-g.is-dragging, .is-dragging .k-handle-g { cursor: grabbing; }
.k-handle-hit { fill: transparent; stroke: none; pointer-events: all; }
.k-handle { fill: var(--c-surface); stroke: currentColor; stroke-width: var(--handle-ring);
  transition: stroke-width var(--dur-fast) var(--ease-out); }
.k-handle-g:hover .k-handle, .k-handle-g.is-dragging .k-handle { stroke-width: 3.5px; }
.k-handle-g.is-dragging .k-handle { fill: currentColor; }
.k-handle-focus { fill: none; stroke: var(--c-focus); stroke-width: 2px; visibility: hidden; }
.k-handle-g:focus-visible .k-handle-focus { visibility: visible; }
.k-hint .k-handle { animation: k-pulse var(--dur-hint) var(--ease-out) 2; transform-box: fill-box; transform-origin: center; }
@keyframes k-pulse { 0% { transform: scale(1); } 30% { transform: scale(1.45); } 60%, 100% { transform: scale(1); } }

/* The widget block: no card, no border, no shadow. The drawing sits on the page. */
.k-widget { max-width: var(--widget-max); margin: var(--sp-6) auto; font-family: var(--font-ui); color: var(--c-ink); }
.k-widget svg { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; }
.k-caption { font-size: var(--fs-caption); color: var(--c-ink-muted); line-height: 1.45; margin-top: var(--sp-2); }

/* Live equation: HTML spans in KaTeX's fonts; each term carries data-term and a k-* colour class. */
.k-eq { font-family: var(--font-math-upright); font-size: 20px; line-height: 1.6; color: var(--c-ink); text-align: center;
  font-variant-numeric: tabular-nums; }
.k-eq .k-var { font-family: var(--font-math); font-style: italic; }
/* No colour here: each term's k-* class sets it (a colour rule here would outrank .k-force). */
.k-eq [data-term] { border-radius: 2px; transition: background-color var(--dur-fast) var(--ease-out); }
.k-eq [data-term].is-hot { background: color-mix(in srgb, currentColor 14%, transparent); }
.k-eq .k-op { padding: 0 0.22em; color: var(--c-ink); }
.k-eq .k-unit { font-family: var(--font-ui); font-size: 0.82em; color: var(--c-ink-muted); padding-left: 0.2em; }

/* Sliders only for values with no handle to grab. Distill-style: "α = 0°" is the label, then the track. */
.k-controls { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); align-items: center; margin-top: var(--sp-2); }
.k-control { display: grid; grid-template-columns: auto minmax(120px, 240px); align-items: center; gap: var(--sp-3);
  font-size: var(--fs-caption); }
.k-control output { font-family: var(--font-math-upright); font-size: var(--fs-readout); font-variant-numeric: tabular-nums; color: currentColor; }
.k-control .k-var { font-family: var(--font-math); font-style: italic; }
.k-slider { -webkit-appearance: none; appearance: none; height: 44px; background: transparent; margin: 0; width: 100%; color: inherit; }
.k-slider::-webkit-slider-runnable-track { height: 2px; background: var(--c-construction); }
.k-slider::-moz-range-track { height: 2px; background: var(--c-construction); }
.k-slider::-moz-range-progress { height: 2px; background: currentColor; }
.k-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; border-radius: 50%;
  background: var(--c-surface); border: 2.5px solid currentColor; cursor: grab; }
.k-slider::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--c-surface); border: 2.5px solid currentColor; cursor: grab; }
.k-slider:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 4px; }
/* Buttons are quiet text in the figure's corner (Reset), not boxed form controls. */
.k-button { font: inherit; font-size: var(--fs-value); min-height: 44px; min-width: 44px; padding: 0 var(--sp-2); color: var(--c-ink-muted);
  background: none; border: none; cursor: pointer; text-decoration: underline; text-decoration-color: var(--c-construction); text-underline-offset: 3px; }
.k-button:hover { color: var(--c-ink); text-decoration-color: currentColor; }
.k-button[aria-pressed="true"] { color: var(--c-ink); font-weight: 600; }
.k-button:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
/* What the learner does or answers (a prediction, Next, Roll, a quiz answer, a part chip): a real
   button, not quiet text. Chrome (Reset, Back, Play, mode tabs, settings) stays .k-button. */
.k-choice { font: inherit; font-size: var(--fs-readout); min-height: 44px; padding: 0 var(--sp-4); color: var(--c-ink);
  background: var(--c-surface); border: 1.5px solid var(--c-construction); border-radius: 6px; cursor: pointer; }
.k-choice:hover { border-color: var(--c-ink-muted); }
.k-choice[aria-pressed="true"], .k-choice[aria-checked="true"] { border: 2px solid var(--c-ink); font-weight: 650; }
.k-choice:disabled { color: var(--c-ink-muted); border-style: dashed; cursor: default; }
.k-choice:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
/* One of several settings (yearly · quarterly · …): quiet buttons, the chosen one bold with an ink underline. */
.k-segmented { display: inline-flex; flex-wrap: wrap; gap: 0 var(--sp-3); }
.k-segmented .k-button[aria-pressed="true"] { text-decoration-color: var(--c-ink); text-decoration-thickness: 2px; }
/* Items to sort (classify, order) and the places they go. */
.k-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-3); font-size: var(--fs-readout);
  background: var(--c-surface); border: 1.5px solid var(--c-construction); border-radius: 6px; cursor: grab; touch-action: none; }
.k-chip.is-dragging { cursor: grabbing; border-color: var(--c-ink); }
.k-chip[aria-selected="true"] { border: 2px solid var(--c-ink); }
.k-chip:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.k-bin { border: 1.5px dashed var(--c-construction); border-radius: 8px; min-height: 88px; padding: var(--sp-3); }
.k-bin.is-over { border: 1.5px solid var(--c-ink); }
.k-bin-label { font-size: var(--fs-caption); font-weight: 600; color: var(--c-ink); margin-bottom: var(--sp-2); }
.k-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Phones: after the base .k-eq rule, so it wins. */
@media (max-width: 559px) { .k-eq { text-align: left; font-size: 17px; } }

@media (prefers-reduced-motion: reduce) {
  .k-hint .k-handle { animation: none; }
  .k-handle, .k-eq [data-term] { transition: none; }
}
