/* Disc cams — on top of calc.css */
main.ck .tabs { grid-template-columns: repeat(3, 1fr); }
main.ck .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.ck .stage-bar .hist { margin-left: auto; }
main.ck .card.stage { overflow: visible; position: relative; }
#view { display: block; width: 100%; height: auto; flex: none; user-select: none; -webkit-user-select: none; touch-action: none; }
#view.dragging, #view.dragging * { cursor: grabbing !important; }
#view .hit { fill: transparent; stroke: none; }
#view .handle { cursor: grab; }
#view .knob { fill: var(--surface); fill-opacity: .2; stroke: var(--sel); stroke-width: 1.8; }
#view .handle:hover .knob, #view .handle:focus-visible .knob { stroke-width: 2.6; }
#view .handle:focus-visible { outline: none; }
#view .handle:focus-visible .hit { stroke: var(--sel); stroke-width: 1.2; stroke-dasharray: 3 2; }

/* drawing language */
.ck-cam { fill: var(--steel-150); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.ck-base { fill: none; stroke: var(--steel-500); stroke-width: .8; stroke-dasharray: 4 3; pointer-events: none; }
.ck-pitch { fill: none; stroke: var(--moment); stroke-width: .8; stroke-dasharray: 6 3; pointer-events: none; }
.ck-hub { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; }
.ck-key { fill: var(--ink); }
.ck-ring { fill: none; stroke-width: 4; stroke-linecap: butt; opacity: .75; pointer-events: none; }
.ck-stem { fill: var(--steel-250); stroke: var(--ink); stroke-width: 1; }
.ck-guide { fill: var(--steel-150); stroke: var(--ink); stroke-width: .9; }
.ck-collar { fill: var(--steel-350); stroke: var(--ink); stroke-width: .8; }
.ck-spring { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.ck-roller { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
.ck-pinc { fill: var(--ink); }
.ck-face { fill: var(--steel-250); stroke: var(--ink); stroke-width: 1; }
.ck-bo { stroke: var(--ink); stroke-width: 11; stroke-linecap: round; }
.ck-bi { stroke: var(--steel-150); stroke-width: 8.6; stroke-linecap: round; }
.ck-pin { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
.ck-gnd { fill: var(--steel-150); stroke: var(--ink); stroke-width: 1; }
.ck-gline { stroke: var(--steel-700); stroke-width: 1.2; }
.ck-hatch { stroke: var(--steel-550); stroke-width: .8; }
.ck-normal { stroke: var(--moment); stroke-width: 1; stroke-dasharray: 5 3; pointer-events: none; }
.ck-axisl { stroke: var(--steel-500); stroke-width: .8; pointer-events: none; }
.ck-phi { fill: none; stroke-width: 1.6; }
.ck-phi.good { stroke: var(--good); } .ck-phi.warn { stroke: var(--warn); } .ck-phi.bad { stroke: var(--bad); }
.ck-contact { fill: var(--load); }
.ck-spd { fill: none; stroke: var(--x-6e7177, #6e7177); stroke-width: 1.4; }
.ck-spdhead { fill: var(--x-6e7177, #6e7177); }
.ck-dim { stroke: var(--x-6e7177, #6e7177); stroke-width: .8; }
.ck-dimhead { fill: var(--x-6e7177, #6e7177); }
.ck-rad { stroke: var(--steel-500); stroke-width: .8; }
.ck-lead { stroke: var(--steel-500); stroke-width: .8; pointer-events: none; }
.ck-leaddot { fill: var(--x-6e7177, #6e7177); pointer-events: none; }
.ck-leg { font-size: 11px; fill: var(--text-3); }
.ck-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 2px 0 8px; }
.ck-type { display: grid; justify-items: center; gap: 2px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 8px 7px; cursor: pointer; font-size: 12px; text-align: center; line-height: 1.25; color: var(--text-2); }
.ck-type[aria-pressed="true"] { border-color: var(--sel); background: var(--sel-bg); color: var(--text); }
.fb-chart .ck-band.rise { fill: var(--moment); opacity: .05; }
.fb-chart .ck-band.fall { fill: var(--rust); opacity: .05; }
.fb-chart .ck-grid { fill: var(--fill-2); }
.fb-chart .ck-ok { fill: var(--good); opacity: .07; }
.fb-chart .ck-lim { fill: var(--bad); opacity: .55; }
.fb-chart .ck-zero { fill: var(--steel-500); }
.fb-chart .ck-vl { cursor: ew-resize; }
.fb-chart .ck-vline { fill: var(--sel); }
.ck-live .ck-slow { margin-left: auto; color: var(--text-3); font-size: 12px; }
/* pills */
#view .pill rect { fill: var(--surface); stroke: var(--steel-300); }
#view .pill text { font-weight: 500; fill: var(--text-2); }
#view .pill.phi rect, #view .pill.seg.rise rect { stroke: var(--x-c9d6f2, #c9d6f2); }
#view .pill.phi text, #view .pill.seg.rise text { fill: var(--x-1e40af, #1e40af); font-weight: 600; }
#view .pill.phi.warn rect { stroke: color-mix(in srgb, var(--amber) 50%, transparent); } #view .pill.phi.warn text { fill: var(--x-9a6a12, #9a6a12); }
#view .pill.phi.bad rect { stroke: color-mix(in srgb, var(--bad) 45%, transparent); } #view .pill.phi.bad text { fill: var(--bad); }
#view .pill.load rect { stroke: color-mix(in srgb, var(--load) 40%, transparent); }
#view .pill.load text { fill: var(--rust); font-weight: 600; }
#view .pill.editable { cursor: pointer; }
#view .pill.editable:hover rect, #view .pill.editable:focus-visible rect { stroke: var(--sel); }
#view .pill.editable:focus-visible { outline: none; }
.ck-ed { position: absolute; z-index: 20; width: 132px; }
.ck-ed input { box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
input.bad { border-color: var(--bad) !important; }

/* the strip under the drawing */
.ck-live { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 38px; align-items: center; }
.ck-live .ck-slow { margin-left: auto; color: var(--text-3); font-size: 12px; }
.ck-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }

/* panel */
.ck-seg { margin: 4px 0 6px; }
.ck-seg button { white-space: normal; line-height: 1.25; }

/* chart */
.ck-chseg { flex-wrap: wrap; }
.ck-chseg button[hidden] { display: none; }
.fb-chart .ck-grid { fill: var(--fill-2); }
.fb-chart .ck-ok { fill: var(--good); opacity: .07; }
.fb-chart .ck-lim { fill: var(--bad); opacity: .55; }
.fb-chart .ck-vl { cursor: ew-resize; }
.fb-chart .ck-vline { fill: var(--sel); }
.fb-chart .hit { fill: transparent; }
.fb-chart .pill rect { fill: var(--surface); stroke: var(--sel); }
.fb-chart .pill text { fill: var(--sel); font-weight: 600; }
.fb-chart .halo { paint-order: stroke; stroke: var(--halo); stroke-width: 3.5px; stroke-linejoin: round; }
#chart { touch-action: pan-y; user-select: none; -webkit-user-select: none; }

/* margins table */
.ckms td.chk { white-space: normal; min-width: 260px; }
.ckms td.chk b { font-weight: 500; display: block; }
.ckms td.chk small { display: block; color: var(--text-3); font-size: 12px; line-height: 1.35; }
.ckms td.chk small.cite { font-size: 11px; }
.grp .small-note { line-height: 1.45; }
.grp .small-note sub { font-size: .75em; }
.f > label span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
main.ck .panel-body { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); padding-bottom: 26px; }

@media (max-width: 1040px) { main.ck .work { grid-template-columns: minmax(0, 1fr); } main.ck .panel-body { -webkit-mask-image: none; mask-image: none; } }
@media (max-width: 760px) {
  .ck-chseg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .ck-chseg button { white-space: normal; }
  .ckms td.chk { min-width: 0; }
  .ckms thead { display: none; }
  .ckms, .ckms tbody { display: block; }
  .ckms tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px; padding: 8px 6px; border-bottom: 1px solid var(--fill-1); }
  .ckms td { display: block; text-align: left; padding: 0; border: 0; }
  .ckms td.chk { grid-column: 1 / -1; }
  .ckms td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--text-3); }
}
#view .pill.seg.fall rect { stroke: color-mix(in srgb, var(--rust) 35%, transparent); } #view .pill.seg.fall text { fill: var(--rust); font-weight: 600; }
#view .pill.seg.dwell text { font-weight: 600; }
.ck-ed { position: absolute; z-index: 20; width: 132px; }
.ck-ed input { box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
@media (max-width: 560px) { .ck-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* theme-auto:start · generated by scripts/theme/hexmap.py: dark values (the rule of scripts/theme/colour.py) for
   colours that are not tokens, written as var(--x-rrggbb, #rrggbb): light is the fallback, unchanged */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --x-1e40af: #789ef5; --x-6e7177: #85827f; --x-9a6a12: #d0a66a; --x-c9d6f2: #313a4c; --x-e3e8f1: #2c2f34;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-1e40af: #789ef5; --x-6e7177: #85827f; --x-9a6a12: #d0a66a; --x-c9d6f2: #313a4c; --x-e3e8f1: #2c2f34;
  }
}
/* theme-auto:end */
