/* Same tokens as the Control Center shell (public/style.css): light by default, dark via data-mode. */
:root{
  --bg:#f9fafb;--surface:#fff;--ink:#1e293b;--muted:#526174;--line:#e5e9ef;--hover:#f1f5f9;--selected:#eff6ff;--link:#2b4c7e;
  --accent:#bf9e56;--accent-ink:#7a6230;--ok:#15803d;--danger:#b42318;--console:#f8fafc;
  --radius:16px;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;font-synthesis:none;
  color:var(--ink);background:var(--bg);color-scheme:light;
}
html[data-mode=dark]{--bg:#111827;--surface:#1e293b;--ink:#f1f5f9;--muted:#cbd5e1;--line:#40516a;--hover:#334155;--selected:#334766;--link:#dbeafe;--accent-ink:#d8bd7f;--ok:#4ade80;--danger:#fca5a5;--console:#0f172a;color-scheme:dark}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:var(--bg);color:var(--ink);min-height:100vh;-webkit-font-smoothing:antialiased}
a{color:var(--link)}
button,input{font:inherit}
.muted{color:var(--muted)}
.small{font-size:13px}
.eyebrow{display:block;font-size:11px;letter-spacing:.18em;font-weight:600;color:var(--muted);text-transform:uppercase}

/* Brand: the knot, one colour, never a gradient or shadow (merkpresentatie p.8). */
.brand-mark{display:inline-block;flex:0 0 auto;line-height:0}
.brand-mark img{width:100%;height:100%;display:block}
.on-dark{display:none!important}
html[data-mode=dark] .on-light{display:none!important}
html[data-mode=dark] .on-dark{display:block!important}
.wordmark{display:flex;flex-direction:column;gap:6px}
.wordmark img{height:13px;width:auto}
.wordmark small{font-size:9px;font-weight:500;color:var(--muted);letter-spacing:.24em}
.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 28px;border-bottom:1px solid var(--line);background:var(--bg)}
.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none}
.topbar-actions{display:flex;align-items:center;gap:10px}
.status-pill{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--line);border-radius:999px;font-size:12px;font-weight:500;color:var(--ink);background:var(--hover);white-space:nowrap}
.pulse-dot{width:8px;height:8px;border-radius:50%;background:var(--ok);display:inline-block;flex:0 0 8px;animation:pulse 2s infinite}
@keyframes pulse{50%{opacity:.35}}
.theme-toggle{white-space:nowrap;padding:8px 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-weight:600;font-size:13px;cursor:pointer}
.theme-toggle:hover{background:var(--hover)}

/* Layout */
.intake{display:grid;grid-template-columns:minmax(320px,420px) minmax(0,1fr);gap:24px;max-width:1440px;margin:0 auto;padding:28px;align-items:start}
.stage{display:grid;gap:20px;min-width:0}

/* Chat */
.chat-panel{position:sticky;top:96px;display:flex;flex-direction:column;height:calc(100vh - 124px);min-height:480px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.chat-head{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line)}
.chat-head .brand-mark{width:32px;height:32px;flex-basis:32px}
.chat-head strong{display:block;font-size:14px;font-weight:600}
.chat-head span{font-size:12px;color:var(--muted)}
.messages{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin}
.bubble{max-width:86%;padding:11px 14px;border-radius:14px;font-size:14.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;animation:rise .28s ease-out}
.bubble.assistant{align-self:flex-start;background:var(--hover);border:1px solid var(--line);border-bottom-left-radius:4px}
.bubble.user{align-self:flex-end;background:var(--ink);color:var(--surface);border-bottom-right-radius:4px}
.bubble.error{align-self:flex-start;background:var(--surface);border:1px solid var(--danger);color:var(--danger)}
@keyframes rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.dots{display:inline-flex;gap:4px;padding:4px 2px}
.dots i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:blink 1.2s infinite}
.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}
@keyframes blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
.thinking{display:inline-flex;align-items:center;gap:10px;color:var(--ink);font-weight:500;margin:0}
.spinner{width:14px;height:14px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.composer{display:flex;gap:8px;padding:14px;border-top:1px solid var(--line)}
.composer input,.auth-card input{flex:1;min-width:0;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);outline:none}
.composer input:focus,.auth-card input:focus{border-color:var(--link);box-shadow:0 0 0 3px var(--selected)}
.composer button{width:46px;border:0;border-radius:999px;background:var(--ink);color:var(--surface);font-size:18px;font-weight:600;cursor:pointer}
.composer button:disabled,.cta:disabled{opacity:.45;cursor:not-allowed}

/* Placeholder */
.placeholder{border:1px dashed var(--line);border-radius:var(--radius);padding:28px;background:var(--surface)}
.ghost-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.ghost-grid i{height:110px;border-radius:12px;background:linear-gradient(90deg,var(--hover),var(--bg),var(--hover));background-size:200% 100%;animation:shimmer 2.4s infinite}
.ghost-console{margin-top:16px;height:180px;border-radius:12px;background:var(--hover)}
@keyframes shimmer{to{background-position:-200% 0}}
.placeholder-copy{margin-top:28px;max-width:560px}
.placeholder-copy h1{font-size:clamp(26px,3vw,34px);line-height:1.2;letter-spacing:-.5px;font-weight:500;margin:12px 0}
.placeholder-copy p{line-height:1.6}

/* Control Center preview */
.cc{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;animation:rise .5s ease-out}
.cc-bar{display:flex;align-items:center;gap:14px;padding:10px 16px;background:var(--hover);border-bottom:1px solid var(--line)}
.lights{display:flex;gap:6px}.lights i{width:10px;height:10px;border-radius:50%;background:var(--line)}
.cc-url{font-family:var(--mono);font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cc-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid var(--line)}
.cc-title{display:flex;align-items:center;gap:14px;min-width:0}
.cc-title h2{margin:6px 0 0;font-size:24px;font-weight:500;letter-spacing:-.4px;overflow-wrap:anywhere}
.demo-badge{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;border:1px solid var(--accent);color:var(--accent-ink);font-size:11px;font-weight:600;letter-spacing:.12em;white-space:nowrap}
.kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:22px 24px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px;display:flex;flex-direction:column;gap:10px;min-width:0}
.kpi-label{font-size:13px;color:var(--muted);font-weight:500}
.kpi-value{font-size:15px;font-weight:500;line-height:1.35}
.kpi-value .big{font-size:40px;font-weight:300;letter-spacing:-1px;margin-right:6px;font-variant-numeric:tabular-nums}
.kpi-sub{font-size:13px;color:var(--muted)}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:4px 10px;border-radius:999px;border:1px solid var(--line);background:var(--hover);color:var(--ink)}
.chip .dot{width:6px;height:6px;border-radius:50%;background:var(--muted)}
.pipeline-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:0 24px 18px}
.step{border:1px solid var(--line);border-radius:var(--radius);padding:16px;background:var(--surface);transition:background .25s,border-color .25s}
.step.active{background:var(--selected);border-color:var(--link)}
.step p{margin:6px 0 0;font-size:13px;color:var(--muted);line-height:1.45}
.step-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.step-title{font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--ink)}
.latency{font-family:var(--mono);font-size:11px;color:var(--muted)}
.console{margin:0 24px 24px;background:var(--console);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.console-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid var(--line);font-size:12px;font-weight:600}
.console-head strong{color:var(--ink)}
.console-body{font-family:var(--mono);font-size:12.5px;padding:12px 16px;height:300px;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;gap:4px}
.log{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:10px;align-items:baseline;animation:rise .25s ease-out}
.log .time{color:var(--muted);opacity:.7}
.log .tag{font-weight:600;font-size:11px;letter-spacing:.04em;min-width:76px}
.log .text{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.log .lat{color:var(--muted)}
.log-trigger .tag{color:var(--link)}.log-parse .tag{color:var(--accent-ink)}.log-action .tag{color:var(--ink)}
.log-done .tag,.log-done .text{color:var(--ok)}
.cursor{color:var(--muted);animation:blink 1s steps(2) infinite}

/* Pricing */
.pricing{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) auto;gap:24px;align-items:center;padding:26px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);animation:rise .6s ease-out}
.trial-badge{display:inline-block;font-size:11px;font-weight:600;letter-spacing:.14em;color:var(--accent-ink);border:1px solid var(--accent);padding:6px 12px;border-radius:999px}
.price{display:flex;align-items:baseline;gap:8px;margin:14px 0 6px}
.price .amount{font-size:44px;font-weight:300;letter-spacing:-1px}
.price .unit{color:var(--muted);font-size:14px}
.pricing p{margin:0;font-size:13px}
.features{list-style:none;margin:0;padding:0;display:grid;gap:10px;font-size:14px}
.features li{display:flex;gap:10px;align-items:flex-start}
.check{color:var(--accent-ink);font-weight:700}
.cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 24px;border:0;border-radius:999px;background:var(--ink);color:var(--surface);font-weight:600;text-decoration:none;cursor:pointer;white-space:nowrap}
.cta:hover{opacity:.9}

/* Auth + welcome */
.auth{display:grid;place-items:center;padding:48px 16px}
.auth-card,.welcome-card{width:min(440px,100%);display:grid;gap:14px;padding:28px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.auth-card h1,.welcome-card h1{margin:0;font-size:26px;font-weight:500;letter-spacing:-.4px}
.auth-card p{margin:0}
.auth-card label{display:grid;gap:6px;font-size:13px;color:var(--muted);font-weight:500}
.auth-card .trial-badge{justify-self:start}
.auth-card .cta{width:100%}
.form-error{color:var(--danger);font-size:13px}
.page-welcome{display:grid;place-items:center;padding:48px 16px}
.welcome-card .status-pill{justify-self:start}
.welcome-card p{color:var(--muted);line-height:1.6;margin:0}
.ghost-link{color:var(--link);font-weight:600}

@media (max-width:1180px){
  .pricing{grid-template-columns:1fr 1fr}
  .pricing .cta{grid-column:1/-1}
}
@media (max-width:980px){
  .intake{grid-template-columns:1fr;padding:16px}
  .chat-panel{position:relative;top:0;height:min(70vh,620px)}
}
@media (max-width:720px){
  .topbar{padding:12px 16px}
  .wordmark,.status-pill .label{display:none}
  .kpi-grid,.pipeline-steps{grid-template-columns:1fr}
  .cc-head{flex-direction:column;align-items:flex-start}
  .pricing{grid-template-columns:1fr}
  .log{grid-template-columns:auto minmax(0,1fr) auto}
  .log .time{display:none}
  .log .text{white-space:normal}
  .console-body{height:260px}
  .ghost-grid{grid-template-columns:1fr}.ghost-grid i:nth-child(n+2){display:none}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
