/* Branding questionnaire UI — shared styles for the form, mockup and element library.
   Standard calm form UI with a light Nightly Cinnamon Roll accent:
   Shrikhand wordmark only, chocolate primary, mint progress, butter selection, brick errors. */
:root {
  color-scheme: light;
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F4F2EE;
  --text: #1F1B18;
  --text-2: #6B635D;
  --line: #E4E0DA;
  --line-strong: #CBC5BD;
  --brand: #44362E;          /* NCR chocolate */
  --brand-hover: #2E241E;
  --brand-ink: #FFFFFF;
  --select: #FFF4DC;         /* NCR butter, softened */
  --mint: #62D1B4;           /* NCR mint */
  --mint-soft: #E3F6F0;
  --mint-ink: #1F7A63;
  --danger: #9E4242;         /* NCR brick */
  --danger-soft: #F8ECEC;
  --danger-line: #E3C9C9;
  --warn-soft: #FFF4DC;
  --warn-line: #F0DDB4;
  --focus: #2F9E83;
  --radius: 10px;
  --radius-sm: 6px;
  --notch-r: 13px;           /* radius of the corner selector */
  --notch-gap: 4px;          /* space between selector and the cut edge */
  --font-sans: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-brand: "Shrikhand", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font-sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 700; color: var(--text); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand); }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.muted { color: var(--text-2); }
.mono { font-family: var(--font-mono); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.brand .studio { font-family: var(--font-brand); color: var(--brand); font-size: 18px; line-height: 1; }
.brand .client { font-size: 14px; color: var(--text-2); }
.save { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.save .dot { width: 8px; height: 8px; background: var(--mint); border-radius: 999px; }
.save.is-saving .dot { background: var(--line-strong); animation: pulse 1s ease-in-out infinite; }
.save.is-off { color: var(--danger); font-weight: 600; }
.save.is-off .dot { background: var(--danger); }
.save.is-offline .dot { background: #D9A93B; }
@keyframes pulse { 50% { opacity: .3; } }
.progress { height: 4px; background: var(--line); }
.progress span { display: block; height: 100%; background: var(--mint); transition: width 200ms ease; }

/* ---------- Shell ---------- */
.shell { max-width: 1080px; margin: 0 auto; padding-inline: 16px; padding-block: 32px 64px; display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 40px; align-items: start; }
main.step { min-width: 0; display: grid; gap: 20px; max-width: 760px; }
.step-head { display: grid; gap: 6px; margin-bottom: 4px; }
.step-head h1 { font-size: clamp(28px, 4vw, 34px); line-height: 1.15; }
.step-head p { max-width: 60ch; color: var(--text-2); }

/* ---------- Sections menu ---------- */
.sections { position: sticky; top: 88px; }
.sections-toggle { display: none; }
.sections-title { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0 10px 8px; display: flex; justify-content: space-between; }
.sections ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sections a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; text-decoration: none; color: var(--text-2); font-size: 15px; border-radius: var(--radius-sm); }
.sections a:hover { background: var(--surface); color: var(--text); }
.sections .s-mark { width: 18px; height: 18px; flex: none; display: grid; place-items: center; font-size: 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); color: var(--text-2); }
.sections .is-done { color: var(--text); }
.sections .is-done .s-mark { background: var(--mint); border-color: var(--mint); color: var(--brand); }
.sections .is-current { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--mint); }
.sections .is-current .s-mark { border-color: var(--brand); color: var(--brand); }
.sections .is-error .s-mark { border-color: var(--danger); background: var(--danger); color: #fff; }
.sections .s-note { margin-left: auto; font-size: 12px; color: var(--danger); font-weight: 600; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; gap: 16px; padding-block: 0 64px; }
}
/* Compact sections menu: JS adds .is-compact below 860px (and the library forces it in the phone demo). */
.sections.is-compact { position: static; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shell .sections.is-compact { margin-inline: -16px; border-width: 0 0 1px; border-radius: 0; }
.sections.is-compact .sections-title { display: none; }
.sections.is-compact .sections-toggle { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.sections.is-compact .sections-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sections-toggle .st-text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.sections-toggle .st-step { font-size: 13px; color: var(--text-2); }
.sections-toggle .st-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sections-toggle .st-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.sections-toggle .st-bar span { display: block; height: 100%; background: var(--mint); }
.sections-toggle .st-err { color: var(--danger); font-weight: 600; }
.sections-toggle .chev { transition: transform 150ms ease; }
.sections-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sections.is-compact ol { display: none; padding: 8px 8px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.sections.is-compact.is-open ol { display: grid; }
.sections.is-compact a { padding: 12px 10px; }

/* ---------- Question blocks ---------- */
.q { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px; display: grid; gap: 12px; min-width: 0; margin: 0; }
.q > legend, .q .qlabel { font-size: 17px; font-weight: 600; line-height: 1.35; padding: 0; color: var(--text); }
fieldset.q > legend { float: left; width: 100%; margin-bottom: 2px; }
fieldset.q > legend + * { clear: left; }
.help { font-size: 14px; color: var(--text-2); }
.req { color: var(--danger); }
.opt { font-weight: 400; font-size: 14px; color: var(--text-2); }
.counter { font-size: 13px; color: var(--text-2); justify-self: start; }
.counter.is-max { color: var(--brand); font-weight: 600; }
.q.has-error { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.error-msg { display: flex; gap: 6px; align-items: flex-start; color: var(--danger); font-size: 14px; font-weight: 600; }
.error-msg .icon { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- Text inputs ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label { font-weight: 600; font-size: 15px; }
.input, .textarea, .select { font: inherit; border: 1px solid var(--line-strong); background: var(--surface); padding: 10px 12px; min-height: 44px; border-radius: var(--radius-sm); width: 100%; color: var(--text); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #A39B94; }
.input:hover, .textarea:hover { border-color: var(--text-2); }
.input:focus-visible, .textarea:focus-visible, .is-focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); background: #FFFCFC; }
.input:disabled, .textarea:disabled { background: var(--surface-2); color: var(--text-2); cursor: not-allowed; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-size: 14px; }
.input-prefix .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Notch selector (cards, tiles) ----------
   The card body is masked with a circle at its top-right corner; the selector
   sits in that bite, visually separate from the content being picked. */
.pick { position: relative; display: block; cursor: pointer; min-width: 0; }
.pick > input { position: absolute; top: 0; right: 0; width: 1px; height: 1px; opacity: 0; }
.pick-body {
  --cut: calc(var(--notch-r) + var(--notch-gap));
  display: grid; gap: 6px; align-content: start; height: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 8px 8px 12px;
  -webkit-mask: radial-gradient(circle at calc(100% - 4px) 4px, #0000 var(--cut), #000 calc(var(--cut) + .5px));
          mask: radial-gradient(circle at calc(100% - 4px) 4px, #0000 var(--cut), #000 calc(var(--cut) + .5px));
  transition: border-color 120ms ease, background 120ms ease;
}
.pick:hover .pick-body { border-color: var(--line-strong); background: #FFFEFC; }
.pick > input:checked ~ .pick-body { background: var(--select); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pick > input:focus-visible ~ .pick-body { box-shadow: inset 0 0 0 2px var(--focus); border-color: var(--focus); }
.pick > input:focus-visible ~ .pick-mark { outline: 2px solid var(--focus); outline-offset: 2px; }
/* the mask clips anything drawn outside the card, so focus is shown inside the card and on the selector */
.pick > input:disabled ~ .pick-body { opacity: .5; }
.pick.is-blocked { cursor: not-allowed; }
.pick-mark {
  position: absolute; top: calc(4px - var(--notch-r)); right: calc(4px - var(--notch-r));
  width: calc(var(--notch-r) * 2); height: calc(var(--notch-r) * 2); border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: var(--brand-ink); pointer-events: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.pick:hover .pick-mark { border-color: var(--brand); }
.pick-mark svg { width: 14px; height: 14px; opacity: 0; }
.pick > input:checked ~ .pick-mark { background: var(--brand); border-color: var(--brand); }
.pick > input:checked ~ .pick-mark svg { opacity: 1; }
.pick.is-radio .pick-mark::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--brand-ink); opacity: 0; }
.pick.is-radio > input:checked ~ .pick-mark::after { opacity: 1; }
.pick.is-radio .pick-mark svg { display: none; }
.pick.shake .pick-mark { animation: nudge 300ms ease; }
@keyframes nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.pick-name { font-weight: 600; font-size: 15px; padding: 0 4px; padding-right: 18px; }
.pick-cap { font-size: 13px; line-height: 1.45; color: var(--text-2); padding: 0 4px; }

/* option cards (single / multi): text only */
.options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); padding-top: 4px; }
.options.is-list { grid-template-columns: 1fr; }
.options .pick-body { padding: 12px 36px 12px 14px; min-height: 52px; align-content: center; }
.options .pick-name { padding: 0; font-weight: 500; }
.options .pick-cap { padding: 0; }
.other-field { grid-column: 1 / -1; }

/* tile grids (image-choice) */
.tiles { display: grid; gap: 16px 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding-top: 6px; }
.none-pick .pick-body { place-content: center; text-align: center; min-height: 100px; border-style: dashed; background: var(--bg); padding: 16px 28px; }
.none-pick > input:checked ~ .pick-body { border-style: solid; }
.reveal { display: grid; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.reveal[hidden] { display: none; }
.reveal > label { font-weight: 600; font-size: 15px; }

/* style board miniatures */
.board { aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--radius-sm); overflow: hidden; display: grid; grid-template-rows: 14% 1fr 26%; font-size: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.board .bnav { display: flex; align-items: center; justify-content: space-between; padding: 0 8%; border-bottom: 1px solid rgba(0,0,0,.08); }
.board .bnav i { display: inline-block; height: 4px; width: 18px; background: currentColor; opacity: .35; margin-left: 4px; }
.board .blogo { width: 22px; height: 7px; }
.board .bhero { position: relative; display: grid; align-content: center; gap: 5px; padding: 0 8%; overflow: hidden; }
.board .bh { font-size: 15px; line-height: 1.05; max-width: 70%; position: relative; z-index: 1; }
.board .bp { height: 4px; width: 55%; opacity: .3; background: currentColor; position: relative; z-index: 1; }
.board .bbtn { width: 46px; height: 12px; position: relative; z-index: 1; }
.board .bcards { display: grid; grid-template-columns: repeat(3,1fr); gap: 6%; padding: 4% 8% 6%; }
.board .bcards b { display: block; }
.board svg.deco { position: absolute; right: 0; bottom: 0; height: 100%; }

/* palettes */
.pal { display: grid; grid-template-columns: repeat(5,1fr); height: 88px; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.pal span { position: relative; }
.pal code { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font: 10px var(--font-mono); background: rgba(255,255,255,.92); color: #222; border-radius: 3px; padding: 2px 1px; opacity: 0; transition: opacity 120ms; writing-mode: vertical-rl; }
.pick:hover .pal code, .pick > input:focus-visible ~ .pick-body .pal code { opacity: 1; }

/* type specimens: 2-column grid so headline + paragraph read at a realistic measure */
.tiles.is-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .tiles.is-wide { grid-template-columns: 1fr; } }
.tiles.is-wide .none-pick { grid-column: 1 / -1; }
.tiles.is-wide .none-pick .pick-body { min-height: 64px; }
.spec { background: var(--bg); border-radius: var(--radius-sm); padding: 20px 20px 22px; display: grid; align-content: start; gap: 10px; color: #1d1d1d; }
.spec .sh { font-size: 28px; line-height: 1.12; text-wrap: balance; }
.spec .sb { font-size: 16px; line-height: 1.55; color: #3d3d3d; }

/* shape picks */
.shape-demo { background: var(--bg); border-radius: var(--radius-sm); padding: 18px; display: grid; }
.sd-card { background: #fff; border: 1px solid #D9D4CD; padding: 14px; display: grid; gap: 8px; justify-items: start; }
.sd-line { height: 6px; width: 80%; background: #D9D4CD; border-radius: 3px; }
.sd-line.short { width: 55%; }
.sd-btn { margin-top: 4px; background: #2E5E7E; color: #fff; font-size: 12px; font-weight: 600; padding: 8px 14px; }

/* photos */
.photo { aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-fallback { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 12px; text-align: center; font-size: 13px; color: var(--text-2); background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, #EFECE7 10px 20px); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 15px; cursor: pointer; transition: background 120ms, border-color 120ms; }
.chip span:hover { border-color: var(--brand); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip input:checked + span::before { content: ""; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }
.chip-add { display: inline-flex; gap: 6px; }
.chip-add .input { min-height: 38px; border-radius: 999px; padding: 6px 14px; width: 180px; }
.chip.is-custom span { border-style: dashed; }

/* ---------- Agreement scale ---------- */
.scale-key { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; }
.scale-key .ticks { display: flex; gap: 6px; }
.scale-key .ticks span { width: 52px; text-align: center; font-size: 11px; line-height: 1.2; color: var(--text-2); }
.scales { display: grid; gap: 4px; }
.scale { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.scale:first-child { border-top: 0; }
.scale .l { text-align: right; font-size: 15px; font-weight: 500; }
.scale .r { font-size: 15px; font-weight: 500; }
.seg { display: flex; gap: 6px; align-items: center; }
.seg label { width: 52px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg i { display: block; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); transition: background 120ms, border-color 120ms; }
.seg label:nth-child(1) i, .seg label:nth-child(5) i { width: 36px; height: 36px; }
.seg label:nth-child(2) i, .seg label:nth-child(4) i { width: 28px; height: 28px; }
.seg label:nth-child(3) i { width: 20px; height: 20px; }
.seg label:hover i { border-color: var(--brand); }
.seg input:checked + i { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--surface); }
.seg input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.scale-single { display: grid; gap: 8px; }
.scale-single .ends { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); max-width: 260px; }

/* ---------- Matrix ---------- */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-size: 15px; }
.matrix th { font-size: 13px; font-weight: 600; color: var(--text-2); text-align: center; padding: 8px; width: 110px; }
.matrix th:first-child { text-align: left; width: auto; }
.matrix td { border-top: 1px solid var(--line); padding: 4px 8px; text-align: center; }
.matrix td:first-child { text-align: left; padding: 12px 8px 12px 0; }
.matrix tr:hover td { background: var(--bg); }
.radio { appearance: none; width: 22px; height: 22px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; margin: 0; }
.radio:hover { border-color: var(--brand); }
.radio:checked { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px var(--surface); }
.radio:focus-visible, .checkbox:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.matrix-cards { display: none; }
.segbtns { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segbtns label { position: relative; }
.segbtns input { position: absolute; opacity: 0; }
.segbtns span { display: grid; place-items: center; min-height: 40px; padding: 4px 6px; font-size: 13px; text-align: center; cursor: pointer; background: var(--surface); }
.segbtns label + label span { border-left: 1px solid var(--line-strong); }
.segbtns input:checked + span { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.segbtns input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.mcard { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.mcard > span { font-weight: 500; }
.matrix-wrap.force-cards .matrix { display: none; }
.matrix-wrap.force-cards .matrix-cards { display: grid; gap: 10px; }
@media (max-width: 640px) {
  .matrix-wrap.responsive .matrix { display: none; }
  .matrix-wrap.responsive .matrix-cards { display: grid; gap: 10px; }
}

/* ---------- Plain checkbox ---------- */
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.checkbox { appearance: none; width: 20px; height: 20px; flex: none; margin: 2px 0 0; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.checkbox:checked { background: var(--brand); border-color: var(--brand); }
.checkbox:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }

/* ---------- Colors ---------- */
.color-rows { display: grid; gap: 10px; }
.color-row { display: grid; grid-template-columns: 44px 120px minmax(0,1fr) 44px; gap: 8px; align-items: center; }
.swatch { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: none; cursor: pointer; overflow: hidden; }
.swatch::-webkit-color-swatch-wrapper { padding: 0; }
.swatch::-webkit-color-swatch { border: 0; }
.swatch::-moz-color-swatch { border: 0; }
.color-row .hex { font-family: var(--font-mono); font-size: 14px; text-transform: uppercase; }
@media (max-width: 560px) { .color-row { grid-template-columns: 44px minmax(0,1fr) 44px; } .color-row .note { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Repeater ---------- */
.repeat { display: grid; gap: 12px; }
.rcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; background: var(--bg); }
.rcard-head { display: flex; justify-content: space-between; align-items: center; }
.rcard-head h4 { font-size: 15px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--font-sans); border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); padding: 13px 20px; min-height: 44px; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; transition: background 120ms ease, border-color 120ms ease; }
.btn:hover { background: var(--brand-hover); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--brand); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--brand); padding-inline: 8px; text-decoration: underline; text-underline-offset: 3px; }
.btn.quiet:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.dashed { width: 100%; background: transparent; color: var(--brand); border: 1.5px dashed var(--line-strong); }
.btn.dashed:hover { border-color: var(--brand); background: var(--surface); }
.btn.icon-only { padding: 0; width: 44px; background: transparent; border-color: transparent; color: var(--text-2); }
.btn.icon-only:hover { background: var(--surface-2); color: var(--danger); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 999px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; }

/* ---------- Banners & panels ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.banner .icon { margin-top: 2px; }
.banner strong { display: block; }
.banner .b-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.banner.info { background: var(--mint-soft); border-color: #BFE8DC; }
.banner.info .icon { color: var(--mint-ink); }
.banner.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.banner.error { background: var(--danger-soft); border-color: var(--danger-line); }
.banner.error .icon { color: var(--danger); }
.banner ul { margin: 6px 0 0; padding-left: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; align-content: start; background: var(--surface); }
.panel.fail { border-color: var(--danger-line); background: var(--danger-soft); }
.panel.ok { border-color: #BFE8DC; background: var(--mint-soft); }
.panel.offline { background: var(--warn-soft); border-color: var(--warn-line); }
.panel h3 { font-size: 20px; line-height: 1.25; }
.panel .row { display: flex; gap: 10px; flex-wrap: wrap; }
.copybox { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.copybox span { padding: 10px 12px; flex: 1; min-width: 0; user-select: all; overflow-wrap: anywhere; }
.copybox button { border: 0; border-left: 1px solid var(--line-strong); background: var(--surface); font: 600 14px var(--font-sans); color: var(--text); padding: 0 14px; cursor: pointer; }
.copybox button:hover { background: var(--bg); }

/* ---------- Welcome & review ---------- */
.welcome { max-width: 640px; display: grid; gap: 16px; }
.welcome h1 { font-size: clamp(30px, 5vw, 40px); line-height: 1.12; }
.welcome .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.review { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.review-sec { padding: 18px 20px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.review-sec:first-child { border-top: 0; }
.review-sec header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.review-sec h3 { font-size: 17px; }
.review dl { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 16px; margin: 0; font-size: 15px; }
.review dt { color: var(--text-2); }
.review dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.review dd.skipped { color: var(--text-2); font-style: italic; }
.review dd.missing { color: var(--danger); font-weight: 600; }
.review .mini-sw { display: inline-flex; vertical-align: middle; border-radius: 3px; overflow: hidden; margin-right: 6px; }
.review .mini-sw i { width: 12px; height: 16px; }
@media (max-width: 560px) { .review dl { grid-template-columns: 1fr; gap: 2px; } .review dd { margin-bottom: 8px; } }

/* ---------- Tooltip-ish live notice ---------- */
.notice { font-size: 13px; color: var(--brand); font-weight: 600; min-height: 1em; }

@media (max-width: 560px) {
  .top-in { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
  .brand { flex-direction: column; gap: 4px; }
  .save { font-size: 12px; text-align: right; max-width: 48%; }
  .scale-key { display: none; }
  .scale { grid-template-columns: 1fr 1fr; gap: 6px; }
  .scale .l { text-align: left; }
  .scale .r { text-align: right; }
  .scale .seg { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .q { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ======================================================================
   App additions (not in the reference pages)
   ====================================================================== */
:root { color-scheme: light; }
html { background: var(--bg); }
[hidden] { display: none !important; }
.shell.is-solo { grid-template-columns: minmax(0, 1fr); }
.shell.is-solo main.step { margin-inline: auto; width: 100%; }
main.step:focus { outline: none; }
.quote { margin: 4px 0 0; padding: 12px 16px; border-left: 3px solid var(--mint); background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--text); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.swatch.is-unknown { opacity: .45; }
.sections a { cursor: pointer; }
.btn .spinner + span { margin-left: 0; }
.welcome-logo { max-height: 56px; width: auto; align-self: start; }
.panel .row { flex-wrap: wrap; }
.is-readonly .pick > input:not(:checked) ~ .pick-body { opacity: .55; }
.is-readonly input, .is-readonly textarea { cursor: default; }
.center-msg { max-width: 560px; margin: 12vh auto; padding: 0 16px; display: grid; gap: 12px; }
h1:focus, h1:focus-visible { outline: none; }
.progress span { width: 0; }
.included { list-style: none; margin: 2px 0 4px; padding: 12px 16px; background: var(--bg); border-radius: var(--radius-sm); columns: 2 220px; column-gap: 24px; font-size: 14px; }
.included li { break-inside: avoid; padding: 3px 0 3px 22px; position: relative; }
.included li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 6px; border-left: 2px solid var(--mint-ink); border-bottom: 2px solid var(--mint-ink); transform: rotate(-45deg); }
