/* ===========================================================
   COLIT - Litigation Finance Platform
   Design System / Global Styles
   No external fonts, no CDN, no dependencies.
   =========================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Design Tokens ---------- */
:root {
  /* Surfaces */
  --bg-base: #07090d;
  --bg-surface: #0e1117;
  --bg-elevated: #141821;
  --bg-hover: #1a1f2a;
  --bg-input: #0b0e14;

  /* Borders */
  --border: #1f2531;
  --border-strong: #2a3142;
  --border-accent: rgba(94, 234, 212, 0.25);

  /* Text */
  --text-primary: #e6e9ef;
  --text-secondary: #9097a6;
  --text-tertiary: #5d6577;

  /* Accents */
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.12);
  --accent-strong: #2dd4bf;
  --positive: #4ade80;
  --positive-dim: rgba(74, 222, 128, 0.12);
  --negative: #f87171;
  --negative-dim: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-dim: rgba(251, 191, 36, 0.12);
  --info: #60a5fa;
  --info-dim: rgba(96, 165, 250, 0.12);
  --violet: #c084fc;
  --violet-dim: rgba(192, 132, 252, 0.12);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, "Cascadia Mono", Consolas, monospace;

  /* Sizes */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Layout */
  --nav-height: 60px;
  --max-width: 1280px;
  --container-pad: 24px;

  /* Shadow */
  --shadow: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.45);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01", "ss03";
}

::selection { background: var(--accent-dim); color: var(--accent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a4458; }

/* ---------- Typography Utilities ---------- */
.h2 { font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
.h3 { font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
.h4 { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0; }
.h5 { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0; }

.text-lg { font-size: 17px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent); }
.text-positive { color: var(--positive); }
.text-negative { color: var(--negative); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.caps {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.center { text-align: center; }
.right { text-align: right; }

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: row; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-10 { gap: 40px; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.wrap { flex-wrap: wrap; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }

.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; } .mt-16 { margin-top: 64px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; } .mb-10 { margin-bottom: 40px; }
.py-10 { padding-top: 40px; padding-bottom: 40px; }
.py-16 { padding-top: 64px; padding-bottom: 64px; }
.py-24 { padding-top: 96px; padding-bottom: 96px; }

/* ---------- Top Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(7, 9, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 2px;
  background: var(--bg-base);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--text-primary); background: var(--bg-elevated); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.12s ease;
  border: 1px solid transparent;
}
.nav-icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}
.nav-icon-btn svg { display: block; }

/* Profile dropdown */
.profile-dropdown { position: relative; }
.profile-trigger {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 200;
  animation: profile-menu-in 0.12s ease-out;
}
.profile-menu[hidden] { display: none; }
@keyframes profile-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-menu-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 14px;
}
.profile-menu-header .meta { min-width: 0; flex: 1; }
.profile-menu-header .meta .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-menu-header .meta .email {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-primary);
  border-radius: 6px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.profile-menu-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.profile-menu-signout { color: var(--negative); }
.profile-menu-signout:hover { background: rgba(248, 113, 113, 0.08); color: var(--negative); }

.profile-menu-status {
  padding: 8px 12px 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--text-tertiary);
}
.profile-menu-status .pill { font-size: 10px; padding: 3px 8px; }
.nav-icon-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #04231e;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-base);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.12s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #04231e;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: #3a4458; }

.btn-ghost {
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-tight { padding: 16px; }
.card-hoverable { transition: all 0.15s ease; cursor: pointer; }
.card-hoverable:hover { border-color: var(--border-strong); background: var(--bg-elevated); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ---------- Badges & Pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-accent { background: var(--accent-dim); color: var(--accent); border-color: var(--border-accent); }
.badge-positive { background: var(--positive-dim); color: var(--positive); border-color: rgba(74, 222, 128, 0.25); }
.badge-negative { background: var(--negative-dim); color: var(--negative); border-color: rgba(248, 113, 113, 0.25); }
.badge-warning { background: var(--warning-dim); color: var(--warning); border-color: rgba(251, 191, 36, 0.25); }
.badge-info { background: var(--info-dim); color: var(--info); border-color: rgba(96, 165, 250, 0.25); }
.badge-violet { background: var(--violet-dim); color: var(--violet); border-color: rgba(192, 132, 252, 0.25); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  display: inline-block;
}
.dot-positive { background: var(--positive); box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
.dot-warning { background: var(--warning); box-shadow: 0 0 8px rgba(251, 191, 36, 0.5); }
.dot-negative { background: var(--negative); box-shadow: 0 0 8px rgba(248, 113, 113, 0.5); }
.dot-accent { background: var(--accent); box-shadow: 0 0 8px rgba(94, 234, 212, 0.5); }

/* ---------- Stat Block ---------- */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 12px; color: var(--text-tertiary); letter-spacing: 0.02em; }
.stat-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
.stat-value-lg { font-size: 32px; }
.stat-value-sm { font-size: 18px; }
.stat-delta { font-size: 12px; font-family: var(--font-mono); }

/* ---------- Tables ---------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
}

.table {
  width: 100%;
  font-size: 14px;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr.row-hover:hover { background: var(--bg-elevated); cursor: pointer; }

.table .num { font-family: var(--font-mono); font-feature-settings: "tnum"; text-align: right; }

/* ---------- Form Elements ---------- */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

/* Custom select arrow - keeps proper spacing from border, no native arrow */
.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%239097a6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  cursor: pointer;
}

.select:hover { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23e6e9ef' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }

/* Remove default arrow in IE/Edge legacy */
.select::-ms-expand { display: none; }

.input-mono { font-family: var(--font-mono); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.checkbox {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}
.checkbox:checked { background: var(--accent); border-color: var(--accent); }
.checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 0;
  width: 4px; height: 9px;
  border: solid #04231e;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- Progress Bar ---------- */
.progress {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 100%);
  transition: width 0.4s ease;
}

.progress-tall { height: 10px; }

/* ---------- Avatar ---------- */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--bg-base);
  flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 80px; height: 80px; font-size: 24px; }

/* ---------- Hero (landing) ---------- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow-x: clip;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 64px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  background: linear-gradient(180deg, #f5f7fb 0%, #9097a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; }

/* ---------- Inline SVG icons (mask-based so they inherit currentColor) ---------- */
.icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  vertical-align: -2px;
  flex-shrink: 0;
}

.icon-sm { width: 12px; height: 12px; }
.icon-md { width: 18px; height: 18px; vertical-align: -3px; }
.icon-lg { width: 24px; height: 24px; vertical-align: -5px; }
.icon-xl { width: 32px; height: 32px; vertical-align: -6px; }

.icon-check {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
.icon-x {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
}
.icon-warn {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>");
}
.icon-doc {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><polyline points='14 2 14 8 20 8'/><line x1='9' y1='13' x2='15' y2='13'/><line x1='9' y1='17' x2='15' y2='17'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><polyline points='14 2 14 8 20 8'/><line x1='9' y1='13' x2='15' y2='13'/><line x1='9' y1='17' x2='15' y2='17'/></svg>");
}
.icon-camera {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/><circle cx='12' cy='13' r='4'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/><circle cx='12' cy='13' r='4'/></svg>");
}
.icon-paperclip {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/></svg>");
}
/* ---------- Tri-card (three-sides equal-layout pattern) ---------- */
.tri-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tri-badge {
  min-height: 26px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.tri-title {
  min-height: 60px;          /* lock 2-line slot regardless of title length */
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
}

.tri-body {
  flex: 1 1 auto;            /* expands to fill - pushes CTA to bottom */
  line-height: 1.6;
  margin: 0 0 24px;
}

.tri-cta {
  align-self: flex-start;
  margin-top: auto;          /* belt-and-suspenders: also pin to bottom */
}

@media (max-width: 900px) {
  .tri-title { min-height: 0; }
}

/* ---------- Platform State Grid ---------- */
.live-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.live-stat {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.live-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.live-stat:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.live-stat:hover::before { opacity: 0.8; }

.live-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.live-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
  margin-top: 12px;
  line-height: 1.1;
}

.live-stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.4;
}

@media (max-width: 1000px) {
  .live-grid { grid-template-columns: repeat(3, 1fr); }
  .live-stat:nth-child(n+4) { grid-column: span 1; }
}

@media (max-width: 700px) {
  .live-grid { grid-template-columns: repeat(2, 1fr); }
  .live-stat-value { font-size: 24px; }
}

@media (max-width: 460px) {
  .live-grid { grid-template-columns: 1fr; }
}

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
}

.section-head-title { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Curator Card ---------- */
.curator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.curator-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.curator-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.curator-meta { flex: 1; min-width: 0; }
.curator-name { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0; }
.curator-firms { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

.curator-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.curator-stat-label { font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.06em; text-transform: uppercase; }
.curator-stat-value { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--text-primary); margin-top: 2px; }

.curator-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }

/* ---------- Deal Card ---------- */
.deal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.15s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deal-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.deal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.deal-card-title { font-size: 16px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }

.deal-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.deal-card-stat { display: flex; flex-direction: column; gap: 4px; }
.deal-card-stat-label { font-size: 11px; color: var(--text-tertiary); letter-spacing: 0.04em; text-transform: uppercase; }
.deal-card-stat-value { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text-primary); }

/* ---------- Deal Detail ---------- */
.deal-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.deal-side {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 1024px) {
  .deal-layout { grid-template-columns: 1fr; }
  .deal-side { position: static; }
}

/* ---------- Waterfall Visual ---------- */
.waterfall {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
}

.waterfall-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.waterfall-row.is-funder { border-left: 3px solid var(--accent); }
.waterfall-row.is-lawyer { border-left: 3px solid var(--info); }
.waterfall-row.is-claimant { border-left: 3px solid var(--violet); }
.waterfall-row.is-platform { border-left: 3px solid var(--warning); }

.waterfall-row.is-sub {
  margin-left: 18px;
  padding: 8px 12px;
  background: var(--bg-surface);
  font-size: 12px;
  color: var(--text-secondary);
  border-left-width: 2px;
  position: relative;
}
.waterfall-row.is-sub::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--border);
}

.waterfall-row .amt { font-family: var(--font-mono); font-weight: 600; }
.waterfall-row.is-sub .amt { font-weight: 500; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.12s ease;
  cursor: pointer;
}

.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 96px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.footer-col h6 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color 0.12s ease;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding: 24px var(--container-pad) 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ---------- Sparkline ---------- */
.sparkline { display: block; width: 100%; height: 40px; }

/* ---------- MOIC Bracket ---------- */
.moic-bracket {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 12px;
}

.moic-step {
  padding: 10px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
}

.moic-step.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

.moic-step .step-label { color: var(--text-tertiary); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px; }
.moic-step .step-value { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); font-size: 14px; }
.moic-step.active .step-value { color: var(--accent); }

/* ---------- Subscription Panel ---------- */
.subscribe-panel { padding: 20px; }
.subscribe-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.subscribe-row .v { font-family: var(--font-mono); color: var(--text-primary); font-weight: 500; }
.subscribe-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ---------- Marquee dot pulse ---------- */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--positive);
  position: relative;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--positive);
  opacity: 0.4;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* ---------- Empty State ---------- */
.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-tertiary);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* ---------- Step / Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-tertiary);
  z-index: 1;
  position: relative;
}

.timeline-dot.done { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.timeline-dot.active { background: var(--accent); border-color: var(--accent); color: var(--bg-base); }

.timeline-content { flex: 1; padding-top: 1px; }
.timeline-title { font-weight: 500; font-size: 14px; color: var(--text-primary); }
.timeline-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

/* ---------- Risk bar ---------- */
.risk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.risk-meter {
  display: flex;
  gap: 3px;
}

.risk-pip {
  width: 16px;
  height: 5px;
  border-radius: 2px;
  background: var(--bg-hover);
}

.risk-pip.lit-low { background: var(--positive); }
.risk-pip.lit-med { background: var(--warning); }
.risk-pip.lit-high { background: var(--negative); }

/* ---------- Activity Feed Item ---------- */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.activity-content { flex: 1; }
.activity-title { font-size: 13px; color: var(--text-primary); }
.activity-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* ---------- Auth shell (sign in / signup / waitlist) ---------- */
.auth-shell {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-card-wide { max-width: 560px; }

.auth-card .brand {
  justify-content: center;
  margin-bottom: 28px;
  font-size: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--text-tertiary);
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.demo-hint {
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  align-items: center;
}

.demo-hint .mono { color: var(--accent); font-weight: 600; }

/* Onboarding shell */
.onb-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.onb-side {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 40px 28px;
}

.onb-side .brand {
  margin-bottom: 32px;
  font-size: 16px;
}

.onb-stages { display: flex; flex-direction: column; gap: 2px; }

.onb-stage {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  position: relative;
}

.onb-stage-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-tertiary);
}

.onb-stage.done .onb-stage-num { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.onb-stage.active .onb-stage-num { background: var(--accent); border-color: var(--accent); color: var(--bg-base); }
.onb-stage.active { background: var(--bg-elevated); }

.onb-stage-content { flex: 1; padding-top: 1px; }
.onb-stage-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.onb-stage-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.onb-stage:not(.active):not(.done) .onb-stage-label { color: var(--text-tertiary); }

.onb-main { padding: 56px 64px; overflow-y: auto; }
.onb-main-inner { max-width: 600px; }

.onb-tools {
  position: sticky;
  top: var(--nav-height);
  z-index: 5;
  background: var(--bg-base);
  padding: 24px 64px 16px;
  margin: -56px -64px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 900px) {
  .onb-shell { grid-template-columns: 1fr; }
  .onb-side { border-right: none; border-bottom: 1px solid var(--border); padding: 20px; }
  .onb-stages { flex-direction: row; overflow-x: auto; gap: 4px; }
  .onb-stage { min-width: 160px; }
  .onb-main { padding: 32px 20px; }
  .onb-tools { padding: 16px 20px; margin: -32px -20px 16px; }
}

/* Method-picker cards */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.choice {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.choice:hover { border-color: var(--border-strong); }
.choice.selected { background: var(--accent-dim); border-color: var(--border-accent); }
.choice-title { font-weight: 600; font-size: 14px; }
.choice-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }

/* Multi-pill selector */
.pill-select { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-select .pill {
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}
.pill-select .pill.selected {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ---------- Whitepaper layout ---------- */
.wp-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px var(--container-pad) 96px;
}

.wp-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
  padding-right: 8px;
}

.wp-toc-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.wp-toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wp-toc-list a {
  display: block;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all 0.12s ease;
}
.wp-toc-list a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.wp-toc-list a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.wp-toc-list .sub a { padding-left: 22px; font-size: 12px; color: var(--text-tertiary); }
.wp-toc-list .sub a:hover { color: var(--text-secondary); }

.wp-body {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.wp-body h1 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.wp-body h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.wp-body h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 32px 0 12px;
  scroll-margin-top: 80px;
}
.wp-body h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wp-body p { margin: 0 0 16px; }
.wp-body p:has(+ p) { margin-bottom: 12px; }
.wp-body strong { color: var(--text-primary); font-weight: 600; }
.wp-body em { color: var(--text-primary); font-style: italic; }
.wp-body a { color: var(--accent); border-bottom: 1px dotted rgba(94,234,212,0.4); }
.wp-body a:hover { border-bottom-style: solid; }

.wp-body ul, .wp-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.wp-body li { margin-bottom: 6px; }

.wp-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid var(--border);
}

.wp-body blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.wp-body table {
  width: 100%;
  margin: 16px 0 24px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.wp-body th {
  background: var(--bg-elevated);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
}
.wp-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.wp-body tr:last-child td { border-bottom: none; }
.wp-body td.num, .wp-body th.num { text-align: right; font-family: var(--font-mono); font-feature-settings: "tnum"; }

.wp-callout {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
}
.wp-callout-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.wp-callout p { margin-bottom: 8px; }
.wp-callout p:last-child { margin-bottom: 0; }

.wp-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.wp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.wp-meta > div { display: flex; flex-direction: column; gap: 2px; }
.wp-meta .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-quaternary, var(--text-tertiary)); }
.wp-meta .value { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); }

.wp-footnote-ref {
  font-size: 10px;
  vertical-align: super;
  color: var(--accent);
  margin: 0 1px;
  text-decoration: none;
}
.wp-footnote-ref:hover { text-decoration: underline; }

.wp-references ol { list-style: decimal; padding-left: 22px; }
.wp-references li {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .wp-shell { grid-template-columns: 1fr; gap: 24px; }
  .wp-toc { position: static; max-height: none; padding-right: 0; }
  .wp-body h1 { font-size: 28px; }
  .wp-body h2 { font-size: 20px; margin-top: 36px; }
}

@media print {
  .nav, .footer, .wp-toc, #footer-mount, #nav-mount { display: none !important; }
  .wp-shell { display: block; padding: 0; max-width: none; }
  .wp-body { max-width: none; color: #000; font-size: 11pt; }
  .wp-body h1, .wp-body h2, .wp-body h3, .wp-body strong { color: #000; }
  .wp-body a { color: #000; border: none; text-decoration: underline; }
  .wp-callout { background: #f6f6f6; border-left-color: #000; }
}

/* ---------- Blog ---------- */
.blog-featured {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.blog-featured::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 65%);
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.blog-featured:hover { border-color: var(--border-accent); background: var(--bg-elevated); }
.blog-featured:hover::before { opacity: 1; }

.blog-featured-content { position: relative; z-index: 1; }

.blog-featured-side {
  position: relative;
  z-index: 1;
  padding-left: 32px;
  border-left: 1px solid var(--border);
}

.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.blog-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.blog-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.blog-card-excerpt {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  flex: 1;
}

.blog-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-tertiary);
}

.blog-card-foot .mono { color: var(--text-secondary); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-filter {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}
.blog-filter:hover { color: var(--text-primary); border-color: var(--border-strong); }
.blog-filter.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* Article page */
.article-shell {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px var(--container-pad) 96px;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 36px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.article-byline .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.article-byline .name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.article-byline .role { font-size: 12px; color: var(--text-tertiary); }
.article-byline .date {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  text-align: right;
}

.article-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.article-body h1, .article-body h2, .article-body h3 {
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 36px 0 14px;
  scroll-margin-top: 80px;
}
.article-body h2 { font-size: 22px; }
.article-body h3 { font-size: 17px; }
.article-body p { margin: 0 0 18px; }
.article-body strong { color: var(--text-primary); font-weight: 600; }
.article-body em { color: var(--text-primary); font-style: italic; }
.article-body a { color: var(--accent); border-bottom: 1px dotted rgba(94,234,212,0.4); }
.article-body a:hover { border-bottom-style: solid; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  border-radius: 0 6px 6px 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.article-title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.article-excerpt {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

@media (max-width: 900px) {
  .blog-featured { grid-template-columns: 1fr; padding: 28px; }
  .blog-featured-side { padding-left: 0; border-left: none; padding-top: 24px; border-top: 1px solid var(--border); }
  .blog-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 28px; }
}

/* ---------- Demo mode banner ---------- */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 150;
  width: 100%;
  background: linear-gradient(90deg, var(--warning-dim), rgba(251,191,36,0.06));
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--warning);
  font-size: 12px;
  text-align: center;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.01em;
}
.demo-banner strong { color: var(--warning); font-weight: 600; }
.demo-banner .demo-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--warning); flex-shrink: 0;
}
.demo-banner a { color: var(--warning); text-decoration: underline; }
/* When the banner is present, the sticky nav sits below it */
body.has-demo-banner .nav { top: 0; }

/* ---------- Toast (transient feedback for demo-only actions) ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 90vw;
  animation: toast-in 0.2s ease-out, toast-out 0.3s ease-in 2.6s forwards;
  pointer-events: none;
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

@keyframes toast-in {
  from { transform: translate(-50%, 18px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translate(-50%, 0); opacity: 1; }
  to   { transform: translate(-50%, 18px); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .h2 { font-size: 24px; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}
