/* Stack plume — on top of calc.css */
main.plume .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.plume .stage-bar .hist { margin-left: auto; }
#view { display: block; width: 100%; height: auto; user-select: none; touch-action: none; }
#view .hit { fill: transparent; stroke: none; }
#view .handle { cursor: grab; }
#view .handle.hx { cursor: ew-resize; }
#view .handle.hy { cursor: ns-resize; }
#view .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
#view .handle:hover .knob, #view .handle:focus .knob { fill: var(--sel); }
#view .handle:focus { outline: none; }
#view .pl-field { pointer-events: none; }

/* the drawing */
.pl-ground { fill: none; stroke: var(--steel-750); stroke-width: 1.3; }
.pl-hatch { fill: none; stroke: var(--steel-500); stroke-width: .8; }
.pl-stack { fill: var(--steel-200); stroke: var(--steel-750); stroke-width: 1.2; }
.pl-axis { fill: none; stroke: var(--x-6e7177, #6e7177); stroke-width: 1; stroke-dasharray: 5 4; }
.pl-cl { fill: none; stroke: var(--x-8a3a1c, #8a3a1c); stroke-width: 1.3; stroke-dasharray: 6 4; }
.pl-lid { fill: none; stroke: var(--steel-700); stroke-width: 1.2; stroke-dasharray: 2 3; }
.pl-frame { fill: none; stroke: var(--line); stroke-width: 1; }
.pl-mast { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.pl-max { fill: var(--ink); stroke: var(--halo); stroke-width: 1.2; }
.pl-wind { fill: none; stroke: var(--text-2); stroke-width: 1.8; }
.pl-windh { fill: var(--text-2); stroke: none; }
.pl-dim { fill: none; stroke: var(--x-6e7177, #6e7177); stroke-width: 1; }
.pl-dimh { fill: var(--x-6e7177, #6e7177); stroke: none; }
.pl-ttl { font-size: 11px; font-weight: 500; fill: var(--text-3); letter-spacing: .02em; }

/* pills */
#view .pill rect { fill: var(--surface); stroke: var(--steel-300); }
#view .pill text { font-size: 11.5px; font-weight: 500; fill: var(--text-2); font-variant-numeric: tabular-nums; }
#view .pill.eq rect { stroke: rgba(23, 24, 26, .3); } #view .pill.eq text { fill: var(--text); font-weight: 600; }
#view .pill.good rect { stroke: color-mix(in srgb, var(--good) 55%, transparent); } #view .pill.good text { fill: var(--olive); font-weight: 600; }
#view .pill.warn rect { stroke: color-mix(in srgb, var(--amber) 60%, transparent); } #view .pill.warn text { fill: var(--x-8a5a0c, #8a5a0c); font-weight: 600; }
#view .pill.bad rect { stroke: color-mix(in srgb, var(--bad) 55%, transparent); } #view .pill.bad text { fill: var(--x-b0321f, #b0321f); font-weight: 600; }
#view .pill.editable { cursor: text; }
#view .pill.editable:hover rect, #view .pill.editable:focus rect { stroke: var(--sel); stroke-width: 1.4; }
#view .pill.editable:focus { outline: none; }

/* legend of the bands */
.pl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 14px 8px; font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pl-li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; line-height: 1; }
.pl-li i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .12); }
.pl-lk { color: var(--text-3); }

/* editors in the drawing */
.stage { position: relative; }
.pl-edit { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--sel); border-radius: 9px; padding: 2px 8px 2px 4px; box-shadow: 0 6px 18px rgba(20, 22, 28, .14); }
.pl-edit input { width: 82px; border: 0; outline: none; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; padding: 3px 2px; }
.pl-edit span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* live strip and flags */
.pl-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; }
.pl-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.pl-live i { font-style: normal; color: var(--text-3); }
.pl-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pl-flags span { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; line-height: 1.4; }
.pl-flags span.bad, .pl-flags span.pl-err { color: var(--bad-ink, #b0321f); border-color: color-mix(in srgb, var(--bad) 35%, transparent); white-space: normal; }

/* panel */
.pl-seg { margin-bottom: 6px; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
.pl-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--text-2); cursor: pointer; font-variant-numeric: tabular-nums; line-height: 1.5; }
.pl-chip:hover { border-color: var(--line-2); }
.pl-chip.on { border-color: var(--text); color: var(--text); font-weight: 500; }
.pl-tog { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-2); margin: 4px 0 8px; line-height: 1.4; cursor: pointer; }
.pl-tog input { margin: 2px 0 0; flex: none; }
#panel input.bad { color: var(--bad); }
#panel .num:has(input.bad) input { border-color: var(--bad); }
#panel.fade-b { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
#panel.fade-t { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px); mask-image: linear-gradient(to bottom, transparent, #000 28px); }
#panel.fade-t.fade-b { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); }

/* Turner's key as a clickable grid */
.pl-key { width: 100%; border-collapse: collapse; font-size: 11.5px; margin: 4px 0 6px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.pl-key th { font-weight: 500; color: var(--text-3); padding: 3px 2px; text-align: center; line-height: 1.25; }
.pl-key th.r { text-align: left; white-space: nowrap; }
.pl-key td { padding: 1px; text-align: center; }
.pl-key td button { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 3px 0; font: inherit; font-size: 11.5px; color: var(--text-2); cursor: pointer; line-height: 1.3; }
.pl-key td button:hover { border-color: var(--line-2); }
.pl-key td button.on { border-color: var(--text); color: var(--text); font-weight: 600; background: var(--bg); }
.pl-key td button:disabled { color: var(--text-3); cursor: default; background: var(--surface-2); }

/* summary */
.pl-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; max-width: 38ch; }
.pl-big { font-weight: 600; color: var(--x-8a3a1c, #8a3a1c); }
.pl-tag { display: inline-block; font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 4px; white-space: nowrap; line-height: 1.5; vertical-align: middle; }

/* charts */
.pl-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#cChart, #hChart, #uChart, #sChart { touch-action: none; user-select: none; }
.fb-chart .cdrag { cursor: ew-resize; }
#checks td.note { white-space: normal; min-width: 200px; line-height: 1.4; }

@media (max-width: 1100px) { .pl-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  #checks thead { display: none; }
  #checks, #checks tbody { display: block; width: 100%; }
  #checks tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  #checks td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  #checks td.chk { grid-column: 1; grid-row: 1; }
  #checks td:nth-child(5) { grid-column: 2; grid-row: 1; align-self: center; }
  #checks td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  #checks td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 12.5px; text-align: right; }
  #checks td:nth-child(2)::before { content: "actual "; color: var(--text-3); }
  #checks td:nth-child(3)::before { content: "allowed "; color: var(--text-3); }
  #checks td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--text-3); min-width: 0; }
}
@media print { .pl-edit { display: none !important; } }

/* 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-6e7177: #85827f; --x-8a3a1c: #d28a71; --x-8a5a0c: #c89e69; --x-b0321f: #ef8470; --x-c97a62: #eda994;
    --x-d68f74: #f0b49d; --x-dce8d9: #2c342a; --x-e3aa8c: #e3b49b; --x-ecc3a6: #6f523d; --x-f2d9bd: #42321f;
    --x-f5ead1: #332c1c;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-6e7177: #85827f; --x-8a3a1c: #d28a71; --x-8a5a0c: #c89e69; --x-b0321f: #ef8470; --x-c97a62: #eda994;
    --x-d68f74: #f0b49d; --x-dce8d9: #2c342a; --x-e3aa8c: #e3b49b; --x-ecc3a6: #6f523d; --x-f2d9bd: #42321f;
    --x-f5ead1: #332c1c;
  }
}
/* theme-auto:end */
