/* =====================================================================
   design-system.css — Premium SaaS design system (design prototype)
   ---------------------------------------------------------------------
   Clean white canvas · blue→purple gradient brand · rounded cards ·
   soft shadows · generous spacing · modern type. Two layouts:
     .layout-marketing  → full-bleed landing / login
     .layout-app        → sidebar + topbar product UI
   Static prototype only — no real functionality is styled here.
   ===================================================================== */

:root {
  /* Brand gradient */
  --grad-brand: linear-gradient(135deg, #0a66c2 0%, #2f8fed 55%, #4f9fec 100%);
  --grad-brand-soft: linear-gradient(135deg, #e8f1fb 0%, #eef6ff 100%);
  --grad-blue: linear-gradient(135deg, #3b82f6, #0a66c2);
  --grad-violet: linear-gradient(135deg, #0a66c2, #00a0dc);
  --grad-sunset: linear-gradient(135deg, #2f8fed, #38bdf8);
  --grad-teal: linear-gradient(135deg, #0ea5e9, #0a66c2);

  /* Neutrals */
  --c-bg:        #ffffff;
  --c-bg-2:      #f7f8fc;
  --c-surface:   #ffffff;
  --c-surface-2: #f5f6fb;
  --c-border:    #ebecf3;
  --c-border-2:  #e0e2ee;
  --c-text:      #14152a;
  --c-text-2:    #3d3f57;
  --c-muted:     #6a6d85;
  --c-faint:     #9a9db4;

  --c-accent:      #0a66c2;
  --c-accent-ink:  #084d92;
  --c-accent-soft: #e8f1fb;

  --c-success: #12a366;
  --c-success-soft: #e6f6ef;
  --c-warning: #c98a18;
  --c-warning-soft: #fbf3e3;
  --c-danger:  #e0463c;
  --c-danger-soft: #fdeceb;

  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(20,22,55,.05);
  --shadow-sm: 0 2px 8px rgba(20,22,55,.06), 0 1px 2px rgba(20,22,55,.04);
  --shadow-md: 0 10px 30px rgba(20,22,55,.08), 0 2px 6px rgba(20,22,55,.05);
  --shadow-lg: 0 24px 60px rgba(60,40,160,.16);
  --shadow-brand: 0 12px 28px rgba(124,92,246,.32);

  --sidebar-w: 256px;
  --topbar-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14.5px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--c-accent); text-decoration: none; }
h1,h2,h3,h4 { color: var(--c-text); margin: 0 0 .4em; letter-spacing: -0.022em; line-height: 1.18; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 21px; font-weight: 680; }
h3 { font-size: 16px; font-weight: 640; }
p { margin: 0 0 1em; color: var(--c-muted); }

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
  font-family: var(--font); cursor: pointer; border: 1px solid transparent;
  transition: transform .08s, box-shadow .15s, background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 16px; height: 16px; }
.btn-gradient { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-gradient:hover { filter: brightness(1.05); box-shadow: 0 14px 34px rgba(124,92,246,.4); }
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-ink); }
.btn-outline { background: #fff; color: var(--c-text); border-color: var(--c-border-2); }
.btn-outline:hover { border-color: var(--c-accent); color: var(--c-accent-ink); box-shadow: var(--shadow-xs); }
.btn-ghost { background: transparent; color: var(--c-text-2); }
.btn-ghost:hover { background: var(--c-surface-2); color: var(--c-text); }
.btn-subtle { background: var(--c-surface-2); color: var(--c-muted); }
.btn-subtle:hover { color: var(--c-text); }
.btn-lg { padding: 13px 24px; font-size: 15px; border-radius: var(--r-md); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Pills / badges / chips ──────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; }
.pill-soft { background: var(--c-accent-soft); color: var(--c-accent-ink); }
.pill-outline { border: 1px solid var(--c-border-2); color: var(--c-muted); background: #fff; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 550; background: var(--c-surface-2); color: var(--c-text-2); border: 1px solid var(--c-border); }
.chip.chip-accent { background: var(--c-accent-soft); color: var(--c-accent-ink); border-color: transparent; }
.chip.chip-flag { background: var(--c-warning-soft); color: var(--c-warning); border-color: transparent; }
.chip.chip-ok { background: var(--c-success-soft); color: var(--c-success); border-color: transparent; }
.concept-full { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.concept-full .cf-card { display: flex; flex-direction: column; }
.concept-full .cf-card .illus { height: 120px; margin-bottom: 14px; }
.cf-card .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-faint); margin-top: 12px; }
.cf-card .txt { font-size: 13px; color: var(--c-text-2); margin: 3px 0 0; line-height: 1.5; }

/* ── Simplified Generate flow ─────────────────────────────────── */
.gen-flow { max-width: 1040px; margin: 0 auto; }
.flow-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 auto 22px; max-width: 1040px; }
.flow-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--c-faint); cursor: default; }
.flow-step.clickable { cursor: pointer; }
.flow-step .fs-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--c-surface-2); color: var(--c-muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.flow-step .fs-dot svg { width: 13px; height: 13px; }
.flow-step.cur { color: var(--c-accent-ink); }
.flow-step.cur .fs-dot { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }
.flow-step.done { color: var(--c-text-2); }
.flow-step.done .fs-dot { background: var(--c-success-soft); color: var(--c-success); }
.flow-line { flex: 1; height: 2px; min-width: 12px; background: var(--c-border); border-radius: 2px; }

.flow-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.flow-card h2 { font-size: 20px; margin-bottom: 6px; }
.flow-card .lead { color: var(--c-muted); font-size: 14px; margin-bottom: 18px; }
.flow-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.flow-actions .spacer { flex: 1; }

/* Compact company summary chip atop the flow */
.co-chip { display: flex; align-items: center; gap: 12px; background: var(--grad-brand-soft); border: 1px solid var(--c-border-2); border-radius: var(--r-md); padding: 11px 14px; margin-bottom: 16px; font-size: 13px; }
.co-chip .co-ic { width: 30px; height: 30px; border-radius: 8px; background: #fff; display: grid; place-items: center; color: var(--c-accent); flex: 0 0 30px; }
.co-chip .co-ic svg { width: 16px; height: 16px; }
.co-chip a { font-weight: 600; }

/* Summary lines (company "we understand") */
.sum-line { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--c-border); }
.sum-line:last-child { border-bottom: 0; }
.sum-line .sk { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-faint); flex: 0 0 130px; padding-top: 1px; }
.sum-line .sv { font-size: 13.5px; color: var(--c-text); }

/* Style swatch picker with example previews */
.style-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--c-border-2); border-radius: var(--r-md); overflow: hidden; cursor: pointer; background: #fff; transition: border-color .12s, box-shadow .12s, transform .1s; }
.swatch:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.swatch.on { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(10,102,194,.16); }
.swatch .illus { height: 66px; border-radius: 0; }
.swatch .sw-name { font-size: 12px; font-weight: 600; padding: 7px 9px; text-align: center; color: var(--c-text-2); }
.swatch .sw-desc { font-size: 11px; color: var(--c-faint); padding: 0 9px 9px; text-align: center; line-height: 1.35; }
.type-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.type-cards .swatch .illus { height: 54px; }
/* Real example-image previews inside style/type swatch cards */
.ex-prev { height: 150px; overflow: hidden; background: #f3f4f6; display: block; }
.ex-prev img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.type-cards .swatch .ex-prev { height: 140px; }

/* Small segmented control (e.g. Main character) */
.seg-sm { display: inline-flex; background: var(--c-surface-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-sm button { border: 0; background: transparent; padding: 6px 12px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; color: var(--c-muted); cursor: pointer; }
.seg-sm button.on { background: #fff; color: var(--c-accent-ink); box-shadow: var(--shadow-xs); }

/* Advanced disclosure */
.adv-toggle { font-size: 13px; font-weight: 600; color: var(--c-muted); cursor: pointer; background: none; border: 0; padding: 4px 0; }
.adv-toggle:hover { color: var(--c-accent-ink); }

/* Big centered loading state */
.flow-loading { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 44px 20px; }
.flow-loading .gen-frame { width: 220px; height: 220px; }
.badge-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill); }
.badge-status .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge-status.none { background: var(--c-surface-2); color: var(--c-faint); }
.badge-status.none .dot { background: var(--c-faint); }
.badge-status.untested { background: var(--c-warning-soft); color: var(--c-warning); }
.badge-status.untested .dot { background: var(--c-warning); }
.badge-status.saved { background: var(--c-success-soft); color: var(--c-success); }
.badge-status.saved .dot { background: var(--c-success); }
.tag-free { background: var(--c-success-soft); color: var(--c-success); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); letter-spacing: .02em; }
.tag-credit { background: var(--c-accent-soft); color: var(--c-accent-ink); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }

/* ── Cards ───────────────────────────────────────────────────── */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.card-flush { padding: 0; overflow: hidden; }
.card + .card, .stack > * + * { margin-top: 18px; }
.muted { color: var(--c-muted); }
.faint { color: var(--c-faint); }
.divider { height: 1px; background: var(--c-border); margin: 20px 0; border: 0; }
.row { display: flex; gap: 16px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ── Illustration placeholders (non-photorealistic) ──────────── */
.illus { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--grad-violet); display: block; }
.illus svg { display: block; width: 100%; height: 100%; }
.illus-label { position: absolute; left: 12px; bottom: 11px; color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.illus-tag { position: absolute; right: 11px; top: 11px; background: rgba(255,255,255,.92); color: var(--c-accent-ink); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }

/* =====================================================================
   MARKETING LAYOUT (landing / login)
   ===================================================================== */
.layout-marketing { display: block; background: var(--c-bg); }
.view-marketing { display: block; }

.mwrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.mnav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--c-border); }
.mnav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.mlogo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.mlogo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad-brand); box-shadow: var(--shadow-brand); display: grid; place-items: center; color: #fff; }
.mnav-links { display: flex; gap: 26px; }
.mnav-links a { color: var(--c-text-2); font-size: 14px; font-weight: 550; }
.mnav-links a:hover { color: var(--c-text); }
.mnav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mnav-cta a.login { font-size: 14px; font-weight: 600; color: var(--c-text-2); }

.hero { padding: 72px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1fr 0.92fr; gap: 48px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.hero h1 { font-size: 50px; font-weight: 760; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 18px; }
.hero .sub { font-size: 18px; color: var(--c-muted); max-width: 32ch; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.hero-trust { display: flex; gap: 18px; align-items: center; color: var(--c-faint); font-size: 13px; }
.hero-trust .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--c-border-2); }

/* Demo / input card on the hero left-lower or as the right panel */
.demo-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 20px; }
.demo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.demo-head .pip { display: flex; gap: 6px; }
.demo-head .pip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.demo-head .pip i:nth-child(1){ background: #ff5f57; } .demo-head .pip i:nth-child(2){ background: #febc2e; } .demo-head .pip i:nth-child(3){ background: #28c840; }
.demo-title { font-size: 13px; font-weight: 600; color: var(--c-muted); }

.concept-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.concept-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .14s, border-color .14s; cursor: pointer; }
.concept-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-border-2); }
.concept-card.selected { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(10,102,194,.18), var(--shadow-md); }
.concept-card .illus { height: 132px; border-radius: 0; }
.concept-card .cc-body { padding: 13px 14px 15px; }
.concept-card .cc-title { font-size: 13.5px; font-weight: 650; }
.concept-card .cc-desc { font-size: 12px; color: var(--c-muted); margin-top: 3px; line-height: 1.45; }

.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 56px 0 12px; }
.step3 { display: flex; gap: 14px; align-items: flex-start; }
.step3 .n { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: var(--grad-brand-soft); color: var(--c-accent-ink); display: grid; place-items: center; font-weight: 700; }
.step3 h4 { font-size: 15px; margin: 2px 0 4px; }
.step3 p { font-size: 13.5px; margin: 0; }

.msection { padding: 60px 0; }
.msection.alt { background: var(--c-bg-2); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.msection-head { text-align: center; max-width: 60ch; margin: 0 auto 36px; }
.msection-head h2 { font-size: 30px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.price-card.featured { border-color: transparent; box-shadow: var(--shadow-md); position: relative; outline: 2px solid var(--c-accent); }
.price-card .price { font-size: 34px; font-weight: 760; letter-spacing: -.02em; margin: 6px 0 2px; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 20px; }
.price-card li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--c-text-2); padding: 6px 0; }
.price-card li .ck { color: var(--c-success); flex: 0 0 16px; margin-top: 2px; }

.mfooter { border-top: 1px solid var(--c-border); padding: 28px 0; color: var(--c-faint); font-size: 13px; }
.mfooter-inner { display: flex; align-items: center; gap: 16px; }

/* Login / signup card */
.auth-wrap { min-height: calc(100vh - 0px); display: grid; place-items: center; padding: 48px 24px; background: var(--c-bg-2); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 34px; }
.auth-card .mlogo { justify-content: center; margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--c-surface-2); border-radius: var(--r-pill); padding: 4px; margin: 0 auto 22px; }
.seg button { border: 0; background: transparent; padding: 8px 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 13.5px; color: var(--c-muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--c-text); box-shadow: var(--shadow-xs); }
.oauth-btn { width: 100%; }

/* =====================================================================
   APP LAYOUT (product UI)
   ===================================================================== */
.layout-app { display: flex; min-height: 100vh; background: var(--c-bg-2); }

.sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #fff; border-right: 1px solid var(--c-border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-brand); }
.brand-name { font-weight: 680; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--c-faint); margin-top: 1px; }

.side-cta { padding: 4px 14px 10px; }
.nav { padding: 8px 12px; overflow-y: auto; flex: 1; }
.nav-group { margin-bottom: 14px; }
.nav-group-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--c-faint); padding: 6px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm); color: var(--c-text-2); font-weight: 550; font-size: 13.5px; cursor: pointer; user-select: none; transition: background .12s, color .12s; }
.nav-item:hover { background: var(--c-surface-2); color: var(--c-text); }
.nav-item.active { background: var(--c-accent-soft); color: var(--c-accent-ink); font-weight: 650; }
.nav-item .ico { width: 18px; height: 18px; flex: 0 0 18px; opacity: .92; }
.nav-item .badge { margin-left: auto; font-size: 9.5px; font-weight: 700; color: var(--c-faint); background: var(--c-surface-2); border-radius: var(--r-pill); padding: 1px 7px; }
.side-foot { padding: 12px; border-top: 1px solid var(--c-border); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.side-user .nm { font-size: 13px; font-weight: 600; }
.side-user .pl { font-size: 11px; color: var(--c-faint); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); flex: 0 0 var(--topbar-h); background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.topbar-title { font-weight: 650; font-size: 16px; }
.credit-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-pill); padding: 6px 14px; font-size: 13px; font-weight: 600; }
.credit-pill .spark { width: 15px; height: 15px; color: var(--c-accent); }
.topbar .avatar { cursor: pointer; }

.view { padding: 30px 36px 72px; max-width: 1120px; width: 100%; }

/* Page header */
.page-head { margin-bottom: 24px; }
.page-head .eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 7px; }
.page-head h1 { font-size: 27px; }
.page-head p { max-width: 66ch; }
.head-row { display: flex; align-items: flex-start; gap: 16px; }
.head-row .spacer { flex: 1; }

/* Hero CTA banner (dashboard) */
.cta-banner { background: var(--grad-brand); border-radius: var(--r-xl); padding: 26px 28px; color: #fff; display: flex; align-items: center; gap: 22px; box-shadow: var(--shadow-brand); position: relative; overflow: hidden; }
.cta-banner::after { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); }
.cta-banner h2 { color: #fff; margin: 0 0 5px; font-size: 21px; }
.cta-banner p { color: rgba(255,255,255,.9); margin: 0; max-width: 48ch; font-size: 14px; }
.cta-banner .btn { background: #fff; color: var(--c-accent-ink); box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.cta-banner .btn:hover { filter: none; background: #fff; }

/* Stat tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-xs); }
.tile .k { font-size: 12.5px; color: var(--c-muted); font-weight: 550; display: flex; align-items: center; gap: 7px; }
.tile .k .ico { width: 15px; height: 15px; color: var(--c-accent); }
.tile .v { font-size: 27px; font-weight: 720; letter-spacing: -.02em; margin-top: 6px; }
.tile .v.small { font-size: 16px; font-weight: 650; }
.tile .sub { font-size: 12px; color: var(--c-faint); margin-top: 2px; }

/* Section heading inside app */
.sec-head { display: flex; align-items: center; gap: 12px; margin: 28px 0 14px; }
.sec-head h3 { margin: 0; }
.sec-head .spacer { flex: 1; }
.sec-head a { font-size: 13px; font-weight: 600; }

/* Generation cards (recent / history) */
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gen-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .14s; cursor: pointer; }
.gen-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gen-card .illus { height: 150px; border-radius: 0; }
.gen-card .gc-body { padding: 13px 15px 15px; }
.gen-card .gc-name { font-weight: 640; font-size: 14px; }
.gen-card .gc-meta { font-size: 12px; color: var(--c-muted); margin-top: 2px; }
.gen-card .gc-foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; }

/* Quick start steps */
.qs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.qs { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 16px; }
.qs .n { width: 30px; height: 30px; border-radius: 9px; background: var(--grad-brand-soft); color: var(--c-accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.qs h4 { font-size: 14px; margin: 0 0 4px; }
.qs p { font-size: 12.5px; margin: 0; }

/* Forms */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 7px; }
.field .hint { font-size: 12px; color: var(--c-faint); margin-top: 7px; }
.input, textarea.input { width: 100%; padding: 11px 14px; border: 1px solid var(--c-border-2); border-radius: var(--r-sm); font-size: 14px; font-family: var(--font); background: #fff; color: var(--c-text); transition: border-color .12s, box-shadow .12s; }
.input:focus, textarea.input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(10,102,194,.15); }
.input.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.55; }
.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; }

/* Tabs */
.tabs { display: inline-flex; background: var(--c-surface-2); border-radius: var(--r-pill); padding: 4px; gap: 2px; margin-bottom: 18px; }
.tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 13px; color: var(--c-muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--c-accent-ink); box-shadow: var(--shadow-xs); }

/* Style option chips */
.style-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.style-opt { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid var(--c-border-2); border-radius: var(--r-md); cursor: pointer; font-size: 13px; font-weight: 550; background: #fff; }
.style-opt .sw { width: 22px; height: 22px; border-radius: 7px; }
.style-opt.on { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(10,102,194,.14); color: var(--c-accent-ink); }

/* Consent + notice */
.notice { display: flex; gap: 11px; align-items: flex-start; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 13px 15px; font-size: 12.5px; color: var(--c-muted); line-height: 1.55; }
.notice .ni { flex: 0 0 16px; margin-top: 1px; color: var(--c-accent); }
.consent { display: flex; gap: 11px; align-items: flex-start; background: var(--grad-brand-soft); border: 1px solid var(--c-border-2); border-radius: var(--r-md); padding: 14px 16px; font-size: 13px; color: var(--c-text-2); }
.consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--c-accent); }

/* Prospect summary list */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; }
.kv .k { font-size: 12.5px; color: var(--c-muted); font-weight: 550; }
.kv .v { font-size: 13.5px; color: var(--c-text); font-weight: 550; }

/* Concept preview (text) cards */
.cprev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cprev-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.cprev-card .illus { height: 110px; margin-bottom: 14px; }
.cprev-card h4 { font-size: 15px; margin: 0 0 4px; }
.cprev-card .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-faint); margin-top: 12px; }
.cprev-card .txt { font-size: 13px; color: var(--c-text-2); margin: 3px 0 0; }
.cprev-card .btn { margin-top: 16px; }

/* Loading / generation */
.gen-stage { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
.gen-frame { aspect-ratio: 1/1; border-radius: var(--r-lg); overflow: hidden; position: relative; box-shadow: var(--shadow-md); }
.shimmer { position: absolute; inset: 0; background: linear-gradient(110deg, #eef0ff 8%, #f6f0ff 18%, #eef0ff 33%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }
.gen-prog { height: 8px; border-radius: var(--r-pill); background: var(--c-surface-2); overflow: hidden; margin: 14px 0 8px; }
.gen-prog i { display: block; height: 100%; width: 62%; background: var(--grad-brand); border-radius: var(--r-pill); }

/* Final result */
.result-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 26px; align-items: start; }
.result-img { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--c-surface-2); min-height: 200px; }
.result-img img { display: block; width: 100%; height: auto; }
.msg-box { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 16px; font-size: 14px; color: var(--c-text-2); line-height: 1.6; white-space: pre-wrap; }
.usage-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--c-muted); }

/* Tables (admin / history list) */
.tbl-wrap { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--c-faint); font-weight: 700; padding: 12px 16px; background: var(--c-surface-2); border-bottom: 1px solid var(--c-border); }
table.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--c-border); color: var(--c-text-2); }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: #fcfcff; }
.dot-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12.5px; }
.dot-status .d { width: 8px; height: 8px; border-radius: 50%; }
.dot-status.ok .d { background: var(--c-success); } .dot-status.ok { color: var(--c-success); }
.dot-status.fail .d { background: var(--c-danger); } .dot-status.fail { color: var(--c-danger); }
.dot-status.warn .d { background: var(--c-warning); } .dot-status.warn { color: var(--c-warning); }

/* Proto banner */
.proto-banner { display: flex; align-items: center; gap: 10px; background: var(--c-warning-soft); color: #8a6212; border: 1px solid #f0e0bf; border-radius: var(--r-md); padding: 10px 14px; font-size: 12.5px; font-weight: 550; margin-bottom: 20px; }

/* Toast */
#toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #1a1c2e; color: #fff; padding: 11px 18px; border-radius: var(--r-md); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); animation: toast-in .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 40px; }
  .steps3, .pricing-grid, .qs-grid, .cprev, .concept-strip { grid-template-columns: 1fr; }
  .gen-stage, .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .view { padding: 22px 18px 56px; }
  .mnav-links { display: none; }
}

/* ── Feature grid (landing) ──────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: 1fr; } }

/* ── Stepper (create flow) ───────────────────────────────────── */
.stepper { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.stepper .st { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--c-faint); }
.stepper .sd { width: 26px; height: 26px; border-radius: 50%; background: var(--c-surface-2); color: var(--c-muted); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.stepper .sd svg { width: 14px; height: 14px; }
.stepper .st.cur { color: var(--c-accent-ink); }
.stepper .st.cur .sd { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }
.stepper .st.done { color: var(--c-text-2); }
.stepper .st.done .sd { background: var(--c-success-soft); color: var(--c-success); }
.stepper .sl { flex: 1; height: 2px; background: var(--c-border); margin: 0 12px; min-width: 16px; border-radius: 2px; }

/* ── Company profile editor (Phase 2) ────────────────────────── */
.editor-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.editor-row .input { flex: 1; }
.icon-btn { width: 38px; height: 40px; flex: 0 0 38px; border: 1px solid var(--c-border-2); background: #fff; border-radius: var(--r-sm); color: var(--c-muted); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { border-color: var(--c-danger); color: var(--c-danger); }
.add-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--c-accent-ink); background: var(--c-accent-soft); border: 0; border-radius: var(--r-sm); padding: 8px 13px; cursor: pointer; }
.add-btn svg { width: 14px; height: 14px; }
.add-btn:hover { filter: brightness(.97); }
.persona-block { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 14px; margin-bottom: 12px; background: var(--c-bg-2); }
.flag-card { display: flex; gap: 10px; align-items: flex-start; background: var(--c-warning-soft); border: 1px solid #f0e0bf; border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; }
.flag-card .input { background: #fff; }

/* Loading / error / empty states */
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--c-accent-soft); border-top-color: var(--c-accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyze-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 34px 20px; }
/* "Sketching the concept" loader — animated pencil writing lines on paper */
.sketch-load { display: flex; align-items: center; gap: 18px; padding: 30px 26px; }
.sketch-art svg { display: block; }
.sketch-art .sk-paper { fill: #fff; stroke: var(--c-border-2); stroke-width: 2; }
.sketch-art .sk-line { stroke: #d9dbea; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: skdraw 2.2s ease-in-out infinite; }
.sketch-art .sk-line.l2 { animation-delay: .35s; }
.sketch-art .sk-line.l3 { animation-delay: .7s; }
@keyframes skdraw { 0% { stroke-dashoffset: 90; } 45% { stroke-dashoffset: 0; } 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 90; } }
.sketch-art .sk-pencil { transform-box: view-box; transform-origin: 0 0; animation: skmove 2.2s ease-in-out infinite; }
@keyframes skmove { 0%,45% { transform: translate(90px,30px); } 47%,72% { transform: translate(84px,45px); } 74%,97% { transform: translate(76px,60px); } 100% { transform: translate(90px,30px); } }
/* "Reading your company" loader — magnifying glass scanning a document */
.scan-art svg { display: block; }
.scan-art .sc-paper { fill: #fff; stroke: var(--c-border-2); stroke-width: 2; }
.scan-art .sc-line { stroke: #d9dbea; stroke-width: 4; stroke-linecap: round; animation: scpulse 2.6s ease-in-out infinite; }
.scan-art .sc-line:nth-of-type(3) { animation-delay: .25s; }
.scan-art .sc-line:nth-of-type(4) { animation-delay: .5s; }
.scan-art .sc-line:nth-of-type(5) { animation-delay: .75s; }
@keyframes scpulse { 0%,100% { stroke: #d9dbea; } 50% { stroke: #b9b2f4; } }
.scan-art .sc-glass { transform-box: view-box; transform-origin: 0 0; animation: scanmove 2.8s ease-in-out infinite; }
@keyframes scanmove { 0% { transform: translate(34px,26px) scale(1); } 24% { transform: translate(86px,26px) scale(1.05); } 48% { transform: translate(40px,44px) scale(1); } 72% { transform: translate(84px,56px) scale(1.05); } 100% { transform: translate(34px,26px) scale(1); } }
/* "Creating your illustration" loader — drawing frame with grid, sweep + pencil */
.flow-loading .draw-frame { width: 200px; height: 200px; position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--c-bg-2); border: 1px solid var(--c-border-2); box-shadow: var(--shadow-md); }
.draw-frame .draw-grid { position: absolute; inset: 0; background-image: linear-gradient(#e9e7f5 1px, transparent 1px), linear-gradient(90deg, #e9e7f5 1px, transparent 1px); background-size: 22px 22px; opacity: .65; }
.draw-frame .draw-sweep { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 32%, rgba(10,102,194,.22) 50%, transparent 68%); animation: drawsweep 1.5s linear infinite; }
@keyframes drawsweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.draw-frame .draw-pencil { position: absolute; left: 50%; top: 50%; margin: -17px 0 0 -17px; animation: drawpencil 2.4s ease-in-out infinite; }
@keyframes drawpencil { 0%,100% { transform: translate(-46px,-40px) rotate(-12deg); } 25% { transform: translate(44px,-30px) rotate(8deg); } 50% { transform: translate(36px,40px) rotate(-6deg); } 75% { transform: translate(-40px,32px) rotate(10deg); } }
.err-card { display: flex; gap: 11px; align-items: flex-start; background: var(--c-danger-soft); border: 1px solid #f3c9c5; color: #a3322b; border-radius: var(--r-md); padding: 13px 15px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; }
.err-card svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state .ei { width: 52px; height: 52px; border-radius: 14px; background: var(--c-accent-soft); color: var(--c-accent); display: grid; place-items: center; margin: 0 auto 16px; }
.empty-state .ei svg { width: 26px; height: 26px; }

/* ── Upload boxes + thumbnails (Phase 3) ─────────────────────── */
.upload-box { display: flex; gap: 11px; align-items: center; padding: 14px; border: 1.5px dashed var(--c-border-2); border-radius: var(--r-md); cursor: pointer; color: var(--c-muted); background: #fff; transition: border-color .12s, background .12s; }
.upload-box:hover { border-color: var(--c-accent); background: #fbfbff; }
.upload-box svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--c-accent); }
.upload-box.sm { padding: 10px 12px; font-size: 13px; gap: 8px; }
.upload-box.sm svg { width: 16px; height: 16px; flex: 0 0 16px; }
.thumb { position: relative; display: inline-block; margin-top: 10px; }
.thumb img { height: 88px; max-width: 160px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--c-border); display: block; }
.thumb .rm { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--c-border-2); color: var(--c-danger); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.thumb .rm svg { width: 13px; height: 13px; }
.cr-pane[hidden] { display: none; }
.map-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.map-row .arrow-i { color: var(--c-faint); width: 16px; height: 16px; }
