/* Setup wizard, brand screens. Tokens only. */

.swb { max-width: 1040px; }
.swb-narrow { max-width: 640px; }
.swb button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.swb-after { margin-top: 14px; }

.swb-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.swb-lab { font-size: 13px; font-weight: 700; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.swb-tag { font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.swb-help { font-size: 13px; font-weight: 500; color: var(--text-3); }
.swb-txt { width: 100%; font-family: inherit; font-size: 17px; font-weight: 500; color: var(--text); background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-md, 10px); padding: 13px 14px; outline: none; transition: border-color .16s, box-shadow .16s; }
.swb-txt.is-small { font-size: 14px; padding: 9px 12px; }
textarea.swb-txt { resize: vertical; line-height: 1.45; }
.swb-txt:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft-2); }
.swb-txt:disabled { background: var(--surface-soft); color: var(--text-3); }
.swb-note { border-radius: var(--radius-md, 10px); padding: 12px 14px; font-size: 14px; line-height: 1.45; margin-bottom: 14px; background: var(--primary-soft-2); color: var(--text); }
.swb-note.is-warn { background: var(--warning-soft); }
.swb-note.is-bad { background: var(--warning-soft); }
.swb-error { min-height: 1.4em; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--danger); }

.swb-key { position: absolute; top: 10px; right: 10px; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 1px solid var(--border-strong); border-radius: 5px; font-size: 11px; font-weight: 700; color: var(--text-3); background: var(--surface-soft); }
.swb-opts { display: grid; gap: 12px; }
.swb-opts.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.swb-opts.is-five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.swb-opt { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--text-3); box-shadow: var(--shadow-sm); border-radius: var(--radius-lg, 14px); padding: 18px; display: flex; flex-direction: column; gap: 6px; min-height: 44px; transition: border-color .16s, background .16s, box-shadow .16s; }
.swb-opt:hover { border-color: var(--primary-2); background: var(--surface-soft); }
.swb-opt.is-on { border-color: var(--primary); background: var(--primary-soft-2); box-shadow: 0 0 0 2px var(--primary); }
.swb-opt b { font-size: 16px; font-weight: 700; }
.swb-desc { font-size: 13.5px; line-height: 1.4; color: var(--text-2); }
.swb-badge { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-soft); border: 1px solid var(--border); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.swb-opt.is-on .swb-badge { background: var(--primary); border-color: var(--primary); color: #fff; }
.swb-opts.is-five .swb-opt { min-height: 84px; justify-content: center; align-items: center; text-align: center; padding: 26px 12px 14px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.swb-opts.is-five .swb-key { top: 8px; right: 8px; }
.swb-main { position: absolute; left: 10px; top: 8px; font-size: 11px; font-weight: 700; color: var(--primary); }
/* goal tiles: a picked tile is solid blue so the choice reads at a glance */
.swb-opts.is-five .swb-opt.is-on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.swb-opts.is-five .swb-opt.is-on .swb-main { color: #fff; }
.swb-opts.is-five .swb-opt.is-on .swb-key { background: var(--primary-dark); border-color: transparent; color: #fff; }
.swb-opt:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.swb-board { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; position: relative; }
.swb-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.swb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.swb-card.is-editing { border-color: var(--primary-2); }
.swb-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.swb-card-head h2 { font-size: 15px; font-weight: 700; }
.swb-edit { min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--primary); }
.swb-edit:hover { background: var(--surface-hover); }
.swb-idrow { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.swb-idrow b { display: block; font-size: 18px; font-weight: 800; }
.swb-idrow span { font-size: 13px; color: var(--text-3); }
.swb-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; flex: none; background: var(--surface-soft); }
.swb-logo.is-letter { display: grid; place-items: center; background: var(--primary); color: #fff; font-size: 20px; font-weight: 800; }
.swb-kv { display: flex; flex-direction: column; gap: 7px; padding: 11px 0; border-top: 1px solid var(--border); }
.swb-kv.is-missing { background: var(--warning-soft); border-radius: var(--radius-md, 10px); padding: 11px 12px; border-top-color: transparent; margin-top: 4px; }
.swb-k { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.swb-need { font-size: 11.5px; font-weight: 700; color: var(--warning); }
.swb-v { font-size: 14.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.swb-v.is-add { color: var(--text-3); }
.swb-chips, .swb-sws { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swb-card.is-editing .swb-sws { gap: 16px; }
.swb-chip { font-size: 13.5px; font-weight: 600; min-height: 34px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); transition: background .16s, border-color .16s; }
.swb-chip:hover { background: var(--surface-soft); }
.swb-chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.swb-chip.is-static { cursor: default; min-height: 0; padding: 4px 12px; }
.swb-chip.is-static:not(.is-on):hover { background: var(--surface); }
.swb-swb { position: relative; }
.swb-sw { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); display: block; position: relative; overflow: hidden; }
.swb-sw.is-input { cursor: pointer; }
.swb-sw input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.swb-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 12px; line-height: 1; }
.swb-x::after { content: ""; position: absolute; inset: -10px; }
.swb-addsw { width: 44px; height: 44px; border-radius: 10px; border: 1.5px dashed var(--border-strong); color: var(--text-3); font-size: 20px; }
.swb-skel { height: 150px; border-radius: var(--radius-lg, 14px); background: linear-gradient(90deg, var(--border), var(--surface), var(--border)); background-size: 200% 100%; animation: swb-shimmer 1.3s linear infinite; }

/* The scan beam passes over the board once, and each value wipes in behind it. */
.swb-board.is-scanning::after { content: ""; position: absolute; left: -12px; right: -12px; height: 90px; top: -90px; pointer-events: none; z-index: 3; background: linear-gradient(to bottom, transparent, rgba(0, 113, 219, .14), transparent); border-bottom: 1px solid var(--primary-2); animation: swb-beam 1.5s ease-in .1s forwards; }
.swb-board.is-scanning .swb-idrow > div,
.swb-board.is-scanning .swb-v,
.swb-board.is-scanning .swb-chips,
.swb-board.is-scanning .swb-sws { animation: swb-wipe .65s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d2, 0s); }
.swb-sw { animation: swb-pop .5s cubic-bezier(.2, 1.3, .3, 1) both; animation-delay: var(--d, 0s); }

@keyframes swb-shimmer { to { background-position: -200% 0; } }
@keyframes swb-beam { from { top: -90px; opacity: 1; } to { top: 100%; opacity: 0; } }
@keyframes swb-wipe { from { clip-path: inset(0 100% 0 0); opacity: .3; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes swb-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    .swb-board { grid-template-columns: minmax(0, 1fr); }
    .swb-opts.is-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .swb-opts.is-three { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .swb-board.is-scanning::after { display: none; }
    .swb-board.is-scanning .swb-idrow > div,
    .swb-board.is-scanning .swb-v,
    .swb-board.is-scanning .swb-chips,
    .swb-board.is-scanning .swb-sws,
    .swb-sw,
    .swb-skel { animation: none; }
}
.swb-tag { font-size: 11.5px; font-weight: 600; color: var(--text-3); background: var(--surface-hover); border-radius: 999px; padding: 2px 8px; white-space: nowrap; align-self: flex-start; }
