:root {
  color-scheme: light;
  --ink: #102527;
  --muted: #506465;
  --line: #d8e1df;
  --surface: #fff;
  --accent: #006450;
  --paper: #edf2f0;
  --dark: #142c30;
  --dark-text: #eff6f2;
  --teal: #75d8b6;
  --amber: #fac38b;
  --grid: #325057;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, select, input, output { font: inherit; }
button, select, input[type=checkbox], input[type=range] { accent-color: var(--accent); }
button, select { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #008b70; outline-offset: 3px; }
.shell { width: min(100% - 3rem, 78rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #f8fbf9; }
.masthead { display: flex; align-items: center; gap: 1rem; min-height: 4.35rem; }
.wordmark { color: var(--ink); text-decoration: none; font-size: 1.55rem; font-weight: 800; letter-spacing: -.06em; }
.wordmark span { color: var(--accent); }
.product-name { border-left: 1px solid #c8d6d3; padding-left: 1rem; color: var(--muted); }
.demo-tag { margin-left: auto; color: var(--accent); font-size: .875rem; font-weight: 650; }
.intro { padding-block: 2rem 1.6rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); line-height: 1; letter-spacing: -.055em; font-weight: 750; }
.intro p { margin-top: .7rem; color: var(--muted); font-size: 1.04rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(18rem, 1fr); gap: 1rem; align-items: stretch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel h2 { font-size: 1.14rem; font-weight: 700; letter-spacing: -.015em; }
.drawing { background: var(--dark); border-color: var(--dark); color: var(--dark-text); overflow: hidden; }
.drawing-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; padding: 1rem 1.2rem .6rem; }
.drawing-header p { color: #baccce; font-size: .9rem; margin-top: .24rem; }
.drawing-unit { color: #b6c7c9; font-size: .73rem; font-weight: 650; letter-spacing: .09em; white-space: nowrap; }
#scene { display: block; width: 100%; aspect-ratio: 1.93; }
.drawing-footer, .motion { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: .6rem 1.2rem; }
.drawing-footer { justify-content: space-between; border-top: 1px solid var(--grid); }
.legend, .toggle { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; font-size: .86rem; }
.legend { list-style: none; padding: 0; margin: 0; }
.legend li { display: flex; align-items: center; gap: .35rem; }
.legend i, .chart-note i { width: 1rem; height: .16rem; display: inline-block; }
.tractor-key { background: var(--teal); }
.trailer-key { background: var(--amber); }
.hitch-key { border-top: 2px dashed var(--dark-text); }
.toggle { gap: .22rem; cursor: pointer; }
.toggle input { margin: 0; width: 1.15rem; height: 1.15rem; }
.motion { border-top: 1px solid var(--grid); flex-wrap: nowrap; padding-bottom: .85rem; }
.motion button { border: 0; border-radius: 6px; background: var(--teal); color: var(--ink); padding: .47rem .7rem; min-width: 4.6rem; font-weight: 700; }
.motion input { min-width: 3rem; flex: 1; accent-color: var(--teal); }
.motion output { min-width: 5rem; text-align: right; font-size: .9rem; font-variant-numeric: tabular-nums; }
.settings, .data-panel { padding: 1rem 1.2rem; }
.settings label { display: block; font-size: .91rem; font-weight: 650; }
.settings > label { margin: 1.12rem 0 .45rem; }
.settings select { width: 100%; padding: .58rem .55rem; color: var(--ink); border: 1px solid #b7c9c3; background: #f7faf8; border-radius: 6px; }
.settings input[type=range] { width: 100%; min-width: 0; margin-inline: 0; }
.range-heading, .range-ends { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.range-heading { margin: 1.2rem 0 .35rem; }
.range-heading output { color: var(--accent); font-weight: 750; white-space: nowrap; }
.range-ends { color: var(--muted); font-size: .84rem; }
.readouts { margin: 1rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .65rem; column-gap: .8rem; }
.readouts div { padding-top: .55rem; border-top: 1px solid var(--line); }
.readouts dt { color: var(--muted); font-size: .84rem; }
.readouts dd { margin: .08rem 0 0; color: var(--ink); font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-variant-numeric: tabular-nums; font-weight: 700; }
.condition { border-top: 1px solid var(--line); padding-top: .8rem; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.data-panel > p { color: var(--muted); margin-top: .25rem; font-size: .9rem; }
#force-chart { display: block; width: 100%; height: 220px; overflow: visible; margin-top: .65rem; }
.chart-note { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.chart-note .measured-key { margin-left: .18rem; background: var(--accent); }
.chart-note .live-key { margin-left: .7rem; border-top: 2px dashed #a45327; }
.slip-chart { display: grid; gap: .46rem; margin-top: .9rem; }
.slip-row { display: grid; grid-template-columns: minmax(6.35rem, auto) minmax(3rem, 1fr) 3.6rem; align-items: center; gap: .5rem; font-size: .86rem; }
.slip-value { font-variant-numeric: tabular-nums; text-align: right; }
.slip-track { height: .48rem; position: relative; background: #e8eeee; border-radius: 3px; }
.slip-track::before { position: absolute; content: ""; height: .8rem; top: -.15rem; left: 50%; border-left: 1px solid #879c95; }
.slip-mark { position: absolute; height: 100%; background: #20866e; }
.slip-mark.negative { background: #ad5a31; }
.site-footer { padding-block: 1.3rem 1.7rem; display: flex; justify-content: space-between; align-items: start; gap: 1rem; color: var(--muted); line-height: 1.5; font-size: .9rem; }
.site-footer strong { color: var(--accent); }
.site-footer a { display: inline-block; margin-top: .35rem; }
.notice { margin: 0 0 1rem; padding: .8rem; border-left: 3px solid var(--accent); background: var(--surface); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media(max-width: 850px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .drawing { grid-column: 1 / -1; }
  .settings { grid-column: 1 / -1; }
  .readouts { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media(max-width: 590px) {
  .shell { width: calc(100% - 1.4rem); }
  .masthead { min-height: 3.6rem; gap: .6rem; }
  .product-name { display: none; }
  .intro { padding-block: 1.35rem 1.1rem; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .readouts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .drawing-header, .drawing-footer, .motion, .settings, .data-panel { padding-left: .78rem; padding-right: .78rem; }
  #scene { aspect-ratio: 1.34; }
  .motion { gap: .5rem; }
  .motion output { min-width: 4.6rem; }
  .drawing-unit { display: none; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
