/* ============================================================
   Builder-UI — egen chrome ovanpå det delade designsystemet
   (site/showcase.css ger :root-tokens, body, .eyebrow, .card, .org m.m.)
   ============================================================ */

body { min-height: 100vh; }
.wrapcol { position: relative; z-index: 1; }

/* shared buttons / inputs */
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; border: none;
  border-radius: 12px; padding: 14px 24px; font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -14px var(--accent-glow); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-ghost {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 22px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: border-color 0.18s, transform 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-1px); }
.link-btn { background: none; border: none; color: var(--text-dim); font-size: 13px; cursor: pointer; }
.link-btn:hover { color: var(--text); text-decoration: underline; }

/* ---------- KEY SETUP ---------- */
.setup { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; }
.setup-badge { display: inline-flex; width: fit-content; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); padding: 7px 14px; border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 18px; }
.setup h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.setup-lead { color: var(--text-dim); font-size: 16px; margin-top: 16px; }
.setup-field { margin-top: 26px; }
.setup-field input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 15px 16px; color: var(--text); font-size: 15px; font-family: ui-monospace, Menlo, monospace; outline: none; }
.setup-field input:focus { border-color: var(--accent); }
.setup-err { color: var(--red); font-size: 13px; margin-top: 10px; }
.setup .btn-primary { margin-top: 18px; width: 100%; }
.setup-help { margin-top: 22px; font-size: 13.5px; color: var(--text-dim); }
.setup-help a { color: var(--accent-2); }

/* ---------- INTAKE FORM ---------- */
.form-wrap { max-width: 680px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 24px; }
.form-head { margin-bottom: 36px; }
.form-head h1 { font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin-top: 14px; }
.form-lead { color: var(--text-dim); font-size: 16px; margin-top: 14px; }
.intake { display: flex; flex-direction: column; gap: 18px; }
.frow { display: flex; flex-direction: column; gap: 7px; }
.flabel { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.fin { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; color: var(--text); font-size: 15px; font-family: inherit; outline: none; transition: border-color 0.18s; }
.fin:focus { border-color: var(--accent); }
select.fin { cursor: pointer; }
.intake-text { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: var(--text); font-size: 15px; font-family: inherit; line-height: 1.55; resize: vertical; outline: none; min-height: 150px; }
.intake-text:focus { border-color: var(--accent); }
.build-btn { margin-top: 8px; align-self: flex-start; font-size: 16px; padding: 15px 30px; }
.form-foot { margin-top: 28px; }

/* ---------- PROGRESS ---------- */
.progress-wrap { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 24px; }
.prog-head { margin-bottom: 28px; }
.prog-company { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; letter-spacing: -0.025em; margin-top: 10px; }
.prog-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.prog-step { display: flex; align-items: center; gap: 11px; color: var(--text-dim); font-size: 15px; transition: color 0.3s; }
.prog-step .prog-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; transition: all 0.3s; }
.prog-step.active { color: var(--text); }
.prog-step.active .prog-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 1.4s infinite; }
.prog-step.done { color: var(--green); }
.prog-step.done .prog-dot { border-color: var(--green); background: var(--green); animation: none; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.5); } 50% { box-shadow: 0 0 0 7px rgba(99,102,241,0); } }
.analysis-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px 28px; min-height: 240px; }
.analysis-text { white-space: pre-wrap; font-size: 15px; line-height: 1.65; color: var(--text); max-height: 60vh; overflow-y: auto; }

/* ---------- RESULT ---------- */
.result-wrap { max-width: 1080px; margin: 0 auto; padding: clamp(40px, 6vw, 70px) 24px 90px; }
.result-hero { margin-bottom: 8px; }
.result-hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-top: 12px; }
.result-lead { color: var(--text-dim); font-size: 17px; margin-top: 16px; max-width: 640px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

@media (max-width: 560px) { .result-actions { flex-direction: column; } .result-actions button { width: 100%; } }

/* hub-länk, inline-fel, avbryt, disablad ghost */
.hublink { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); text-decoration: none; font-size: 13px; margin-bottom: 22px; width: fit-content; }
.hublink:hover { color: var(--text); }
.fin-err { color: var(--red); font-size: 13.5px; background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.3); border-radius: 10px; padding: 10px 14px; }
.prog-cancel { margin-top: 22px; }
.btn-ghost:disabled { opacity: 0.5; cursor: default; transform: none; }
