/* Full-screen setup (rows 34/35/37): one question per screen on the dot grid, fits 100vh. */
body.setup-page { margin: 0; overflow: hidden; background: var(--canvas); }
.setup { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background-color: var(--canvas); background-image: radial-gradient(var(--hairline) 1px, transparent 1px); background-size: 16px 16px; }
.setup-bar { position: absolute; inset: 0 0 auto; height: 3px; background: var(--fill); }
.setup-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .4s cubic-bezier(.2,.8,.2,1); }
.setup-head { display: flex; align-items: center; gap: 12px; padding: 20px 28px; flex: none; }
.setup-logo { width: 30px; height: auto; }
.setup-skipall, .setup-skip { margin-left: auto; background: none; border: 0; color: var(--subtle); font: inherit; font-size: 14px; cursor: pointer; padding: 8px 10px; border-radius: 8px; }
.setup-skip { margin-left: 0; }
.setup-skipall:hover, .setup-skip:hover { color: var(--text); background: var(--tint); }
.setup-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 24px 10vh; overflow: hidden; }
.setup-step { width: 100%; max-width: 480px; transform-origin: top center; }
.setup-step.wide { max-width: 800px; }
@media (prefers-reduced-motion: no-preference) {
  .setup-step { animation: setup-in .18s cubic-bezier(.2,.8,.2,1); }
  .setup-step.back { animation-name: setup-back; }
}
@keyframes setup-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes setup-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.setup-step h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: -.02em; font-weight: 600; color: var(--strong); margin: 0 0 12px; }
.setup-line { color: var(--subtle); font-size: 16px; line-height: 1.5; margin: 0 0 32px; }
.setup-fields { display: grid; gap: 14px; }
.setup-fields input, .setup-fields select { height: 48px; padding: 0 16px; border-radius: 12px; font-size: 16px; width: 100%; box-sizing: border-box; }
/* Checkboxes (tools: "I pay salaries", "Amount includes VAT") keep their own size, not the 48px field box. */
.setup-fields input:is([type=checkbox], [type=radio]) { width: 18px; height: 18px; padding: 0; border-radius: 4px; flex: none; accent-color: var(--orange); }
.setup-actions { display: flex; align-items: center; gap: 12px; margin-top: 36px; }
.setup-go { height: 44px; padding: 0 22px; border-radius: 12px; font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.setup-backbtn { height: 44px; padding: 0 18px; border-radius: 12px; background: none; border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.setup-backbtn:hover { background: var(--tint); }
.setup-msg:not(:empty) { margin-top: 14px; }
.setup-note { color: var(--subtle); font-size: 13px; margin-top: 16px; }
/* Choices: cards with a selected glow. */
.setup-choices { display: grid; gap: 12px; }
.setup-choices.grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.setup-choices.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.setup-choice { position: relative; display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 18px 20px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--base); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color .15s, box-shadow .2s, background-color .15s; }
.setup-choice:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.setup-choice.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--base));
  box-shadow: 0 0 0 1px var(--brand), 0 0 0 6px color-mix(in srgb, var(--brand) 12%, transparent), 0 8px 28px -10px color-mix(in srgb, var(--brand) 45%, transparent); }
.setup-choice:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 0 0 4px var(--ring); }
.setup-choice .ic { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 1px; }
.setup-choice b { display: block; color: var(--strong); font-weight: 600; margin-bottom: 4px; }
.setup-choice small { color: var(--subtle); font-size: 13.5px; line-height: 1.45; }
.setup-choice.featured { grid-column: 1 / -1; }
.setup-badge { position: absolute; top: 12px; right: 12px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--brand) 12%, var(--base)); color: var(--brand); }
:root[data-theme="dark"] .setup-badge { color: var(--link); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .setup-badge { color: var(--link); } }
.setup-choice:disabled { opacity: .55; cursor: not-allowed; }
/* Art cards */
.setup-artcard { position: relative; height: 190px; margin: 0 0 28px; border-radius: 18px; overflow: hidden;
  /* Theme tokens only (row 39): the brand and its deep shade, so light, dark and brand changes follow. */
  --art-from: color-mix(in srgb, var(--brand) 88%, white); --art-mid: var(--orange-deep, var(--brand)); --art-to: color-mix(in srgb, var(--orange-deep, var(--brand)) 60%, black);
  background: radial-gradient(120% 140% at 15% 0%, var(--art-from) 0%, var(--art-mid) 45%, var(--art-to) 100%); box-shadow: inset 0 0 0 1px oklch(100% 0 0 / .12); }
:root[data-theme="dark"] .setup-artcard { --art-to: color-mix(in srgb, var(--orange-deep, var(--brand)) 45%, black); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .setup-artcard { --art-to: color-mix(in srgb, var(--orange-deep, var(--brand)) 45%, black); } }
/* Compact layout when a step is taller than the screen (setup.js fit()): before any scaling. */
.setup-step.compact h1 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 8px; }
.setup-step.compact .setup-artcard { height: 130px; margin-bottom: 16px; }
.setup-step.compact .setup-facts { gap: 10px; }
.setup-step.compact .setup-choice { padding: 12px 16px; }
.setup-trust { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 13px; color: var(--subtle); }
.setup-trust li { display: flex; gap: 8px; align-items: flex-start; }
.setup-trust .ic { width: 15px; height: 15px; color: var(--brand); flex: none; margin-top: 2px; }
.setup-filelabel { display: grid; gap: 6px; font-size: 13px; color: var(--subtle); }
.setup-filelabel textarea { font: inherit; font-family: var(--mono, ui-monospace, monospace); font-size: 13px; }
.setup-dl li.focus span { font-weight: 600; color: var(--strong); }
.setup-artcard canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.setup-art-label { position: absolute; left: 16px; bottom: 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #fff; opacity: .92; }
.setup-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.setup-facts li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--strong); }
.setup-facts .ic { width: 20px; height: 20px; color: var(--brand); flex: none; }
/* Preset pickers */
.setup-preset { display: grid; gap: 14px; }
.setup-preset label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--subtle); }
.setup-mods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.setup-mods span { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: var(--fill); color: var(--text); }
/* AI setup chat */
.setup-step.chat { max-width: 760px; display: flex; flex-direction: column; height: min(680px, calc(100dvh - 150px)); }
.setup-chat { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 12px; scroll-behavior: smooth; }
.setup-chip-access { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 500;
  background: var(--base); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); margin-bottom: 14px; }
.setup-chip-access .ic { width: 14px; height: 14px; color: var(--brand); }
.smsg { max-width: 88%; padding: 12px 16px; border-radius: 16px; line-height: 1.5; white-space: pre-line; font-size: 15px; }
.smsg.ai { align-self: flex-start; background: var(--base); border: 1px solid var(--line); border-radius: 16px 16px 16px 6px; }
.smsg.me { align-self: flex-end; background: var(--fill); border-radius: 16px 16px 6px 16px; }
@media (prefers-reduced-motion: no-preference) { .smsg, .scard { animation: setup-in .18s ease-out; } }
.scard { align-self: stretch; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: var(--base); border-radius: 16px; padding: 16px 18px; display: grid; gap: 10px; }
.scard h3 { margin: 0; font-size: 16px; color: var(--strong); display: flex; align-items: center; gap: 8px; }
.scard h3 .ic { width: 18px; height: 18px; color: var(--brand); }
.scard p { margin: 0; color: var(--subtle); font-size: 14px; }
.scard .setup-fields { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.scard .setup-fields input, .scard .setup-fields select { height: 42px; font-size: 15px; }
.scard .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.scard .nc { font-size: 12.5px; color: var(--warning); display: flex; gap: 6px; align-items: center; }
.setup-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.setup-quick button { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--base); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.setup-quick button:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.setup-input { display: flex; gap: 8px; }
.setup-input input { flex: 1; height: 46px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
.setup-dl { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.setup-dl li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--base); border: 1px solid var(--line); font-size: 14px; }
.setup-dl time { color: var(--subtle); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .setup-head { padding: 14px 16px; }
  .setup-stage { place-items: start center; padding: 2vh 16px 16px; }
  .setup-artcard { height: 150px; }
  .setup-step.chat { height: calc(100dvh - 90px); }
}
