/* ============================================================
   ConvergeQA — "Convergence" design system (shared)
   Concept: multiple AI perspectives converge into one documented review record.
   Signature: blue gradient. Premium, confident, trustworthy.
   Shared across app surfaces (Workspace, Account, Guided, Builder, Org, 2FA,
   Developers). Light + dark via [data-theme].

   USAGE: link this AFTER a page's own inline <style> so its token refresh and
   primitive components win the cascade:
     <link rel="stylesheet" href="/static/convergence.css">
   It intentionally does NOT include a global `*` reset or page layout — only
   design tokens, base typography, and reusable component primitives — so it
   refreshes an existing page's look without disturbing its structure.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* base neutrals (light) */
  --bg:           #fbfbfe;
  --bg-subtle:    #f3f4fb;
  --surface:      #ffffff;
  --surface-2:    #f7f8fd;
  --surface-3:    #eef0f9;
  --border:       #e6e8f3;
  --border-strong:#d3d7ea;
  --text:         #13142b;
  --text-muted:   #585d7a;
  --text-faint:   #8b90ac;

  /* brand */
  --accent:       #0071e3;
  --accent-2:     #3a93f0;
  --accent-ink:   #0a5bbf;   /* readable on light */
  --grad:         linear-gradient(135deg, #0071e3 0%, #3a93f0 100%);
  --grad-vivid:   linear-gradient(135deg, #0071e3 0%, #3a93f0 55%, #1f8fff 100%);
  --grad-soft:    linear-gradient(135deg, rgba(0,113,227,.10), rgba(58,147,240,.10));

  /* semantic */
  --success:      #0fae73;
  --success-soft: rgba(15,174,115,.12);
  --warn:         #d98e00;
  --warn-soft:    rgba(217,142,0,.12);
  --danger:       #e5484d;
  --danger-soft:  rgba(229,72,77,.12);

  /* model brand dots */
  --m-opus:   #d97757;
  --m-gpt:    #10a37f;
  --m-gemini: #4285f4;
  --m-grok:   #6b7280;

  /* shape + depth */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --pill:      999px;
  --shadow-sm: 0 1px 2px rgba(18,20,45,.05), 0 1px 3px rgba(18,20,45,.06);
  --shadow-md: 0 4px 14px rgba(18,20,45,.08), 0 2px 6px rgba(18,20,45,.05);
  --shadow-lg: 0 24px 60px rgba(40,30,120,.16), 0 8px 24px rgba(18,20,45,.10);
  --ring: 0 0 0 4px rgba(0,113,227,.18);

  --font-display: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg:           #0a0b13;
  --bg-subtle:    #0f1120;
  --surface:      #151728;
  --surface-2:    #1b1e33;
  --surface-3:    #232743;
  --border:       #272b46;
  --border-strong:#363b5c;
  --text:         #edeefa;
  --text-muted:   #a7accb;
  --text-faint:   #71769a;
  --accent:       #3a9bff;
  --accent-2:     #74b9ff;
  --accent-ink:   #8cc4ff;
  --grad:         linear-gradient(135deg, #3a9bff 0%, #74b9ff 100%);
  --grad-vivid:   linear-gradient(135deg, #3a9bff 0%, #74b9ff 55%, #5ab0ff 100%);
  --grad-soft:    linear-gradient(135deg, rgba(58,155,255,.16), rgba(116,185,255,.16));
  --success:      #2bd49a;
  --success-soft: rgba(43,212,154,.15);
  --warn:         #f0b429;
  --warn-soft:    rgba(240,180,41,.15);
  --danger:       #ff6369;
  --danger-soft:  rgba(255,99,105,.15);
  --m-grok:       #9aa1b5;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 18px rgba(0,0,0,.4);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.55), 0 8px 24px rgba(0,0,0,.4);
  --ring: 0 0 0 4px rgba(58,155,255,.28);
}

/* ---------- base typography (no global reset; tokens drive the rest) ---------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}
h1,h2,h3,h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.08; }
::selection { background: rgba(58,155,255,.28); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--pill); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s, opacity .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: default; opacity: .55; transform: none; box-shadow: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(0,113,227,.32); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(0,113,227,.42); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-lg { font-size: 16px; padding: 15px 30px; }
.btn-sm { font-size: 13px; padding: 8px 15px; }
.btn-block { width: 100%; }

/* ---------- chips / pills / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  padding: 6px 13px; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--border);
}
.chip-accent { color: var(--accent-ink); background: var(--grad-soft); border-color: transparent; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 7px;
}
.badge-critical { color: var(--danger); background: var(--danger-soft); }
.badge-major    { color: var(--warn);   background: var(--warn-soft); }
.badge-minor    { color: var(--accent-ink); background: var(--grad-soft); }
.badge-verified { color: var(--success); background: var(--success-soft); }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* ---------- segmented control ---------- */
.segmented {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--pill);
}
.segmented button {
  font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--text-muted);
  padding: 9px 20px; border: none; background: transparent; border-radius: var(--pill); cursor: pointer;
  transition: all .18s ease; white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(0,113,227,.3); }
.segmented.subtle button.active { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow-sm); }

/* ---------- form fields ---------- */
label.fld-label { display:block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.input, .select, textarea.input {
  width: 100%; font-family: var(--font); font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 13px 15px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input::placeholder, textarea.input::placeholder { color: var(--text-faint); }
.select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b90ac' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

/* gradient text */
.grad-text { background: var(--grad-vivid); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* utility */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }

/* (The shared site footer's "links pinned to top" fix now lives at the source in
   static/site-footer.js, so it applies to every page that footer renders on —
   not just pages that load this stylesheet.) */
