/* =====================================================================
   SixMinutes AI: "heritage law, modern practice" design system
   Landing: warm ivory paper, navy + deep bronze-gold, serif authority,
   white cards with hairline rules. App: light, calm, ink sidebar.
   ===================================================================== */
:root {
  --font-head: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Landing palette: warm paper + navy + bronze */
  --paper: #faf8f3;
  --paper-2: #f2eee4;
  --ink: #1b2434;
  --navy: #1e3a8a;
  --navy-deep: #14264f;
  --navy-night: #0f1d3d;
  --l-muted: #5d6a7d;
  --l-line: #e7e2d6;
  --l-line-strong: #d3ccbb;

  --gold: #a97a24;
  --gold-bright: #c89540;
  --gold-soft: rgba(169, 122, 36, 0.09);
  --gold-grad: linear-gradient(100deg, #c89540 0%, #a97a24 100%);

  /* App palette */
  --bg: #f6f8fb;
  --bg-soft: #eef2f7;
  --card: #ffffff;
  --primary: #1e3a8a;
  --primary-hover: #16306f;
  --primary-soft: #eaf0fb;
  --accent: #a97a24;
  --accent-soft: #f8f2e2;
  --text: #0f172a;
  --muted: #5d6b81;
  --border: #e3e8f0;
  --border-strong: #c9d3e0;

  --danger: #dc2626;
  --warn: #b45309;
  --ok: #047857;

  --shadow: 0 1px 2px rgba(27,36,52,0.04), 0 1px 3px rgba(27,36,52,0.05);
  --shadow-md: 0 6px 24px rgba(27,36,52,0.08);
  --shadow-lg: 0 20px 50px -16px rgba(27,36,52,0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--primary); }
.hidden { display: none !important; }
::selection { background: rgba(200,149,64,0.3); }
button, input, textarea, select { touch-action: manipulation; }

/* ---------- Brand / logo ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: inline-flex; color: var(--primary); }
.brand-mark svg { width: 30px; height: 30px; display: block; }
.brand-name { font-family: var(--font-head); font-size: 23px; font-weight: 600; color: var(--text); letter-spacing: 0.2px; }
.brand-tag { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.4px; margin-top: 1px; }

/* Shared primary button */
.primary-btn {
  position: relative;
  background: linear-gradient(135deg, #24479e 0%, #16306f 100%);
  color: #fff; border: none; padding: 13px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14.5px; font-family: var(--font-body);
  cursor: pointer; align-self: flex-start; text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
  box-shadow: 0 6px 18px -8px rgba(30,58,138,0.5);
}
.primary-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0) scale(0.99); }
.primary-btn:focus-visible, .ghost-btn:focus-visible, .nav-cta:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.glow-btn { box-shadow: 0 10px 26px -10px rgba(30,58,138,0.55); }

/* =====================================================================
   PUBLIC LANDING: warm paper, navy & bronze
   ===================================================================== */
.landing {
  min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(900px 480px at 92% -6%, rgba(30,58,138,0.06), transparent 60%),
    radial-gradient(760px 420px at -8% 10%, rgba(169,122,36,0.06), transparent 55%),
    var(--paper);
  color: var(--ink);
}
.landing em { font-style: italic; }

/* Scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--gold-grad); z-index: 120;
}

/* Nav */
.landing-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 5vw;
  background: rgba(250,248,243,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.landing-nav.scrolled { border-bottom-color: var(--l-line); background: rgba(250,248,243,0.96); }
.landing-nav .brand-mark { color: var(--navy); }
.landing-nav .brand-name { color: var(--ink); }
.nav-links { display: flex; gap: 28px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a { color: var(--l-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.15s; padding: 6px 2px; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-cta {
  color: var(--navy); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--l-line-strong);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--l-line-strong); border-radius: 9px; color: var(--ink); width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* Hero */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center;
  padding: 80px 5vw 92px; max-width: 1280px; margin: 0 auto;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--gold); font-size: 11.5px; letter-spacing: 2.2px; font-weight: 700;
  text-transform: uppercase; margin-bottom: 26px;
  padding: 8px 16px; border: 1px solid rgba(169,122,36,0.3); border-radius: 999px;
  background: var(--gold-soft);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.hero h1 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(40px, 5.2vw, 64px); line-height: 1.08;
  margin: 0 0 24px; letter-spacing: -0.5px; color: var(--ink);
}
.grad-text {
  display: inline-block;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 18px; color: var(--l-muted); line-height: 1.65; margin: 0 0 32px; max-width: 540px; }
.hero-cta-row { display: flex; gap: 14px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.ghost-btn {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px;
  padding: 13px 22px; border-radius: var(--radius-sm);
  border: 1px solid var(--l-line-strong); background: #fff;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.ghost-btn:hover { border-color: var(--navy); transform: translateY(-1px); box-shadow: var(--shadow); }
.hero-trust { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; margin: 0; padding: 0; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; color: var(--l-muted); font-size: 13px; }
.hero-trust svg { width: 15px; height: 15px; color: var(--gold); flex-shrink: 0; }

/* Hero headline word-by-word entrance (spans injected by JS) */
.hw { display: inline-block; opacity: 0; transform: translateY(0.5em); animation: hw-in 0.7s var(--ease) forwards; }
@keyframes hw-in { to { opacity: 1; transform: none; } }
/* Rotating hero word: keyframe restarts on each swap; resting state is visible */
.grad-text.word-swap { animation: word-swap-in 0.45s var(--ease); }
@keyframes word-swap-in { from { opacity: 0; transform: translateY(0.45em); } }

/* Auth card */
.auth-card {
  position: relative;
  background: #fff; border: 1px solid var(--l-line-strong); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-lg); color: var(--text);
}
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 3px;
  background: var(--gold-grad); border-radius: 0 0 3px 3px;
}
.auth-toggle { display: flex; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; border: none; background: transparent; padding: 11px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; font-family: inherit; transition: background 0.18s, color 0.18s; }
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
#signupFields { display: flex; flex-direction: column; gap: 14px; }
.auth-submit { width: 100%; justify-content: center; text-align: center; align-self: stretch; }
.auth-error { color: var(--danger); font-size: 13px; min-height: 16px; }
.divider { display: flex; align-items: center; text-align: center; color: var(--muted); font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--border); }
.divider span { padding: 0 12px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; transition: background 0.15s; }
.google-btn:hover { background: var(--bg-soft); }
.g-logo { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #4285F4; color: #fff; font-weight: 800; font-size: 13px; }
.demo-hint { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--muted); background: var(--bg-soft); padding: 10px; border-radius: 8px; }
.privacy-line { margin-top: 12px; display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.privacy-line svg { width: 15px; height: 15px; color: var(--ok); flex-shrink: 0; margin-top: 1px; }
.agree-row { flex-direction: row !important; align-items: flex-start; gap: 9px; font-weight: 500 !important; font-size: 13px; color: var(--muted); }
.agree-row input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); }
.agree-row a { color: var(--primary); }

.invite-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 24px; }
.invite-screen .auth-card { width: 100%; max-width: 430px; }
.invite-screen .subtitle { color: var(--muted); }

/* Practice-area marquee */
.marquee {
  overflow: hidden; border-top: 1px solid var(--l-line); border-bottom: 1px solid var(--l-line);
  padding: 16px 0; position: relative; background: #fff;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee-track span {
  display: inline-flex; align-items: center;
  color: var(--l-muted); font-family: var(--font-head); font-size: 17px; letter-spacing: 0.6px;
  white-space: nowrap; padding: 0 18px;
}
.marquee-track span::after {
  content: ""; width: 5px; height: 5px; margin-left: 36px;
  background: var(--gold); transform: rotate(45deg); opacity: 0.55; flex-shrink: 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* Product mockup */
.mockup-section { max-width: 1120px; margin: 0 auto; padding: 64px 5vw 40px; }
.mockup-glow { border-radius: 17px; box-shadow: var(--shadow-lg); }
.mockup { background: #fff; border: 1px solid var(--l-line-strong); border-radius: 16px; overflow: hidden; }
.mockup-bar { display: flex; align-items: center; gap: 7px; padding: 13px 18px; border-bottom: 1px solid var(--l-line); background: var(--paper-2); }
.mockup-bar i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mockup-bar i:nth-child(1){background:#ff5f57}.mockup-bar i:nth-child(2){background:#febc2e}.mockup-bar i:nth-child(3){background:#28c840}
.mockup-bar span { margin-left: 12px; color: var(--l-muted); font-size: 12px; }
.mockup-body { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; padding: 22px; }
.mk-stat { background: var(--paper); border: 1px solid var(--l-line); border-radius: var(--radius-sm); padding: 16px; }
.mk-stat .l { color: var(--l-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; }
.mk-stat .v { font-family: var(--font-head); font-size: 28px; font-weight: 600; margin-top: 8px; color: var(--ink); }
.mk-stat .v.green { color: var(--ok); }
.mk-wide {
  grid-column: 1 / -1; border-radius: var(--radius-sm); padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(120deg, var(--navy-deep), var(--navy));
  border: none;
}
.mk-wide .l.mono { color: var(--gold-bright); font-family: var(--font-body); font-weight: 700; font-size: 10.5px; letter-spacing: 1.6px; }
.mk-wide .big { font-family: var(--font-head); color: #fff; font-size: 34px; font-weight: 600; margin-top: 4px; }
.mk-bars { display: flex; gap: 8px; align-items: flex-end; height: 56px; }
.mk-bars i { width: 13px; background: var(--gold-bright); opacity: 0.9; border-radius: 3px 3px 0 0; display: inline-block; transform: scaleY(0); transform-origin: bottom; transition: transform 0.8s var(--ease); }
.reveal.in .mk-bars i { transform: scaleY(1); }
.mk-bars i:nth-child(2) { transition-delay: 0.07s; } .mk-bars i:nth-child(3) { transition-delay: 0.14s; }
.mk-bars i:nth-child(4) { transition-delay: 0.21s; } .mk-bars i:nth-child(5) { transition-delay: 0.28s; }
.mk-bars i:nth-child(6) { transition-delay: 0.35s; } .mk-bars i:nth-child(7) { transition-delay: 0.42s; }

/* Activity line inside the mockup */
.mk-ticker {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--l-line); border-radius: var(--radius-sm);
  background: var(--paper); padding: 11px 16px; overflow: hidden;
}
.tk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.tk-label { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: var(--ok); flex-shrink: 0; }
.tk-text { color: var(--l-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-text.tk-swap { animation: tk-in 0.45s var(--ease); }
@keyframes tk-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Stat band */
.stat-band { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; max-width: 1120px; margin: 0 auto; padding: 56px 5vw; text-align: center; }
.sb-num { font-family: var(--font-head); font-size: 52px; font-weight: 600; color: var(--navy); }
.sb-num.prefix-dollar { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-label { color: var(--l-muted); font-size: 13.5px; margin-top: 6px; line-height: 1.45; }

/* Sections */
.section { max-width: 1180px; margin: 0 auto; padding: 88px 5vw; position: relative; }
.section::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(460px, 65%); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(169,122,36,0.35), transparent);
}
.section-head { text-align: center; max-width: 700px; margin: 0 auto 52px; }
.kicker { color: var(--gold); font-size: 11.5px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; margin-bottom: 16px; }
.section-head h2 { font-family: var(--font-head); font-size: clamp(30px, 3.4vw, 44px); margin: 0 0 14px; color: var(--ink); font-weight: 600; line-height: 1.15; }
.section-head h2 em { color: var(--gold); }
.section-head h2::after {
  content: ""; display: block; width: 64px; height: 2px; margin: 18px auto 0;
  background: var(--gold-grad); border-radius: 2px;
  transform: scaleX(0); transition: transform 0.9s var(--ease) 0.25s;
}
.section-head.reveal.in h2::after { transform: scaleX(1); }
.section-head p { color: var(--l-muted); font-size: 17px; line-height: 1.65; margin: 0; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; gap: 18px; }
.bento-tile {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--l-line);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.bento-tile:hover { transform: translateY(-3px); border-color: var(--l-line-strong); box-shadow: var(--shadow-md); }
.bento-tile.span2 { grid-column: span 2; }
.bento-tile.row2 { grid-row: span 2; }
.bento-tile h3 { font-family: var(--font-head); color: var(--ink); margin: 15px 0 8px; font-size: 21px; font-weight: 600; }
.bento-tile p { color: var(--l-muted); font-size: 14.5px; line-height: 1.6; margin: 0; }
.f-icon {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  background: var(--primary-soft); border: 1px solid #d8e2f5;
  display: flex; align-items: center; justify-content: center;
}
.f-icon svg { width: 23px; height: 23px; color: var(--navy); }
.tile-demo { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.chip { font-size: 11.5px; color: var(--l-muted); background: var(--paper); border: 1px solid var(--l-line); padding: 5px 11px; border-radius: 999px; }
.chip.green { color: var(--ok); border-color: #b9e4d0; background: #ecfdf5; }
.chip.warn { color: var(--warn); border-color: #ecd9b4; background: #fdf6e7; }
.chip.red { color: var(--danger); border-color: #f3c6c6; background: #fdf0f0; }
.tile-roi { background: linear-gradient(180deg, var(--primary-soft), #fff); }
.tile-bars { display: flex; gap: 8px; align-items: flex-end; margin-top: auto; height: 92px; }
.tile-bars i { flex: 1; background: linear-gradient(180deg, #2c4ea8, var(--navy-deep)); border-radius: 4px 4px 0 0; transform: scaleY(0); transform-origin: bottom; transition: transform 0.8s var(--ease); }
.reveal.in .tile-bars i { transform: scaleY(1); }
.tile-bars i:nth-child(2) { transition-delay: 0.07s; } .tile-bars i:nth-child(3) { transition-delay: 0.14s; }
.tile-bars i:nth-child(4) { transition-delay: 0.21s; } .tile-bars i:nth-child(5) { transition-delay: 0.28s; }
.tile-bars i:nth-child(6) { transition-delay: 0.35s; } .tile-bars i:nth-child(7) { transition-delay: 0.42s; }

/* Assurance band */
.spec-band {
  margin-top: 28px; display: grid; grid-template-columns: repeat(4,1fr); gap: 12px;
  border: 1px solid var(--l-line); border-radius: var(--radius);
  background: #fff; padding: 18px 22px; box-shadow: var(--shadow);
}
.spec-band > div { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--l-muted); font-size: 13px; text-align: center; }
.spec-band svg { width: 17px; height: 17px; color: var(--navy); flex-shrink: 0; }

/* Interactive intake demo */
.demo-card {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: stretch;
  background: #fff; border: 1px solid var(--l-line); border-radius: 18px; padding: 30px;
  box-shadow: var(--shadow-md);
}
.demo-left { display: flex; flex-direction: column; gap: 14px; }
.demo-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-chip {
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: var(--l-muted); background: var(--paper); border: 1px solid var(--l-line);
  padding: 8px 14px; border-radius: 999px; transition: all 0.2s;
}
.demo-chip:hover { border-color: var(--navy); color: var(--ink); }
.demo-chip.active { background: var(--primary-soft); border-color: var(--navy); color: var(--navy); }
.demo-label { color: var(--l-muted); font-weight: 600; font-size: 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
#demoInput {
  flex: 1; resize: vertical; min-height: 150px;
  background: var(--paper); border: 1px solid var(--l-line-strong); color: var(--ink);
  border-radius: var(--radius-sm); font-size: 14px; line-height: 1.6; padding: 14px;
}
#demoInput:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
#demoRun { align-self: flex-start; }
#demoRun:disabled { opacity: 0.6; cursor: wait; }

/* The output panel, styled as an intake memorandum */
.demo-console {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--l-line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dc-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px;
  border-bottom: 2px solid var(--navy); background: #fff;
}
.dc-head .tk-label { color: var(--navy); }
.dc-file { margin-left: auto; color: var(--l-muted); font-size: 11px; font-style: italic; font-family: var(--font-head); letter-spacing: 0.3px; }
.dc-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 16px; min-height: 300px; }
.dc-steps { display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.dc-step { display: flex; align-items: center; gap: 10px; color: var(--l-muted); opacity: 0; transform: translateY(8px); animation: dc-in 0.4s var(--ease) forwards; }
@keyframes dc-in { to { opacity: 1; transform: none; } }
.dc-step .st-ic { width: 15px; height: 15px; flex-shrink: 0; display: inline-flex; }
.dc-step .st-ic.spin { border: 2px solid rgba(30,58,138,0.2); border-top-color: var(--navy); border-radius: 50%; animation: dc-spin 0.7s linear infinite; }
@keyframes dc-spin { to { transform: rotate(360deg); } }
.dc-step.done { color: var(--ink); }
.dc-step.done .st-ic { border: none; animation: none; }
.dc-step.done .st-ic::before {
  content: ""; width: 10px; height: 5px; margin: 3px 0 0 1px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg); display: block;
}
.dc-results { display: flex; flex-direction: column; gap: 12px; border-top: 1px dashed var(--l-line-strong); padding-top: 16px; }
.dc-row { display: flex; align-items: baseline; gap: 12px; opacity: 0; transform: translateY(10px); animation: dc-in 0.45s var(--ease) forwards; }
.dc-row:nth-child(2) { animation-delay: 0.12s; }
.dc-row:nth-child(3) { animation-delay: 0.24s; }
.dc-row:nth-child(4) { animation-delay: 0.36s; }
.dc-key { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; min-width: 110px; flex-shrink: 0; }
.dc-val { color: var(--ink); font-size: 14px; line-height: 1.6; }
.dc-summary { flex-wrap: wrap; }
.dc-caret { width: 7px; height: 15px; background: var(--navy); display: inline-block; animation: dc-blink 0.85s steps(1) infinite; align-self: center; }
.dc-caret.hidden { display: none; }
@keyframes dc-blink { 50% { opacity: 0; } }
.dc-saved {
  align-self: flex-start; margin-top: 4px; padding: 7px 14px; border-radius: 999px;
  background: #ecfdf5; border: 1px solid #b9e4d0;
  color: var(--ok); font-size: 12.5px; font-weight: 700;
  opacity: 0; transform: scale(0.85); animation: dc-pop 0.5s var(--ease) 0.55s forwards;
}
@keyframes dc-pop { to { opacity: 1; transform: scale(1); } }

/* ROI calculator */
.roi-card {
  background: #fff; border: 1px solid var(--l-line); border-radius: 18px; padding: 42px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
  box-shadow: var(--shadow-md);
}
.roi-controls { display: flex; flex-direction: column; gap: 28px; }
.roi-controls label { display: flex; flex-direction: column; gap: 12px; color: var(--ink); font-weight: 600; font-size: 14px; }
.roi-controls output { color: var(--gold); font-family: var(--font-head); font-size: 24px; font-weight: 600; }
.roi-controls input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 6px; background: var(--paper-2); outline: none; cursor: pointer; border: 1px solid var(--l-line); }
.roi-controls input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy); cursor: grab;
  border: 3px solid #fff; box-shadow: var(--shadow-md);
}
.roi-controls input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--navy);
  border: 3px solid #fff; box-shadow: var(--shadow-md); cursor: grab;
}
.roi-result {
  text-align: center; padding: 36px 30px; border-radius: var(--radius); position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--navy), var(--navy-night));
  color: #fff;
}
.roi-result-label { color: var(--gold-bright); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.8px; font-weight: 700; }
.roi-big { font-family: var(--font-head); font-size: clamp(44px, 4.6vw, 62px); font-weight: 600; margin: 12px 0; color: #fff; font-variant-numeric: tabular-nums; }
.roi-sub { color: #b9c6e4; font-size: 13px; margin-bottom: 24px; }
.roi-result .primary-btn { display: inline-block; background: var(--gold-grad); color: #171106; box-shadow: none; }
.roi-result .primary-btn:hover { filter: brightness(1.08); }

/* Value props */
.testi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.testi {
  background: #fff; border: 1px solid var(--l-line); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.testi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.testi p { color: var(--l-muted); font-size: 15px; line-height: 1.65; margin: 0; }
.vp-stat { font-family: var(--font-head); font-size: 34px; font-weight: 600; margin-bottom: 12px; color: var(--navy); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; position: relative; }
.step {
  position: relative;
  background: #fff; border: 1px solid var(--l-line); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step-no { font-family: var(--font-head); font-size: 40px; font-weight: 600; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-family: var(--font-head); color: var(--ink); margin: 12px 0 8px; font-weight: 600; font-size: 20px; }
.step p { color: var(--l-muted); font-size: 14.5px; line-height: 1.6; margin: 0; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -22px; width: 22px; height: 1px;
  background: linear-gradient(90deg, rgba(169,122,36,0.6), transparent);
}

/* Pricing */
.pricing { text-align: center; }
.free-pill {
  display: inline-block; margin-top: 18px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid rgba(169,122,36,0.35); background: var(--gold-soft);
  color: var(--ink); font-size: 13.5px;
}
.free-pill strong { color: var(--gold); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1020px; margin: 0 auto; }
.price-card {
  position: relative; text-align: left;
  background: #fff; border: 1px solid var(--l-line); border-radius: 16px; padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  animation: card-pop 0.55s var(--ease) backwards;
}
.pricing-grid .price-card:nth-child(2) { animation-delay: 0.08s; }
.pricing-grid .price-card:nth-child(3) { animation-delay: 0.16s; }
@keyframes card-pop { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.hot { border: 2px solid var(--navy); box-shadow: 0 18px 44px -18px rgba(30,58,138,0.35); }
.price-card h3 { font-family: var(--font-head); margin: 0 0 4px; font-size: 23px; font-weight: 600; color: var(--ink); }
.price-card .price { font-family: var(--font-head); font-size: 46px; font-weight: 600; margin: 10px 0 2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.price-card .per { font-size: 13px; color: var(--l-muted); }
.per-note { font-size: 12px; color: var(--l-muted); margin-top: 2px; margin-bottom: 4px; }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 0; }
.price-card li { padding: 7px 0 7px 26px; font-size: 14px; color: var(--ink); position: relative; }
.price-card li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 14px; height: 8px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg) scale(0.85);
}
.badge-pop { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-md); }
.band-size { font-size: 12px; color: var(--gold); font-weight: 600; letter-spacing: 0.4px; margin: 2px 0 8px; }
.price-cta {
  width: 100%; margin-top: 22px; padding: 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--l-line-strong); cursor: pointer; font-weight: 600; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--ink); transition: all 0.2s;
}
.price-cta:hover { border-color: var(--navy); color: var(--navy); }
.price-card.hot .price-cta { background: linear-gradient(135deg, #24479e 0%, #16306f 100%); color: #fff; border: none; }
.price-card.hot .price-cta:hover { filter: brightness(1.1); }

/* Billing toggle (landing + app) */
.billing-toggle { display: flex; width: fit-content; gap: 4px; background: #fff; border: 1px solid var(--l-line); border-radius: 999px; padding: 4px; margin: 0 auto 38px; box-shadow: var(--shadow); }
.bt-opt { background: transparent; border: none; color: var(--l-muted); font-family: inherit; font-weight: 600; font-size: 14px; padding: 10px 22px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
.bt-opt.active { background: var(--navy); color: #fff; }
.save-pill { font-size: 10px; font-weight: 700; background: #ecfdf5; color: var(--ok); padding: 3px 8px; border-radius: 999px; letter-spacing: 0.4px; }
.bt-opt.active .save-pill { background: rgba(255,255,255,0.18); color: #fff; }

/* FAQ */
.faq-wrap { max-width: 780px; margin: 0 auto; }
.faq {
  background: #fff; border: 1px solid var(--l-line); border-radius: var(--radius-sm);
  padding: 0 24px; margin-bottom: 12px; transition: border-color 0.25s; box-shadow: var(--shadow);
}
.faq[open] { border-color: var(--l-line-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 21px 0; color: var(--ink); font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 26px; font-weight: 300; line-height: 1; transition: transform 0.3s var(--ease); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--l-muted); font-size: 14.5px; line-height: 1.7; margin: 0 0 22px; }
.faq[open] p { animation: faq-in 0.35s var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* Legal documents */
.legal-note { max-width: 760px; margin: 24px auto 0; text-align: center; color: var(--l-muted); font-size: 12.5px; line-height: 1.6; }
.legal-note a { color: var(--gold); }
.legal-doc { max-width: 880px; }
.legal-doc .section-head p { font-size: 14px; }
.legal-doc .doc-body { color: #414c5e; font-size: 14.5px; line-height: 1.75; }
.legal-doc .doc-body p { margin: 0 0 14px; }
.legal-doc .doc-body strong { color: var(--ink); }
.legal-doc .doc-body em { color: var(--l-muted); }

/* Final CTA: navy band */
.final-cta {
  text-align: center; padding: 96px 5vw 104px; margin: 40px 0 0;
  background: linear-gradient(160deg, var(--navy-deep), var(--navy-night));
}
.final-cta h2 { font-family: var(--font-head); font-size: clamp(34px, 4.4vw, 54px); color: #f5f1e6; margin: 0 0 16px; font-weight: 600; line-height: 1.12; }
.final-cta h2 em { color: var(--gold-bright); }
.final-cta p { color: #b9c6e4; font-size: 18px; margin: 0 0 32px; }
.final-cta .primary-btn { background: var(--gold-grad); color: #171106; box-shadow: 0 14px 34px -12px rgba(200,149,64,0.55); }
.final-cta .primary-btn:hover { filter: brightness(1.08); }
.primary-btn.big { font-size: 16.5px; padding: 17px 36px; display: inline-block; }

/* Footer */
.landing-foot { background: var(--navy-night); color: #9db0d6; text-align: center; padding: 48px 5vw; font-size: 13.5px; }
.landing-foot .brand-mark { color: var(--gold-bright); vertical-align: middle; }
.landing-foot .brand-mark svg { width: 20px; height: 20px; display: inline-block; }
.foot-social { display: flex; gap: 18px; justify-content: center; margin-bottom: 22px; }
.foot-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(157,176,214,0.3); color: #9db0d6;
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.foot-social a:hover { color: var(--gold-bright); border-color: var(--gold-bright); transform: translateY(-2px); }
.foot-social svg { width: 18px; height: 18px; }
.landing-foot .foot-links { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.landing-foot .foot-links a { color: #9db0d6; text-decoration: none; font-size: 13.5px; transition: color 0.15s; }
.landing-foot .foot-links a:hover { color: #fff; }
.foot-disclaimer { max-width: 720px; margin: 16px auto 0; color: #7186ad; font-size: 11.5px; line-height: 1.6; }

/* Back-to-top with scroll progress ring */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 110;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: #fff; border: 1px solid var(--l-line-strong);
  color: var(--navy); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease), border-color 0.2s;
  box-shadow: var(--shadow-md);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { border-color: var(--navy); }
.to-top .tt-ring { position: absolute; inset: 1px; width: 44px; height: 44px; }
.to-top .tt-arrow { width: 18px; height: 18px; position: relative; }

/* Contact modal */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(20,30,52,0.55); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modal-box { background: #fff; border-radius: var(--radius); width: 100%; max-width: 460px; padding: 32px; position: relative; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-box h2 { font-family: var(--font-head); color: var(--text); margin: 0 0 6px; font-size: 26px; font-weight: 600; }
.modal-sub { color: var(--muted); font-size: 14.5px; margin: 0 0 20px; line-height: 1.5; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; width: 36px; height: 36px; border-radius: 8px; }
.modal-close:hover { color: var(--text); background: var(--bg-soft); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =====================================================================
   APP SHELL (authenticated): light, calm, ink sidebar
   ===================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px; flex-shrink: 0;
  background: linear-gradient(180deg, #101c38 0%, #0f1d3d 100%);
  color: #c6d0e4;
  display: flex; flex-direction: column;
  padding: 26px 16px; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(150,168,205,0.1);
}
.sidebar .brand { padding: 4px 8px 28px; }
.sidebar .brand-mark { color: var(--gold-bright); }
.sidebar .brand-name { color: #f5f1e6; }
.sidebar .brand-tag { color: #6d7a99; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: none;
  color: #9aa7c2; font-size: 14.5px; font-weight: 500; font-family: inherit;
  padding: 11px 13px; border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: rgba(200,149,64,0.12); color: var(--gold-bright); }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px;
  border-radius: 3px; background: var(--gold-grad);
}

.sidebar-foot { margin-top: auto; padding: 16px 8px 4px; border-top: 1px solid rgba(255,255,255,0.08); }
.user-box { font-size: 13px; color: #9aa7c2; margin-bottom: 12px; line-height: 1.45; }
.user-box .u-name { color: #fff; font-weight: 600; display: block; }
.user-box .u-firm { color: #6d7a99; }
.logout-btn { width: 100%; background: transparent; border: 1px solid rgba(255,255,255,0.14); color: #c6d0e4; padding: 10px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 13px; font-family: inherit; transition: background 0.15s, border-color 0.15s; }
.logout-btn:hover { background: rgba(255,255,255,0.07); color: #fff; border-color: rgba(255,255,255,0.3); }

.content { flex: 1; padding: 38px 46px; max-width: 1180px; }
.view.hidden { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-family: var(--font-head); font-size: 32px; font-weight: 600; }
.subtitle { margin: 5px 0 0; color: var(--muted); font-size: 14px; }

.rate-control { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.rate-control input { width: 120px; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; }
.stat-value { font-family: var(--font-head); font-size: 34px; font-weight: 600; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--ok); font-weight: 600; margin-top: 4px; }
.stat-card.accent { background: linear-gradient(140deg, #16306f, #0f1d3d); border: 1px solid rgba(200,149,64,0.35); color: #fff; }
.stat-card.accent .stat-label { color: var(--gold-bright); }
.stat-card.accent .stat-sub { color: #cdd9f5; }

/* Highlight banner (dashboard) */
.annual-banner {
  background: linear-gradient(120deg, #101a36 0%, #1e3a8a 60%, #16306f 100%);
  color: #fff; border: 1px solid rgba(200,149,64,0.3); border-radius: var(--radius);
  padding: 26px 30px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  position: relative; overflow: hidden;
}
.annual-banner::before {
  content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(200,149,64,0.25), transparent 70%); pointer-events: none;
}
.annual-banner .ab-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--gold-bright); font-weight: 700; }
.annual-banner .ab-value { font-family: var(--font-head); font-size: 42px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.annual-banner .ab-note { font-size: 13px; color: #cdd9f5; max-width: 280px; text-align: right; position: relative; }

/* Cards & charts */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-card h3 { margin: 0 0 18px; font-family: var(--font-head); font-size: 18px; font-weight: 600; }

.bar-chart { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 56px; align-items: center; gap: 12px; font-size: 13px; }
.bar-row .bar-label { color: var(--text); font-weight: 600; }
.bar-track { background: var(--bg-soft); border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #24479e, #1e3a8a); }
.bar-fill.green { background: linear-gradient(90deg, #0a9469, #047857); }
.bar-row .bar-val { text-align: right; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

.pipeline { display: flex; gap: 14px; }
.pipe-stage { flex: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 14px; text-align: center; }
.pipe-count { font-family: var(--font-head); font-size: 30px; font-weight: 600; }
.pipe-name { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; }

/* Cases */
.case-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; cursor: pointer; box-shadow: var(--shadow); transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.case-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.case-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.case-card-top h3 { margin: 0; font-size: 16px; font-weight: 600; }
.case-card p { color: var(--muted); margin: 8px 0 0; font-size: 14px; line-height: 1.55; }

.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-left: 6px; letter-spacing: 0.4px; }
.badge.urgency-high { background: #fef2f2; color: var(--danger); }
.badge.urgency-medium { background: var(--accent-soft); color: var(--warn); }
.badge.urgency-low { background: #ecfdf5; color: var(--ok); }
.badge.status { background: var(--primary-soft); color: var(--primary); }

/* Detail */
.detail-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.detail-card h3 { margin-top: 0; font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.field-row { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 14px; }
.label { color: var(--muted); font-weight: 600; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.timeline-item { border-left: 3px solid var(--primary); padding: 8px 14px; margin-bottom: 8px; font-size: 14px; background: var(--bg-soft); border-radius: 0 8px 8px 0; }
.ai-output { background: var(--primary-soft); border: 1px solid #d5e0f5; border-radius: var(--radius-sm); padding: 16px; white-space: pre-wrap; font-size: 14px; margin-top: 12px; line-height: 1.55; }
.ai-output:has(.ai-body) { white-space: normal; }
.ai-heading { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--primary); margin-bottom: 10px; }
.ai-body { white-space: pre-wrap; font-size: 14px; line-height: 1.6; color: var(--text); }
.ai-note { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border-strong); font-size: 12px; color: var(--muted); font-style: italic; }

/* One-click automations (case detail) */
.auto-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.auto-btn {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; cursor: pointer; font-family: inherit;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.auto-btn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.auto-btn:disabled { opacity: 0.55; cursor: wait; transform: none; }
.auto-btn svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.auto-btn strong { display: block; font-size: 14px; color: var(--text); }
.auto-btn small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
@media (max-width: 720px) { .auto-row { grid-template-columns: 1fr; } }

/* Forms (app) */
form.card { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 16px; }
.form-row label { flex: 1; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
input, textarea, select { font-family: inherit; font-size: 15px; padding: 12px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
select { align-self: flex-start; }

.link-btn { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; margin-bottom: 14px; padding: 0; font-size: 14px; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }
.inline-form { display: flex; gap: 10px; margin-top: 12px; }
.inline-form input { flex: 1; }
.spinner { color: var(--muted); font-size: 13px; }

/* Trial / billing */
.trial-banner { background: var(--accent-soft); border: 1px solid #ecdcb8; color: #7c5410; border-radius: var(--radius-sm); padding: 13px 18px; margin-bottom: 20px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.trial-banner.expired { background: #fef2f2; border-color: #f3c2c2; color: var(--danger); }
.trial-banner button { background: var(--primary); color: #fff; border: none; padding: 9px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit; }

.billing-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bill-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.bill-card.hot { border-color: rgba(169,122,36,0.55); box-shadow: 0 0 0 1px rgba(169,122,36,0.25), var(--shadow-md); }
.bill-card.current { border: 2px solid var(--primary); }
.bill-card h3 { margin: 0 0 4px; font-family: var(--font-head); font-size: 21px; font-weight: 600; }
.bill-card .price { font-family: var(--font-head); font-size: 38px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.bill-card .per { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.bill-card .band-size { color: var(--accent); }
.bill-card ul { list-style: none; padding: 0; margin: 0 0 18px; }
.bill-card li { padding: 6px 0 6px 24px; font-size: 14px; color: var(--text); position: relative; }
.bill-card li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 13px; height: 7px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg) scale(0.85);
}
.bill-card button { width: 100%; padding: 12px; border-radius: var(--radius-sm); border: none; font-weight: 600; cursor: pointer; font-family: inherit; }
.bill-card .upgrade-btn { background: var(--primary); color: #fff; transition: background 0.15s; }
.bill-card .upgrade-btn:hover { background: var(--primary-hover); }
.bill-card .current-btn { background: var(--bg-soft); color: var(--muted); cursor: default; }
/* In-app billing toggle on light bg */
.content .billing-toggle { background: var(--bg-soft); border-color: var(--border); margin-left: 0; box-shadow: none; }
.content .bt-opt { color: var(--muted); }
.content .bt-opt.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.content .save-pill { background: #ecfdf5; color: var(--ok); }

/* Plan summary (billing page) */
.plan-summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.ps-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.ps-plan { font-family: var(--font-head); font-size: 26px; font-weight: 600; margin: 6px 0 8px; display: flex; align-items: center; gap: 12px; }
.ps-line { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 560px; }
.plan-pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 11px; border-radius: 999px; }
.plan-pill.ok { background: #ecfdf5; color: var(--ok); border: 1px solid #b9e4d0; }
.plan-pill.bad { background: #fef2f2; color: var(--danger); border: 1px solid #f3c6c6; }
.ps-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ps-metric { font-size: 13.5px; color: var(--muted); }
.ps-metric strong { color: var(--text); font-size: 16px; }
.ps-portal { background: #fff; border: 1px solid var(--border-strong); color: var(--primary); font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.ps-portal:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.ps-portal:disabled { opacity: 0.6; cursor: wait; }
.billing-note { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 16px 2px 0; max-width: 680px; }

/* Toasts */
#toastWrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: min(480px, calc(100vw - 40px)); }
.toast {
  background: #10203f; color: #f0f4fc; font-size: 14px; line-height: 1.5;
  padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--ok);
  opacity: 0; transform: translateY(14px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  max-width: 100%;
}
.toast.err { border-left-color: var(--danger); }
.toast.show { opacity: 1; transform: none; }

/* Checkout fine print */
.co-hint { font-weight: 500; font-size: 12px; color: var(--muted); }
.co-lock { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; color: var(--muted); }
.co-terms { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; line-height: 1.55; }
.co-terms a { color: var(--primary); }
@media (max-width: 720px) {
  .plan-summary { flex-direction: column; align-items: flex-start; }
  .ps-side { align-items: flex-start; }
}

/* Team */
.team-head { margin-bottom: 14px; }
.team-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.team-row:last-child { border-bottom: none; }
.t-name { font-weight: 600; display: block; }
.t-email { color: var(--muted); font-size: 13px; }
.t-actions { display: flex; align-items: center; gap: 10px; }
.t-remove { background: none; border: 1px solid var(--border-strong); color: var(--danger); border-radius: 7px; padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; }
.t-remove:hover { background: #fef2f2; }
.t-copy { background: var(--primary-soft); border: none; color: var(--primary); border-radius: 7px; padding: 8px 13px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; }

/* Leads */
.lead-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.lead-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lead-name { font-weight: 700; font-size: 16px; }
.lead-firm { color: var(--muted); font-size: 14px; margin-left: 8px; }
.lead-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lead-contact { display: flex; gap: 18px; margin-top: 8px; flex-wrap: wrap; }
.lead-contact a { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 14px; }
.lead-contact a:hover { text-decoration: underline; }
.lead-msg { margin: 10px 0 0; color: var(--text); font-size: 14px; line-height: 1.5; background: var(--bg-soft); padding: 10px 12px; border-radius: 8px; }

/* Settings */
.settings-form { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.settings-form label { color: var(--muted); }
.settings-form .primary-btn { align-self: flex-start; }
.settings-msg { font-size: 13px; min-height: 16px; font-weight: 600; }
.app-disclaimer { font-size: 12px; color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 9px 12px; margin-top: 12px; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.checkout-config h3, .checkout-summary h3 { margin-top: 0; font-family: var(--font-head); font-weight: 600; font-size: 21px; }
.co-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.co-field input { max-width: 160px; }
.co-optional { font-weight: 500; color: var(--muted); opacity: 0.8; }
.co-code-row { display: flex; gap: 8px; align-items: stretch; }
.co-code-row input { flex: 1; max-width: none; text-transform: uppercase; letter-spacing: 0.5px; }
.co-code-row input::placeholder { text-transform: none; letter-spacing: normal; }
.co-code-apply { border: 1px solid var(--primary); background: transparent; color: var(--primary); font-weight: 700; font-size: 13px; padding: 0 16px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; font-family: inherit; transition: background 0.12s, color 0.12s; }
.co-code-apply:hover { background: var(--primary); color: #fff; }
.co-code-msg { font-size: 12.5px; font-weight: 600; margin: 8px 0 0; }
.co-code-msg.ok { color: var(--ok); }
.co-code-msg.err { color: var(--danger); }
.co-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.co-line.discount { color: var(--ok); font-weight: 600; }
.co-total { display: flex; justify-content: space-between; padding: 14px 0 2px; font-family: var(--font-head); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-savings { font-size: 12.5px; color: var(--ok); font-weight: 700; margin: 10px 0 0; text-align: right; }
.co-secure { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-top: 52px; }
  .nav-links {
    display: none; position: fixed; inset: 73px 16px auto; z-index: 99;
    flex-direction: column; gap: 4px; transform: none; left: auto;
    background: #fff; border: 1px solid var(--l-line-strong);
    border-radius: var(--radius); padding: 12px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; border-radius: 9px; font-size: 15.5px; }
  .nav-links a:hover { background: var(--paper); }
  .nav-toggle { display: inline-flex; }
  .bento { grid-template-columns: 1fr 1fr; }
  .steps, .testi-grid { grid-template-columns: 1fr 1fr; }
  .stat-band { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .roi-card { grid-template-columns: 1fr; padding: 30px; }
  .demo-card { grid-template-columns: 1fr; padding: 22px; }
  .pricing-grid, .billing-tiers { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .mockup-body { grid-template-columns: 1fr 1fr; }
  .mk-wide { flex-wrap: wrap; gap: 14px; }
  .bento-tile.span2, .bento-tile.row2 { grid-column: span 2; grid-row: span 1; }
  .spec-band { grid-template-columns: 1fr 1fr; }
  .step:not(:last-child)::after { display: none; }
}
@media (max-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
  .content { padding: 26px 20px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: column; padding: 18px 16px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .nav-item { padding: 10px 12px; }
  .sidebar-foot { margin-top: 14px; }
  .pipeline { flex-wrap: wrap; }
  .pipe-stage { min-width: 40%; }
  .annual-banner { flex-direction: column; align-items: flex-start; }
  .annual-banner .ab-note { text-align: left; max-width: none; }
}
@media (max-width: 560px) {
  .bento, .steps, .stat-band, .testi-grid, .spec-band { grid-template-columns: 1fr; }
  .bento-tile.span2, .bento-tile.row2 { grid-column: span 1; }
  .bento { grid-auto-rows: auto; }
  .bento-tile { min-height: 190px; }
  .form-row { flex-direction: column; }
  .hero { padding: 36px 6vw 60px; }
  .auth-card { padding: 24px 20px; }
  .roi-card { padding: 22px 18px; }
  .section { padding: 64px 6vw; }
  .marquee-track span { font-size: 15px; }
  .hero-cta-row .primary-btn, .hero-cta-row .ghost-btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
  .hw { opacity: 1 !important; transform: none !important; animation: none !important; }
  .mk-bars i, .tile-bars i { transform: scaleY(1) !important; }
  .section-head h2::after { transform: scaleX(1); }
  .dc-step, .dc-row, .dc-saved { opacity: 1 !important; transform: none !important; animation: none !important; }
  .dc-caret { display: none; }
  .pricing-grid .price-card { animation: none; }
}
