/* HMF look, measured from hmf.dk: logo red #D0101E, blue #00508F, footer grey #575756,
   ink #141A1F, Source Sans, bold uppercase navigation. Industrial, flat, photo-forward. */
:root {
  --red: #d0101e;
  --red-dark: #a50c17;
  --blue: #00508f;
  --ink: #141a1f;
  --grey: #575756;
  --grey-2: #858584;
  --line: #d9dcdf;
  --line-2: #eceef0;
  --paper: #ffffff;
  --plane: #f4f5f6;
  --stage: #e6e8ea;
  --ok: #1f7a3d;
  --chat-w: clamp(360px, 30vw, 500px);
  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 4px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--stage); color: var(--ink); font-family: var(--font); font-size: 15px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.app { position: fixed; inset: 0; display: grid; grid-template-columns: var(--chat-w) 1fr; overflow: hidden; }

/* ---------- stage ---------- */
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.env-label { font: 600 12px/1 var(--font); color: var(--red-dark); background: rgba(255,255,255,.88); padding: 4px 7px; border-radius: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.env-label.strong { background: var(--red); color: #fff; font-size: 13px; padding: 5px 9px; }
.env-label.jib { color: var(--blue); }

.brandbar { position: absolute; top: 20px; left: 24px; display: flex; align-items: center; gap: 14px; pointer-events: none; }


.stage-tools { position: absolute; top: 20px; right: 20px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.seg { display: inline-flex; background: rgba(255,255,255,.94); border-radius: var(--r); padding: 3px; box-shadow: 0 1px 3px rgba(20,26,31,.08); }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 3px; font-weight: 600; font-size: 13px; color: var(--grey); white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }
.chip-toggle { display: inline-flex; align-items: center; gap: 7px; border: 0; background: rgba(255,255,255,.94); padding: 9px 12px; border-radius: var(--r); font-weight: 600; font-size: 13px; color: var(--grey); box-shadow: 0 1px 3px rgba(20,26,31,.08); }
.chip-toggle svg { width: 18px; height: 18px; }
.chip-toggle[aria-pressed="true"] { background: var(--red); color: #fff; }
.status-line { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); font-size: 13px; color: var(--grey); background: rgba(255,255,255,.9); padding: 6px 12px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.status-line.on { opacity: 1; }

/* ---------- popup sections (model, more) ---------- */

.sec { padding: 22px 24px 20px; border-bottom: 1px solid var(--line-2); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-title { font: 700 13px/1.1 var(--font); text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.sec-note { font-size: 12.5px; color: var(--grey-2); }
.question { font-size: 14px; color: var(--grey); margin: -4px 0 12px; }

/* type chips */
.types { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { position: relative; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r); padding: 8px 11px; font-size: 13.5px; font-weight: 600; text-align: left; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--grey-2); }
.opt.is-selected { border-color: var(--red); background: var(--red); color: #fff; }
.opt.is-default { border-style: dashed; border-color: var(--grey-2); }
.opt.is-blocked { color: #a9adb1; background: var(--plane); border-color: var(--line-2); }
.opt.is-blocked:hover { border-color: var(--line); }
.opt .tag { display: inline-block; font: 700 9.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; margin-left: 6px; padding: 3px 4px 2px; border-radius: 2px; background: var(--line-2); color: var(--grey); vertical-align: 1px; }
.opt.is-selected .tag { background: rgba(255,255,255,.22); color: #fff; }
.pending { opacity: .65; }

/* family cards */
.more { margin-top: 10px; border: 0; background: none; color: var(--grey); font-weight: 600; font-size: 13px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.filter { display: flex; gap: 6px; margin-bottom: 10px; }
.filter input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; font: inherit; font-size: 14px; }

/* extensions */
.ext-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ext-seg button { border: 0; border-right: 1px solid var(--line); background: var(--paper); padding: 9px 2px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.ext-seg button:last-child { border-right: 0; }
.ext-seg .n { font: 700 17px/1 var(--font); font-variant-numeric: tabular-nums; }
.ext-seg .r { font-size: 11.5px; color: var(--grey); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ext-seg button.is-selected { background: var(--red); color: #fff; }
.ext-seg button.is-selected .r { color: rgba(255,255,255,.85); }
.ext-seg button.is-default { box-shadow: inset 0 -3px 0 var(--grey-2); }
.ext-seg button.is-blocked { color: #b5b9bd; background: var(--plane); }
.ext-cap { margin-top: 8px; font-size: 12.5px; color: var(--grey); }

/* options */
.mod { margin-bottom: 16px; }
.mod:last-child { margin-bottom: 0; }
.mod-name { font: 600 14px/1.2 var(--font); margin-bottom: 7px; display: flex; justify-content: space-between; gap: 8px; }
.mod-name .held { font-weight: 400; color: var(--grey); font-size: 13px; text-align: right; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sw { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); padding: 0; background: var(--c); }
.sw.special { background: conic-gradient(#a72920, #e5b300, #2f7d32, #063971, #6b2a7d, #a72920); }
.sw.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--red); }
.sw.is-default { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--grey-2); outline: 1px dashed transparent; }
.sw.is-blocked { opacity: .3; }
.special-tag { font: 700 10px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; background: var(--plane); color: var(--grey); padding: 4px 6px; border-radius: 2px; }

/* specs */
.specs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.specs th { text-align: left; font-weight: 400; color: var(--grey); padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.specs td { text-align: right; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.chart { display: grid; gap: 3px; margin-bottom: 14px; }
.chart .row { display: grid; grid-template-columns: 54px 1fr 74px; align-items: center; gap: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chart .bar { height: 10px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.chart .bar i { display: block; height: 100%; background: var(--grey); }
.chart .row.max .bar i { background: var(--red); }
.chart .row.man .bar i { background: repeating-linear-gradient(90deg, var(--grey-2) 0 4px, transparent 4px 7px); }
.chart .lbl { color: var(--grey); }
.chart .kg { text-align: right; font-weight: 600; }
.desc { font-size: 13.5px; color: var(--grey); line-height: 1.45; margin: 0 0 12px; }

/* summary */
.price { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin: 4px 0 14px; }
.btn-red { border: 0; background: var(--red); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; padding: 13px 18px; border-radius: var(--r); }
.btn-red:hover { background: var(--red-dark); }
.btn-red:disabled { background: #c9cccf; cursor: not-allowed; }
.btn-ghost { border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14px; padding: 12px 16px; border-radius: var(--r); }
.btn-wide { width: 100%; }
.notice { font-size: 12.5px; color: var(--grey); margin-top: 8px; line-height: 1.4; }

.credit { padding: 18px 24px 24px; font-size: 11.5px; color: var(--grey-2); }
.wordmark { font-weight: 700; letter-spacing: .01em; color: var(--grey); text-transform: lowercase; }

/* tooltip */
.tip { position: fixed; z-index: 50; max-width: 280px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.35; padding: 8px 10px; border-radius: var(--r); pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.tip b { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #ff8a92; margin-bottom: 3px; }

/* modal */
.modal { border: 0; border-radius: 6px; padding: 0; max-width: min(440px, calc(100vw - 32px)); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); }
.modal::backdrop { background: rgba(20,26,31,.45); }
.modal .mbody { padding: 22px 22px 6px; }
.modal h2 { margin: 0 0 8px; font-size: 20px; }
.modal p { margin: 0 0 12px; color: var(--grey); line-height: 1.45; }
.modal ul { margin: 0 0 12px; padding-left: 18px; }
.modal li { margin-bottom: 6px; }
.modal .mfoot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 22px 20px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.field input, .field textarea { font: inherit; font-weight: 400; font-size: 15px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 11px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--grey); margin-bottom: 8px; }
.err { color: var(--red-dark); font-size: 13px; min-height: 1em; }

/* chat */
.icon-btn { border: 0; background: none; padding: 6px; border-radius: var(--r); color: var(--grey); }
.icon-btn svg { width: 18px; height: 18px; display: block; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.chat-log::-webkit-scrollbar { display: none; }
.bubble { max-width: 88%; padding: 9px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble p { margin: 0 0 6px; } .bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 4px 0 6px; padding-left: 18px; }
.bubble.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 3px; }
.bubble.user.unsent { opacity: .6; }
.bubble.assistant { align-self: flex-start; background: var(--plane); border-bottom-left-radius: 3px; }
.bubble.error { background: #fff1f1; color: var(--red-dark); }
.picks { align-self: flex-start; font-size: 12px; color: var(--blue); padding-left: 4px; }
.activity { font-size: 12px; color: var(--grey-2); font-style: italic; padding-left: 4px; }
.qcard { align-self: stretch; border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.qcard .q { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.qcard .opts { gap: 6px; }
.qcard.stack .opts { flex-direction: column; align-items: stretch; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line-2); }
.chat-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 11px; font: inherit; font-size: 14px; }
.chat-form .btn-red { padding: 10px 14px; font-size: 13px; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--grey-2); animation: blink 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.bubble .tbl { overflow-x: auto; margin: 6px 0; scrollbar-width: none; }
.bubble table { border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bubble th, .bubble td { border-bottom: 1px solid var(--line); padding: 4px 8px 4px 0; text-align: left; white-space: nowrap; }
.bubble th { font-weight: 700; }

/* model status: CAD loading progress, or a note when a generic or preview model is shown */
.model-status { position: absolute; left: 24px; top: 78px; display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.92); border-radius: var(--r); padding: 7px 11px; font-size: 12.5px; color: var(--grey); box-shadow: 0 1px 3px rgba(20,26,31,.08); max-width: min(420px, calc(100% - 48px)); }
.model-status[hidden] { display: none; }
.model-status .ms-bar { display: none; width: 90px; height: 3px; background: var(--line-2); border-radius: 2px; overflow: hidden; flex: none; }
.model-status.loading .ms-bar { display: block; }
.model-status .ms-bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }
.model-status.cad { color: var(--ink); }
.model-status.cad::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; }
@media (max-width: 820px) { .model-status { top: 66px; left: 12px; font-size: 11.5px; padding: 5px 9px; } }
.bubble .retry { margin-top: 8px; background: #fff; }
/* a static (unrigged) CAD model has no poses to switch */
.app.is-static #poseSeg, .app.is-static #detailBtn { display: none; }
.dims { position: absolute; right: 20px; top: 70px; background: rgba(20,26,31,.9); color: #fff; font: 12px/1.35 var(--mono); padding: 10px 12px; border-radius: var(--r); z-index: 5; max-width: calc(100% - 40px); }
.dims b { color: #ff8a92; margin-right: 6px; }
.dims span { color: #c9cdd1; }
.dims table { border-collapse: collapse; margin-top: 6px; }
.dims th, .dims td { padding: 2px 8px 2px 0; text-align: right; white-space: nowrap; font-weight: 400; }
.dims th:first-child { text-align: left; color: #c9cdd1; }
.dims td.ok { color: #8fd19e; } .dims td.bad { color: #ff6b6b; font-weight: 600; }
.dims.perf { top: auto; bottom: 20px; right: 20px; }
@media (max-width: 820px) { .dims, .dims.perf { top: 100px; bottom: auto; right: 8px; font-size: 10px; padding: 6px 8px; pointer-events: none; } }
.dims { pointer-events: none; }
/* HMF logo (tenant branding, 1694x1135 = 1.49:1), at the header height */
.brand-logo { display: block; height: 44px; width: auto; border-radius: 2px; }
@media (max-width: 820px) { .brand-logo { height: 34px; } }

/* crane family: a compact list (no photos), sticky header, bounded height with a soft fade */
.sec-family { padding-bottom: 14px; }
.fam-sticky { position: sticky; top: 0; z-index: 2; background: var(--paper); padding-top: 2px; }
.fhead { display: grid; grid-template-columns: 1fr 72px 82px; gap: 8px; padding: 4px 10px 6px; font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--grey-2); border-bottom: 1px solid var(--line); }
.fhead span:not(:first-child) { text-align: right; }
.flist { position: relative; max-height: 352px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); padding-bottom: 20px; }
.flist::-webkit-scrollbar { display: none; }
.fgroup { position: sticky; top: 0; background: var(--plane); font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--grey); padding: 7px 10px 6px; z-index: 1; }
.frow { display: grid; grid-template-columns: 1fr 72px 82px; gap: 8px; align-items: center; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-bottom: 1px solid var(--line-2); background: var(--paper); text-align: left; font-size: 14px; }
.frow:hover { background: var(--plane); }
.frow .fname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .ctrl { display: inline-block; margin-left: 6px; font: 700 9.5px/1 var(--font); letter-spacing: .06em; padding: 3px 4px 2px; border-radius: 2px; background: var(--line-2); color: var(--grey); vertical-align: 2px; }
.frow .ftm, .frow .freach { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font); font-weight: 600; }
.frow small { font-size: 11px; color: var(--grey); font-weight: 400; margin-left: 2px; }
.frow.is-selected { background: var(--red); color: #fff; }
.frow.is-selected small, .frow.is-selected .ctrl { color: rgba(255,255,255,.85); }
.frow.is-selected .ctrl { background: rgba(255,255,255,.2); }
.frow.is-default { outline: 1.5px dashed var(--grey-2); outline-offset: -3px; }
.frow.is-blocked { color: #a9adb1; background: var(--plane); }
@media (max-width: 820px) { .frow { min-height: 50px; } .flist { max-height: 300px; } }

/* ---------- start screen: covers the app until the configuration, kit and CAD model are in ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 46%, rgba(244,245,246,.97) 0%, rgba(244,245,246,.9) 45%, rgba(230,232,234,.6) 100%),
    linear-gradient(rgba(0,80,143,.07) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(0,80,143,.07) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--stage);
  transition: opacity .6s cubic-bezier(.2,.7,.2,1), visibility 0s linear .6s;
}
.loader.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader.is-out .ld-card { transform: translateY(-8px) scale(.985); }
.ld-card { width: min(400px, 100%); display: flex; flex-direction: column; align-items: flex-start; transition: transform .6s cubic-bezier(.2,.7,.2,1); animation: ld-in .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ld-in { from { opacity: 0; transform: translateY(6px); } }
.ld-logo { display: block; width: 88px; height: auto; border-radius: 3px; margin-bottom: 28px; }
.ld-eyebrow { font: 700 12px/1 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.ld-title { font: 700 30px/1.15 var(--font); letter-spacing: -.01em; color: var(--ink); margin: 10px 0 26px; text-wrap: balance; }
.ld-steps { list-style: none; margin: 0 0 22px; padding: 0; width: 100%; display: grid; gap: 2px; }
.ld-steps li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 12px; min-height: 34px; font-size: 15px; color: var(--grey-2); transition: color .25s; }
.ld-steps li[data-state="active"] { color: var(--ink); font-weight: 600; }
.ld-steps li[data-state="done"] { color: var(--grey); }
.ld-steps .p { font: 500 13px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--grey); }
.ld-steps i { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); transition: border-color .25s, background .25s; }
.ld-steps li[data-state="active"] i { border-color: var(--red); }
.ld-steps li[data-state="active"] i::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--red); animation: ld-pulse 1.1s ease-in-out infinite; }
.ld-steps li[data-state="done"] i { border-color: var(--ink); background: var(--ink); }
.ld-steps li[data-state="done"] i::after { content: ""; position: absolute; left: 5.5px; top: 2.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
@keyframes ld-pulse { 50% { transform: scale(.55); opacity: .55; } }
.ld-bar { width: 100%; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.ld-bar i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(.02); }
.ld-note { margin: 16px 0 0; min-height: 2.9em; font-size: 13.5px; line-height: 1.45; color: var(--grey); transition: opacity .4s; }
.ld-note[hidden] { display: block; visibility: hidden; opacity: 0; }
.ld-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ld-actions[hidden], .ld-actions [hidden] { display: none; }
.ld-credit { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--grey-2); }
.loader.is-failed .ld-eyebrow { color: var(--grey); }
.loader.is-failed .ld-steps li[data-state="active"] i { border-color: var(--grey-2); }
.loader.is-failed .ld-steps li[data-state="active"] i::after { animation: none; background: var(--grey-2); }
.loader.is-failed .ld-bar i { background: var(--grey-2); }
@media (max-width: 520px) { .ld-title { font-size: 25px; margin-bottom: 20px; } .ld-logo { width: 72px; margin-bottom: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .loader, .ld-card, .ld-note { transition: none; animation: none; }
  .ld-steps li[data-state="active"] i::after { animation: none; }
}

.btn-sm { padding: 7px 11px; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.btn-sm:disabled { color: #b5b9bd; cursor: default; }
.link { border: 0; background: none; padding: 0; font: 600 13px/1.3 var(--font); color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the assistant's pick ---------- */
.rec { background: linear-gradient(var(--plane), var(--plane)) padding-box; border-left: 3px solid var(--red); }
.rec-eyebrow { font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.rec-name { font: 700 20px/1.2 var(--font); margin-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rec-ext { font: 400 13.5px/1.2 var(--font); color: var(--grey); font-variant-numeric: tabular-nums; }
.rec-fit { margin: 10px 0 12px; font-size: 14px; line-height: 1.45; padding-left: 22px; position: relative; font-variant-numeric: tabular-nums; }
.rec-fit::before { position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; font: 700 11px/16px var(--font); text-align: center; color: #fff; }
.rec-fit.ok::before { content: "✓"; background: var(--ok); }
.rec-fit.bad { color: var(--red-dark); }
.rec-fit.bad::before { content: "!"; background: var(--red); }

/* ---------- the job and the ranked list ---------- */
.jobbar { display: flex; align-items: baseline; gap: 10px; margin: -2px 0 10px; padding: 8px 10px; background: var(--plane); border-radius: var(--r); font-size: 13.5px; }
.jobbar .jk { font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--grey); }
.jobbar .jv { font-weight: 600; flex: 1; font-variant-numeric: tabular-nums; }
.fgroup.warn { color: var(--red-dark); background: #fbeeee; }
.frow.is-unfit .fname, .frow.is-unfit .ftm { color: var(--grey-2); }
.freach.nofit { color: var(--grey-2); font-family: var(--font); font-size: 12.5px; }
.ext-seg button.is-unfit:not(.is-selected) .n { color: #b5b9bd; }
.ext-seg button.is-unfit.is-selected { background: var(--red-dark); }

/* ---------- the assistant: a permanent column left of the crane ---------- */
.chat { position: relative; z-index: 3; display: flex; flex-direction: column; min-height: 0; background: var(--paper); border-right: 1px solid var(--line); }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; border-bottom: 3px solid var(--red); }
.restart { flex: none; margin-top: 1px; color: var(--grey); font-size: 12.5px; }
.restart:hover { color: var(--ink); }
.chat-title { font: 700 14px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; }
.chat-sub { font-size: 13px; color: var(--grey); margin-top: 3px; }
.chat .chat-log { padding: 18px 22px; gap: 12px; }
.chat .bubble { font-size: 14.5px; }
.chat .credit { padding: 0 24px 12px; }
.sheet-handle { display: none; }
.picks.note { color: var(--grey); align-self: stretch; text-align: center; font-size: 12.5px; padding: 2px 8px; }

/* files */
.attach { flex: none; align-self: center; color: var(--grey); }
.attach:hover { color: var(--ink); background: var(--plane); }
.attach svg { width: 20px; height: 20px; }
.chat-tray { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
.chat-tray[hidden] { display: none; }
.fchips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.fchips:last-child { margin-bottom: 0; }
.fchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 1px solid var(--line); border-radius: 3px; padding: 4px 6px 4px 5px; font-size: 12.5px; background: var(--paper); color: var(--ink); }
.fchip .fk { font: 500 10px/1 var(--mono); padding: 3px 4px 2px; border-radius: 2px; background: var(--ink); color: #fff; }
.fchip .fn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.fchip .fx { border: 0; background: none; padding: 0 2px; font-size: 16px; line-height: 1; color: var(--grey); }
.bubble.user .fchip { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }
.bubble.user .fchip .fk { background: #fff; color: var(--ink); }
.ferr { font-size: 12.5px; color: var(--red-dark); align-self: center; }
.drop-hint { display: none; }
.chat.is-drop .drop-hint { display: grid; place-items: center; position: absolute; inset: 8px; z-index: 5; border: 2px dashed var(--red); border-radius: 6px; background: rgba(255,255,255,.94); font-weight: 700; color: var(--ink); pointer-events: none; }

/* coaching tip */
.coach { position: relative; margin: 0 12px 8px; padding: 10px 36px 10px 12px; background: var(--plane); border-left: 3px solid var(--red); border-radius: 0 var(--r) var(--r) 0; }
.coach[hidden] { display: none; }
.coach-k { font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.coach-t { margin: 5px 0 6px; font-size: 13.5px; line-height: 1.4; }
.coach-x { position: absolute; top: 4px; right: 4px; }
.coach-x svg { width: 14px; height: 14px; }

/* ---------- the bar under the crane ---------- */
.spec-bar { position: absolute; left: 24px; bottom: 24px; z-index: 4; display: flex; align-items: stretch; background: rgba(255,255,255,.95); border-radius: var(--r); box-shadow: 0 1px 3px rgba(20,26,31,.10); max-width: calc(100% - 48px); }
.spec-bar:empty { display: none; }
/* "Go to quote": bottom right of the stage, beside the bar; above it when the stage is too narrow for both */
.go-quote { position: absolute; right: 24px; bottom: 24px; z-index: 5; min-height: 46px; text-transform: none; letter-spacing: 0; font-size: 15px; box-shadow: 0 1px 3px rgba(20,26,31,.18); }
.app[inert] .go-quote { visibility: hidden; }
@media (min-width: 821px) and (max-width: 1360px) { .go-quote { bottom: 96px; } }
@media (max-width: 820px) { .go-quote { right: 8px; bottom: 84px; min-height: 40px; padding: 10px 14px; font-size: 13px; } }
.spec-bar .skeleton { padding: 12px 16px; color: var(--grey); }
.tile { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; border: 0; border-right: 1px solid var(--line-2); background: transparent; padding: 10px 18px 9px; text-align: left; min-width: 0; transition: background .15s; }
.tile:last-child { border-right: 0; }
.tile .k { display: flex; align-items: center; gap: 6px; font: 700 10.5px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--grey-2); white-space: nowrap; }
.tile .k .short, .tile .dots { display: none; }
.tile .v { font: 600 22px/1.1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .v small { font-size: 13px; font-weight: 600; color: var(--grey); margin-left: 3px; }
.tile .need { font-size: 11.5px; color: var(--grey); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* direct picks are there, not shouted: the caret shows on hover, focus or open */
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid currentColor; opacity: 0; transition: opacity .15s, transform .15s; }
.tile:hover, .tile:focus-visible { background: var(--plane); }
.tile:hover .caret, .tile:focus-visible .caret, .tile[aria-expanded="true"] .caret { opacity: 1; }
.tile[aria-expanded="true"] { background: var(--plane); box-shadow: inset 0 2px 0 var(--ink); }
.tile[aria-expanded="true"] .caret { transform: rotate(180deg); }
.tile.model { flex-direction: row; align-items: center; gap: 9px; padding-right: 16px; }
.tile.model .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
.tile.model .v { font-weight: 700; }
.tile.model .v small { font: 600 12px/1 var(--font); color: var(--grey); margin-left: 6px; }
.tile.model .caret { color: var(--grey-2); }
.more-chip { flex-direction: row; align-items: center; font: 600 13px/1 var(--font); color: var(--grey-2); padding: 0 16px; }
.more-chip:hover, .more-chip[aria-expanded="true"] { color: var(--ink); }

/* ---------- popup: one question at a time, above its tile ---------- */
.pop { position: fixed; z-index: 40; width: 300px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; background: var(--paper); border-radius: 6px; box-shadow: 0 0 0 1px rgba(20,26,31,.08), 0 18px 48px rgba(20,26,31,.22); }
.pop[hidden] { display: none; }
.pop.wide { width: 440px; }
.pop::after { content: ""; position: absolute; bottom: -6px; left: calc(var(--arrow-x, 50%) - 6px); width: 12px; height: 12px; background: var(--paper); transform: rotate(45deg); box-shadow: 1px 1px 0 rgba(20,26,31,.08); }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 10px 10px 18px; border-bottom: 1px solid var(--line-2); flex: none; }
.pop-title { margin: 0; font: 700 13px/1.1 var(--font); text-transform: uppercase; letter-spacing: .08em; }
.pop-sub { margin: 12px 18px 4px; font-size: 13.5px; color: var(--grey); line-height: 1.4; }
.pop-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; border-radius: 0 0 6px 6px; }
.pop-scroll::-webkit-scrollbar { display: none; }
.pop-scroll .sec { padding: 16px 18px; }
.pop-scroll .sec:last-child { border-bottom: 0; }
.pop-fit { margin: 4px 18px 0; min-height: 2.8em; font-size: 13.5px; line-height: 1.4; color: var(--grey); }
.pop-fit b { color: var(--ink); }
.pop-fit.bad { color: var(--red-dark); }
.pop-foot { display: flex; align-items: center; gap: 8px; padding: 10px 18px 16px; }
.pop-foot .sp { flex: 1; }
.pop-foot .btn-ghost, .pop-foot .btn-red { padding: 10px 16px; font-size: 13.5px; }
.sec-foot .history { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-foot .history button { flex: 1; }
.spec { padding: 12px 18px 16px; }
.spec summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--grey); padding: 4px 0; }
.spec summary:hover { color: var(--ink); }
.spec[open] summary { margin-bottom: 10px; }

/* wheel picker */
.wheel { --ih: 34px; height: calc(var(--ih) * 5); margin: 6px 18px 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none; border-radius: var(--r);
  background: linear-gradient(var(--band, var(--ink)), var(--band, var(--ink))) 0 calc(var(--ih) * 2) / 100% 2px no-repeat, linear-gradient(var(--band, var(--ink)), var(--band, var(--ink))) 0 calc(var(--ih) * 3 - 2px) / 100% 2px no-repeat;
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel:focus-visible { --band: var(--blue); }
.wheel-pad { height: calc(var(--ih) * 2); }
.wheel-item { height: var(--ih); line-height: var(--ih); text-align: center; scroll-snap-align: center; font: 400 17px/34px var(--font); font-variant-numeric: tabular-nums; color: var(--grey-2); cursor: pointer; user-select: none; transition: color .12s; }
.wheel-item.on { color: var(--ink); font-weight: 700; font-size: 21px; }

/* ---------- phone: crane on top, the assistant as a sheet below ---------- */
@media (max-width: 820px) {
  .app { --sheet: 50dvh; grid-template-columns: 1fr; grid-template-rows: 1fr var(--sheet); }
  .stage { grid-row: 1; }
  .chat { grid-row: 2; border-right: 0; border-radius: 12px 12px 0 0; margin-top: -12px; box-shadow: 0 -6px 20px rgba(20,26,31,.12); }
  .sheet-handle { display: grid; place-items: center; height: 22px; flex: none; cursor: grab; touch-action: none; }
  .sheet-handle i { width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
  .chat-head { padding: 0 16px 8px; border-bottom-width: 2px; }
  .chat-sub { display: none; }
  .chat .chat-log { padding: 12px 14px; }
  .chat .credit { display: none; }
  .app[data-sheet="low"] .chat-log, .app[data-sheet="low"] .coach { display: none; }
  .brandbar { top: 10px; left: 10px; }
  .stage-tools { top: 10px; right: 8px; gap: 6px; }
  .seg button { padding: 6px 7px; font-size: 12px; }
  .chip-toggle { padding: 7px 8px; font-size: 12px; }
  .chip-toggle .t { display: none; }
  .model-status { top: 56px; left: 10px; }
  .status-line { top: auto; bottom: 86px; }
  .spec-bar { left: 8px; right: 8px; bottom: 20px; max-width: none; }
  .tile { flex: 1 1 0; padding: 8px 8px 7px; gap: 3px; }
  .tile .k { font-size: 9.5px; letter-spacing: .06em; }
  .tile .k .long, .more-chip .long { display: none; }
  .tile .k .short, .tile .dots { display: inline; }
  .tile .v { font-size: 16px; }
  .tile .v small { font-size: 11px; margin-left: 1px; }
  .tile .need { font-size: 10.5px; }
  .tile.model { flex: 1.2 1 0; gap: 6px; padding: 0 8px; }
  .tile.model .v small { display: none; }
  .more-chip { flex: 0 0 auto; padding: 0 10px; font-size: 16px; letter-spacing: .1em; }
  .caret { display: none; }
  /* phones: every popup is a sheet from the bottom over a dimmed page */
  .pop, .pop.wide { left: 0 !important; right: 0; bottom: 0 !important; width: 100%; max-width: none; max-height: 82dvh !important; border-radius: 12px 12px 0 0; box-shadow: 0 0 0 100vmax rgba(20,26,31,.38); padding-bottom: env(safe-area-inset-bottom); }
  .pop::after { display: none; }
  .pop-scroll { border-radius: 0; }
  .wheel { --ih: 40px; }
  .wheel-item { line-height: 40px; }
}


a.btn-red { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- 3D off (the default): the crane's photo holds the stage; nothing 3D is loaded ---------- */
.flat { display: none; }
.app.no-3d .flat { position: absolute; inset: 84px 24px 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.app.no-3d #view, .app.no-3d .labels { visibility: hidden; }
.app.no-3d #poseSeg, .app.no-3d #detailBtn, .app.no-3d #envBtn, .app.no-3d .model-status { display: none; }
.flat-photo { display: block; max-width: min(100%, 760px); min-height: 0; flex: 0 1 auto; max-height: calc(100% - 96px); object-fit: contain; mix-blend-mode: multiply; }
.flat-photo.none { display: none; }
.flat-name { font: 700 22px/1.2 var(--font); color: var(--ink); }
.flat-3d { padding: 9px 16px; }
@media (max-width: 820px) {
  /* phones: clear of Get product; the 3D chip at the top is the way in */
  .app.no-3d .flat { inset: 60px 10px 136px; gap: 8px; }
  .flat-photo { max-height: calc(100% - 30px); }
  .flat-name { font-size: 16px; }
  .flat-3d { display: none; }
  .app:not(.no-3d) .view3d .lbl { display: none; }
}
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
