/* THE AXLE LAYOUT TOOL'S OWN TOUCHES (owner, 2026-11-22 / 23). Tokens only; the strip is scaled by k, so sizes that must stay real are multiplied by --axc-inv.
   - The COUPLING card: the span between the tractor's last axle and the trailer's first axle has no wheels, so it holds no drawing: a title, what it
     measures, an arrowed dimension line with the distance, the drag slider under it, and (bottom) the jeep that is added or removed at this spot.
   - The DRAG SLIDER under every distance.
   - The zoom magnifier on a wide screen, and the ft / m switch at the top right of the tool. */
.axc #axle-units .coupling-heading { justify-content: center; text-align: center; }
.axc #axle-units .coupling-heading .axc-cpl-title { font-size: 14px; font-weight: 700; color: var(--ink); }
/* The caption sits in the open space above the dashed line, so the card's header keeps the same height as its neighbours. */
.axc #axle-units .coupling-cell .axle-art { position: relative; }
.axc #axle-units .coupling-cell .axc-cpl-sub { position: absolute; top: 12px; left: 50%; width: calc(var(--coupling-width, 76px) / var(--axc-inv, 1) - 8px); margin: 0; font-size: 10px; line-height: 1.4; font-weight: 400; text-align: center; color: var(--muted); white-space: normal; transform: translateX(-50%) scale(var(--axc-inv, 1)); transform-origin: 50% 0; }
.axc #axle-units .axc-spans--cpl .axc-span { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 4; fill: none; }
.axc #axle-units .axc-spans--cpl .axc-span-end { stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
/* The jeep button is the last thing in the card, in the row where the weights are on the other cards. */
.axc #axle-units .coupling-cell .axc-weights { display: flex; align-items: flex-start; justify-content: center; }
.axc #axle-units .axc-cpl-jeep { min-width: 64px; height: 30px; margin: 8px 0 0; padding: 0 8px; border: 1px dashed var(--accent); border-radius: 9999px; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; line-height: 1.4; cursor: pointer; transform: scale(var(--axc-inv, 1)); transform-origin: 50% 0; }
.axc #axle-units .axc-cpl-jeep.is-on { border-style: solid; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.axc #axle-units .axc-cpl-jeep:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.axc #axle-units .axc-cpl-jeep:disabled { opacity: .5; cursor: not-allowed; }
.axc #axle-units .axc-cpl-jeep:focus-visible, .axc #axle-units .axc-slide:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── The drag slider under every distance (owner's reference): a filled track, a ring thumb, tick marks and the two ends' values. Right lengthens. ── */
.axc.axc.axc:not(.axs) #axle-units .axle-art { height: calc(204px + 72px * var(--axc-inv, 1)); }
.axc.axc.axc #axle-units .axc-gap { bottom: calc(44px * var(--axc-inv, 1)); }
.axc #axle-units .axc-slide { cursor: pointer; user-select: none; }
.axc #axle-units .axc-slide::after { content: ""; position: absolute; inset: -8px; }
.axc #axle-units .axc-slide-track { position: absolute; left: 0; right: 0; top: 8px; height: 8px; border-radius: 9999px; background: var(--border); }
.axc #axle-units .axc-slide-fill { display: block; height: 100%; border-radius: 9999px; background: var(--accent-2, var(--accent)); }
.axc #axle-units .axc-slide-tick { position: absolute; top: 16px; width: 1px; height: 4px; background: var(--muted); transform: translateX(-50%); }
.axc #axle-units .axc-slide-thumb { position: absolute; top: 12px; box-sizing: border-box; width: 20px; height: 20px; border: 4px solid var(--accent-2, var(--accent)); border-radius: 9999px; background: var(--surface); transform: translate(-50%, -50%); cursor: ew-resize; box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 25%, transparent); }
.axc #axle-units .axc-slide:hover .axc-slide-thumb, .axc #axle-units .axc-slide:focus-visible .axc-slide-thumb, .axc #axle-units .axc-slide.is-live .axc-slide-thumb { border-width: 5px; }
.axc #axle-units .axc-slide-end { position: absolute; top: 24px; font-size: 10px; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.axc #axle-units .axc-slide-min { left: 0; }
.axc #axle-units .axc-slide-max { right: 0; }
.axc #axle-units .axc-slide[data-narrow] .axc-slide-end { display: none; }
.axc #axle-units.is-dragging .axc-slide, .axc #axle-units.is-dragging .axc-slide-thumb { cursor: grabbing; }

/* ── The zoom magnifier on a wide screen: in the Tractor card, top centre. Zoomed, the rig is bigger and the box scrolls sideways. ── */
@media (min-width: 768px) {
  .axc #axle-units .axle-unit > header { position: relative; }
  .axc.axc #axle-units .axle-unit > header .axc-zoombtn { position: absolute; top: calc(4px * var(--axc-inv, 1)); left: 50%; display: inline-grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 9999px; color: var(--muted); background: var(--surface); cursor: pointer; transform: translateX(-50%) scale(var(--axc-inv, 1)); transform-origin: 50% 0; }
  .axc #axle-units .axle-unit > header .axc-zoombtn:hover, .axc #axle-units .axle-unit > header .axc-zoombtn:focus-visible, .axc #axle-units .axle-unit > header .axc-zoombtn.is-out { color: var(--ink); border-color: var(--ink); }
  .axc #axle-units .axle-unit > header .axc-zoombtn.is-out .axc-z-plus { display: none; }
}

/* ── The ft / m switch at the top right of the layout tool (it moved out of the rig selector row) ── */
.axc .axle-panel .panel-heading.has-units { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.axc .axle-panel .panel-heading.has-units .units-field { margin: 0 0 0 auto; }

/* The rig picker's rows carry the layout's own drawing, big enough to read (owner: "the icons are too small and there is too much blank space on the right"):
   a wide thumbnail, and on a desktop a wider list so the row is filled. */
.axc .axc-pop-ico.is-rig, .axc .axc-pop-list .axc-pop-ico { width: 136px; height: 68px; overflow: hidden; }
.axc .axc-pop-list .axc-pop-ico svg.axc-ico { width: 72%; height: auto; }
@media (max-width: 720px) { .axc .axc-pop-ico.is-rig, .axc .axc-pop-list .axc-pop-ico { width: 112px; height: 56px; } }
@media (min-width: 721px) { .axc .axc-pop--master .axc-pop-list { width: min(100%, 560px); max-height: 440px; } }
.axc .axc-pop-ico.is-rig .axr { display: block; width: 100%; height: 100%; }

/* ── The two selectors (owner, 2026-11-23): side by side on a desktop, stacked on a phone. The unit switch left this row, so the toolbar is
   rig | state | share + print. On a phone the original stacked rules (rig on row 2, state on row 3) stand. ── */
@media (min-width: 721px) {
  .axc.axc[data-mode="axle"] .heading-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .axc.axc[data-mode="axle"] .heading-actions .setup-bar .axc-f-master { grid-column: 1; grid-row: 1; }
  .axc.axc[data-mode="axle"] .heading-actions .setup-bar .axc-f-state { grid-column: 2; grid-row: 1; }
  .axc.axc[data-mode="axle"] .heading-actions .history-actions { grid-column: 3; grid-row: 1; }
}
