/* GrantWriter Restyle — shared tokens + theme scopes */

/* Smooth anchor scroll for the landing-page nav. */
html { scroll-behavior: smooth; }
/* Landing-page sections clear the sticky navbar (56px when expanded, 46px
   when scrolled — use the larger value so the heading is never tucked
   under the nav while a scroll is settling). */
.gw-land-section { scroll-margin-top: 72px; }

/* ─── Base tokens (theme-agnostic) ─────────────────────────────────────── */
:root {
  --grad-from: #667eea;
  --grad-to:   #764ba2;
  --grad: linear-gradient(135deg, var(--grad-from) 0%, var(--grad-to) 100%);
  --grad-soft: linear-gradient(135deg, rgba(102,126,234,0.12) 0%, rgba(118,75,162,0.12) 100%);
  --grad-focus: rgba(102,126,234,0.40);

  --glow-strength: 0.45;

  /* font */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* density (overridden by tweak) */
  --pad-x: 16px;
  --pad-y: 14px;
  --row-h: 44px;

  --eyebrow-tracking: 0.08em;
}

/* ─── Light theme ──────────────────────────────────────────────────────── */
.theme-light {
  --bg:           #f4f5f7;
  --page:         #f8f9fb;
  --surface:      #ffffff;
  --surface-2:    #f8f9fb;
  --surface-3:    #f1f3f6;
  --chrome:       #0f1115;        /* dark navbar */
  --chrome-soft:  #1a1d24;
  --border:       #e6e8ec;
  --border-soft:  #eef0f3;
  --border-strong:#d8dbe1;

  --text:         #0f1115;
  --text-soft:    #404652;
  --text-muted:   #6b7280;
  --text-on-chrome:#ffffff;
  --text-on-chrome-muted: rgba(255,255,255,0.6);

  --accent:       #6464e8;
  --accent-soft:  rgba(102,126,234,0.10);
  --success:      #15803d;
  --success-soft: rgba(21,128,61,0.10);
  --warning:      #b45309;
  --warning-soft: rgba(180,83,9,0.12);
  --danger:       #b91c1c;
  --danger-soft:  rgba(185,28,28,0.10);
  --info:         #0369a1;
  --info-soft:    rgba(3,105,161,0.10);

  --shadow-xs: 0 1px 1px rgba(15,17,21,0.04);
  --shadow-sm: 0 1px 2px rgba(15,17,21,0.06), 0 1px 1px rgba(15,17,21,0.03);
  --shadow:    0 4px 12px rgba(15,17,21,0.06), 0 1px 2px rgba(15,17,21,0.04);
  --shadow-md: 0 12px 24px -8px rgba(15,17,21,0.10), 0 4px 8px -4px rgba(15,17,21,0.06);
  --shadow-lg: 0 24px 48px -12px rgba(15,17,21,0.18);
  --shadow-glow: 0 12px 32px -8px rgba(102,126,234,calc(var(--glow-strength) * 1));

  color-scheme: light;
}

/* ─── Dark theme ───────────────────────────────────────────────────────── */
.theme-dark {
  --bg:           #06070d;
  --page:         #0a0c13;
  --surface:      #0f1219;
  --surface-2:    #151926;
  --surface-3:    #1d2230;
  --chrome:       #0a0c13;
  --chrome-soft:  #12141c;
  --border:       #1d2230;
  --border-soft:  #161a25;
  --border-strong:#2a3142;

  --text:         #f1f5f9;
  --text-soft:    #cbd5e1;
  --text-muted:   #8a94a8;
  --text-on-chrome:#f1f5f9;
  --text-on-chrome-muted: rgba(241,245,249,0.55);

  --accent:       #8a91ff;
  --accent-soft:  rgba(138,145,255,0.14);
  --success:      #4ade80;
  --success-soft: rgba(74,222,128,0.14);
  --warning:      #fbbf24;
  --warning-soft: rgba(251,191,36,0.14);
  --danger:       #f87171;
  --danger-soft:  rgba(248,113,113,0.14);
  --info:         #38bdf8;
  --info-soft:    rgba(56,189,248,0.14);

  --shadow-xs: 0 1px 1px rgba(0,0,0,0.40);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.50);
  --shadow:    0 6px 16px rgba(0,0,0,0.40), 0 2px 4px rgba(0,0,0,0.30);
  --shadow-md: 0 16px 32px -8px rgba(0,0,0,0.55);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,0.65);
  --shadow-glow: 0 12px 32px -8px rgba(138,145,255,calc(var(--glow-strength) * 1));

  color-scheme: dark;
}

/* ─── Artboard chrome ──────────────────────────────────────────────────── */
.gw-frame {
  font-family: var(--font-sans);
  background: var(--page);
  color: var(--text);
  width: 100%;
  height: 100%;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

.gw-frame * { box-sizing: border-box; }

/* ─── Header / navbar (dark chrome) ────────────────────────────────────── */
.gw-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  background: var(--chrome);
  color: var(--text-on-chrome);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  /* Sticky: stays pinned to the top of the viewport while you scroll the page. */
  position: sticky;
  top: 0;
  z-index: 50;
  transition: height .18s ease, box-shadow .18s ease;
}
/* Shrink + add a soft shadow once the user scrolls past the hero. JS in
   base.html toggles .is-scrolled on the element based on window.scrollY. */
.gw-nav.is-scrolled {
  height: 46px;
  box-shadow: 0 2px 12px -4px rgba(0,0,0,0.35);
}
.gw-nav.is-scrolled .gw-brand-mark { width: 22px; height: 22px; font-size: 11px; }
.gw-nav.is-scrolled .gw-brand { font-size: 14px; }
.gw-nav .gw-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  color: var(--text-on-chrome);
  text-decoration: none;
}
.gw-nav .gw-brand:hover { text-decoration: none; color: var(--text-on-chrome); }
.gw-nav-links a, .gw-nav-links a:hover { text-decoration: none; }
.gw-brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px;
  box-shadow: 0 4px 12px -2px rgba(102,126,234,0.6);
}
.gw-nav-links {
  display: flex; align-items: center; gap: 2px;
  margin-left: 24px; flex: 1;
}
.gw-nav-links a {
  color: var(--text-on-chrome-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.gw-nav-links a:hover { color: var(--text-on-chrome); background: rgba(255,255,255,0.06); }
.gw-nav-links a.is-active {
  color: var(--text-on-chrome);
  background: rgba(255,255,255,0.08);
}
.gw-nav-right { display:flex; align-items:center; gap:14px; }

/* Theme toggle button (lives in the dark navbar — shows sun in dark mode, moon in light mode). */
.gw-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.gw-theme-toggle:hover { background: rgba(255,255,255,0.08); color: #fff; }
/* Show the icon that represents the theme you'll SWITCH TO when clicked. */
.theme-light .gw-theme-toggle .gw-theme-icon-light { display: none; }
.theme-dark  .gw-theme-toggle .gw-theme-icon-dark  { display: none; }

/* Floating variant — used on auth pages where there's no navbar. */
.gw-theme-toggle-floating {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 100;
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.gw-theme-toggle-floating:hover { background: var(--surface-2); color: var(--text); }
.gw-search {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-on-chrome-muted);
  width: 220px;
}
.gw-search kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  color: var(--text-on-chrome-muted);
}
.gw-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 8px -2px rgba(102,126,234,0.5);
}

/* ─── Container ────────────────────────────────────────────────────────── */
.gw-container {
  padding: 28px 32px;
}
.gw-container-wide { padding: 28px 32px; }

/* ─── Page title / eyebrow ─────────────────────────────────────────────── */
.gw-page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.gw-eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-tracking);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.gw-h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text);
}
.gw-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* ─── Card ─────────────────────────────────────────────────────────────── */
.gw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.gw-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.gw-card-head h3 {
  margin: 0; font-size: 13px; font-weight: 700;
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text);
}
.gw-card-head .gw-card-meta { font-size: 12px; color: var(--text-muted); }
.gw-card-body { padding: 16px; }
.gw-card-body.tight { padding: 0; }

/* Gradient accent bar at top of card */
.gw-card.accent {
  position: relative;
  overflow: hidden;
}
.gw-card.accent::before {
  content: ''; position: absolute; left:0; top:0; right:0;
  height: 3px;
  background: var(--grad);
}

/* ─── Tile (dashboard) ─────────────────────────────────────────────────── */
.gw-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.gw-tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.gw-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.gw-tile .gw-tile-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items:center; justify-content:center;
  background: var(--grad-soft);
  color: var(--accent);
  font-size: 15px;
}
.gw-tile .gw-tile-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.gw-tile .gw-tile-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.gw-tile .gw-tile-meta {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}

/* Hero tile — gradient bg, white type */
.gw-tile.hero {
  background: var(--grad);
  color: #fff;
  border: 0;
  box-shadow: var(--shadow-glow);
}
.gw-tile.hero .gw-tile-icon {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.gw-tile.hero .gw-tile-desc { color: rgba(255,255,255,0.85); }
.gw-tile.hero .gw-tile-meta { color: rgba(255,255,255,0.75); }
.gw-tile.hero::after {
  content: ''; position: absolute; right: -30px; bottom: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
  pointer-events: none;
}

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.gw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  background: var(--chrome);
  color: #fff;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .15s ease;
  white-space: nowrap;
}
.gw-btn:hover { transform: translateY(-1px); }
.gw-btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(102,126,234, calc(var(--glow-strength) * 1.2));
}
.gw-btn-primary:hover {
  box-shadow: 0 10px 24px -6px rgba(102,126,234, calc(var(--glow-strength) * 1.4));
}
.gw-btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.gw-btn-secondary:hover { background: var(--surface-2); }
.gw-btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: transparent;
  height: 32px; padding: 0 10px;
}
.gw-btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.gw-btn-sm { height: 30px; font-size: 12px; padding: 0 10px; gap: 6px; }
.gw-btn-lg { height: 44px; font-size: 14px; padding: 0 22px; }

/* ─── Badges / chips ───────────────────────────────────────────────────── */
.gw-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-soft);
  border: 1px solid var(--border);
  line-height: 1.5;
  white-space: nowrap;
}
.gw-badge-grad {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px -4px rgba(102,126,234,0.5);
}
.gw-badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.gw-badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.gw-badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.gw-badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.gw-badge-soft { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* status dot */
.gw-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.gw-dot.is-on { background: var(--success); box-shadow: 0 0 6px var(--success); }

/* ─── Form controls ────────────────────────────────────────────────────── */
.gw-input, .gw-textarea, .gw-select {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-family: inherit; font-size: 13px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gw-textarea { height: auto; padding: 10px 12px; min-height: 80px; line-height: 1.55; resize: vertical; }
.gw-input:focus, .gw-textarea:focus, .gw-select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--grad-focus);
}
.gw-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
}

/* ─── Table ────────────────────────────────────────────────────────────── */
.gw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gw-table th, .gw-table td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.gw-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-tracking);
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.gw-table tr:last-child td { border-bottom: 0; }
.gw-table tbody tr:hover td { background: var(--surface-2); }
.gw-table .gw-row-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ─── Eyebrow micro-section heading ────────────────────────────────────── */
.gw-section-eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-tracking);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 10px;
}

/* ─── Progress bar (gradient) ──────────────────────────────────────────── */
.gw-progress {
  width: 100%; height: 6px;
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.gw-progress > div {
  height: 100%;
  background: var(--grad);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 12px -2px rgba(102,126,234,0.5);
}

/* ─── Stat tile (KPI) ──────────────────────────────────────────────────── */
.gw-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.gw-stat .gw-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-tracking);
  color: var(--text-muted);
  font-weight: 700;
}
.gw-stat .gw-stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  color: var(--text);
}
.gw-stat .gw-stat-delta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: 4px;
}
.gw-stat .gw-stat-delta.up { color: var(--success); }
.gw-stat .gw-stat-delta.down { color: var(--danger); }
.gw-stat.grad {
  background: var(--grad);
  color: #fff;
  border: 0;
  box-shadow: var(--shadow-glow);
}
.gw-stat.grad .gw-stat-label,
.gw-stat.grad .gw-stat-value,
.gw-stat.grad .gw-stat-delta {
  color: #fff;
}
.gw-stat.grad .gw-stat-label { color: rgba(255,255,255,0.8); }
.gw-stat.grad .gw-stat-delta { color: rgba(255,255,255,0.9); }
.gw-stat.grad::after {
  content: ''; position: absolute; right: -40px; bottom: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
}

/* ─── Sidebar (workspace) ──────────────────────────────────────────────── */
.gw-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
}
.gw-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  transition: background .15s ease;
}
.gw-sidebar-item:hover { background: var(--surface-2); color: var(--text); }
.gw-sidebar-item.is-active {
  background: var(--grad-soft);
  color: var(--accent);
  font-weight: 600;
}
.gw-sidebar-item.is-active::before {
  content: ''; width: 3px; height: 16px; border-radius: 2px; background: var(--grad);
  margin-right: -4px;
}

/* ─── Avatar chip (in lists) ───────────────────────────────────────────── */
.gw-pic {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items:center; justify-content:center;
  font-weight: 700; font-size: 11.5px;
  color: #fff;
  flex-shrink: 0;
}
.gw-pic.g1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.gw-pic.g2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.gw-pic.g3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.gw-pic.g4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.gw-pic.g5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.gw-pic.g6 { background: linear-gradient(135deg, #30cfd0, #330867); }
.gw-pic.g7 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #2a2a2a; }

/* ─── Alert ────────────────────────────────────────────────────────────── */
.gw-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  border-left: 3px solid var(--accent);
  background: var(--grad-soft);
  color: var(--text);
}
.gw-alert i:first-child { color: var(--accent); margin-top: 1px; }
.gw-alert.success { border-color: var(--success); background: var(--success-soft); }
.gw-alert.success i:first-child { color: var(--success); }
.gw-alert.warning { border-color: var(--warning); background: var(--warning-soft); }
.gw-alert.warning i:first-child { color: var(--warning); }

/* ─── Avatar stack ─────────────────────────────────────────────────────── */
.gw-avatar-stack { display: inline-flex; }
.gw-avatar-stack .gw-pic {
  width: 24px; height: 24px; font-size: 9.5px;
  border: 2px solid var(--surface);
  margin-left: -6px; border-radius: 50%;
}
.gw-avatar-stack .gw-pic:first-child { margin-left: 0; }

/* helpers */
.gw-row { display: flex; align-items: center; gap: 12px; }
.gw-col { display: flex; flex-direction: column; gap: 4px; }
.gw-gap-6 { gap: 6px; } .gw-gap-8 { gap: 8px; } .gw-gap-12 { gap: 12px; } .gw-gap-16 { gap: 16px; }
.gw-mt-8 { margin-top: 8px; } .gw-mt-12 { margin-top: 12px; } .gw-mt-16 { margin-top: 16px; } .gw-mt-24 { margin-top: 24px; }
.gw-text-muted { color: var(--text-muted); }
.gw-mono { font-family: var(--font-mono); font-size: 12px; }
.gw-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

/* ─── Atmospheric login bg ─────────────────────────────────────────────── */
.gw-auth-bg {
  position: relative;
  width: 100%; height: 100%;
  background: var(--bg);
  overflow: hidden;
}
.gw-auth-bg::before {
  /* aurora gradient orb */
  content: '';
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(102,126,234,0.40) 0%, rgba(102,126,234,0) 60%);
  filter: blur(20px);
}
.gw-auth-bg::after {
  content: '';
  position: absolute;
  bottom: -200px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(118,75,162,0.35) 0%, rgba(118,75,162,0) 60%);
  filter: blur(20px);
}
.theme-dark .gw-auth-bg::before { background: radial-gradient(circle, rgba(102,126,234,0.30) 0%, rgba(102,126,234,0) 60%); }
.theme-dark .gw-auth-bg::after  { background: radial-gradient(circle, rgba(118,75,162,0.25) 0%, rgba(118,75,162,0) 60%); }

/* grid pattern overlay */
.gw-auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--text) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--text) 4%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 0%, transparent 80%);
}

.gw-auth-card {
  position: relative;
  width: 420px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.gw-auth-card-header {
  background: var(--grad);
  color: #fff;
  padding: 22px 24px 18px;
  text-align: center;
}
.gw-auth-card-header .gw-brand-mark {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: none;
  margin: 0 auto 10px;
  font-size: 18px;
}
.gw-auth-card-header h1 {
  margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
}
.gw-auth-card-header p {
  margin: 4px 0 0; font-size: 13px; opacity: 0.85;
}
.gw-auth-card-body { padding: 24px; }

/* Continue / Sign up with Google button + the "or" divider underneath. */
.gw-oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.gw-oauth-btn:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
}
.gw-oauth-btn svg { flex-shrink: 0; }
.gw-oauth-divider {
  display: flex; align-items: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gw-oauth-divider::before,
.gw-oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.gw-oauth-divider span { padding: 0 12px; }

/* ─── Sparkline ───────────────────────────────────────────────────────── */
.gw-spark { width: 100%; height: 36px; }

/* Avatar squircle for dashboard hero */
.gw-hero-orb {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}

/* density modifiers */
.density-compact .gw-card-body { padding: 12px; }
.density-compact .gw-tile { padding: 14px; }
.density-compact .gw-table th, .density-compact .gw-table td { padding: 8px 14px; }
.density-comfy .gw-card-body { padding: 22px; }
.density-comfy .gw-tile { padding: 22px; }
.density-comfy .gw-table th, .density-comfy .gw-table td { padding: 14px 18px; }

/* Theme label header in canvas */
.theme-tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  z-index: 10;
}

/* helper for proposal editor */
.gw-editor-toolbar {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.gw-editor-toolbar button {
  height: 28px; min-width: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--text-soft);
  border-radius: 6px; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.gw-editor-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.gw-editor-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 4px; }

/* shimmer for AI generating state */
@keyframes gw-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.gw-shimmer {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--text) 8%, transparent) 0%,
    color-mix(in srgb, var(--accent) 35%, transparent) 50%,
    color-mix(in srgb, var(--text) 8%, transparent) 100%);
  background-size: 200% 100%;
  animation: gw-shimmer 2.4s linear infinite;
  border-radius: 4px;
}

/* Soft section card (used for AI panel etc) */
.gw-soft-card {
  background: var(--grad-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 12px;
  padding: 14px 16px;
}

/* ─── App-level additions on top of the bundle's design tokens ────── */

/* ─── Mobile bottom-tab nav (TJ-native pattern, ported from
       trading-jay/dashboard/templates/base.html + design-system.css) ── */
#gw-mobile-nav {
  display: none;
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* TJ-native dark + navy border (deliberate: matches Trading Jay's bar even
     in light theme — the bottom nav is always dark, like a system app bar). */
  background: #0a0c14;
  border-top: 1px solid #1e2535;
  z-index: 90;
  align-items: stretch;
}
/* TJ-native mobile-tab styling — solid purple active state (no gradient-text
   trick), slate inactive, light-purple hover. Matches
   trading-jay/dashboard/static/css/design-system.css .tj-mobile-tab. */
.gw-mobile-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: #718096;
  text-decoration: none;
  font-size: 0.58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  font-family: inherit;
  border: 0; background: none; cursor: pointer;
  padding: 6px 2px;
  transition: color .15s ease;
}
.gw-mobile-tab i { font-size: 1.15rem; line-height: 1; }
.gw-mobile-tab:hover { color: #a78bfa; text-decoration: none; }
.gw-mobile-tab.is-active { color: #667eea; }
.gw-mobile-tab.is-active i { color: #667eea; }

/* More drawer + overlay */
#gw-more-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
#gw-more-overlay.is-open { display: block; opacity: 1; pointer-events: auto; }

#gw-more-drawer {
  display: none;
  position: fixed;
  left: 0; right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  z-index: 101;
  /* Match TJ's drawer chrome — slightly darker than the dark navbar. */
  background: #0d0f18;
  border: 1px solid #1e2535;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: 8px 12px 16px;
  transform: translateY(110%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-height: 72vh; overflow-y: auto;
}
#gw-more-drawer.is-open { display: block; transform: translateY(0); }

.gw-more-handle {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: #2d3748;
  margin: 4px auto 12px;
}

/* TJ-native tile grid (mirrors .tj-more-tile from trading-jay/dashboard
   design-system.css). Icon-on-top, uppercase label below — same visual
   language as the bottom tab bar so the drawer feels like an extension
   of it rather than a different control. */
.gw-more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.gw-more-tile {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 18px 8px;
  background: #141720; border: 1px solid #1e2535; border-radius: 12px;
  color: #a0aec0; text-decoration: none;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  text-align: center; width: 100%;
  font-family: inherit;
  border-width: 1px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.gw-more-tile i { font-size: 1.4rem; color: #a78bfa; line-height: 1; }
.gw-more-tile:hover {
  background: #1a1e2e; color: #e2e8f0;
  border-color: #3a4060; text-decoration: none;
}
.gw-more-tile.is-active {
  background: rgba(102,126,234,0.12);
  border-color: rgba(102,126,234,0.35);
  color: #667eea;
}
.gw-more-tile.is-active i { color: #667eea; }

/* Logout — full width row, danger tint, sits below the tile grid. */
.gw-more-tile-danger {
  flex-direction: row; gap: 10px;
  padding: 14px 20px; justify-content: center;
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.20);
  color: #fca5a5;
}
.gw-more-tile-danger i { color: #fca5a5; font-size: 1rem; }
.gw-more-tile-danger:hover {
  background: rgba(248,113,113,0.14);
  border-color: rgba(248,113,113,0.35);
  color: #fecaca;
}

/* Phone-sized mobile styles (only the things that genuinely need tighter
   layout on a phone — typography, container padding, page-head reflow). */
@media (max-width: 720px) {
  .gw-container, .gw-container-wide { padding: 16px; }
  .gw-nav { padding: 0 12px; height: 52px; }
  .gw-search { display: none; }
  .gw-page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .gw-page-head > div:last-child { flex-wrap: wrap; }
  .gw-tile-grid { grid-template-columns: 1fr; gap: 10px; }
  .gw-table th, .gw-table td { padding: 9px 12px; font-size: 12.5px; }
  .gw-card-body { padding: 14px; }
  .gw-h1 { font-size: 22px; }
}

/* Nav-bar breakpoint = retina iPad and below (~1024px). Per the global
   "Mobile-nav rules" in ~/.claude/CLAUDE.md, the bottom tab bar +
   top-nav-links hide must activate at iPad-retina size, not just at
   phone size. iPad users get the chunkier bottom-tab UX. */
@media (max-width: 1024px) {
  .gw-nav-links { display: none; }
  #gw-mobile-nav { display: flex; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .gw-footer { margin-top: 16px !important; }
  #chat-bubble { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
  #chat-panel  { bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Belt-and-suspenders: hide bottom nav + more drawer on desktop (>1024). */
@media (min-width: 1025px) {
  #gw-mobile-nav, #gw-more-drawer, #gw-more-overlay { display: none !important; }
}

/* Defaults for html/body — bundle defines tokens INSIDE .theme-light /
   .theme-dark scopes, so we attach .theme-light to <html> in base.html. */
html, body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--page);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}
html { color-scheme: light; }
html.theme-dark { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: underline; }

/* Universal focus ring for keyboard nav */
:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--grad-focus);
  border-radius: var(--radius-sm);
}

/* iOS bottom safe area for fixed elements */
@supports (padding: max(0px)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Legacy aliases so any not-yet-restyled inline styles keep resolving. */
:root { --muted: var(--text-muted); }

/* ─── Chat bubble + panel (TJ-native) ───────────────────────────── */
#chat-bubble {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  right: 1rem;
  width: 52px; height: 52px;
  border-radius: 50%; border: 0;
  background: var(--grad);
  color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md), 0 0 24px -4px rgba(102,126,234,0.5);
  z-index: 100;
  transition: transform .2s ease, box-shadow .2s ease;
}
#chat-bubble:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 0 32px -2px rgba(102,126,234,0.65); }

#chat-panel {
  display: none;
  position: fixed;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0));
  right: 1rem;
  width: min(380px, calc(100vw - 2rem));
  height: min(560px, calc(100vh - 7rem));
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  z-index: 101;
  box-shadow: var(--shadow-lg);
  flex-direction: column; overflow: hidden;
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 600;
}
.chat-close {
  background: none; border: 0; color: var(--text-muted);
  font-size: 18px; line-height: 1; cursor: pointer;
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.chat-close:hover { background: var(--surface-2); color: var(--text); }
.chat-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.chat-tab {
  flex: 1; padding: 8px; border: 0; background: transparent;
  color: var(--text-muted); cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  border-bottom: 2px solid transparent; transition: all .15s ease;
}
.chat-tab:hover:not(.is-locked) { color: var(--text); background: var(--surface-3); }
.chat-tab.is-active {
  color: var(--accent);
  border-bottom-color: transparent;
  background: var(--grad-soft);
}
.chat-tab.is-locked { color: var(--text-muted); cursor: not-allowed; opacity: 0.55; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-thread-list { display: none; padding: 8px; overflow-y: auto; }
.chat-input-row {
  display: flex; padding: 10px; gap: 8px;
  border-top: 1px solid var(--border); background: var(--surface);
}
.chat-input-row input { flex: 1; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 13px; font-family: inherit; }
.chat-input-row input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--grad-focus); }

/* ─── Chat bubbles ────────────────────────────────────────────────── */
.chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
}
.chat-msg-user {
  align-self: flex-end;
  background: var(--grad);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg-bot {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-msg-body { white-space: pre-wrap; word-wrap: break-word; }
.chat-more {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.chat-more:hover { text-decoration: underline; color: var(--accent); }

/* ─── Announcement popup styles ────────────────────────────────────── */
.gw-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 17, 21, 0.55);
  backdrop-filter: blur(2px);
  z-index: 110;
}
.gw-popup-card {
  position: fixed;
  z-index: 111;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 18px 20px 18px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: min(420px, calc(100vw - 32px));
  animation: gw-popup-in .22s cubic-bezier(.4,0,.2,1);
}
.gw-popup-center {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.gw-popup-top-right    { top: 16px; right: 16px; }
.gw-popup-top-left     { top: 16px; left: 16px; }
.gw-popup-top-center   { top: 16px; left: 50%; transform: translateX(-50%); }
.gw-popup-bottom-right { bottom: 80px; right: 16px; }
.gw-popup-bottom-left  { bottom: 80px; left: 16px; }
.gw-popup-bottom-center{ bottom: 80px; left: 50%; transform: translateX(-50%); }

.gw-popup-close {
  position: absolute; top: 8px; right: 8px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted);
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.gw-popup-close:hover { background: var(--surface-2); color: var(--text); }

.gw-popup-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.gw-popup-icon-info    { background: var(--accent-soft); color: var(--accent); }
.gw-popup-icon-warning { background: var(--warning-soft); color: var(--warning); }
.gw-popup-icon-success { background: var(--success-soft); color: var(--success); }

.gw-popup-body { flex: 1; min-width: 0; }
.gw-popup-title { font-weight: 700; font-size: 14px; letter-spacing: -0.005em; }
.gw-popup-text  { color: var(--text-soft); font-size: 13px; margin-top: 4px; line-height: 1.5; }

@keyframes gw-popup-in {
  from { opacity: 0; transform: translate(var(--gw-popup-x, 0), -8px); }
  to   { opacity: 1; }
}
/* Center popup needs different initial transform */
.gw-popup-center { animation-name: gw-popup-center-in; }
@keyframes gw-popup-center-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% - 8px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

@media (max-width: 720px) {
  .gw-popup-card { max-width: calc(100vw - 24px); padding: 14px; }
  .gw-popup-bottom-right, .gw-popup-bottom-left, .gw-popup-bottom-center {
    bottom: 90px;
  }
}

/* ─── AI search bar (sticky, just below the dark navbar) ──────────── */
#gw-ai-bar {
  background: var(--page);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 8;
}
.gw-ai-bar-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gw-ai-bar-inner:focus-within {
  box-shadow: 0 0 0 3px var(--grad-focus);
}
.gw-ai-bar-icon { color: var(--text-muted); font-size: 13px; }
.gw-ai-bar-input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  padding: 6px 0;
  min-width: 0;
}
.gw-ai-bar-input::placeholder { color: var(--text-muted); }
.gw-ai-ask-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 0;
  background: var(--grad);
  color: white;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s ease;
}
.gw-ai-ask-btn:hover { filter: brightness(1.06); }
.gw-ai-shortcut {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text-muted);
  background: var(--surface-2);
  margin-right: 4px;
}
@media (max-width: 720px) {
  #gw-ai-bar { padding: 8px 12px; }
  .gw-ai-shortcut { display: none; }
  .gw-ai-ask-btn span { display: none; }
  .gw-ai-ask-btn { padding: 6px 10px; }
}

/* ─── Search dropdown (anchored to the bar) ──────────────────────── */
.gw-ai-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  overflow: hidden;
}
.gw-ai-dropdown-results {
  max-height: 420px;        /* ~10 rows; scroll for more */
  overflow-y: auto;
  padding: 6px 8px;
}
.gw-ai-dropdown-empty {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.gw-ai-dropdown-aifoot {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border: 0;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.gw-ai-dropdown-aifoot:hover { background: var(--surface-3); }
.gw-ai-dropdown-aifoot span { flex: 1; }

/* ─── AI overlay + modal ──────────────────────────────────────────── */
#gw-ai-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 17, 21, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  padding: 24px;
  overflow-y: auto;
}
#gw-ai-overlay.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: gw-ai-fade .18s ease;
}
@keyframes gw-ai-fade { from { opacity: 0 } to { opacity: 1 } }
.gw-ai-modal {
  width: min(720px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  margin-top: 6vh;
  max-height: calc(100vh - 12vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: gw-ai-rise .22s cubic-bezier(.4,0,.2,1);
}
@keyframes gw-ai-rise { from { transform: translateY(8px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
.gw-ai-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.gw-ai-close {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.gw-ai-close:hover { background: var(--surface-2); color: var(--text); }
.gw-ai-modal-body {
  padding: 18px 22px;
  flex: 1;
  overflow-y: auto;
}
.gw-ai-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
#gw-ai-drop {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
#gw-ai-drop.is-dragging {
  border-color: var(--accent);
  background: var(--grad-soft);
}
.gw-ai-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.gw-ai-result-item:hover { border-color: var(--accent); background: var(--surface); text-decoration: none; color: var(--text); }

/* ─── Search result rows (used inside the dropdown) ──────────────── */
.gw-ai-group {
  padding: 12px 12px 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 6px;
  width: 100%;
}
.gw-ai-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background .12s ease;
}
.gw-ai-row:hover, .gw-ai-row.is-active {
  background: var(--grad-soft);
  text-decoration: none;
  color: var(--text);
}
.gw-ai-row-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}
.gw-ai-row.is-active .gw-ai-row-icon {
  background: var(--grad);
  color: white;
}
.gw-ai-row-text { flex: 1; min-width: 0; }
.gw-ai-row-label {
  font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gw-ai-row-sub {
  font-size: 11.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px;
}
.gw-ai-row-arrow {
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0;
  transition: opacity .12s ease;
}
.gw-ai-row.is-active .gw-ai-row-arrow,
.gw-ai-row:hover .gw-ai-row-arrow {
  opacity: 1;
  color: var(--accent);
}

/* ─── Marketing landing page (/) ─────────────────────────────────── */
.gw-land-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 32px;
}
.gw-land-h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 10px 0 18px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.gw-land-lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 56ch;
}
.gw-land-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.gw-land-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: var(--text-muted);
}
.gw-land-trust i { color: var(--accent); margin-right: 4px; }
.gw-land-hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}
.gw-land-mock {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
  /* Bobs 4 times then settles. */
  animation: gw-land-bob 5.2s ease-in-out 4;
  will-change: transform;
}
.gw-land-mock-stack {
  max-width: 280px;
  align-self: flex-end;
  margin-right: 20px;
  transform: rotate(2.5deg);
  /* Different duration + slight delay so the two cards bob out of phase. */
  animation: gw-land-bob-stack 6.8s ease-in-out 4;
  animation-delay: 0.6s;
}

@keyframes gw-land-bob {
  0%, 100% { transform: rotate(-1.2deg) translateY(0); }
  50%      { transform: rotate(-1.2deg) translateY(-7px); }
}
@keyframes gw-land-bob-stack {
  0%, 100% { transform: rotate(2.5deg) translateY(0); }
  50%      { transform: rotate(2.5deg) translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  .gw-land-mock, .gw-land-mock-stack { animation: none; }
}
.gw-land-mock-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.gw-land-mock-tag {
  font-size: 10px; font-weight: 700;
  color: white;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.gw-land-mock-line {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  margin: 6px 0;
}

.gw-land-section { padding: 56px 0 8px; }
.gw-land-h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 6px 0 12px;
  color: var(--text);
}
.gw-land-body {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 72ch;
  margin: 0;
}

.gw-land-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.gw-land-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color .15s ease, transform .15s ease;
}
.gw-land-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.gw-land-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--grad);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}
.gw-land-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
.gw-land-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}

/* Alternating-band tint — applied to sections that would otherwise be
   the third white-on-white in a row, so the landing page has visual
   rhythm. Uses negative horizontal margins to escape the gw-container's
   32px gutter and read as a full-width band. */
.gw-land-tinted {
  /* --surface-2 was indistinguishable from the page bg (#f8f9fb both).
     Switched to the brand's accent-soft (rgba(102,126,234,0.10)) — a
     light periwinkle wash that reads as clearly different from white
     without being heavy. */
  background: var(--accent-soft);
  margin-left: -32px;
  margin-right: -32px;
  padding-left: 32px;
  padding-right: 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 720px) {
  /* Mobile container padding drops to 16px — match the negative offset. */
  .gw-land-tinted { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

/* Charts */
.gw-land-numbers { background: var(--surface-2); margin: 56px -24px 8px; padding: 56px 24px; border-radius: 18px; }
.gw-land-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.gw-land-chart-head { margin-bottom: 14px; }
.gw-land-chart-title { font-size: 14px; font-weight: 700; color: var(--text); }
.gw-land-chart-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.gw-land-bar-row {
  display: grid;
  grid-template-columns: 64px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.gw-land-bar-label { font-size: 11.5px; color: var(--text-muted); text-align: right; }
.gw-land-bar {
  height: 12px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}
.gw-land-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
/* Default-zero for animated bars so they don't flash full-width before JS runs. */
.gw-land-bar-fill[data-pct] { width: 0; }
.gw-land-bar-fill.is-grad { background: var(--grad); }
.gw-land-bar-fill.is-muted { background: var(--text-muted); opacity: .35; }
.gw-land-bar-val { font-size: 12px; font-weight: 700; color: var(--text); }
.gw-land-chart-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-soft);
}
.gw-land-chart-foot strong { color: var(--accent); }

/* Stories */
.gw-land-story {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gw-land-story-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 4px;
}
.gw-land-story-name { font-size: 14px; font-weight: 700; color: var(--text); }
.gw-land-story-meta { font-size: 11.5px; color: var(--text-muted); }
.gw-land-story p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}
.gw-land-story-stat {
  margin-top: auto;
  padding: 10px 12px;
  background: var(--grad-soft);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text);
}
.gw-land-disclaimer {
  text-align: center;
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* Pricing strip */
/* Monthly ↔ Annual pill toggle — shared by /pricing and the landing-page strip. */
.gw-interval-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 22px;
  font-size: 13px;
}
.gw-land-pricing .gw-interval-toggle,
.gw-page-head + .gw-interval-toggle {
  display: flex;
  width: fit-content;
}
.gw-interval-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .12s ease, background .12s ease, box-shadow .12s ease;
}
.gw-interval-toggle button:hover:not(.is-active) { color: var(--text); }
.gw-interval-toggle button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.gw-interval-save {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
}

.gw-land-price {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.gw-land-price-popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--grad-focus);
}
.gw-land-price-badge {
  position: absolute;
  top: -10px;
  left: 22px;
  background: var(--grad);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}
.gw-land-price-name { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.gw-land-price-amt { font-size: 36px; font-weight: 800; color: var(--text); margin: 6px 0 4px; }
/* Only the suffix ("/mo", "/yr") shrinks — the number .amt span stays big.
   Was: .gw-land-price-amt span which scooped up the amount span too. */
.gw-land-price-amt .per { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.gw-land-price-tag { font-size: 12.5px; color: var(--text-soft); margin-bottom: 14px; }
.gw-land-price ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.gw-land-price ul li { font-size: 13px; color: var(--text); display: flex; gap: 8px; align-items: center; }
.gw-land-price ul li i { color: var(--accent); font-size: 11px; }

/* Final CTA */
.gw-land-finalcta {
  margin: 64px -24px 32px;
  padding: 56px 24px;
  background: var(--grad);
  border-radius: 18px;
  text-align: center;
}
.gw-land-finalcta .gw-land-cta { justify-content: center; }

/* Responsive */
@media (max-width: 900px) {
  .gw-land-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .gw-land-hero-visual { align-items: center; }
  .gw-land-mock-stack { margin-right: 0; }
  .gw-land-h1 { font-size: 36px; }
  .gw-land-h2 { font-size: 24px; }
  .gw-land-grid-3 { grid-template-columns: 1fr; }
  .gw-land-numbers, .gw-land-finalcta { margin-left: -12px; margin-right: -12px; padding-left: 18px; padding-right: 18px; }
}

