/* ============================================
   LIMA — Design System
   Type: Geist + Instrument Serif + Geist Mono
   Palette: cool neutrals, violet accent, lime brand mark
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;450;500;600;700&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Background tones — cool neutrals, two-tone banding */
  --bg: #FBFBFD;
  --bg-elev: #FFFFFF;
  --bg-sunken: #F5F4FB;
  --bg-tint: #EDECF7;

  /* Ink scale */
  --ink-900: #16161C;
  --ink-800: #1F1F27;
  --ink-700: #2E2E38;
  --ink-600: #4A4A57;
  --ink-500: #6E6E7D;
  --ink-400: #9797A4;
  --ink-300: #C0C0CA;
  --ink-200: #DADAE2;
  --ink-100: #E7E7EF;
  --ink-50:  #F2F2F8;

  /* Borders */
  --line: #E4E3EE;
  --line-strong: #D3D2E0;

  /* Accent — violet */
  --accent: oklch(0.55 0.24 288);
  --accent-hover: oklch(0.49 0.25 288);
  --accent-soft: oklch(0.965 0.022 288);
  --accent-tint: oklch(0.92 0.06 288);
  --accent-ink: oklch(0.47 0.23 288);

  /* Brand mark — lime */
  --lime: oklch(0.94 0.18 118);
  --lime-deep: oklch(0.88 0.19 118);

  /* Functional */
  --sage: oklch(0.58 0.09 155);
  --sage-soft: oklch(0.95 0.04 155);
  --amber: oklch(0.70 0.13 75);
  --amber-soft: oklch(0.95 0.05 75);
  --rose: oklch(0.58 0.16 25);
  --rose-soft: oklch(0.95 0.03 25);

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-pill: 999px;

  /* Shadows — hairline first */
  --shadow-xs: 0 1px 0 rgba(22, 22, 28, 0.04);
  --shadow-sm: 0 1px 2px rgba(22, 22, 28, 0.05), 0 0 0 1px rgba(22, 22, 28, 0.04);
  --shadow: 0 4px 14px -6px rgba(22, 22, 28, 0.10), 0 1px 2px rgba(22, 22, 28, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(22, 22, 28, 0.18), 0 4px 12px -4px rgba(22, 22, 28, 0.08);
  --shadow-xl: 0 40px 80px -20px rgba(22, 22, 28, 0.25), 0 8px 16px -4px rgba(22, 22, 28, 0.10);

  /* Type stacks */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-feature-settings: 'ss01', 'cv11';
}

#root {
  min-height: 100vh;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

a { color: inherit; text-decoration: none; }

/* ===== Typography utilities ===== */
.t-display {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 72px;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink-900);
}
.t-display-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-style: italic;
  color: var(--ink-900);
}
.t-h1 { font-size: 40px; font-weight: 500; line-height: 1.05; letter-spacing: -0.025em; }
.t-h2 { font-size: 28px; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.t-h3 { font-size: 20px; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; }
.t-h4 { font-size: 16px; font-weight: 500; line-height: 1.3; letter-spacing: -0.005em; }
.t-body { font-size: 14px; line-height: 1.55; color: var(--ink-700); }
.t-body-lg { font-size: 16px; line-height: 1.55; color: var(--ink-700); }
.t-small { font-size: 13px; line-height: 1.45; color: var(--ink-600); }
.t-micro { font-size: 12px; line-height: 1.4; color: var(--ink-500); }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.mono-sm { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0; }

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 120ms ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { height: 44px; padding: 0 18px; font-size: 14.5px; }

.btn-primary {
  background: var(--lime);
  color: var(--ink-900);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--lime-deep);
}
.btn-primary:hover { background: var(--lime-deep); }

.btn-accent {
  background: var(--lime);
  color: var(--ink-900);
  font-weight: 500;
}
.btn-accent:hover { background: var(--lime-deep); }

.btn-ink {
  background: var(--ink-900);
  color: var(--bg);
}
.btn-ink:hover { background: var(--ink-700); }

.btn-secondary {
  background: var(--bg-elev);
  border-color: var(--line-strong);
  color: var(--ink-800);
}
.btn-secondary:hover { background: var(--bg-sunken); border-color: var(--ink-300); }

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

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-800);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--ink-300);
  padding-bottom: 1px;
}
.btn-link:hover { border-color: var(--ink-700); }

/* ===== Cards ===== */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card-flat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* ===== Inputs ===== */
.input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input input { width: 100%; font-size: 14px; }
.input input::placeholder { color: var(--ink-400); }

/* ===== Chips / Badges ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-tint);
  color: var(--ink-600);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.chip-sage { background: var(--sage-soft); color: oklch(0.35 0.06 155); border-color: transparent; }
.chip-amber { background: var(--amber-soft); color: oklch(0.40 0.10 75); border-color: transparent; }
.chip-dark { background: var(--ink-900); color: var(--bg); border-color: transparent; }

/* ===== Avatars (placeholders) ===== */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--bg-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-700);
  flex-shrink: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.avatar.square {
  border-radius: var(--r-sm);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* ===== Layout ===== */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.content {
  padding: 32px 40px 64px;
  max-width: 1180px;
  width: 100%;
}

/* Sidebar nav */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--ink-600);
  font-weight: 450;
  cursor: pointer;
  transition: all 120ms ease;
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: var(--bg-tint); color: var(--ink-900); }
.nav-item.active {
  background: var(--ink-900);
  color: var(--bg);
}
.nav-item .nav-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-400);
}
.nav-item.active .nav-meta { color: rgba(255,255,255,0.5); }

.nav-group-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: 0 10px;
  margin-bottom: 6px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 0;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--lime);
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logo-mark svg { display: block; width: 68%; height: 68%; }
.logo-text {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}
.logo-text .accent { color: var(--ink-400); font-weight: 400; }

/* Page headings */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.page-title-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
}

/* Trial banner */
.trial-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-radius: var(--r);
  font-size: 12.5px;
  color: var(--accent-ink);
}
.trial-banner .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* utility */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); width: 100%; }
.vdivider { width: 1px; background: var(--line); align-self: stretch; }

/* striped placeholder (for image slots) */
.placeholder-img {
  background:
    repeating-linear-gradient(135deg,
      var(--bg-tint) 0 8px,
      var(--bg-sunken) 8px 16px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--ink-500);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 450;
  transition: color 120ms ease;
}
.tab:hover { color: var(--ink-800); }
.tab.active {
  color: var(--ink-900);
  border-color: var(--ink-900);
  font-weight: 500;
}
.tab .count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-400);
  padding: 1px 5px;
  background: var(--bg-tint);
  border-radius: 3px;
}
.tab.active .count {
  background: var(--ink-900);
  color: var(--bg);
}

/* Toggle */
.toggle {
  width: 32px;
  height: 18px;
  background: var(--ink-200);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 150ms ease;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 150ms ease;
}
.toggle.on { background: var(--ink-900); }
.toggle.on::after { transform: translateX(14px); }

/* Animations
   fade-in must not use transform: a transformed ancestor becomes the
   containing block for position:fixed children, which broke modals. */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in { animation: fadeIn 180ms ease; }

/* Modal still uses opacity, but only on overlay */

@keyframes modalIn {
  from { transform: scale(0.98) translateY(8px); }
  to { transform: scale(1) translateY(0); }
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 26, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal {
  background: var(--bg-elev);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  max-width: 520px;
  width: 100%;
  animation: modalIn 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Selection cards (onboarding) */
.select-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  cursor: pointer;
  text-align: left;
  transition: all 120ms ease;
}
.select-card:hover {
  border-color: var(--ink-300);
  background: var(--bg-elev);
}
.select-card.selected {
  border-color: var(--ink-900);
  background: var(--bg-elev);
  box-shadow: 0 0 0 1px var(--ink-900);
}
.select-card .check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-200);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.select-card.selected .check {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink-900);
}

/* Mobile responsiveness on landing */
@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 20px 16px 48px; }
  .t-display { font-size: 44px; }
  .t-display-serif { font-size: 50px; }
}

/* ===== Insights page layout ===== */
.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 32px;
  align-items: start;
}
.summary-rail { position: sticky; top: 80px; align-self: start; min-width: 0; }
@media (max-width: 1040px) {
  .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-rail { position: static; }
}

/* Marketing page layouts — collapse to one column before the text track can be squeezed */
.split-hero{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,1fr);gap:56px;align-items:start}
.split-article{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);gap:56px;align-items:start}
.split-faq{display:grid;grid-template-columns:minmax(0,0.8fr) minmax(0,1.4fr);gap:48px}
.mock-grid{display:grid;grid-template-columns:minmax(0,190px) minmax(0,1fr)}
@media (max-width:900px){
  .split-hero,.split-article,.split-faq{grid-template-columns:minmax(0,1fr);gap:36px}
  .split-article aside{position:static}
}
@media (max-width:720px){
  .mock-grid{grid-template-columns:minmax(0,1fr)}
  .mock-grid .mock-rail{display:none}
}
/* Site header: let the nav wrap rather than overflow */
.site-nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.site-nav a{white-space:nowrap}

.mwj-link{color:var(--ink-600);text-decoration:underline;text-decoration-color:var(--ink-300);text-underline-offset:3px}.mwj-link:hover{color:var(--ink-900);text-decoration-color:var(--ink-900)}

.crumbs>*{white-space:nowrap;flex-shrink:0}
