/* Sheet.Console styles. Built from build/css/console/ by build/generate.py: edit the parts there. */
/* ---- 00-core.css ---- */
/* Sheet.Console · design 4A (bar + cards + result sheet), brand tokens only.
   Container queries on .vcalc (container-type: inline-size in styles.css). */
.vc.cx { display: block; position: relative; min-width: 0; font-family: var(--font); color: var(--text); }
.cx [hidden] { display: none !important; }
:where(.cx) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
:where(.cx) :where(button:disabled) { cursor: default; }
.cx :focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.cx-i { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cx-m { font-family: var(--mono); }
/* thumbnails: a flex box of fixed size, so the photo's percentage limits resolve */
.cx-th { display: flex !important; align-items: center; justify-content: center; overflow: hidden; }
.cx-th img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cx-th svg { display: block; width: 100%; height: 100%; }
.cx-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 1 · title bar */
.cx-tbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.cx-tt { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.cx-tools { display: flex; align-items: center; gap: 2px; }
.cx-ghost { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: var(--radius); font-size: 13px; font-weight: 500; color: var(--text-2); }
.cx-ghost:hover:not(:disabled) { background: var(--bg-2); color: var(--ink); }
.cx-ghost:disabled { color: var(--line-2); }
.cx-redo { display: none !important; }

/* 2 · command bar, «Understood:», suggestions, popover */
.cx-barw { position: relative; }
.cx-bar { display: flex; align-items: center; gap: 16px; min-height: 80px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: var(--radius-lg); background: var(--bg); }
.cx-bar:focus-within { box-shadow: var(--ring); }
.cx-kt { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); font: 400 20px/1 var(--font); }
.cx-field { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.cx-in, .cx-mirror { font: 500 clamp(20px, 1.2rem + 0.9vw, 31px)/1.3 var(--font); letter-spacing: -0.014em; padding: 10px 0; margin: 0; white-space: pre; }
.cx-in { position: relative; z-index: 1; display: block; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); caret-color: var(--ink); }
.cx-in::placeholder { color: var(--muted); opacity: 0.8; }
.cx-in:focus-visible { outline: 0; }
.cx-mirror { position: absolute; left: 0; top: 0; pointer-events: none; color: var(--ink); -webkit-text-fill-color: transparent; }
.cx-mirror u { text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.cx-mirror u.cx-u-x { text-decoration-color: var(--warn); text-decoration-style: wavy; text-decoration-thickness: 1.5px; }
.cx-run { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: var(--radius); background: var(--ink) !important; color: #fff !important; }
.cx-run .cx-i { width: 20px; height: 20px; }
.cx-sug { position: absolute; z-index: 30; left: 74px; right: 80px; top: 82px; list-style: none; margin: 0; padding: 6px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--lift); max-height: 330px; overflow: auto; }
.cx-sg { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; min-height: 40px; padding: 9px 10px; border-radius: var(--radius); cursor: pointer; }
.cx-sg b { font: 500 14px/1.2 var(--mono); color: var(--ink); white-space: nowrap; }
.cx-sg span { font-size: 12.5px; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cx-sg.cx-on, .cx-sg:hover { background: var(--bg-2); }
.cx-und { display: flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 34px; }
.cx-und-l { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 2px; }
.cx-toks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cx-tok { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); white-space: nowrap; }
.cx-tok b { font: 600 10px/1 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.cx-tok span { font: 500 13px/1 var(--mono); color: var(--ink); }
.cx-tok .cx-i { width: 11px; height: 11px; color: var(--muted); }
button.cx-tok:hover, button.cx-tok[aria-expanded="true"] { border-color: var(--ink); }
.cx-tok-x { border-style: dashed; border-color: var(--warn); background: var(--warn-soft); }
.cx-tok-x b { color: var(--warn); }
.cx-tok-none { font-size: 13px; color: var(--muted); }
.cx-sep { color: var(--line-2); font-size: 14px; }
.cx-hint { margin-left: auto; flex: none; font-size: 12.5px; color: var(--muted); }
.cx-pop { position: absolute; z-index: 40; max-height: min(62vh, 440px); overflow: auto; padding: 12px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: 0 6px 8px -4px rgba(18, 20, 19, 0.18); }
.cx-pop-h { margin: 0 0 4px; font: 600 10.5px/1.4 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.cx-pop .cx-g-list { grid-template-columns: minmax(0, 1fr); }

/* 3 · board: cards + recent (58 %) | result sheet + alternatives (42 %) */
.cx-board { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: 24px 32px; margin-top: 22px; align-items: start; }
.cx-left, .cx-right { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* cards */
.cx-cards { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 1.3fr); grid-auto-flow: row dense; gap: 14px; }
.cx-card { min-width: 0; display: flex; flex-direction: column; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift); }
/* choosing: two columns; a card of photo tiles takes the whole row */
.cx-cards:has(.cx-picking) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cx-card.cx-picking:has(.cx-g-tiles) { grid-column: 1 / -1; }
.cx-c-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.cx-c-l { font: 600 10.5px/1 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.cx-chg { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -10px -8px; padding: 0 8px; font-size: 12.5px !important; font-weight: 500 !important; color: var(--accent-ink) !important; border-radius: var(--radius); }
.cx-chg .cx-i { width: 11px; height: 11px; }
.cx-c-ph { flex: 1; min-height: 132px; margin-top: 8px; padding-bottom: 10px; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.cx-c-ph img { display: block; max-width: 100%; max-height: 176px; object-fit: contain; }
.cx-c-ph svg { display: block; width: 100%; max-width: 100%; max-height: 176px; }
.cx-c-v { margin-top: 11px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 22px; }
.cx-c-pn { font: 600 17px/1.15 var(--mono); color: var(--ink); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.cx-c-pn.cx-word { font-family: var(--font); letter-spacing: -0.01em; }
.cx-mark { font: 600 9.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--bg-3); border-radius: var(--radius-sm); padding: 5px 6px; }
.cx-kv { margin: 9px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; font-size: 12px; line-height: 1.25; }
.cx-kv dt { color: var(--muted); }
.cx-kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.cx-kv dd.cx-m { font-family: var(--mono); font-size: 11.5px; }
.cx-c-k + .cx-c-k { margin-top: 4px; }
.cx-c-kl { display: block; margin: 12px 0 6px; font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.cx-card > .cx-c-k:first-of-type .cx-g { margin-top: 10px; }
.cx-c-kl + .cx-g { margin-top: 0 !important; }
.cx-c-sum { margin-top: 12px; }
.cx-c-sum b { display: block; font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.cx-c-sum span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.cx-none { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* options: list rows, photo tiles, a segmented rail; incompatible ones folded with the reason */
.cx-g { display: grid; gap: 8px; }
.cx-g-list { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.cx-always .cx-g-list { grid-template-columns: minmax(0, 1fr); }
.cx-o { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 12px 6px 8px; border: 1px solid var(--line) !important; border-radius: var(--radius); background: var(--bg) !important; }
.cx-o:hover { border-color: var(--line-2) !important; }
.cx-o.cx-on { border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink); }
.cx-o-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-o-t b { font-size: 13.5px; font-weight: 500; color: var(--text-2); line-height: 1.25; }
.cx-on .cx-o-t b { color: var(--ink); font-weight: 600; }
.cx-o-t small { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.cx-rd { width: 16px; height: 16px; flex: none; position: relative; border-radius: 50%; border: 1.5px solid var(--line-2); }
.cx-on .cx-rd { border: 0; background: var(--accent); }
.cx-on .cx-rd::after { content: ""; position: absolute; left: 5.5px; top: 5.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.cx-o .cx-th { width: 76px; height: 40px; flex: none; display: grid; place-items: center; }
.cx-always .cx-o { min-height: 58px; }
.cx-always .cx-o .cx-th { width: 96px; height: 44px; }
.cx-g-tiles { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); }
.cx-tiles { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; text-align: center; }
.cx-tiles .cx-th { width: 100%; height: 84px; }
.cx-tiles .cx-o-t { align-items: center; }
.cx-tiles .cx-o-t b { font: 600 13px/1.2 var(--mono); }
.cx-g-seg { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; background: var(--bg-3); border-radius: var(--radius); width: max-content; max-width: 100%; }
.cx-seg { width: auto; min-width: 60px; justify-content: center; padding: 6px 10px; border-color: transparent !important; background: transparent !important; border-radius: var(--radius-sm); }
.cx-seg .cx-o-t { align-items: center; }
.cx-seg .cx-o-t b { font: 500 13px/1.2 var(--mono); }
.cx-seg .cx-o-t small { display: none; }
.cx-seg.cx-on { background: var(--ink) !important; box-shadow: none; }
.cx-seg.cx-on .cx-o-t b { color: #fff; }
.cx-off { margin-top: 8px; }
.cx-off summary { display: flex; align-items: center; min-height: 36px; font-size: 12px; color: var(--muted); cursor: pointer; }
.cx-off .cx-o { margin-top: 6px; border-style: dashed !important; }
.cx-o-off .cx-o-t b { color: var(--muted); font-weight: 500; }
.cx-num { display: flex; align-items: stretch; width: max-content; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.cx-stp { width: 44px; min-height: 44px; display: grid !important; place-items: center; font: 500 18px/1 var(--mono) !important; color: var(--ink) !important; background: var(--bg-2) !important; }
.cx-num-in { width: 76px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 500 16px/1 var(--mono); color: var(--ink); background: var(--bg); }
.cx-num-n { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cx-chip { min-height: 36px; padding: 0 10px !important; border: 1px solid var(--line) !important; border-radius: var(--radius); font: 500 12.5px var(--mono) !important; color: var(--ink) !important; background: var(--bg-2) !important; }
.cx-chip.cx-on { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }

/* recent, Try, How it works */
.cx-rc-h { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.cx-rc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cx-rc { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 8px 18px 8px 10px !important; border: 1px solid var(--line) !important; border-radius: var(--radius-lg); }
.cx-rc:hover { border-color: var(--line-2) !important; }
.cx-rc .cx-th { width: 88px; height: 42px; flex: none; display: grid; place-items: center; }
.cx-rc-tx { flex: 1; min-width: 0; }
.cx-rc-q { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-rc-r { margin-top: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cx-rc-r b { font: 600 13px/1.2 var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cx-rc-r time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cx-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.cx-try-l { font-size: 13px; font-weight: 600; color: var(--ink); margin-right: 4px; }
.cx .cx-ex { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); font: 500 12.5px/1.2 var(--mono); color: var(--ink); text-align: left; }
.cx .cx-ex:hover { border-color: var(--ink); }
.cx-how { list-style: none; counter-reset: cxh; margin: 0; padding: 14px 16px; display: grid; gap: 10px; background: var(--bg-2); border-radius: var(--radius-lg); }
.cx-how li { counter-increment: cxh; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.cx-how li::before { content: counter(cxh, decimal-leading-zero); grid-row: span 2; font: 500 10.5px/1.9 var(--mono); color: var(--muted); }
.cx-how b { color: var(--ink); font-weight: 600; }

/* 4 · the result sheet */
.cx-sheet { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); box-shadow: var(--lift); }
.cx-sh-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 18px 12px; border-bottom: 1px solid var(--line); }
.cx-sh-t { margin: 0; font-size: 15px; font-weight: 600; line-height: 20px; color: var(--ink); }
.cx-sh-s { margin: 2px 0 0; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.cx-sh-s .cx-m { font-size: 12px; color: var(--text-2); }
.cx-sh-st { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.cx-cmp { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.cx-cmp i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.cx-cmp-ok i { background: var(--accent); }
.cx-cmp .cx-m { font-size: 12px; color: var(--muted); }
.cx-res { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.cx .vc-answer { font: 700 20px/1.25 var(--font); letter-spacing: -0.015em; color: var(--ink); margin: 0; text-wrap: balance; }
.cx.vc-is-empty .vc-answer { font-size: 16px; font-weight: 600; color: var(--muted); }
.cx .vc-sub { margin: 5px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.cx-slots { list-style: none; margin: 0; padding: 0; }
.cx-slot { display: grid; grid-template-columns: 112px 76px minmax(0, 1fr); column-gap: 14px; align-items: center; min-height: 86px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.cx-sl-lbl { display: flex; align-items: center; gap: 8px; font: 400 10.5px/15px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cx-sl-lbl b { font-weight: 500; color: var(--ink); }
.cx-sl-ref { display: block; margin: 2px 0 0 22px; font: 400 10.5px/15px var(--mono); color: var(--muted); }
.cx-slot .cx-th { width: 76px; height: 54px; display: flex; align-items: center; justify-content: center; padding: 4px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.cx-slot button.cx-th { cursor: zoom-in; }
.cx-th-need, .cx-th-none { border-style: dashed !important; border-color: var(--line-2) !important; font: 400 11px var(--mono); color: var(--muted); }
.cx-sl-t { min-width: 0; }
.cx-sl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cx-sl-v { font: 500 15px/18px var(--mono); color: var(--ink); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cx-x { font: 400 12.5px var(--font); color: var(--muted); letter-spacing: 0; }
.cx-lnk { flex: none; min-height: 44px; margin: -13px -6px; padding: 0 6px; font-size: 12px !important; font-weight: 500 !important; color: var(--accent-ink) !important; border-radius: var(--radius); }
.cx-auto { flex: none; font: 400 11px var(--mono); color: var(--muted); }
.cx-sl-d { margin: 1px 0 0; font-size: 12.5px; line-height: 16px; color: var(--text-2); }
.cx-sl-m { margin: 2px 0 0; font: 400 10.5px/15px var(--mono); color: var(--muted); }
.cx-sl-need { margin: 0; font-size: 13px; color: var(--muted); }
.cx-slot-need .cx-sl-lbl b { color: var(--muted); }
.cx-slot-bad .cx-sl-v { color: var(--bad); }
.cx-verd { padding: 0 18px; }
.cx-verd:empty { display: none; }
.cx .vc-verdict { margin: 12px 0 0; }
.cx-acts { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 18px; margin-top: 12px; border-top: 1px solid var(--line); }
.cx-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px !important; border: 1px solid var(--line-2) !important; border-radius: var(--radius); background: var(--bg) !important; font: 600 13.5px/1 var(--font) !important; color: var(--ink) !important; text-decoration: none; white-space: nowrap; }
.cx-btn:hover:not(:disabled) { border-color: var(--ink) !important; }
.cx-btn.cx-pri { flex: 1 1 150px; background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }
.cx-btn:disabled { opacity: 0.45; }
.cx-btn .cx-i { width: 15px; height: 15px; }
.cx-sheet .cx-plan { margin: 12px 18px 16px; }
.cx-plan-tap .cx-sheet .cx-plan { display: none; }
.cx-plan-full { background: var(--bg); }
.cx-plan-full .vc-photos { justify-content: center; }

/* 5 · other choices that fit */
.cx-alt-h { display: flex; align-items: baseline; gap: 6px; }
.cx-alt-h h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 18px; color: var(--ink); }
.cx-n { font: 500 12px var(--mono); color: var(--muted); margin-left: 2px; }
.cx-alt-m { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right; }
.cx-alt-list { list-style: none; margin: 10px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cx-alt { display: grid; grid-template-columns: 72px minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) auto; column-gap: 12px; align-items: center; min-height: 54px; padding: 4px 10px 4px 12px; border-bottom: 1px solid var(--line); }
.cx-alt:last-child { border-bottom: 0; }
.cx-alt .cx-th { width: 72px; height: 32px; display: grid; place-items: center; }
.cx-alt-v { font: 500 13.5px/1.2 var(--mono); color: var(--ink); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cx-alt-s { font-size: 12.5px; color: var(--text-2); }
.cx-alt-l { font: 500 12px/1.3 var(--mono); color: var(--muted); }
.cx-use { min-height: 44px; padding: 0 14px !important; border: 1px solid var(--line-2) !important; border-radius: var(--radius-sm); font-size: 12.5px !important; font-weight: 600 !important; color: var(--ink) !important; }
.cx-use:hover { border-color: var(--ink) !important; }

/* details: the values, the extra tables and the notes, as on every sheet */
.cx-details { margin-top: 28px; }
.cx-details > * + * { margin-top: 14px; }

/* 6 · shortcuts */
.cx-keys { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; padding: 11px 0 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cx-keys span { display: inline-flex; align-items: center; gap: 6px; }
.cx kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; font: 500 10.5px/1 var(--mono); color: var(--text-2); background: var(--bg); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--radius-sm); }
.cx-mbar { display: none; }

/* narrow: one column, the sheet straight after the cards */
@container (max-width: 960px) {
  .cx-board { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
  .cx-board > * , .cx-left > *, .cx-right > * { min-width: 0; max-width: 100%; }
  .cx-left, .cx-right { display: contents; }
  .cx-cards { order: 1; }
  .cx-sheet { order: 2; }
  .cx-alts { order: 3; }
  .cx-recent { order: 4; }
  .cx-howw { order: 5; }
  .cx-hint { display: none; }
}
/* phone (iPhone 13, 390): the bar stays on top, rows slide, actions stay at the bottom, 16 px text */
@container (max-width: 640px) {
  .cx-tbar { margin-bottom: 10px; }
  .cx-ghost span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cx-ghost { padding: 0 12px; }
  .cx-barw { position: sticky; top: var(--header-h, 60px); z-index: 25; background: var(--bg); padding: 8px 0 4px; }
  .cx-bar { min-height: 58px; gap: 8px; padding: 0 6px 0 12px; }
  .cx-kt { display: none; }
  .cx-in, .cx-mirror { font-size: 18px; padding: 8px 0; }
  .cx-mirror u { text-underline-offset: 5px; }
  .cx-run { width: 44px; height: 44px; }
  .cx-sug { left: 0; right: 0; top: 70px; }
  .cx-und { margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
  .cx-und::-webkit-scrollbar { display: none; }
  .cx-toks { flex-wrap: nowrap; }
  .cx-tok { flex: none; min-height: 36px; }
  .cx-tok span { font-size: 14px; }
  .cx-und-l { font-size: 14px; }
  .cx-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 2px 2px 8px; scrollbar-width: thin; }
  .cx-cards { align-items: flex-start; }
  .cx-card { flex: 0 0 86%; scroll-snap-align: start; }
  .cx-c-ph { flex: none; min-height: 0; height: 128px; }
  .cx-card.cx-picking { flex-basis: 94%; }
  .cx-g-list { grid-template-columns: minmax(0, 1fr); }
  .cx-g-tiles { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .cx-o-t b, .cx-c-sum span, .cx .vc-sub, .cx-sl-d, .cx-sl-need, .cx-rc-q, .cx-how li, .cx-kv { font-size: 16px; }
  .cx-o-t small { font-size: 13px; }
  .cx .vc-answer { font-size: 20px; }
  .cx-slot { grid-template-columns: 64px minmax(0, 1fr); row-gap: 6px; padding: 12px 14px; }
  .cx-sl-k { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; }
  .cx-sl-ref { margin: 0; }
  .cx-slot .cx-th { width: 64px; height: 48px; }
  .cx-sl-v { font-size: 16px; }
  .cx-sh-h, .cx-res, .cx-acts { padding-left: 14px; padding-right: 14px; }
  .cx-verd { padding: 0 14px; }
  .cx-acts [data-cx="copy"], .cx-acts [data-cx="print"] { display: none; }
  .cx-alt { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "th v use" "th s use"; row-gap: 2px; padding: 6px 10px; }
  .cx-alt .cx-th { grid-area: th; width: 60px; }
  .cx-alt-v { grid-area: v; font-size: 15px; }
  .cx-alt-s { grid-area: s; font-size: 14px; }
  .cx-alt-l { display: none; }
  .cx-use { grid-area: use; }
  .cx-alt-h { flex-wrap: wrap; }
  .cx-alt-m { margin-left: 0; width: 100%; text-align: left; }
  .cx-try { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .cx-ex { flex: none; font-size: 14px !important; }
  .cx-keys { display: none; }
  .cx-mbar { display: flex; position: sticky; bottom: 0; z-index: 20; gap: 10px; margin-top: 16px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
  .cx-mbar .cx-btn { flex: 1; font-size: 16px !important; }
}
/* ---- 01-engine.css ---- */
/* engine 2: units in the title bar, folded Details, live plan (dimensions as buttons, handles),
   repeatable groups (Add …, Remove) and the unit after a number field. Brand tokens only. */
.cx-uw { display: flex; align-items: center; gap: 8px; margin-right: 8px; }
.cx-uw:empty { display: none; }
.cx .cx-seg { width: auto; padding: 3px; gap: 2px; }
.cx .cx-seg button { flex: none; min-width: 44px; min-height: 36px; padding: 0 8px; font: 500 12.5px/1 var(--mono); }

.cx-more { border-top: 1px solid var(--line); }
.cx-more > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.cx-more > summary::-webkit-details-marker { display: none; }
.cx-more > summary::before { content: ""; width: 6px; height: 6px; margin: 0 2px 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.cx-more[open] > summary::before { transform: rotate(45deg); margin-bottom: 4px; }
.cx-more > summary:hover { color: var(--ink); }
.cx-more > :not(summary):not(:empty) { margin-top: 14px; }
.cx-more[open] { padding-bottom: 8px; }

.cx-plan .d-ref { cursor: pointer; }
.cx-plan .d-ref:hover text, .cx-plan .d-ref:focus-visible text { fill: var(--accent-ink); }
.cx-plan .d-ref:focus-visible, .cx-plan .d-hdl:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.cx-plan .d-hdl { cursor: grab; touch-action: none; }
.cx-plan .d-hdl:hover .d-hdl-k, .cx-plan .d-hdl:focus-visible .d-hdl-k { stroke: var(--accent-ink); stroke-width: 2.2; }
.cx-plan.d-dragging, .cx-plan.d-dragging .d-hdl { cursor: grabbing; }
.cx-plan.d-dragging { user-select: none; }

.cx-add { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg, 12px); background: var(--bg); font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.cx-add:hover { border-color: var(--ink); color: var(--ink); }
.cx-del { margin-left: auto; }
.cx-num-u { align-self: center; padding: 0 6px; font: 500 12px/1 var(--mono); color: var(--muted); }

@container (max-width: 640px) {
  .cx-tbar { flex-wrap: wrap; row-gap: 0; }
  .cx-tt { min-width: 0; }
  .cx-tools { margin-left: auto; }
  .cx-uw { margin-right: 2px; gap: 4px; }
  .cx .cx-seg button { min-width: 40px; padding: 0 6px; }
}
/* ---- 02-engine3.css ---- */
/* Motor 3 (07-11): the plan in a full-width band on desktop, compact cards, the checks of the sheet */
/* the plan: a band under the board while the board has two columns (X.placePlan moves it); drawn as big as it reads */
.cx-band { margin-top: 20px; }
.cx-band[hidden] { display: none; }
.cx-band .cx-plan { margin: 0; padding: 14px; }
.cx-band .cx-plan svg { width: min(100%, max(960px, calc(var(--cx-ar, 1.6) * 660px))); margin: 0 auto; }
@media print { .cx-plan .d-hdl { display: none !important; } }

/* desktop board: the sheet keeps the right column; the other choices go under the cards when that keeps the
   two columns closer in height (X.placePlan sets cx-alts-r otherwise); a last flexible row takes what is left */
@container (min-width: 961px) {
  .cx-board:not(.cx-alts-r) { grid-template-areas: "cards sheet" "alts sheet" "recent sheet" "how sheet" ". sheet"; grid-template-rows: auto auto auto auto 1fr; row-gap: 20px; }
  .cx-board:not(.cx-alts-r) > .cx-left, .cx-board:not(.cx-alts-r) > .cx-right { display: contents; }
  .cx-board:not(.cx-alts-r) .cx-cards { grid-area: cards; }
  .cx-board:not(.cx-alts-r) .cx-alts { grid-area: alts; }
  .cx-board:not(.cx-alts-r) .cx-recent { grid-area: recent; }
  .cx-board:not(.cx-alts-r) .cx-howw { grid-area: how; }
  .cx-board:not(.cx-alts-r) .cx-sheet { grid-area: sheet; }
  .cx-btn.cx-pri { flex: 1 1 auto; }
  /* the result follows the cards while it fits the screen (X.placePlan sets cx-stick) */
  .cx-stick:not(.cx-alts-r) .cx-sheet, .cx-stick.cx-alts-r > .cx-right { position: sticky; top: calc(var(--header-h, 60px) + 16px); }
}

/* cards: as tall as their content; the value leads, the picture is a thumbnail at its left */
.cx-cards { align-items: start; }
.cx-cards > .cx-add { align-self: start; min-height: 44px; }
/* packed (X.pack): 1 px rows, each card spans its own height, the 14 px gap is in the spans */
.cx-cards.cx-pack { grid-auto-rows: 1px; row-gap: 0; }
/* «+ Add …» at the foot of the group's last card */
.cx-c-add { grid-column: 1 / -1; margin-top: 12px; }
.cx-c-add .cx-add { width: 100%; min-height: 40px; }
/* a single word or number stays on one line; labels give way to the value */
.cx-nb { white-space: nowrap; }
.cx-c-pn { overflow-wrap: break-word; }
.cx-c-pn.cx-nb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cx-c-pn.cx-long { font-size: 14.5px; }
.cx-kv { grid-template-columns: minmax(min-content, 1fr) minmax(min-content, max-content); }
.cx-kv dt { overflow-wrap: normal; }
.cx-kv dd { overflow-wrap: break-word; }
@container (min-width: 641px) {
  .cx-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  /* a card of several controls across the whole row, its controls side by side */
  .cx-card.cx-wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--cx-n, 2), minmax(0, 1fr)); column-gap: 20px; align-items: start; }
  .cx-card.cx-wide > :not(.cx-c-k) { grid-column: 1 / -1; }
  .cx-card.cx-wide > .cx-c-k + .cx-c-k { margin-top: 0; }
  .cx-card.cx-wide > .cx-c-k .cx-g { margin-top: 0; }
  .cx-card.cx-wide .cx-g-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .cx-card:not(.cx-picking):not(.cx-always) { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "h h" "ph v" "ph kv"; grid-template-rows: auto auto 1fr; column-gap: 12px; }
  .cx-card:not(.cx-picking):not(.cx-always) > .cx-c-h { grid-area: h; }
  .cx-card:not(.cx-picking):not(.cx-always) > .cx-c-ph { grid-area: ph; align-self: start; }
  .cx-card:not(.cx-picking):not(.cx-always) > .cx-c-v { grid-area: v; margin-top: 10px; }
  .cx-card:not(.cx-picking):not(.cx-always) > .cx-kv { grid-area: kv; margin-top: 6px; }
  .cx-c-ph { flex: none; min-height: 0; width: 52px; height: 52px; margin-top: 10px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .cx-c-ph img { max-height: 44px; }
  .cx-c-ph svg { max-height: 44px; }
}

/* the checks of the sheet (sheet.checks): label and word always written, the tone only adds to them */
.cx-cks { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.cx-ck { font: 500 11.5px/1.3 var(--mono); padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); background: var(--bg); }
.cx-ck b { font-weight: 700; color: var(--ink); }
.cx-ck-ok { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.cx-ck-warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.cx-ck-bad { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.cx-ck-none { border-style: dashed; }
.cx-ck-why { margin: 5px 0 0; font-size: 12.5px; line-height: 17px; color: var(--text-2); }
.cx-ck-why.cx-ck-bad { color: var(--bad); }
@container (max-width: 640px) { .cx-ck { font-size: 13px; } .cx-ck-why { font-size: 15px; line-height: 21px; } }

/* the sheet's slots: a part number keeps its line, «Change» moves under it when the column is narrow (1024) */
.cx-sl-top { flex-wrap: wrap; row-gap: 2px; }
.cx-sl-v { overflow-wrap: break-word; }

/* glyph tiles (no photo) from tablet up: the glyph at the left, the size and its count at the right, rows of
   <= 56 px, 4 to a row at 1400 (Blanks stock, Bend shape); photo tiles keep their picture on top; the phone as it was */
@container (min-width: 641px) {
  .cx-g-tiles:not(:has(img)) { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .cx-g-tiles:not(:has(img)) .cx-tiles { flex-direction: row; align-items: center; gap: 6px; padding: 5px 6px; text-align: left; }
  .cx-g-tiles:not(:has(img)) .cx-th { width: 32px; height: 32px; }
  .cx-g-tiles:not(:has(img)) .cx-o-t { align-items: flex-start; min-width: 0; }
  .cx-g-tiles:not(:has(img)) .cx-o-t small { line-height: 1.2; }
}
/* Recent: no empty picture box when the job has no picture; on a phone the result may take two lines */
.cx-rc-tx:first-child { padding-left: 6px; }
/* phone: the strip is as tall as the card in view (X.strip sets its height) */
@container (max-width: 640px) {
  .cx-cards { box-sizing: border-box; overflow-y: hidden; transition: height .2s; }
  .cx-rc-r b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* ---- 03-fields.css ---- */
/* Console fields (ext/fields.js, 11-11): action buttons of a card or of the sheet, date and time, free text
   and an editable table. The buttons were the prepreg out-time ones (10-prepreg-out-time.css). */
.cx-lg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cx-lg .cx-btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
.cx-lg .cx-btn[disabled] { opacity: .45; cursor: default; }
.cx-lg .cx-btn.cx-gh { border-color: transparent !important; color: var(--accent-ink, #4A52D6) !important; padding: 0 8px !important; }
.cx-tx { width: 100%; min-height: 40px; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); font: 500 14px/1.35 var(--font); color: var(--ink); }
textarea.cx-tx { min-height: 88px; resize: vertical; font-family: var(--mono, "JetBrains Mono", monospace); font-size: 13px; }
.cx-tx-n { text-align: right; font-family: var(--mono, "JetBrains Mono", monospace); }
.cx-tx:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.cx-tw { max-width: 100%; overflow-x: auto; margin-top: 4px; }
.cx-tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.cx-tb th { text-align: left; padding: 6px 4px; background: var(--ink); color: #fff; font-weight: 600; }
.cx-tb th:first-child { border-radius: 6px 0 0 0; }
.cx-tb th:last-child { border-radius: 0 6px 0 0; }
.cx-tb td { padding: 4px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.cx-tb .num { text-align: right; }
.cx-tb .cx-tx { min-height: 34px; padding: 6px 8px; font-size: 13px; }
.cx-sheet-b > .cx-lg { margin-top: 10px; }
/* ---- 04-hx.css ---- */
/* Style H on the console (def.hxc, Sheet.HX.layer): inputs in compact rows; the result is the H band and the numbered tables,
   so the sheet, the other choices, the Details fold and the phone's bottom bar give way (their text stays in the page). */
.cx.cx-h .cx-tt, .cx.cx-h .cx-mbar, .cx.cx-h .cx-more, .cx.cx-h .cx-hint, .cx.cx-h .cx-kt { display: none; }
.cx.cx-h .cx-tbar { border-bottom: 0; margin-bottom: 8px; justify-content: flex-end; min-height: 0; }
.cx.cx-h .cx-board:not(.cx-alts-r), .cx.cx-h .cx-board { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 10px; }
.cx.cx-h .cx-board > * , .cx.cx-h .cx-left > * { min-width: 0; max-width: 100%; }
.cx.cx-h .cx-left { display: contents; }
.cx.cx-h .cx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cx.cx-h .cx-bar { border-width: 2px; border-radius: var(--radius); min-height: 46px; }
.cx.cx-h .cx-bar:focus-within { border-color: var(--accent); }
.cx.cx-h .cx-in, .cx.cx-h .cx-mirror { font-family: var(--mono); font-size: 18px; font-weight: 500; }
.cx.cx-h .cx-barw.hx-miss .cx-bar { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(154, 91, 0, .22); }
.cx.cx-h .cx-barw .hx-miss-t { margin: 6px 0 0; font-size: 12px; color: var(--warn); }
.cx.cx-h .cx-und { margin-top: 6px; }
.cx.cx-h .ph-list { display: none; }
.cx.cx-h .cx-right { display: block; height: 0; margin: -10px 0 0; padding: 0; border: 0; overflow: hidden; visibility: hidden; }   /* QA 14-11: its buttons (Download PDF…) sat under the H tables, clickable by nobody yet reachable by Tab */
/* 10-11: tighter H console, no gaps that say nothing: Recent and Try share one line */
.cx.cx-h .cx-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cx.cx-h .cx-rcl:not(:empty) { flex: 1 1 380px; min-width: 0; }
.cx.cx-h .cx-rcl:empty { display: none; }
.cx.cx-h .cx-try { margin-top: 0; }
.cx.cx-h .cx-rc { min-height: 0; padding: 6px 12px 6px 10px !important; }
.cx.cx-h .cx-rc-h { margin-bottom: 6px; }
.cx.cx-h .cx-rc-r { margin-top: 2px; }
@container (min-width: 641px) { .cx.cx-h .cx-ex { min-height: 36px; } }

/* missing data (13-11): a very thin warn hairline on the cards whose fields the result still needs, only once something is entered */
.cx.cx-h .cx-card.cx-need { outline: 1px solid rgba(154, 91, 0, .42); outline-offset: -1px; }

/* the drawing in sight while the data goes in. .hx-aside (Sheet.HX.paint) holds the result band and a live
   miniature of the plan (the same SVG, cloned on every redraw). From 1100 px it is a column at the right of the cards, sticky while
   it fits the screen (.hx-stk), and it ends with the board, so it never covers the full drawing or the tables under it. Narrower:
   above the cards, not sticky (the phone's input bar is the sticky one). The miniature opens the full drawing below. */
.cx.cx-h .hx-aside { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cx.cx-h .hx-aside > .hx-layer { margin-top: 0; }
.hx-mini { display: block; width: 100%; min-width: 0; padding: 6px 8px 4px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); text-align: left; cursor: pointer; }
.hx-mini[hidden] { display: none; }
.hx-mini:hover { border-color: var(--line-2); }
.hx-mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hx-mini-d { display: block; }
.hx-mini-d svg { display: block; width: 100%; height: auto; max-height: 150px; margin: 0 auto; pointer-events: none; }
.hx-mini-d .d-hdl, .hx-mini-d .vc-dwg-x { display: none; }
.hx-mini-l { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.hx-mini-l span + span { color: var(--accent-ink); }
.cx.cx-h .cx-band { scroll-margin-top: calc(var(--header-h, 60px) + 12px); }
@media (max-width: 1099px) { .hx-mini-d svg { max-height: 150px; } }
@media (min-width: 1100px) {
  .vc.cx.cx-h .cx-board.hx-two { flex-direction: row; align-items: flex-start; column-gap: 18px; }
  .vc.cx.cx-h .cx-board.hx-two > .cx-left { display: flex; flex-direction: column; gap: 10px; flex: 1 1 0; min-width: 0; order: 1; }
  .vc.cx.cx-h .cx-board.hx-two > .hx-aside { order: 2; flex: 0 0 clamp(320px, 32%, 372px); }
  .vc.cx.cx-h .cx-board.hx-two > .hx-aside.hx-stk { position: sticky; top: calc(var(--header-h, 60px) + 12px); }
  .vc.cx.cx-h .cx-board.hx-two { position: relative; }
  /* the console's own sheet (out of sight, kept for the tests and the PDF) keeps the board's width, out of the row */
  .vc.cx.cx-h .cx-board.hx-two > .cx-right { position: absolute; left: 0; right: 0; top: 0; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .hx-mini { transition: none; } }
/* ---- 05-compact.css ---- */
/* a compact console, in the kit and never page by page. Tighter cards, labels and gaps on every pointer;
   smaller controls (34-38 px) only with a fine pointer, finger targets keep their 44 px. Never `gap` on .cx-cards (1 px pack rows). */
.cx.cx-h .cx-tbar { margin-bottom: 6px; }
.cx.cx-h .cx-und { margin-top: 6px; min-height: 28px; }
.cx.cx-h .cx-board { margin-top: 8px; }
.cx.cx-h .cx-cards { column-gap: 10px; }
.cx.cx-h .cx-card { padding: 8px 10px; }
.cx.cx-h .cx-c-h { min-height: 18px; }
.cx.cx-h .cx-c-kl { margin: 5px 0 3px; }
.cx.cx-h .cx-card > .cx-c-k:first-of-type .cx-g { margin-top: 6px; }
.cx.cx-h .cx-chips { gap: 4px; margin-top: 4px; }
.cx.cx-h .cx-g { gap: 6px; }
.cx.cx-h .cx-c-add { margin-top: 8px; }
.cx.cx-h .cx-num-n { margin-top: 4px; }
/* label and stepper on one row when they fit; the chips and the note go under them */
.cx.cx-h .cx-c-k:has(> .cx-num) { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.cx.cx-h .cx-c-k:has(> .cx-num) > .cx-c-kl { margin: 4px 0; }
.cx.cx-h .cx-c-k:has(> .cx-num) > :not(.cx-c-kl):not(.cx-num):not(.cx-chips) { flex: 1 0 100%; }
/* the quick values share the row with the stepper when they fit (a lone standard value is a small chip, not a block under it) */
.cx.cx-h .cx-c-k:has(> .cx-num) > .cx-chips { flex: 1 1 auto; margin-top: 0; }
/* a segmented control takes its label's row when it fits: label and control on one line */
.cx.cx-h .cx-c-k:has(> .cx-g-seg) { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.cx.cx-h .cx-c-k:has(> .cx-g-seg) > .cx-c-kl { margin: 3px 0; }
/* a list of a few options fills its row: no empty tracks beside it */
.cx.cx-h .cx-card.cx-wide .cx-g-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cx.cx-h .cx-band { margin-top: 12px; }
.cx.cx-h .cx-band .cx-plan { padding: 10px; }
/* a card that X.pack stretches a few px to square its column: its parts spread out, no hollow foot */
.cx.cx-h .cx-card.cx-str { align-self: stretch; justify-content: space-between; }
/* the result column: the same tight rhythm as the cards */
.cx.cx-h .hx-aside { gap: 6px; }
.cx.cx-h .hx-aside .vc-result.hx-band { padding: 8px 12px 8px 16px; gap: 6px 14px; }
.cx.cx-h .hx-aside .hx-say { gap: 3px; }
.cx.cx-h .hx-aside .hx-kd { gap: 1px 12px; line-height: 1.3; }
.cx.cx-h .hx-aside .hx-side { gap: 6px; }
.cx.cx-h .hx-mini { padding: 4px 8px 3px; }
.cx.cx-h .hx-mini-d svg { max-height: 140px; }
.cx.cx-h .hx-aside .hx-tag { line-height: 1.2; }
.cx.cx-h .hx-aside .hx-box { margin: 0; }
@media (max-width: 1099px) { .cx.cx-h .hx-mini-d svg { max-height: min(16vh, 130px); } }
/* phone: a strip of at most 12 % of the screen, its label laid over the corner; it adds no sticky layer and little height */
@media (max-width: 699px) {
  .cx.cx-h .hx-mini { position: relative; padding: 3px 6px; }
  .cx.cx-h .hx-mini-d svg { max-height: min(11vh, 92px); }
  .cx.cx-h .hx-mini-l { position: absolute; right: 8px; bottom: 6px; margin: 0; padding: 1px 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .cx.cx-h .hx-mini-l span:first-child { display: none; }
  .cx.cx-h .cx-board { gap: 8px; margin-top: 6px; }
  .cx.cx-h .cx-tbar { margin-bottom: 2px; }
  .cx.cx-h .cx-und { margin-top: 4px; }
  .cx.cx-h .cx-recent { gap: 4px 12px; }
  .cx.cx-h .cx-rc { padding: 4px 10px 4px 8px !important; }
}
@media (pointer: fine) {
  .cx.cx-h .cx-num-in { padding: 0 6px; }
  @supports (field-sizing: content) { .cx.cx-h .cx-num .cx-num-in { field-sizing: content; width: auto; min-width: 46px; max-width: 120px; } }
  .cx.cx-h .cx-card .cx-g-list:not(:has(small)), .cx.cx-h .cx-card .cx-g-list:has(.cx-o:nth-child(4)) { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .cx.cx-h .cx-always .cx-o:has(small) { min-height: 44px; }
  .cx.cx-h .cx-tbar { min-height: 34px; }
  .cx.cx-h .cx-ghost { min-height: 34px; }
  .cx.cx-h .cx-seg button { min-height: 28px; min-width: 38px; }
  .cx.cx-h .cx-bar { min-height: 40px; }
  .cx.cx-h .cx-run { width: 36px; height: 36px; }
  .cx.cx-h .cx-tok { min-height: 26px; }
  .cx.cx-h .cx-stp { width: 32px; min-height: 32px; font-size: 16px !important; }
  .cx.cx-h .cx-num-in { width: 64px; font-size: 15px; }
  .cx.cx-h .cx-num-u { padding: 0 5px; font-size: 11.5px; }
  .cx.cx-h .cx-chip { min-height: 24px; padding: 0 8px !important; font-size: 12px !important; }
  .cx.cx-h .cx-o { min-height: 32px; padding: 3px 10px 3px 8px; }
  .cx.cx-h .cx-always .cx-o { min-height: 34px; }
  .cx.cx-h .cx-add, .cx.cx-h .cx-c-add .cx-add, .cx.cx-h .cx-cards > .cx-add { min-height: 32px; }
  .cx.cx-h .cx-ex { min-height: 30px; }
  .cx.cx-h .cx-chg { min-height: 30px; margin: -6px -8px; }
}

/* the toolbar (units, reset) sits on the row of the entry bar's chips, at its right: one row less above the data. Not on a phone (sticky bar). */
@media (min-width: 700px) {
  .cx.cx-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
  .cx.cx-h > * { grid-column: 1 / -1; min-width: 0; }
  .cx.cx-h > .cx-barw { display: contents; }
  .cx.cx-h .cx-barw > * { grid-column: 1 / -1; }
  .cx.cx-h .cx-bar { grid-row: 1; }
  .cx.cx-h .cx-barw > .hx-miss-t { grid-row: 3; }
  .cx.cx-h .cx-barw > .cx-und { grid-column: 1; grid-row: 2; }
  .cx.cx-h > .cx-tbar { grid-column: 2; grid-row: 2; margin: 6px 0 0; align-self: center; }
}
/* ---- 10-bolt-grip.css ---- */
/* Bolt grip: the bolt part number in the answer line stays in one piece (AN4-7 broke at its hyphen on a phone) */
.cx-sheet .vc-sub a { white-space: nowrap; }
/* ---- 10-cherry-pulling-head.css ---- */
/* Cherry pulling head (07-11 tarde): the verdict band at the top of the sheet (it rides in sheet.sub).
   WORKS green, DOESN'T WORK red, NOT LISTED grey, what is still missing in a dashed band; always in words,
   the word on a rectangular label. The kit's status word («Waiting for inputs», «Within limits») and the
   verdict box under the slots stay in the page for the PDF and the tests: the band says it at the top.
   On a phone the bottom bar repeats the verdict, so it is read without opening the sheet. */
#ph-sheet .cx .cx-sh-h { position: relative; }
#ph-sheet .cx .cx-sh-h > div:first-child { flex: 1 1 auto; min-width: 0; }
#ph-sheet .cx .cx-sh-st { position: absolute; top: 13px; right: 18px; }
#ph-sheet .cx .cx-sh-t { padding-right: 128px; }
#ph-sheet .cx .vc-status, #ph-sheet .cx .cx-verd { height: 0; margin: 0; padding: 0; border: 0; overflow: hidden; }
.phv { display: block; margin: 10px 0 2px; padding: 11px 13px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text-2); font: 400 13.5px/19px var(--font); }
.phv-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.phv-w { font: 700 12px/1 var(--mono); letter-spacing: .04em; padding: 5px 7px 4px; border-radius: 6px; color: #FFFFFF; background: var(--muted); white-space: nowrap; }
.phv-t { font: 600 15px/20px var(--mono); color: var(--ink, #121413); }
.phv-n { white-space: nowrap; }
.phv-y { display: block; margin-top: 6px; }
.phv .phv-fix { margin-top: 10px; }
.phv-ok { border-color: var(--ok); background: var(--ok-soft); }
.phv-ok .phv-w { background: var(--ok); }
.phv-bad { border-color: var(--bad); background: var(--bad-soft); }
.phv-bad .phv-w { background: var(--bad); }
.phv-nl { background: var(--bg-2); }
.phv-need { border-style: dashed; background: transparent; }
.phv-need .phv-t { font: 500 14px/20px var(--font); color: var(--text-2); }
.phv-mb { display: none; }
@container (max-width: 640px) {
  #ph-sheet .cx .cx-sh-st { right: 14px; }
  #ph-sheet .cx .cx-mbar { flex-wrap: wrap; }
  .phv { font-size: 15px; line-height: 21px; }
  .phv-mb:not([hidden]) { display: flex; align-items: center; gap: 8px; flex: 1 0 100%; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--ink, #121413); font: 600 14px/18px var(--mono); text-align: left; cursor: pointer; }
  .phv-mb b { flex: none; font: 700 12px/1 var(--mono); letter-spacing: .04em; padding: 5px 7px 4px; border-radius: 6px; color: #FFFFFF; background: var(--muted); }
  .phv-mt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .phv-mb.phv-ok { border-color: var(--ok); background: var(--ok-soft); }
  .phv-mb.phv-ok b { background: var(--ok); }
  .phv-mb.phv-bad { border-color: var(--bad); background: var(--bad-soft); }
  .phv-mb.phv-bad b { background: var(--bad); }
  .phv-mb.phv-nl { background: var(--bg-2); }
  .phv-mb.phv-need { border-style: dashed; font: 500 14px/18px var(--font); color: var(--text-2); }
}
/* 07-11 noche: a choice taken under «Doesn't fit» shows as the chosen one; a word the bar overrode says why on screen;
   after the one-tap fix the focus lands on the new band */
#ph-sheet .cx-o-off[aria-pressed="true"] { border: 1px solid var(--ink, #121413); }
/* 09-11: the three columns of the Rivet card (Fastener, Diameter, Grip dash) are narrower than the 240 px the Fastener list asked for, so its
   buttons ran under the Diameter column: the list keeps to its column (the label wraps) and the Grip field shrinks with its column */
@container (min-width: 641px) {
  #ph-sheet .cx-card.cx-wide > .cx-c-k { min-width: 0; }
  #ph-sheet .cx-card.cx-wide .cx-g-list { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
  #ph-sheet .cx-card.cx-wide .cx-num { max-width: 100%; }
  #ph-sheet .cx-card.cx-wide .cx-num-in { flex: 0 1 76px; min-width: 0; }
}
/* 09-11: «Doesn't fit» names the heads that do not work in a small grey list right under the label, in the label's own type (name or P/N only);
   the fold keeps the heads as buttons with their reason, so the list hides while it is open */
#ph-sheet .phx-offl { display: flex; flex-wrap: wrap; gap: 0 14px; margin: -6px 0 8px; padding: 0; list-style: none; font-size: 12px; font-weight: 400; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
#ph-sheet .cx-off[open] + .phx-offl { display: none; }
#ph-sheet .cx-tok-x .phx-why { font-weight: 400; }
.phv:focus { outline: 2px solid var(--ink, #121413); outline-offset: 2px; }
.phv:focus:not(:focus-visible) { outline: none; }
/* the one-tap button wraps on a phone: «Nearest documented: SST -6 · H701B-456 on the G84» must not push the page wider */
.phv .phv-fix { max-width: 100%; height: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; white-space: normal; text-align: left; line-height: 1.3; overflow-wrap: break-word; }
/* ---- 10-edge-distance.css ---- */
/* edge-distance on the console: a tighter result sheet so the board's two columns end together (desktop only) */
@media (min-width: 961px) {
  #ed-sheet .cx-slot { min-height: 62px; padding: 6px 18px; }
  #ed-sheet .cx-slot .cx-th { height: 44px; }
}
/* 10-11: Rivet, Head and Measured hole stand the same height, so they share one row */
@media (min-width: 961px) { #ed-sheet .cx.cx-h .cx-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* ---- 10-kit-weight.css ---- */
/* Kit weight: the suitcase table in its card (console-fields table): part numbers on one line, a narrow quantity, a small remove cross. */
[data-card=bag] .cx-tb { font-size: 12.5px; }
[data-card=bag] .cx-tb td:first-child { white-space: nowrap; }
[data-card=bag] .cx-tb th, [data-card=bag] .cx-tb td { padding-left: 4px; padding-right: 4px; }
[data-card=bag] .cx-tb .cx-tx-n { width: 56px; padding: 6px 6px; }
[data-card=bag] .cx-tb .cx-btn { min-height: 30px; min-width: 30px; padding: 0 6px; font-size: 12px; }
/* ---- 10-pot-life.css ---- */
/* 10-11: Pot life, Mixed at and Warn at share one row on the desktop. Mixed at gets the width for its three time chips on one line,
   so it stands as tall as Pot life, and the short Warn at keeps to its content */
@media (min-width: 961px) {
  #pl-sheet .cx.cx-h .cx-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, .7fr); grid-auto-rows: auto !important; align-items: start; }
  #pl-sheet .cx.cx-h .cx-cards > .cx-card { grid-row: auto !important; grid-column: auto !important; }
}
/* ---- 10-prepreg-out-time.css ---- */
/* 10-11: the three limits share one row, the freezer card takes the width under them (no holes) */
@media (min-width: 961px) {
  #ot-sheet .cx.cx-h .cx-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto !important; align-items: start; }
  #ot-sheet .cx.cx-h .cx-cards > .cx-card { grid-row: auto !important; grid-column: auto !important; }
  #ot-sheet .cx.cx-h .cx-cards > [data-card=log] { grid-column: 1 / -1 !important; }
}
/* ---- 10-repair-order-bom.css ---- */
/* Repair order list on engine 3: each line of the table card is a small form that fits a card column. */
.cx [data-card=list] .cx-tb { table-layout: fixed; width: 100%; }
.cx [data-card=list] .cx-tb td { padding: 4px 2px; vertical-align: top; }
.cx-ln-h { display: flex; align-items: center; gap: 6px; }
.cx-ln-h b { flex: 0 0 18px; font: 600 12px var(--mono, monospace); color: var(--mut, #5A615D); }
.cx-ln-h .cx-tx { flex: 1 1 auto; min-width: 0; }
.cx-ln-h .cx-btn { flex: 0 0 auto; min-height: 34px; min-width: 34px; padding: 0 8px; }
.cx-ln-h .cx-ln-o { flex: 0 0 auto; min-width: 44px; text-align: right; }
.cx-ln-o b { font: 700 15px var(--mono, monospace); color: var(--ink); }
.cx-bn { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 2px 0 0 24px; font-size: 12px; line-height: 1.3; color: var(--mut, #5A615D); }
.cx-ln-f { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 5px 0 0 24px; }
.cx-ln-f label { position: relative; display: block; }
.cx-ln-f label span { position: absolute; left: 8px; top: 4px; font-size: 10px; line-height: 1; color: var(--mut, #5A615D); pointer-events: none; }
.cx-ln-f .cx-tx { min-width: 0; height: 40px; padding: 14px 6px 2px; }
.cx-det { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink-2, var(--ink)); }
@media (pointer: fine) { .cx-ln-f .cx-tx { height: 34px; padding-top: 12px; } .cx-ln-f { margin-top: 3px; } .cx-ln-h .cx-btn { min-height: 30px; min-width: 30px; } }
/* ---- 10-rivet-length.css ---- */
/* rivet-length on the console: a tighter result sheet so the board's two columns end together (desktop only) */
@media (min-width: 961px) {
  #rl-sheet .cx-slot { min-height: 62px; padding: 6px 18px; }
  #rl-sheet .cx-slot .cx-th { height: 44px; }
}
/* ---- 10-rivet-shop-head.css ---- */
/* rivet-shop-head on the console: a tighter result sheet so the board's two columns end together (desktop only) */
@media (min-width: 961px) {
  #sh-sheet .cx-slot { min-height: 62px; padding: 6px 18px; }
  #sh-sheet .cx-slot .cx-th { height: 44px; }
}
/* ---- 10-rivet-spacing.css ---- */
/* rivet-spacing on the console: a tighter result sheet so the board's two columns end together (desktop only) */
@media (min-width: 961px) {
  #sp-sheet .cx-slot { min-height: 62px; padding: 6px 18px; }
  #sp-sheet .cx-slot .cx-th { height: 44px; }
}
/* ---- 10-rivet-strength.css ---- */
/* rivet-strength on the console: a tighter result sheet so the board's two columns end together (desktop only) */
@media (min-width: 961px) {
  #rs-sheet .cx-slot { min-height: 62px; padding: 6px 18px; }
  #rs-sheet .cx-slot .cx-th { height: 44px; }
}
