/* Class Bespoke Online Measurement - prototype styles.
 * Brand tokens taken (read-only) from classbespoke.com on 2026-11-03:
 * Red Rose (headings, uppercase), Red Hat Text (body), brown #482a1b, ink #1e1e1e, cream #fff8ee / #f6f1e8, gold #e1b879.
 * All selectors are scoped under .cbm so the module cannot restyle the host WordPress theme. */
:root {
  --cbm-brown: #482a1b;
  --cbm-brown-dark: #3e2116;
  --cbm-ink: #1e1e1e;
  --cbm-muted: #5c5650;
  --cbm-cream: #fff8ee;
  --cbm-sand: #f6f1e8;
  --cbm-line: #e4dccf;
  --cbm-gold: #e1b879;
  --cbm-gold-deep: #a87a35;
  --cbm-white: #ffffff;
  --cbm-ok: #2f6b3a;
  --cbm-warn: #8a5a00;
  --cbm-warn-bg: #fdf3dc;
  --cbm-err: #a12a1c;
  --cbm-err-bg: #fbe9e6;
  --cbm-focus: #1a5fb4;
  --cbm-radius: 4px;
  --cbm-head: "Red Rose", "Red Hat Text", system-ui, sans-serif;
  --cbm-body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.cbm, .cbm *, .cbm *::before, .cbm *::after { box-sizing: border-box; }
body.cbm, .cbm-root { margin: 0; }
body.cbm, .cbm-root { background: var(--cbm-sand); color: var(--cbm-ink); font: 16px/1.55 var(--cbm-body); -webkit-text-size-adjust: 100%; }
.cbm a { color: var(--cbm-brown); }
/* Baseline for the app's buttons. Specificity (0,1,1) beats a theme's generic "button { padding: 15px 30px; ... }"
 * but loses to every specific button rule below (.btn, .seg button, .qty button ...). Values match browser defaults. */
.cbm button { padding: 1px 6px; line-height: normal; min-height: 0; text-transform: none; letter-spacing: normal; font-weight: 400; border-radius: 0; }
.cbm :focus-visible { outline: 3px solid var(--cbm-focus); outline-offset: 2px; }
.cbm h1, .cbm h2, .cbm h3 { font-family: var(--cbm-head); font-weight: 600; letter-spacing: .02em; color: var(--cbm-ink); margin: 0 0 .5em; }
.cbm h1 { font-size: clamp(26px, 4vw, 40px); text-transform: uppercase; line-height: 1.15; }
.cbm h2 { font-size: clamp(20px, 2.6vw, 26px); text-transform: uppercase; }
.cbm h3 { font-family: var(--cbm-body); font-size: 18px; color: var(--cbm-brown); letter-spacing: 0; }
.cbm p { margin: 0 0 1em; }
.cbm .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- chrome ---------- */
.cbm .cbm-devbar { background: #2b2b2b; color: #f5e6c8; font-size: 13px; text-align: center; padding: 6px 12px; }
.cbm .cbm-devbar strong { color: var(--cbm-gold); }
.cbm .cbm-header { background: var(--cbm-brown); color: var(--cbm-cream); }
.cbm .cbm-header-inner { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cbm .cbm-brand { font-family: var(--cbm-head); font-size: 20px; letter-spacing: .14em; text-transform: uppercase; color: var(--cbm-cream); text-decoration: none; }
.cbm .cbm-brand small { display: block; font-family: var(--cbm-body); font-size: 11px; letter-spacing: .2em; color: var(--cbm-gold); }
.cbm .cbm-header nav { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.cbm .cbm-header nav a, .cbm .cbm-header nav button { color: var(--cbm-gold); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 4px 0; }
.cbm .cbm-header .who { color: #f2e6d4; }
.cbm .cbm-main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 64px; }
/* Inside the website the theme already shows the Class Bespoke header, so the app shows one slim bar only. */
.cbm .cbm-header--embedded { background: transparent; color: var(--cbm-ink); border-bottom: 1px solid var(--cbm-line); }
.cbm .cbm-header--embedded .cbm-header-inner { padding: 8px 20px; min-height: 48px; }
.cbm .cbm-app-title { font: 600 12px/1.2 var(--cbm-body); letter-spacing: .18em; text-transform: uppercase; color: var(--cbm-muted); text-decoration: none; }
.cbm .cbm-header--embedded nav button { color: var(--cbm-brown); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }
.cbm .cbm-steps-compact { display: none; }
/* Keep the page height stable while the app loads, so the site footer doesn't jump (CLS). */
.cbm-app-root .cbm-main { min-height: 78vh; }
.cbm .cbm-booting > .hero { visibility: hidden; }
.cbm .cbm-footer { text-align: center; color: var(--cbm-muted); font-size: 13px; padding: 24px 16px 40px; }

/* ---------- stepper ---------- */
.cbm .cbm-steps { list-style: none; margin: 0 0 24px; padding: 0; display: flex; gap: 4px; counter-reset: step; overflow-x: auto; scrollbar-width: none; }
.cbm .cbm-steps li { flex: 1 1 0; min-width: 92px; }
.cbm .cbm-steps a, .cbm .cbm-steps span { display: block; height: 100%; padding: 10px 8px 8px; border-top: 3px solid var(--cbm-line); font-size: 13px; line-height: 1.3; color: var(--cbm-muted); text-decoration: none; }
.cbm .cbm-steps li::before { counter-increment: step; content: counter(step); display: none; }
.cbm .cbm-steps .done a { border-color: var(--cbm-gold-deep); color: var(--cbm-ink); }
.cbm .cbm-steps .current a, .cbm .cbm-steps .current span { border-color: var(--cbm-brown); color: var(--cbm-brown); font-weight: 600; }

/* ---------- surfaces & controls ---------- */
.cbm .card { background: var(--cbm-white); border: 1px solid var(--cbm-line); border-radius: var(--cbm-radius); padding: 24px; }
.cbm .card + .card { margin-top: 16px; }
.cbm .muted { color: var(--cbm-muted); }
.cbm .mt { margin-top: 12px; }
.cbm .small { font-size: 14px; }
.cbm .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 0; border: 1px solid var(--cbm-brown);
  background: var(--cbm-brown); color: var(--cbm-cream); font: 600 14px var(--cbm-body); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.cbm .btn:hover { background: var(--cbm-brown-dark); }
.cbm .btn[disabled] { opacity: .5; cursor: not-allowed; }
.cbm .btn.secondary { background: transparent; color: var(--cbm-brown); }
.cbm .btn.secondary:hover { background: var(--cbm-cream); }
.cbm .btn.ghost { background: transparent; border-color: transparent; color: var(--cbm-brown); text-transform: none; letter-spacing: 0; padding: 6px 10px; min-height: 36px; }
.cbm .btn.small { min-height: 34px; padding: 4px 12px; font-size: 12px; }
.cbm .btn.danger { background: var(--cbm-err); border-color: var(--cbm-err); }
.cbm .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 24px; }
.cbm label { font-weight: 600; font-size: 14px; }
.cbm input[type=text], .cbm input[type=email], .cbm input[type=tel], .cbm input[type=password], .cbm input[type=number], .cbm input[type=search], .cbm select, .cbm textarea {
  width: 100%; font: 16px var(--cbm-body); color: var(--cbm-ink); background: var(--cbm-white); border: 1px solid #c9bfb0; border-radius: var(--cbm-radius); padding: 10px 12px; min-height: 44px; }
.cbm textarea { min-height: 96px; resize: vertical; }
.cbm input:focus, .cbm select:focus, .cbm textarea:focus { border-color: var(--cbm-brown); outline: 2px solid rgba(72, 42, 27, .2); }
.cbm .field { margin-bottom: 16px; }
.cbm .field label { display: block; margin-bottom: 6px; }
.cbm .field .hint { font-size: 13px; color: var(--cbm-muted); margin-top: 4px; }
.cbm .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.cbm .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.cbm .check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--cbm-brown); }
.cbm .notice { border-left: 4px solid var(--cbm-gold-deep); background: var(--cbm-cream); padding: 12px 16px; font-size: 14px; margin: 0 0 16px; }
.cbm .notice.err { border-color: var(--cbm-err); background: var(--cbm-err-bg); }
.cbm .notice.warn { border-color: var(--cbm-warn); background: var(--cbm-warn-bg); }
.cbm .pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; background: var(--cbm-sand); color: var(--cbm-muted); white-space: nowrap; }
.cbm .pill.req { background: var(--cbm-brown); color: var(--cbm-cream); }
.cbm .pill.gold { background: var(--cbm-gold); color: var(--cbm-ink); }

/* segmented / choice pills */
.cbm .seg { display: inline-flex; border: 1px solid var(--cbm-brown); }
.cbm .seg button { border: 0; background: transparent; color: var(--cbm-brown); font: 600 13px var(--cbm-body); padding: 8px 16px; min-height: 40px; cursor: pointer; letter-spacing: .05em; }
.cbm .seg button[aria-pressed=true] { background: var(--cbm-brown); color: var(--cbm-cream); }
.cbm .choices { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.cbm .choices legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.cbm .choices label { font-weight: 400; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c9bfb0; padding: 8px 14px; border-radius: 22px; cursor: pointer; background: var(--cbm-white); min-height: 40px; }
.cbm .choices input { accent-color: var(--cbm-brown); }
.cbm .choices label:has(input:checked) { border-color: var(--cbm-brown); background: var(--cbm-cream); }

/* ---------- start ---------- */
.cbm .hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; background: var(--cbm-brown); color: var(--cbm-cream); padding: 40px; margin-bottom: 24px; }
.cbm .hero h1 { color: var(--cbm-cream); }
.cbm .hero p { color: #f2e6d4; font-size: 17px; }
.cbm .hero .btn { background: var(--cbm-gold); color: var(--cbm-ink); border-color: var(--cbm-gold); }
.cbm .hero .btn.secondary { background: transparent; color: var(--cbm-gold); }
.cbm .hero ol { margin: 0; padding-left: 20px; color: #f2e6d4; }
.cbm .hero ol li { margin-bottom: 8px; }
.cbm .resume-form { display: flex; gap: 8px; margin-top: 8px; }
.cbm .hero .hero-note { border-left: 3px solid var(--cbm-gold); padding-left: 12px; font-size: 16px; color: #fff3df; }
.cbm .hero .hero-actions { justify-content: flex-start; margin-top: 16px; }
.cbm .hero .hero-h3 { color: var(--cbm-gold); }
.cbm .hidden { display: none !important; }
.cbm .wa-block { border-left: 3px solid #25d366; background: #f4fbf6; padding: 12px 16px 2px; margin-bottom: 16px; }
.cbm .wa-block .check { font-weight: 600; }
.cbm .field .hint.flag-err { color: var(--cbm-err); }
.cbm .prewrap { white-space: pre-wrap; }
.cbm ul.plain { list-style: none; padding: 0; margin: 0; }
.cbm ul.plain li { padding: 4px 0; }
.cbm .pill-btn { border: 1px solid #c9bfb0; background: var(--cbm-white); color: var(--cbm-ink); padding: 8px 14px; border-radius: 22px; font: 14px var(--cbm-body); cursor: pointer; min-height: 40px; }
.cbm .pill-btn[aria-pressed=true] { border-color: var(--cbm-brown); background: var(--cbm-cream); font-weight: 600; box-shadow: inset 0 0 0 1px var(--cbm-brown); }
.cbm label.btn.disabled { opacity: .45; pointer-events: none; }
.cbm .photo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.cbm .photo-head h2 { margin: 0; }
.cbm .thumb-missing { width: 120px; height: 150px; display: flex; align-items: center; justify-content: center; background: var(--cbm-sand); border: 1px dashed var(--cbm-gold-deep); color: var(--cbm-warn); font-weight: 600; font-size: 13px; }
.cbm .ref-box { background: var(--cbm-cream); border: 1px solid var(--cbm-line); padding: 14px 18px; margin: 16px 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cbm details summary { cursor: pointer; color: var(--cbm-brown); font-weight: 600; }

/* ---------- garments ---------- */
.cbm .garment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cbm .garment-card { position: relative; border: 1px solid var(--cbm-line); background: var(--cbm-white); padding: 18px; cursor: pointer; text-align: left; font: inherit; color: inherit; min-height: 120px; }
.cbm .garment-card[aria-pressed=true] { border: 2px solid var(--cbm-brown); background: var(--cbm-cream); padding: 17px; }
.cbm .garment-card strong { display: block; font-family: var(--cbm-head); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.cbm .garment-card .qty { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; }
.cbm .garment-card .qty button { width: 32px; height: 32px; border: 1px solid var(--cbm-brown); background: var(--cbm-white); cursor: pointer; font-size: 18px; color: var(--cbm-brown); }
.cbm .garment-card .tick { position: absolute; top: 12px; right: 12px; color: var(--cbm-brown); font-weight: 700; }

.cbm .garment-art { height: 150px; margin: -4px 0 12px; background: linear-gradient(180deg, #faf5ec, #f3ebdf); border-radius: 2px; padding: 8px; }
.cbm .garment-card .card-text { display: block; }

/* picture choices (style options) */
.cbm .pic-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0; }
.cbm .pic-choice { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; border: 1px solid var(--cbm-line); background: var(--cbm-white); padding: 8px; cursor: pointer; text-align: center; font-size: 13px; font-weight: 500; }
.cbm .pic-choice .pic { height: 110px; background: #faf6ef; }
.cbm .pic-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cbm .pic-choice:has(input:checked), .cbm .pic-choice.checked { border: 2px solid var(--cbm-brown); padding: 7px; background: var(--cbm-cream); }
.cbm .pic-choice:has(input:focus-visible) { outline: 3px solid var(--cbm-focus); outline-offset: 2px; }
.cbm .pic-choice.checked::after { content: "\2713"; position: absolute; top: 6px; right: 8px; color: var(--cbm-brown); font-weight: 700; }
.cbm .opt-block { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.cbm fieldset.choices { border: 0; padding: 0; min-width: 0; }
.cbm .opt-block legend, .cbm fieldset.choices legend { padding: 0; }
.cbm .opt-block > .opt-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.cbm .style-layout { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: start; }
.cbm .style-preview { position: sticky; top: 12px; background: var(--cbm-cream); border: 1px solid var(--cbm-line); padding: 12px; text-align: center; }
.cbm .style-preview .preview-art { height: 300px; }
.cbm .section-title { font-family: var(--cbm-head); text-transform: uppercase; letter-spacing: .06em; font-size: 17px; color: var(--cbm-ink); margin: 28px 0 6px; padding-top: 18px; border-top: 1px solid var(--cbm-line); }

/* photo step */
.cbm .photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cbm .photo-card { background: var(--cbm-white); border: 1px solid var(--cbm-line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cbm .photo-card.done { border-color: var(--cbm-ok); box-shadow: inset 0 3px 0 var(--cbm-ok); }
.cbm .photo-card.missing { box-shadow: inset 0 3px 0 var(--cbm-gold); }
.cbm .photo-example { aspect-ratio: 300 / 560; background: #faf6ef; position: relative; overflow: hidden; }
.cbm .photo-example img { width: 100%; height: 100%; object-fit: contain; background: #222; display: block; }
.cbm .photo-card .status-line { font-size: 13px; font-weight: 600; }
.cbm .photo-card .status-line.ok { color: var(--cbm-ok); }
.cbm .photo-card .status-line.todo { color: var(--cbm-warn); }
.cbm .photo-card .btn { width: 100%; }
.cbm .photo-card input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cbm .guidelines { columns: 2; column-gap: 32px; padding-left: 20px; margin: 0; }
.cbm .guidelines li { margin-bottom: 6px; break-inside: avoid; }
.cbm .fig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cbm .fig-card { margin: 0; background: #fff; border: 1px solid var(--cbm-line); padding: 8px; }
.cbm .fig-card .cbm-figure { height: 220px; }
.cbm .fig-card figcaption { font-size: 13px; text-align: center; margin-top: 6px; }
.cbm .ack { background: var(--cbm-cream); border: 1px solid var(--cbm-gold); padding: 16px 18px; margin: 18px 0; }
.cbm .ack p { font-size: 15px; }

/* ---------- measure ---------- */
.cbm .measure { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 20px; align-items: start; }
.cbm .mlist { background: var(--cbm-white); border: 1px solid var(--cbm-line); }
.cbm .mlist-head { padding: 14px 16px; border-bottom: 1px solid var(--cbm-line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cbm .progress { height: 6px; background: var(--cbm-sand); width: 100%; margin-top: 8px; }
.cbm .progress > div { height: 100%; background: var(--cbm-gold-deep); transition: width .2s; }
.cbm .mgroup { padding: 8px 0; border-bottom: 1px solid var(--cbm-line); }
.cbm .mgroup h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--cbm-muted); margin: 8px 16px 4px; }
.cbm .mrow { display: grid; grid-template-columns: 22px 1fr 120px; gap: 8px; align-items: center; padding: 6px 12px 6px 16px; border-left: 3px solid transparent; cursor: pointer; }
.cbm .mrow.selected { background: var(--cbm-cream); border-left-color: var(--cbm-brown); }
.cbm .mrow .mlabel { font-size: 15px; line-height: 1.25; }
.cbm .mrow .mlabel small { display: block; color: var(--cbm-muted); font-size: 12px; }
.cbm .minput { position: relative; }
.cbm .minput input { padding-right: 34px; text-align: right; min-height: 40px; font-variant-numeric: tabular-nums; }
.cbm .minput .u { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--cbm-muted); font-size: 13px; pointer-events: none; }
.cbm .mstate { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.cbm .mstate.ok { background: var(--cbm-ok); color: #fff; }
.cbm .mstate.warn { background: var(--cbm-warn); color: #fff; }
.cbm .mstate.err { background: var(--cbm-err); color: #fff; }
.cbm .mstate.empty { border: 2px solid #c9bfb0; }
.cbm .mnum { font-size: 12px; color: var(--cbm-muted); text-align: center; }
.cbm .mmsg { grid-column: 2 / 4; font-size: 13px; }
.cbm .mmsg:empty { display: none; }
.cbm .mmsg .err { color: var(--cbm-err); }
.cbm .mmsg .warn { color: var(--cbm-warn); }
.cbm .mmsg .conv { color: var(--cbm-muted); }
.cbm .mmsg .check { font-size: 13px; margin-top: 4px; }

.cbm .guide { background: var(--cbm-white); border: 1px solid var(--cbm-line); position: sticky; top: 12px; }
.cbm .guide-head { padding: 18px 22px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cbm .guide-head h2 { margin: 0; }
.cbm .guide-body { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto auto 1fr; column-gap: 20px; padding: 18px 22px 22px; }
.cbm .guide-body > .media { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
.cbm .guide-body > .guide-main, .cbm .guide-body > .guide-extra { grid-column: 2; }
.cbm .media { background: var(--cbm-cream); border: 1px solid var(--cbm-line); }
.cbm .media-tabs { display: flex; border-bottom: 1px solid var(--cbm-line); }
.cbm .media-tabs button { flex: 1; border: 0; background: transparent; padding: 8px; font: 600 12px var(--cbm-body); letter-spacing: .06em; text-transform: uppercase; color: var(--cbm-muted); cursor: pointer; min-height: 38px; }
.cbm .media-tabs button[aria-selected=true] { color: var(--cbm-brown); box-shadow: inset 0 -3px 0 var(--cbm-brown); }
.cbm .media-pane { padding: 10px; }
.cbm .cbm-figure { width: 100%; height: 340px; display: block; background: #fbf6ee; }
.cbm .fig-body { fill: #efe4d4; stroke: #a8957a; stroke-width: 1.3; }
.cbm .fig-spine { stroke: #cdbfa8; stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.cbm .fig-zone { fill: var(--cbm-gold); opacity: .22; }
.cbm .fig-tape { fill: none; stroke: #e2b13c; stroke-linecap: butt; stroke-linejoin: round; }
.cbm .fig-ticks { fill: none; stroke: #6b4a12; stroke-linecap: butt; }
.cbm .fig-hidden { opacity: .35; }
.cbm .fig-arrow { fill: var(--cbm-brown); }
.cbm .fig-start { fill: #2f6b3a; stroke: #fff; stroke-width: 1.2; }
.cbm .fig-end { fill: var(--cbm-brown); stroke: #fff; stroke-width: 1.2; }
.cbm .fig-tag { font-family: var(--cbm-body); font-weight: 700; letter-spacing: .08em; fill: var(--cbm-brown); paint-order: stroke; stroke: #fbf6ee; stroke-width: 3px; }
.cbm .cbm-art { width: 100%; height: 100%; display: block; }
.cbm .pose-skin { fill: #e9dccb; stroke: none; }
.cbm .pose-outline { fill: none; stroke: #6f5d48; stroke-width: 1.4; }
.cbm .pose-top { fill: #8f9aab; }
.cbm .pose-bottom { fill: #4d535f; }
.cbm .pose-shoe { fill: #2a221c; }
.cbm .pose-frame { fill: none; stroke: var(--cbm-gold-deep); stroke-width: 2; stroke-dasharray: 10 6; }
.cbm .pose-level { stroke: var(--cbm-gold-deep); stroke-width: 1.4; stroke-dasharray: 4 4; }
.cbm .pose-cam { fill: var(--cbm-brown); }
.cbm .pose-lens { fill: var(--cbm-gold); stroke: #fff; stroke-width: 2; }
.cbm .video-ph { aspect-ratio: 9 / 12; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; padding: 14px; color: var(--cbm-muted); font-size: 13px;
  background: repeating-linear-gradient(135deg, #f8f1e5 0 12px, #f3eadb 12px 24px); }
.cbm .video-ph strong { color: var(--cbm-brown); font-size: 14px; }
.cbm .video-frame { aspect-ratio: 16 / 9; width: 100%; border: 0; display: block; }
.cbm .media video { width: 100%; display: block; }
.cbm .ref-note { font-size: 12px; color: var(--cbm-warn); padding: 6px 2px 0; }
.cbm .landmarks { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 0 0 14px; }
.cbm .landmarks dt { font-weight: 600; color: var(--cbm-brown); }
.cbm .landmarks dd { margin: 0; }
.cbm .guide ol { padding-left: 20px; margin: 0 0 14px; }
.cbm .guide ol li { margin-bottom: 6px; }
.cbm .mistakes { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.cbm .mistakes li { padding-left: 22px; position: relative; margin-bottom: 4px; }
.cbm .mistakes li::before { content: "\00d7"; position: absolute; left: 4px; color: var(--cbm-err); font-weight: 700; }
.cbm .kind-note { font-size: 13px; background: var(--cbm-sand); padding: 8px 10px; margin-bottom: 14px; }
.cbm details.transcript { font-size: 14px; border-top: 1px solid var(--cbm-line); padding-top: 10px; }
.cbm details.transcript summary { cursor: pointer; font-weight: 600; color: var(--cbm-brown); }
.cbm .mobile-entry { display: none; }
.cbm .mnav { display: none; }
.cbm .mobile-only { display: none !important; }

/* ---------- review & status ---------- */
.cbm table.cbm-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--cbm-white); }
.cbm .cbm-table th, .cbm .cbm-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--cbm-line); vertical-align: top; }
.cbm .cbm-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--cbm-muted); font-weight: 600; background: var(--cbm-cream); }
.cbm .cbm-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cbm .review-section { margin-bottom: 20px; }
.cbm .review-section header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--cbm-line); margin-bottom: 10px; }
.cbm .kv { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 4px 16px; font-size: 15px; margin: 0; }
.cbm .kv dt { color: var(--cbm-muted); }
.cbm .kv dd { margin: 0; }
.cbm .big-ref { font-family: var(--cbm-head); font-size: 28px; letter-spacing: .08em; color: var(--cbm-brown); }
.cbm .copyrow { display: flex; gap: 8px; }
.cbm .copyrow input { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.cbm .photo-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cbm .photo-list figure { margin: 0; width: 120px; font-size: 12px; text-align: center; }
.cbm .photo-list img { width: 120px; height: 180px; object-fit: contain; border: 1px solid var(--cbm-line); display: block; background: #e9e5de; }
.cbm .option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.cbm .comp-title { font-family: var(--cbm-head); text-transform: uppercase; letter-spacing: .06em; font-size: 15px; margin: 18px 0 10px; color: var(--cbm-brown); border-bottom: 1px solid var(--cbm-line); padding-bottom: 6px; }

.cbm #cbm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 150%); background: var(--cbm-ink); color: #fff; padding: 12px 18px; border-radius: var(--cbm-radius); font-size: 14px; transition: transform .2s; z-index: 50; max-width: 90vw; }
.cbm #cbm-toast.show { transform: translate(-50%, 0); }
.cbm #cbm-toast.err { background: var(--cbm-err); }
.cbm .saving { font-size: 12px; color: var(--cbm-muted); min-height: 18px; }

/* ---------- staff ---------- */
.cbm .staff-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cbm .staff-tabs button { border: 1px solid var(--cbm-line); background: var(--cbm-white); padding: 6px 12px; font: 14px var(--cbm-body); cursor: pointer; border-radius: 18px; }
.cbm .staff-tabs button[aria-pressed=true] { background: var(--cbm-brown); color: var(--cbm-cream); border-color: var(--cbm-brown); }
.cbm .status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cbm .status.Draft { background: #eee; color: #555; }
.cbm .status.Submitted { background: #e3ecfa; color: #1d4a8a; }
.cbm .status.Under-Review { background: #fdf3dc; color: #7a5200; }
.cbm .status.Needs-Clarification { background: #fbe9e6; color: #a12a1c; }
.cbm .status.Approved { background: #e2f1e4; color: #2f6b3a; }
.cbm .status.Rejected { background: #3a3a3a; color: #fff; }
.cbm .status.Archived { background: #f0ece6; color: #6b6259; }
.cbm .flags span { margin-right: 6px; font-size: 12px; }
.cbm .flag-err { color: var(--cbm-err); font-weight: 600; }
.cbm .flag-warn { color: var(--cbm-warn); font-weight: 600; }
.cbm .staff-detail { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.cbm .staff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cbm .row-click { cursor: pointer; }
.cbm .row-click:hover td { background: var(--cbm-cream); }
.cbm .issue { display: block; font-size: 12px; }
.cbm .issue.error { color: var(--cbm-err); }
.cbm .issue.warning { color: var(--cbm-warn); }
.cbm .approved-cell { display: grid; grid-template-columns: 1fr 70px; gap: 6px; min-width: 210px; }
.cbm .approved-cell input, .cbm .approved-cell select { min-height: 36px; padding: 6px 8px; font-size: 14px; }
.cbm .approved-cell .reason { grid-column: 1 / 3; }
.cbm .approved-cell .btns { grid-column: 1 / 3; display: flex; gap: 6px; flex-wrap: wrap; }
.cbm .timeline { list-style: none; padding: 0; margin: 0; font-size: 13px; max-height: 420px; overflow: auto; }
.cbm .timeline li { border-left: 2px solid var(--cbm-line); padding: 0 0 10px 12px; position: relative; }
.cbm .timeline li::before { content: ""; position: absolute; left: -5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--cbm-gold-deep); }
.cbm .note { background: var(--cbm-sand); padding: 10px 12px; margin-bottom: 8px; font-size: 14px; white-space: pre-wrap; }
.cbm .note.clarification { background: var(--cbm-err-bg); }
.cbm .note.customer_reply { background: #e3ecfa; }
.cbm .note .meta { font-size: 12px; color: var(--cbm-muted); margin-bottom: 4px; white-space: normal; }
.cbm dialog, dialog.cbm { border: 1px solid var(--cbm-line); border-radius: var(--cbm-radius); padding: 24px; max-width: 560px; width: calc(100% - 32px); }
.cbm dialog::backdrop, dialog.cbm::backdrop { background: rgba(30, 30, 30, .5); }
.cbm .sheet { background: #fff; padding: 32px; max-width: 900px; margin: 0 auto; }
.cbm .sheet h1 { font-size: 24px; }
.cbm .mail { background: #fff; border: 1px solid var(--cbm-line); padding: 14px 16px; margin-bottom: 10px; }
.cbm .mail pre { white-space: pre-wrap; font: 14px/1.5 var(--cbm-body); margin: 8px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cbm .guide-body { grid-template-columns: 200px 1fr; }
  .cbm .staff-detail { grid-template-columns: 1fr; }
  .cbm .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .cbm .style-layout { grid-template-columns: 1fr; }
  .cbm .style-preview { position: static; order: -1; }
  .cbm .style-preview .preview-art { height: 200px; }
}
@media (max-width: 900px) {
  .cbm .cbm-main { padding: 16px 16px 96px; }
  .cbm .hero { grid-template-columns: 1fr; padding: 24px; }
  .cbm .grid2 { grid-template-columns: 1fr; }
  .cbm .measure { grid-template-columns: 1fr; }
  /* Mobile: guided one-at-a-time flow - instructions first, input directly below, then next/previous. */
  .cbm .measure .guide { order: 1; position: static; }
  .cbm .measure .mlist { order: 2; }
  .cbm .measure .mlist.collapsed .mgroup { display: none; }
  .cbm .mobile-only { display: inline-flex !important; }
  .cbm .guide-body { display: block; padding: 14px 16px 16px; }
  .cbm .media { max-width: 420px; width: 100%; margin: 0 auto 14px; }
  .cbm .cbm-figure { max-height: 230px; }
  .cbm .video-ph { aspect-ratio: auto; min-height: 120px; }
  .cbm .mobile-entry { display: block; background: var(--cbm-cream); border: 1px solid var(--cbm-line); padding: 14px; margin: 0 0 16px; }
  .cbm .cbm-brand { font-size: 16px; }
  .cbm .guidelines { columns: 1; }
  .cbm .pic-choices { grid-template-columns: repeat(2, 1fr); }
  .cbm .garment-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cbm .garment-card { padding: 10px; min-height: 0; }
  .cbm .garment-card[aria-pressed=true] { padding: 9px; }
  .cbm .garment-art { height: 110px; }
  .cbm .cbm-figure { height: 260px; }
  .cbm .mobile-entry .minput input { font-size: 22px; min-height: 52px; }
  .cbm .mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--cbm-white); border-top: 1px solid var(--cbm-line); padding: 10px 16px; gap: 10px; z-index: 20; }
  .cbm .mnav .btn { flex: 1; }
  .cbm .guide-head { padding: 14px 16px 0; }
  .cbm .kv { grid-template-columns: 1fr; }
  .cbm .kv dt { margin-top: 6px; }
  .cbm .card { padding: 18px; }
  .cbm .cbm-table.responsive thead { display: none; }
  .cbm .cbm-table.responsive tr { display: block; border-bottom: 1px solid var(--cbm-line); padding: 6px 0; }
  .cbm .cbm-table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 10px; }
  .cbm .cbm-table.responsive td::before { content: attr(data-label); color: var(--cbm-muted); font-size: 12px; text-transform: uppercase; }
  .cbm .cbm-header nav { gap: 12px; }
}
/* ---------- phones: compact progress, single-column measurement list ---------- */
@media (max-width: 900px) {
  .cbm .cbm-steps { display: none; }
  .cbm .cbm-steps-compact { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 10px; margin: 0 0 16px; }
  .cbm .cbm-steps-count { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cbm-muted); white-space: nowrap; }
  .cbm .cbm-steps-compact strong { font-family: var(--cbm-head); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--cbm-brown); }
  .cbm .cbm-steps-bar { grid-column: 1 / -1; height: 3px; background: var(--cbm-line); }
  .cbm .cbm-steps-bar > span { display: block; height: 100%; background: var(--cbm-brown); }
  .cbm .cbm-header--embedded .cbm-header-inner { padding: 6px 16px; min-height: 44px; }
  .cbm .mm { background: transparent; border: 0; }
  .cbm .mm-head { position: sticky; top: 0; z-index: 6; background: var(--cbm-white); border: 1px solid var(--cbm-line); padding: 10px 14px; }
  .cbm .mm-count { flex: 1; min-width: 140px; }
  .cbm .mm-intro { margin: 12px 2px; }
  .cbm .mm .mgroup { background: var(--cbm-white); border: 1px solid var(--cbm-line); margin: 0 0 12px; padding: 2px 0 0; }
  .cbm .mm .mgroup h3 { margin: 10px 14px 4px; }
  .cbm .mm .mfield + .mfield { border-top: 1px solid var(--cbm-line); }
  .cbm .mm .mrow { grid-template-columns: 22px minmax(0, 1fr) minmax(112px, 40%); gap: 10px; padding: 12px 14px 12px 11px; scroll-margin: 96px 0 140px; }
  .cbm .mm .mrow .mlabel { font-size: 16px; font-weight: 600; }
  .cbm .mm .mrow .mlabel small { font-weight: 400; }
  .cbm .mm .minput input { font-size: 18px; min-height: 50px; }
  .cbm .mhelp { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 4px 0 !important; min-height: 32px; background: none; border: 0; color: var(--cbm-brown); font: 600 13px var(--cbm-body) !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .cbm .mhelp { white-space: nowrap; }
  .cbm .mm .mrow .mlabel { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
  .cbm .mhelp::after { content: "+"; text-decoration: none; display: inline-block; width: 1em; text-align: center; }
  .cbm .mhelp[aria-expanded=true]::after { content: "\2212"; }
  .cbm .mguide { padding: 0 14px 14px; }
  .cbm .mguide .media { max-width: 100%; margin: 0 0 12px; }
  .cbm .mguide .cbm-figure { height: 250px; max-height: none; }
  .cbm .mguide .guide-main p:first-child { margin-top: 2px; }
  .cbm .mm-more { border-top: 1px solid var(--cbm-line); padding-top: 8px; }
  .cbm .mm-more summary { min-height: 36px; display: flex; align-items: center; }
  .cbm .mm-foot .actions { margin-top: 8px; }
  .cbm .mnav { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .cbm-typing .mnav { display: none !important; }
  /* Review: one compact line per measurement (label, value as entered, status); conversions are shown while measuring. */
  .cbm .cbm-table.mtable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 9px 10px; }
  .cbm .cbm-table.mtable td { display: block; padding: 0; border: 0; }
  .cbm .cbm-table.mtable td::before { content: none; }
  .cbm .cbm-table.mtable td:nth-child(2) { text-align: right; font-weight: 600; }
  .cbm .cbm-table.mtable td:nth-child(3), .cbm .cbm-table.mtable td:nth-child(4) { display: none; }
  .cbm .cbm-table.mtable td:nth-child(5) { grid-column: 1 / -1; font-size: 13px; }
  .cbm .cbm-table.mtable td:nth-child(5):empty { display: none; }
}
@media (max-width: 370px) {
  .cbm .mm .mrow { grid-template-columns: 20px minmax(0, 1fr) 98px; gap: 8px; padding-right: 10px; }
  .cbm .mm .minput input { padding-right: 30px; }
  .cbm .mm .mrow .mlabel { font-size: 15px; }
}
@media print {
  .cbm .cbm-devbar, .cbm .cbm-header, .cbm .no-print, .cbm .cbm-footer { display: none !important; }
  body.cbm, .cbm-root { background: #fff; }
  .cbm .sheet { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .cbm, .cbm *, .cbm *::before, .cbm *::after { transition: none !important; } }

/* ---------- staff V2 ---------- */
.cbm .staff-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cbm .staff-photos figure { margin: 0; text-align: center; font-size: 12px; }
.cbm .staff-photos img { width: 100%; aspect-ratio: 3 / 5; object-fit: contain; background: #e9e5de; border: 1px solid var(--cbm-line); display: block; }
.cbm .staff-photos .thumb-missing { width: 100%; height: auto; aspect-ratio: 3 / 5; }
.cbm .staff-garment { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; }
.cbm .staff-garment-art { height: 160px; background: #faf5ec; padding: 6px; }
.cbm .mail-att { margin: 4px 0; }
@media (max-width: 700px) { .cbm .staff-photos { grid-template-columns: repeat(2, 1fr); } .cbm .staff-garment { grid-template-columns: 1fr; } }

/* ---------- host-theme guards (WordPress) ----------
 * Themes underline links inside post content (Astra: ".ast-single-post .entry-content a"), which would underline the
 * app's buttons, brand and step links. The app's content region receives focus on every step change for screen
 * readers; it is not an interactive control, so it gets no focus ring. */
.cbm.cbm-root a.btn, .cbm.cbm-root .cbm-brand, .cbm.cbm-root .cbm-header a, .cbm.cbm-root .cbm-steps a, .cbm.cbm-root .choices a { text-decoration: none !important; }
.cbm .cbm-main:focus, .cbm .cbm-main:focus-visible { outline: none; }
.cbm.cbm-root img, .cbm.cbm-root svg { max-width: 100%; box-shadow: none; }
.cbm.cbm-root button { text-shadow: none; box-shadow: none; }
.cbm-root.cbm-under-header { background-image: linear-gradient(var(--cbm-brown), var(--cbm-brown)); background-size: 100% var(--cbm-band, 0px); background-repeat: no-repeat; }
