/* ============================================
   LUMEN LMS — Design Tokens
   Modern SaaS, Linear/Notion vibe
   ============================================ */

:root {
  /* Brand */
  --brand: #0A0A0A;
  --brand-ink: #FFFFFF;
  --accent: #FF5C28; /* used sparingly for charts/CTA highlights */

  /* Neutrals — light mode */
  --bg: #FFFFFF;
  --bg-elev: #FAFAF9;
  --bg-sunken: #F5F5F4;
  --bg-hover: #F0F0EF;
  --border: #E7E5E4;
  --border-strong: #D6D3D1;
  --ink: #0A0A0A;
  --ink-2: #44403C;
  --ink-3: #78716C;
  --ink-4: #A8A29E;

  /* Semantic */
  --green: #15803D;
  --green-bg: #F0FDF4;
  --red: #B91C1C;
  --red-bg: #FEF2F2;
  --amber: #B45309;
  --amber-bg: #FFFBEB;
  --blue: #1D4ED8;
  --blue-bg: #EFF6FF;

  /* Type */
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "GT Sectra", Georgia, serif;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
  --shadow-pop: 0 24px 64px rgba(0,0,0,.14);

  /* Density */
  --density: 1;
  --row-h: calc(40px * var(--density));
  --pad-card: calc(20px * var(--density));
  --pad-section: calc(32px * var(--density));
}

[data-theme="dark"] {
  --brand: #FFFFFF;
  --brand-ink: #0A0A0A;
  --bg: #0A0A0A;
  --bg-elev: #131313;
  --bg-sunken: #0F0F0F;
  --bg-hover: #1C1C1C;
  --border: #262626;
  --border-strong: #333333;
  --ink: #FAFAF9;
  --ink-2: #D6D3D1;
  --ink-3: #A8A29E;
  --ink-4: #78716C;
  --green-bg: #052e16;
  --red-bg: #2a0808;
  --amber-bg: #2a1c08;
  --blue-bg: #0a1838;
}

/* ============================================
   BOLD-LIGHT theme — white 80%, red 20%
   Bold's twin on a light canvas.
   ============================================ */
[data-theme="bold-light"] {
  --brand: #DA0011;
  --brand-ink: #FFFFFF;
  --accent: #DA0011 !important;

  --bg: #FFFFFF;
  --bg-elev: #FAFAF9;
  --bg-sunken: #F5F5F4;
  --bg-hover: #F0EFEE;

  --border: #E7E5E4;
  --border-strong: #D6D3D1;

  --ink: #0A0A0A;
  --ink-2: #44403C;
  --ink-3: #78716C;
  --ink-4: #A8A29E;

  --green: #15803D;
  --green-bg: #F0FDF4;
  --red: #DA0011;
  --red-bg: #FEF2F2;
  --amber: #B45309;
  --amber-bg: #FFFBEB;
  --blue: #1D4ED8;
  --blue-bg: #EFF6FF;
}

/* Bold-light: same red overrides as bold, but tuned for a light canvas */
[data-theme="bold-light"] .btn--primary {
  background: #DA0011;
  color: #FFFFFF;
  border-color: #DA0011;
}
[data-theme="bold-light"] .btn--primary:hover {
  background: #B8000E;
  border-color: #B8000E;
}
[data-theme="bold-light"] .sidebar__logo,
[data-theme="bold-light"] .mkt__logo,
[data-theme="bold-light"] .auth__logo {
  background: #DA0011 !important;
  color: #FFFFFF !important;
}
[data-theme="bold-light"] .live-dot {
  background: #DA0011 !important;
  box-shadow: 0 0 0 0 rgba(218, 0, 17, 0.7);
  animation: bold-pulse 1.6s infinite;
}
[data-theme="bold-light"] .mkt__hero h1 .serif {
  color: #DA0011;
}
[data-theme="bold-light"] .mkt__hero h1 em,
[data-theme="bold-light"] .mkt__hero h1 .accent-word {
  color: #DA0011;
  font-style: normal;
}
[data-theme="bold-light"] .badge--ink {
  background: #DA0011;
  color: #FFFFFF;
}
[data-theme="bold-light"] a { color: #DA0011; }
[data-theme="bold-light"] nav a:hover { color: #DA0011; }
[data-theme="bold-light"] .sidebar__item.is-active,
[data-theme="bold-light"] .nav-item.is-active,
[data-theme="bold-light"] .sidebar-item.is-active {
  background: rgba(218, 0, 17, 0.08);
  color: #DA0011;
}
[data-theme="bold-light"] .sidebar__item.is-active::before,
[data-theme="bold-light"] .sidebar-item.is-active::before {
  background: #DA0011;
}
[data-theme="bold-light"] .tabs__tab.is-active::after,
[data-theme="bold-light"] .tab.is-active::after {
  background: #DA0011;
}
[data-theme="bold-light"] .progress__fill,
[data-theme="bold-light"] .progress-fill,
[data-theme="bold-light"] .bar-fill {
  background: #DA0011 !important;
}
[data-theme="bold-light"] ::selection {
  background: #DA0011;
  color: #FFFFFF;
}
[data-theme="bold-light"] .checkbox--on,
[data-theme="bold-light"] .toggle--on {
  background: #DA0011 !important;
  border-color: #DA0011 !important;
  color: #FFFFFF !important;
}
[data-theme="bold-light"] .card[data-popular="true"],
[data-theme="bold-light"] .pricing__popular {
  border-color: #DA0011 !important;
}
[data-theme="bold-light"] input:focus,
[data-theme="bold-light"] textarea:focus,
[data-theme="bold-light"] select:focus {
  border-color: #DA0011 !important;
  box-shadow: 0 0 0 3px rgba(218, 0, 17, 0.18) !important;
}

/* ============================================
   BOLD theme — black 80%, red 20%
   Black is the canvas; red is the spark.
   ============================================ */
[data-theme="bold"] {
  --brand: #DA0011;        /* signature red — the 20% */
  --brand-ink: #FFFFFF;
  --accent: #DA0011 !important; /* force red regardless of color-picker tweak */

  --bg: #0A0A0A;           /* near-black canvas */
  --bg-elev: #141414;
  --bg-sunken: #050505;
  --bg-hover: #1C1C1C;

  --border: #1F1F1F;
  --border-strong: #2A2A2A;

  --ink: #FAFAF9;
  --ink-2: #D6D3D1;
  --ink-3: #A8A29E;
  --ink-4: #78716C;

  --green: #4ADE80;
  --green-bg: #052e16;
  --red: #FF3B3B;
  --red-bg: #2a0808;
  --amber: #FBBF24;
  --amber-bg: #2a1c08;
  --blue: #60A5FA;
  --blue-bg: #0a1838;
}

/* ============================================
   BOLD theme overrides — red as the spark
   80% black surfaces, 20% red accents
   ============================================ */

/* Brand mark + primary CTA — these ARE the 20% */
[data-theme="bold"] .btn--primary {
  background: #DA0011;
  color: #FFFFFF;
  border-color: #DA0011;
}
[data-theme="bold"] .btn--primary:hover {
  background: #FF1A2C;
  border-color: #FF1A2C;
}
[data-theme="bold"] .sidebar__logo,
[data-theme="bold"] .mkt__logo,
[data-theme="bold"] .auth__logo {
  background: #DA0011 !important;
  color: #FFFFFF !important;
}

/* Hero eyebrow live-dot pulses red */
[data-theme="bold"] .live-dot {
  background: #DA0011 !important;
  box-shadow: 0 0 0 0 rgba(218, 0, 17, 0.7);
  animation: bold-pulse 1.6s infinite;
}
@keyframes bold-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(218, 0, 17, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(218, 0, 17, 0); }
  100% { box-shadow: 0 0 0 0 rgba(218, 0, 17, 0); }
}

/* Selectively re-tint the hardcoded orange data-viz to red */
[data-theme="bold"] .mkt__hero h1 .serif {
  color: #FF3B3B;
}

/* Hero headline gets a red underline accent on a key word */
[data-theme="bold"] .mkt__hero h1 em,
[data-theme="bold"] .mkt__hero h1 .accent-word {
  color: #DA0011;
  font-style: normal;
}

/* Badges */
[data-theme="bold"] .badge--ink {
  background: #DA0011;
  color: #FFFFFF;
}
[data-theme="bold"] .badge {
  border-color: #2A2A2A;
}

/* Links */
[data-theme="bold"] a { color: #FF3B3B; }
[data-theme="bold"] nav a:hover { color: #FF3B3B; }

/* Sidebar / nav active states */
[data-theme="bold"] .sidebar__item.is-active,
[data-theme="bold"] .nav-item.is-active,
[data-theme="bold"] .sidebar-item.is-active {
  background: rgba(218, 0, 17, 0.12);
  color: #FF3B3B;
}
[data-theme="bold"] .sidebar__item.is-active::before,
[data-theme="bold"] .sidebar-item.is-active::before {
  background: #DA0011;
}

/* Tabs underline */
[data-theme="bold"] .tabs__tab.is-active::after,
[data-theme="bold"] .tab.is-active::after {
  background: #DA0011;
}

/* Progress fills, bars, sparklines */
[data-theme="bold"] .progress__fill,
[data-theme="bold"] .progress-fill,
[data-theme="bold"] .bar-fill {
  background: #DA0011 !important;
}

/* Selection */
[data-theme="bold"] ::selection {
  background: #DA0011;
  color: #FFFFFF;
}

/* Checkboxes / toggles when on */
[data-theme="bold"] .checkbox--on,
[data-theme="bold"] .toggle--on {
  background: #DA0011 !important;
  border-color: #DA0011 !important;
  color: #FFFFFF !important;
}

/* "Most popular" pricing tier border + badge */
[data-theme="bold"] .card[data-popular="true"],
[data-theme="bold"] .pricing__popular {
  border-color: #DA0011 !important;
}

/* Override hardcoded orange (rgba(255,92,40,...) used in mkt heatmap & retention) */
[data-theme="bold"] .heatmap-cell,
[data-theme="bold"] [data-viz="heatmap"] > * {
  background: rgba(218, 0, 17, var(--alpha, 0.5)) !important;
}

/* Form focus ring */
[data-theme="bold"] input:focus,
[data-theme="bold"] textarea:focus,
[data-theme="bold"] select:focus {
  border-color: #DA0011 !important;
  box-shadow: 0 0 0 3px rgba(218, 0, 17, 0.18) !important;
}

[data-density="compact"] {
  --density: 0.85;
}

/* ============================================
   Reset / base
   ============================================ */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 600; }

::selection { background: var(--ink); color: var(--bg); }

/* ============================================
   Typography pairings (toggle via data-typeset)
   ============================================ */
[data-typeset="modern"] {
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}
[data-typeset="editorial"] {
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}
[data-typeset="techy"] {
  --font-display: "Geist", "Inter", system-ui, sans-serif;
  --font-body: "Geist", "Inter", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}
[data-typeset="grotesk"] {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* ============================================
   App shell
   ============================================ */
#root { min-height: 100vh; }

.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.app--noside { grid-template-columns: 1fr; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: calc(34px * var(--density));
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 120ms ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: var(--ink-2); }

.btn--secondary { background: var(--bg); color: var(--ink); border-color: var(--border); }
.btn--secondary:hover { background: var(--bg-hover); border-color: var(--border-strong); }

.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--bg-hover); color: var(--ink); }

.btn--sm { height: calc(28px * var(--density)); padding: 0 10px; font-size: 12px; }
.btn--lg { height: calc(44px * var(--density)); padding: 0 20px; font-size: 14px; }

.btn--icon { width: calc(34px * var(--density)); padding: 0; justify-content: center; }
.btn--icon.btn--sm { width: calc(28px * var(--density)); }

/* ============================================
   Inputs
   ============================================ */
.input, .select, .textarea {
  width: 100%;
  height: calc(36px * var(--density));
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink);
  transition: border-color 120ms, box-shadow 120ms;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10,10,10,.06);
}
[data-theme="dark"] .input:focus, [data-theme="dark"] .select:focus, [data-theme="dark"] .textarea:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,.1);
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.checkbox {
  width: 16px; height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  cursor: pointer;
  transition: all 120ms;
  flex-shrink: 0;
}
.checkbox--on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card--elev { background: var(--bg-elev); }
.card__pad { padding: var(--pad-card); }
.card__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================
   Badges / chips
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  background: var(--bg-sunken);
  color: var(--ink-2);
  border: 1px solid var(--border);
}
.badge--green { background: var(--green-bg); color: var(--green); border-color: transparent; }
.badge--red { background: var(--red-bg); color: var(--red); border-color: transparent; }
.badge--amber { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.badge--blue { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.badge--ink { background: var(--ink); color: var(--bg); border-color: transparent; }
.badge--dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================
   Sidebar nav
   ============================================ */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}
.sidebar__brand {
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar__logo {
  width: 28px; height: 28px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.04em;
}
.sidebar__brandname {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.sidebar__role {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 500;
}

.sidebar__section { padding: 14px 10px 4px; }
.sidebar__title {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 600;
  padding: 0 8px 6px;
}
.navitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  height: calc(32px * var(--density));
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 100ms, color 100ms;
  position: relative;
}
.navitem:hover { background: var(--bg-hover); color: var(--ink); }
.navitem--active { background: var(--bg-hover); color: var(--ink); }
.navitem__icon { width: 16px; height: 16px; opacity: .9; flex-shrink: 0; }
.navitem__count {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.sidebar__foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF5C28, #B91C1C);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}
.avatar--sm { width: 22px; height: 22px; font-size: 10px; }
.avatar--lg { width: 40px; height: 40px; font-size: 14px; }
.avatar--xl { width: 56px; height: 56px; font-size: 18px; }

/* ============================================
   Topbar
   ============================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 16px;
}
.topbar__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.topbar__crumbs strong { color: var(--ink); font-weight: 500; }

/* ============================================
   Page layout
   ============================================ */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page__body {
  padding: 28px 32px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page__title {
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0;
}
.page__subtitle {
  color: var(--ink-3);
  font-size: 14px;
  margin-top: 4px;
}

/* ============================================
   Stat tiles
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat__label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.stat__value {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat__delta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.stat__delta--up { color: var(--green); }
.stat__delta--down { color: var(--red); }
.stat__spark { margin-top: 4px; height: 36px; }

/* ============================================
   Tables
   ============================================ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-elev);
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-elev); }

/* ============================================
   Progress
   ============================================ */
.progress {
  width: 100%;
  height: 4px;
  background: var(--bg-sunken);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
  transition: width 240ms ease;
}
.progress--accent .progress__fill { background: var(--accent); }
.progress--green .progress__fill { background: var(--green); }

/* ============================================
   Tabs
   ============================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 120ms;
}
.tab:hover { color: var(--ink-2); }
.tab--active { color: var(--ink); }
.tab--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
}

/* ============================================
   Divider
   ============================================ */
.hr { height: 1px; background: var(--border); border: none; margin: 0; }

/* ============================================
   Kbd
   ============================================ */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-3);
}

/* ============================================
   Utilities
   ============================================ */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.tnum { font-variant-numeric: tabular-nums; }

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

/* Search bar */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: calc(34px * var(--density));
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  flex: 1;
  max-width: 360px;
  font-size: 13px;
}
.search input { flex: 1; background: none; border: none; outline: none; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: var(--ink-4); }

/* tooltip baseline */
.tip {
  position: absolute;
  background: var(--ink);
  color: var(--bg);
  padding: 6px 9px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

/* ============================================
   Marketing-page specific
   ============================================ */
.mkt {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
.mkt__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.mkt__hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 32px 60px;
  text-align: center;
}
.mkt__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 24px;
  background: var(--bg-elev);
}
.mkt__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 78px);
  letter-spacing: -0.045em;
  line-height: 0.98;
  font-weight: 600;
  margin: 0 0 20px;
  text-wrap: balance;
}
.mkt__sub {
  font-size: 18px;
  color: var(--ink-3);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.5;
  text-wrap: pretty;
}
.mkt__cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 56px;
}

.mkt__section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 32px;
}
.mkt__section h2 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 16px;
  text-wrap: balance;
}

/* Skeleton browser frame for hero product shot */
.browser-frame {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}
.browser-frame__bar {
  background: var(--bg-elev);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.browser-frame__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }

/* Animate */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 320ms cubic-bezier(.2,.8,.2,1) both; }

/* Small indicator pulses */
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0; }
}
.live-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 1.6s ease-out infinite;
}
