/* Setup wizard: dark intro column with a stepper, light wizard card, topic tiles, size cards,
   and the live build screen with the agent control room. */

.setup { position: relative; overflow: hidden; background: var(--night); padding: 56px 0 72px; isolation: isolate; min-height: calc(100vh - 64px); }
.setup-art { position: absolute; inset: 0; z-index: -1; }
.setup-art::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask: radial-gradient(ellipse at 20% 20%, #000 20%, transparent 70%); mask: radial-gradient(ellipse at 20% 20%, #000 20%, transparent 70%); }
.setup .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.setup .orb.a { width: 520px; height: 520px; left: -160px; top: -140px; background: #4f46e5; }
.setup .orb.b { width: 420px; height: 420px; right: -120px; bottom: -160px; background: #0891b2; opacity: .4; }

.setup-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 1000px) { .setup-grid { grid-template-columns: 360px minmax(0, 1fr); gap: 48px; } }
.setup-intro { color: var(--night-ink-2); }
@media (min-width: 1000px) { .setup-intro { position: sticky; top: 100px; } }
.setup-intro .eyebrow { color: #a5b4fc; }
.setup-intro h1 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.7rem); }
.setup-intro .lead { color: var(--night-ink-2); font-size: 1.02rem; }
.stepper { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 4px; }
.stepper li { display: flex; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; transition: background .3s; }
.stepper li > span { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
                     font-weight: 800; font-size: .9rem; color: var(--night-ink-2); border: 1px solid var(--night-line); }
.stepper b { display: block; color: #c9cdee; font-size: .95rem; }
.stepper small { color: #6d76a8; font-size: .8rem; }
.stepper li.on { background: rgba(255,255,255,.06); }
.stepper li.on > span { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }
.stepper li.on b { color: #fff; }
.stepper li.done > span { background: rgba(16,185,129,.18); color: #6ee7b7; border-color: transparent; }
.stepper li.done > span::before { content: "✓"; }
.stepper li.done > span { font-size: 0; } .stepper li.done > span::before { font-size: .95rem; }
.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .88rem; }
@media (max-width: 999px) { .stepper, .promises { display: none; } }

.wiz { padding: 32px; border-radius: 22px; box-shadow: 0 30px 80px rgba(3,6,25,.45); animation: rise .5s var(--ease); }
@media (max-width: 560px) { .wiz { padding: 22px 18px; } }
.wiz-step { animation: rise .4s var(--ease); }
.wiz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.wiz-head h2 { margin: 10px 0 6px; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.wiz-head .faint { margin: 0; }
.count { flex: none; font-size: .8rem; font-weight: 700; color: var(--ink-2); background: var(--card-2);
         border: 1px solid var(--line); padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.count.full { color: var(--up); border-color: var(--up); background: var(--up-soft); }

.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); }
#q { width: 100%; font: inherit; font-size: 1rem; padding: 15px 18px 15px 46px; border-radius: 14px;
     border: 1.5px solid var(--line-2); background: var(--card-2); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
#q:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--card); }
#q:disabled { opacity: .6; }
.matches { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px;
           background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); }
.matches li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: .94rem; }
.matches li.active { background: var(--accent-soft); }
.matches .opt-l { flex: 1; font-weight: 600; }
.matches .opt-field { font-size: .76rem; color: var(--ink-3); }
.matches li.add .opt-l { color: var(--accent); }
.matches .none { color: var(--ink-3); cursor: default; }

.chosen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 99px; font-size: .88rem; font-weight: 650;
        background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.25); animation: pop .3s var(--ease); }
.chip.loading { background: var(--line-2); color: var(--ink-2); box-shadow: none; animation: pulse 1.4s infinite; }
.chip-x { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.22); color: inherit; font-size: 1rem; line-height: 1; }
.chip-x:hover { background: rgba(255,255,255,.4); }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.owns { display: grid; gap: 8px; margin-top: 12px; }
.own { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: .85rem; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--line-2); }
.own-wait { color: var(--ink-3); font-style: italic; }
.cat { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .78rem; }
.cat-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: .95rem; padding: 0 4px; }

.tiles-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.tiles-head h3 { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.linkish { font: inherit; font-size: .86rem; font-weight: 700; color: var(--accent); background: none; border: 0; cursor: pointer; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tiles.all { max-height: 420px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.field-h { grid-column: 1 / -1; margin: 10px 0 0; font-size: .8rem; color: var(--ink-2); }
.tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; cursor: pointer; text-align: left;
        font: inherit; font-size: .9rem; font-weight: 650; color: var(--ink); background: var(--card); border: 1.5px solid var(--line);
        transition: border-color .2s, transform .15s var(--ease), box-shadow .2s, background .2s; }
.tile:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.tile:disabled { opacity: .45; cursor: not-allowed; }
.tile-ico { font-size: 1.25rem; }
.tile-l { flex: 1; line-height: 1.25; }
.tile-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .85rem; font-weight: 800;
              color: var(--ink-3); background: var(--card-2); border: 1px solid var(--line); }
.tile.on { border-color: var(--accent); background: var(--accent-soft); }
.tile.on .tile-check { background: var(--accent); color: #fff; border-color: transparent; }

.form-error { margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--down-soft); color: var(--down); font-size: .9rem; font-weight: 600; }
.wiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.wiz-foot .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.size { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 18px; border-radius: 16px;
        cursor: pointer; font: inherit; text-align: left; background: var(--card); color: var(--ink); border: 1.5px solid var(--line);
        transition: border-color .2s, box-shadow .2s, transform .15s var(--ease); }
.size:hover { border-color: var(--accent); transform: translateY(-2px); }
.size.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.size-n { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.size.on .size-n { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.size-t { font-weight: 700; font-size: .92rem; }
.size-s { font-size: .8rem; color: var(--ink-3); }
.size-rec { position: absolute; top: -10px; right: 12px; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
            padding: 2px 8px; border-radius: 99px; background: var(--up-soft); color: var(--up); }
.summary { margin-top: 22px; padding: 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.summary-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* live build */
.live .elapsed { font-size: 1.1rem; font-weight: 700; color: var(--ink-2); }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 22px; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .6s var(--ease);
         background-size: 200% 100%; animation: sheen 2s linear infinite; }
@keyframes sheen { from { background-position: 0 0; } to { background-position: -200% 0; } }
.live-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1180px) { .live-grid { grid-template-columns: 1.25fr 1fr; } }
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.st { display: flex; gap: 14px; padding: 12px; border-radius: 14px; transition: background .3s; }
.st b { display: block; font-size: .95rem; }
.st-sub { font-size: .82rem; color: var(--ink-3); }
.st-ico { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; margin-top: 1px; }
.st.active { background: var(--accent-soft); }
.st.active .st-ico { border-color: var(--accent); border-top-color: transparent; animation: spin .9s linear infinite; }
.st.done .st-ico { background: var(--up); border-color: var(--up); }
.st.done .st-ico::after { content: "✓"; color: #fff; font-size: .8rem; font-weight: 800; }
.st.fail .st-ico { background: var(--down); border-color: var(--down); animation: none; }
.st.fail .st-ico::after { content: "!"; color: #fff; font-weight: 800; }
.tip-line { margin: 20px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line);
            font-size: .9rem; color: var(--ink-2); transition: opacity .3s; }
.tip-line b { color: var(--ink); }
