:root {
  --rl-canvas: #f7f8fa;
  --rl-surface: #ffffff;
  --rl-surface-subtle: #f1f3f7;
  --rl-text: #172033;
  --rl-muted: #667085;
  --rl-quiet: #98a2b3;
  --rl-border: #e2e6ec;
  --rl-border-strong: #cfd5de;
  --rl-brand: #4f46e5;
  --rl-brand-strong: #3730a3;
  --rl-brand-soft: #eef2ff;
  --rl-positive: #16794f;
  --rl-warning: #a15c07;
  --rl-negative: #b42318;
  --rl-radius-sm: 8px;
  --rl-radius: 12px;
  --rl-radius-lg: 16px;
  --rl-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);

  /* Compatibility with the app's existing token names. */
  --bg: var(--rl-canvas);
  --bg1: var(--rl-surface-subtle);
  --bg2: var(--rl-surface);
  --bg3: #eaecf0;
  --text: var(--rl-text);
  --muted: var(--rl-muted);
  --dim: var(--rl-quiet);
  --purple: var(--rl-brand);
  --green: var(--rl-positive);
  --red: var(--rl-negative);
  --amber: var(--rl-warning);
  --teal: #0f766e;
  --border: var(--rl-border);
  --border-h: var(--rl-border-strong);
  --r-card: var(--rl-radius);
  --r-sm: var(--rl-radius-sm);
  --accent: var(--rl-brand);
  --accent-light: var(--rl-brand-strong);
}

html { color-scheme: light; scroll-padding-top: 84px; }

body {
  background: var(--rl-canvas);
  color: var(--rl-text);
}

button,
a,
input { font-family: inherit; }

:where(a, button, input):focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.22);
  outline-offset: 2px;
}

/* Marketing site */
.marketing-page .nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--rl-border);
}

.marketing-page .nav-logo,
.marketing-page .hero h1,
.marketing-page .section-title,
.marketing-page .step h3,
.marketing-page .feature h4,
.marketing-page .cta-box h2 {
  color: var(--rl-text);
}

.marketing-page .nav-links a,
.marketing-page .hero p,
.marketing-page .section-desc,
.marketing-page .step p,
.marketing-page .feature p,
.marketing-page .cta-box p,
.marketing-page .footer a {
  color: var(--rl-muted);
}

.marketing-page .nav-links a:hover,
.marketing-page .footer a:hover { color: var(--rl-text); }

.marketing-page .nav-cta,
.marketing-page .btn-primary {
  background: var(--rl-brand);
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(55, 48, 163, 0.16);
}

.marketing-page .nav-cta:hover,
.marketing-page .btn-primary:hover { background: var(--rl-brand-strong); }

.marketing-page .hero {
  grid-template-columns: 0.95fr 1.05fr;
  gap: 64px;
}

.marketing-page .hero::before {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.07) 0%, transparent 68%);
}

.marketing-page .hero-pill {
  color: var(--rl-brand-strong);
  background: var(--rl-brand-soft);
  border-color: #dfe3ff;
}

.marketing-page .hero-pill .dot,
.marketing-page .mockup-chart-bar { background: var(--rl-brand); }

.marketing-page .hero-note,
.marketing-page .trust-bar p,
.marketing-page .footer { color: var(--rl-muted); }

.marketing-page .btn-secondary {
  background: var(--rl-surface);
  color: var(--rl-text);
  border-color: var(--rl-border);
}

.marketing-page .btn-secondary:hover { border-color: var(--rl-border-strong); }

.marketing-page .hero-image {
  margin-right: 0;
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius-lg);
  padding: 6px;
  background: var(--rl-surface);
  box-shadow: var(--rl-shadow);
  -webkit-mask-image: none;
  mask-image: none;
}

.marketing-page .hero-image-placeholder {
  background: var(--rl-surface-subtle);
  border-radius: 11px;
}

.marketing-page .hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marketing-page .hero-photo-note {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  color: var(--rl-text);
  box-shadow: 0 8px 24px rgba(16,24,40,0.1);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 600;
}

.marketing-page .hero-photo-note span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rl-positive);
}

.marketing-page .mockup-bar,
.marketing-page .mockup-card,
.marketing-page .mockup-chart {
  background: var(--rl-surface);
  border-color: var(--rl-border);
}

.marketing-page .section-label,
.marketing-page .step-num,
.marketing-page .feature-icon .material-symbols-outlined { color: var(--rl-brand); }

.marketing-page .step,
.marketing-page .feature,
.marketing-page .cta-box,
.marketing-page [style*="border:1px solid rgba(20,19,15,0.06)"] {
  background: var(--rl-surface) !important;
  border-color: var(--rl-border) !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
}

.marketing-page .feature-icon { background: var(--rl-brand-soft); }
.marketing-page .feature:hover { border-color: #c7ccff; }
.marketing-page .features-section { background: var(--rl-surface-subtle); border-color: var(--rl-border); }
.marketing-page .trust-bar { border-color: var(--rl-border); background: rgba(255,255,255,0.45); }
.marketing-page .cta-box { background: var(--rl-brand-soft); border-color: #dfe3ff; }

.marketing-page .pricing-section { padding-top: 72px; padding-bottom: 72px; }
.marketing-page .pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}
.marketing-page .pricing-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius);
  background: var(--rl-surface);
}
.marketing-page .pricing-grid strong { color: var(--rl-text); font-size: 13px; font-weight: 600; }
.marketing-page .pricing-grid span { color: var(--rl-brand-strong); font-size: 16px; font-weight: 600; }
.marketing-page .pricing-footnote { margin-top: 14px; color: var(--rl-muted); font-size: 12px; }

/* Web app and dashboard */
.app-page .site-header,
.app-page .dash-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--rl-border);
}

.app-page .logo-dot,
.app-page .hero-eyebrow { color: var(--rl-brand); }

.app-page .hero-title {
  color: var(--rl-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.app-page .hero-sub { color: var(--rl-muted); }

.app-page .search-row {
  background: var(--rl-surface);
  border-color: var(--rl-border-strong);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.app-page .search-btn,
.app-page .btn-primary { background: var(--rl-brand); }
.app-page .search-btn:hover { background: var(--rl-brand-strong); }
.app-page .pill-btn:hover { color: var(--rl-text); background: var(--rl-brand-soft); }

.app-page .metric-card,
.app-page .card,
.app-page .step,
.app-page .modal {
  border-color: var(--rl-border);
  border-radius: var(--rl-radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
}

.app-page .metric-card:hover,
.app-page .card:hover { border-color: var(--rl-border-strong); transform: none; }

.app-page .summary-bar {
  background: var(--rl-brand-soft);
  border-color: #dfe3ff;
}

.app-page .summary-text { color: #414b5f; }

.app-page .chat-fab {
  background: var(--rl-brand);
  box-shadow: 0 6px 20px rgba(55, 48, 163, 0.2);
}

.app-page .chat-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(55, 48, 163, 0.24);
}

.app-page .chat-panel {
  background: var(--rl-surface);
  box-shadow: -8px 0 32px rgba(16, 24, 40, 0.12);
}

/* Policy pages */
.policy-page {
  background: var(--rl-canvas);
  color: var(--rl-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.policy-page .header {
  background: rgba(255,255,255,0.92);
  border-bottom-color: var(--rl-border);
}

.policy-page .logo,
.policy-page .logo span,
.policy-page h1,
.policy-page h2,
.policy-page strong { color: var(--rl-text); }

.policy-page p,
.policy-page ul,
.policy-page .date,
.policy-page .updated,
.policy-page .footer { color: var(--rl-muted); }

.policy-page a { color: var(--rl-brand); }

.policy-page .highlight {
  background: var(--rl-brand-soft);
  border-color: #dfe3ff;
}

.policy-page .footer { border-top-color: var(--rl-border); }

@media (max-width: 800px) {
  .marketing-page .hero { gap: 36px; }
  .marketing-page .nav { padding-inline: 20px; }
  .marketing-page .nav-links > a:not(.nav-cta) { display: none; }
  .marketing-page .pricing-grid { grid-template-columns: 1fr; }
}

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

/* Marketing refresh: immersive hero and a clearer, higher-contrast story. */
.marketing-page {
  background: #f8f9fc;
}

.marketing-page .nav {
  padding: 18px max(24px, calc((100vw - 1200px) / 2));
  background: rgba(14, 20, 39, 0.78);
  border-bottom-color: rgba(255,255,255,0.12);
  backdrop-filter: blur(18px) saturate(130%);
}

.marketing-page .nav-logo { color: #fff; }
.marketing-page .nav-logo img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .24));
}
.marketing-page .nav-links a { color: rgba(255,255,255,0.72); }
.marketing-page .nav-links a:hover { color: #fff; }
.marketing-page .nav-cta {
  background: #fff;
  color: #172033 !important;
  box-shadow: 0 10px 28px rgba(8, 15, 36, 0.22);
}
.marketing-page .nav-cta:hover { background: #eef2ff; }

.marketing-page .hero {
  isolation: isolate;
  width: 100%;
  max-width: none;
  min-height: 740px;
  margin: 0;
  padding: 136px max(40px, calc((100vw - 1200px) / 2)) 74px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .72fr);
  align-items: end;
  gap: 72px;
  overflow: hidden;
  background: #121a33;
}

.marketing-page .hero::before {
  z-index: -1;
  inset: 0;
  width: auto;
  height: auto;
  background:
    linear-gradient(90deg, rgba(10,17,38,.93) 0%, rgba(20,28,60,.76) 38%, rgba(30,35,74,.22) 72%, rgba(16,23,48,.34) 100%),
    linear-gradient(0deg, rgba(10,17,38,.72) 0%, transparent 46%);
}

.marketing-page .hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 7px;
  background: linear-gradient(90deg, #6d63ff 0 34%, #2dc897 34% 58%, #f2b84b 58% 78%, #ef6a7a 78%);
}

.marketing-page .hero > .hero-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  filter: saturate(.92) contrast(1.05);
}

.marketing-page .hero-left {
  max-width: 680px;
  padding: 36px 38px 34px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(12, 19, 42, .70);
  box-shadow: 0 28px 80px rgba(4,10,26,.34);
  backdrop-filter: blur(20px) saturate(125%);
}

.marketing-page .hero-pill {
  color: #dcd9ff;
  background: rgba(109,99,255,.18);
  border-color: rgba(180,174,255,.34);
  margin-bottom: 22px;
}
.marketing-page .hero-pill .dot { background: #8d84ff; box-shadow: 0 0 0 4px rgba(141,132,255,.14); }
.marketing-page .hero h1 {
  max-width: 620px;
  color: #fff;
  font-size: clamp(42px, 5.1vw, 68px);
  line-height: 1.02;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.marketing-page .hero p { max-width: 580px; color: rgba(240,243,255,.76); font-size: 16px; }
.marketing-page .hero .btn-primary {
  background: #6d63ff;
  box-shadow: 0 12px 30px rgba(74,62,221,.35);
}
.marketing-page .hero .btn-primary:hover { background: #8178ff; transform: translateY(-1px); }
.marketing-page .hero .btn-secondary {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
}
.marketing-page .hero .btn-secondary:hover { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); }
.marketing-page .hero-note { color: rgba(220,225,242,.6); line-height: 1.55; }

.hero-signal-panel {
  align-self: end;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 20px;
  background: rgba(249,250,255,.90);
  color: #172033;
  box-shadow: 0 24px 70px rgba(4,10,26,.30);
  backdrop-filter: blur(22px) saturate(130%);
}
.hero-signal-kicker { display: flex; align-items: center; gap: 8px; color: #4f46e5; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-signal-kicker span { width: 8px; height: 8px; border-radius: 50%; background: #22a976; box-shadow: 0 0 0 5px rgba(34,169,118,.12); }
.hero-signal-panel h2 { margin: 13px 0 20px; color: #172033; font-size: 24px; line-height: 1.15; letter-spacing: -.035em; }
.hero-signal-list { display: grid; gap: 9px; }
.hero-signal-list > div { display: flex; align-items: center; gap: 13px; padding: 12px; border: 1px solid #e4e7ef; border-radius: 12px; background: rgba(255,255,255,.76); }
.hero-signal-list .material-symbols-outlined { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #4f46e5; background: #eef2ff; }
.hero-signal-list > div:nth-child(2) .material-symbols-outlined { color: #b45a28; background: #fff2e8; }
.hero-signal-list > div:nth-child(3) .material-symbols-outlined { color: #087d61; background: #e6f8f1; }
.marketing-page .hero .hero-signal-list p { margin: 0; color: #172033; font-size: 13px; line-height: 1.25; }
.marketing-page .hero .hero-signal-list strong,
.marketing-page .hero .hero-signal-list small { display: block; }
.marketing-page .hero .hero-signal-list small { margin-top: 3px; color: #667085; font-size: 11px; }
.hero-signal-foot { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e6ec; }
.hero-signal-foot b { color: #4f46e5; font-size: 30px; line-height: 1; }
.hero-signal-foot span { color: #667085; font-size: 11px; line-height: 1.25; text-transform: uppercase; letter-spacing: .05em; }

.marketing-page .trust-bar {
  padding: 26px 40px;
  border: 0;
  background: #151d36;
}
.marketing-page .trust-bar p { color: #dbe1f4; letter-spacing: .16em; }

.marketing-page #how { max-width: 1100px; padding-top: 94px; padding-bottom: 94px; }
.marketing-page .steps { gap: 16px; }
.marketing-page .step { position: relative; overflow: hidden; padding: 30px 26px; border: 0 !important; box-shadow: 0 14px 34px rgba(35,42,70,.08); }
.marketing-page .step::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: #6d63ff; }
.marketing-page .step:nth-child(2)::before { background: #22a976; }
.marketing-page .step:nth-child(3)::before { background: #ef9b3f; }
.marketing-page .step-num { color: #4f46e5; letter-spacing: .12em; }
.marketing-page .step:nth-child(2) .step-num { color: #087d61; }
.marketing-page .step:nth-child(3) .step-num { color: #b45a28; }

.marketing-page .seo-intro {
  max-width: 1100px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 72px;
  align-items: center;
}
.marketing-page .seo-intro-copy > p { margin-top: 16px; color: #526078; font-size: 15px; line-height: 1.8; }
.marketing-page .seo-intro-points { display: grid; gap: 12px; }
.marketing-page .seo-intro-points > div { display: grid; grid-template-columns: 42px 1fr; column-gap: 14px; padding: 18px; border: 1px solid #e2e6ec; border-radius: 14px; background: #fff; box-shadow: 0 10px 26px rgba(35,42,70,.06); }
.marketing-page .seo-intro-points .material-symbols-outlined { grid-row: 1 / 3; display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: #4f46e5; background: #eef2ff; }
.marketing-page .seo-intro-points > div:nth-child(2) .material-symbols-outlined { color: #087d61; background: #e6f8f1; }
.marketing-page .seo-intro-points > div:nth-child(3) .material-symbols-outlined { color: #b45a28; background: #fff2e8; }
.marketing-page .seo-intro-points strong { color: #172033; font-size: 14px; }
.marketing-page .seo-intro-points p { margin-top: 3px; color: #667085; font-size: 12px; line-height: 1.5; }

.marketing-page .features-section { background: linear-gradient(150deg, #eef0ff 0%, #f7f4ff 55%, #edf9f4 100%); border-color: #dfe3f0; }
.marketing-page .features-section .section { max-width: 1100px; }
.marketing-page .features-grid { max-width: 1100px; }
.marketing-page .feature { border: 1px solid rgba(97,91,183,.14) !important; box-shadow: 0 8px 24px rgba(55,48,163,.055); }
.marketing-page .feature:nth-child(3n+2) .feature-icon { background: #e5f8f0; }
.marketing-page .feature:nth-child(3n+2) .feature-icon .material-symbols-outlined { color: #087d61; }
.marketing-page .feature:nth-child(3n) .feature-icon { background: #fff0e6; }
.marketing-page .feature:nth-child(3n) .feature-icon .material-symbols-outlined { color: #b45a28; }

.marketing-page .pricing-section { max-width: none; padding: 90px max(40px, calc((100vw - 1100px) / 2)); background: #151d36; }
.marketing-page .pricing-section .section-label { color: #9d96ff; }
.marketing-page .pricing-section .section-title { color: #fff; }
.marketing-page .pricing-section .section-desc, .marketing-page .pricing-footnote { color: #aeb7cf; }
.marketing-page .pricing-grid > div { border-color: rgba(255,255,255,.10); background: rgba(255,255,255,.06); }
.marketing-page .pricing-grid strong { color: #eef1fa; }
.marketing-page .pricing-grid span { color: #9d96ff; }
.marketing-page .pricing-grid > div:nth-child(2), .marketing-page .pricing-grid > div:nth-child(5) { background: rgba(45,200,151,.09); }

.marketing-page .cta-section { padding: 96px 40px; background: linear-gradient(135deg, #f8f9fc 0%, #eef1ff 50%, #eaf8f3 100%); }
.marketing-page .cta-box { max-width: 720px; padding: 58px 48px; border: 1px solid rgba(109,99,255,.22) !important; background: linear-gradient(135deg, #fff 0%, #f4f2ff 100%) !important; box-shadow: 0 24px 60px rgba(55,48,163,.12); }
.marketing-page .cta-box h2 { font-size: 34px; }

.marketing-page .faq-section { background: #fff; border-top: 1px solid #e7eaf0; }
.marketing-page .faq-section .section { max-width: 920px; }
.marketing-page .faq-grid { display: grid; gap: 10px; margin-top: 34px; }
.marketing-page .faq-grid details { border: 1px solid #e2e6ec; border-radius: 14px; background: #f8f9fc; }
.marketing-page .faq-grid details[open] { border-color: #cfd3ff; background: #f4f2ff; }
.marketing-page .faq-grid summary { position: relative; padding: 20px 54px 20px 22px; color: #172033; font-size: 14px; font-weight: 650; cursor: pointer; list-style: none; }
.marketing-page .faq-grid summary::-webkit-details-marker { display: none; }
.marketing-page .faq-grid summary::after { content: '+'; position: absolute; top: 50%; right: 22px; transform: translateY(-50%); color: #4f46e5; font-size: 22px; font-weight: 400; }
.marketing-page .faq-grid details[open] summary::after { content: '−'; }
.marketing-page .faq-grid details p { padding: 0 54px 21px 22px; color: #5e687d; font-size: 13px; line-height: 1.75; }

.marketing-page .notice-section { max-width: none !important; margin: 0; padding-inline: max(40px, calc((100vw - 760px) / 2)); background: #fff9ed; }
.marketing-page .notice-card { border-color: #f0d9aa !important; background: #fffdf7 !important; box-shadow: none !important; }

.marketing-page .footer { color: #929bb2; background: #10162a; border: 0; }
.marketing-page .footer a { color: #c9d0e2; }
.marketing-page .footer a:hover { color: #fff; }

@media (max-width: 900px) {
  .marketing-page .hero { min-height: auto; grid-template-columns: 1fr; gap: 24px; padding: 124px 24px 54px; text-align: left; }
  .marketing-page .hero-left { max-width: 720px; padding: 30px; }
  .marketing-page .hero-signal-panel { width: min(100%, 520px); }
  .marketing-page .hero-actions { justify-content: flex-start; }
  .marketing-page .seo-intro { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 560px) {
  .marketing-page .nav { padding: 14px 18px; }
  .marketing-page .hero { padding: 104px 16px 38px; }
  .marketing-page .hero-left { padding: 25px 22px; border-radius: 17px; }
  .marketing-page .hero h1 { font-size: clamp(36px, 12vw, 48px); }
  .marketing-page .hero p { font-size: 14px; }
  .marketing-page .hero-actions { display: grid; }
  .marketing-page .hero-actions a { justify-content: center; }
  .hero-signal-panel { padding: 22px; }
  .marketing-page .pricing-section, .marketing-page .cta-section { padding-inline: 20px; }
}
