:root {
  --greptile-bg: #f1efeb;
  --greptile-text: #2a2a2a;
  --greptile-muted: #4a4a4a;
  --greptile-tertiary: #6a6a6a;
  --greptile-subtle: #7a7a7a;
  --greptile-border: #cccccc;
  --greptile-accent: #107a4d;
  --greptile-accent-strong: #0e6d45;
  --greptile-accent-soft: rgba(16, 122, 77, 0.12);
  --greptile-radius: 12px;
  --greptile-surface: rgba(255, 255, 255, 0.85);
}

#landingPage,
#loginPage,
#qrLoginPage,
#preferencesPage,
#dashboardPage,
#onboardingPage,
#editDevicePage {
  background: var(--greptile-bg);
  color: var(--greptile-text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  position: relative;
  overflow: hidden;
}

#landingPage > header,
#landingPage > main,
#landingPage > footer,
#loginPage > header,
#loginPage > main,
#qrLoginPage > header,
#qrLoginPage > main,
#preferencesPage > header,
#preferencesPage > main,
#dashboardPage > header,
#dashboardPage > main,
#onboardingPage > header,
#onboardingPage > main,
#editDevicePage > header,
#editDevicePage > main {
  position: relative;
  z-index: 1;
}

.font-display {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
}

.greptile-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--greptile-bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(16, 122, 77, 0.14), transparent 48%),
    radial-gradient(circle at 88% 12%, rgba(16, 122, 77, 0.08), transparent 45%),
    radial-gradient(circle at 50% 110%, rgba(0, 0, 0, 0.05), transparent 45%);
  background-size: 110% 110%;
  animation: greptile-drift 28s ease-in-out infinite;
}

.greptile-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='4' width='6' height='6' transform='rotate(45 7 7)' fill='none' stroke='%23107a4d' stroke-opacity='0.18' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  opacity: 0.45;
  mix-blend-mode: multiply;
}

.theme-dark {
  --greptile-bg: #0f0f0f;
  --greptile-text: #f1efeb;
  --greptile-muted: #d1cbc3;
  --greptile-tertiary: #b1a9a0;
  --greptile-subtle: #8f877f;
  --greptile-border: #2b2b2b;
  --greptile-accent: #1aa66b;
  --greptile-accent-strong: #1fb874;
  --greptile-accent-soft: rgba(26, 166, 107, 0.2);
  --greptile-surface: #1a1a1a;
}

.theme-dark .greptile-bg {
  background-image:
    radial-gradient(circle at 12% 18%, rgba(26, 166, 107, 0.16), transparent 52%),
    radial-gradient(circle at 88% 12%, rgba(26, 166, 107, 0.1), transparent 48%),
    radial-gradient(circle at 50% 110%, rgba(0, 0, 0, 0.35), transparent 55%);
}

.theme-dark .greptile-bg::after {
  opacity: 0.2;
}

@keyframes greptile-drift {
  0% { background-position: 0% 0%; }
  50% { background-position: 4% -3%; }
  100% { background-position: 0% 0%; }
}

@media (prefers-reduced-motion: reduce) {
  .greptile-bg {
    animation: none;
  }
}

.btn-primary {
  background-color: var(--greptile-accent);
  color: #f1efeb;
  border: 1px solid rgba(16, 122, 77, 0.35);
  box-shadow: 0 14px 30px -18px rgba(16, 122, 77, 0.5);
}

.btn-primary:hover {
  background-color: var(--greptile-accent-strong);
}

.btn-outline {
  border-color: rgba(16, 122, 77, 0.35);
  color: var(--greptile-accent);
}

.btn-outline:hover {
  background-color: rgba(16, 122, 77, 0.08);
  border-color: rgba(16, 122, 77, 0.6);
}

.greptile-card {
  border-radius: var(--greptile-radius);
}

.bg-gradient-cell {
  background-color: var(--greptile-surface);
  border: 1px solid var(--greptile-border);
}

.theme-dark .bg-gradient-cell {
  background-color: rgba(0, 0, 0, 0.5);
  border: 0px solid rgba(0, 0, 0, 0.0);
}

.greptile-brand {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  color: var(--greptile-text);
  letter-spacing: -0.02em;
}

#landingPage h1,
#landingPage h2,
#landingPage h3 {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

#features,
#pricing,
#faq {
  scroll-margin-top: 96px;
}

#landingPage .text-white { color: var(--greptile-text) !important; }
#landingPage .text-white\/90,
#landingPage .text-white\/80 { color: var(--greptile-muted) !important; }
#landingPage .text-white\/70 { color: var(--greptile-tertiary) !important; }
#landingPage .text-white\/60 { color: var(--greptile-subtle) !important; }

#landingPage .text-gray-900,
#landingPage .text-gray-950,
#landingPage .text-slate-950 { color: var(--greptile-text) !important; }
#landingPage .text-gray-700,
#landingPage .text-gray-600,
#landingPage .text-gray-500,
#landingPage .text-gray-400,
#landingPage .text-slate-600 { color: var(--greptile-muted) !important; }
#landingPage .text-gray-300,
#landingPage .text-gray-200 { color: var(--greptile-tertiary) !important; }
#landingPage .text-indigo-600,
#landingPage .text-indigo-500 { color: var(--greptile-accent) !important; }

#landingPage .bg-white { background-color: rgba(255, 255, 255, 0.85) !important; }
#landingPage .bg-white\/5 { background-color: rgba(255, 255, 255, 0.65) !important; }
#landingPage .bg-white\/10 { background-color: rgba(255, 255, 255, 0.8) !important; }
#landingPage .bg-white\/20 { background-color: rgba(255, 255, 255, 0.92) !important; }
#landingPage .bg-gray-50,
#landingPage .bg-gray-100,
#landingPage .bg-gray-900\/5 { background-color: rgba(255, 255, 255, 0.7) !important; }

#landingPage .border-white\/5,
#landingPage .border-white\/10,
#landingPage .border-white\/15,
#landingPage .border-white\/20,
#landingPage .border-gray-200 { border-color: var(--greptile-border) !important; }

#landingPage .ring-white\/10,
#landingPage .ring-white\/20,
#landingPage .ring-gray-900\/10,
#landingPage .inset-ring-gray-200 { --tw-ring-color: rgba(204, 204, 204, 0.6) !important; }

#landingPage .shadow-xl,
#landingPage .shadow-2xl { --tw-shadow-color: rgba(0, 0, 0, 0.18); }

#landingPage .bg-indigo-600,
#landingPage .bg-indigo-500 { background-color: var(--greptile-accent-soft) !important; }

#dashboardPage {
  background: #000;
}

#dashboardPage .greptile-bg {
  background-color: #000;
  background-image: none;
}

#dashboardPage .greptile-bg::after {
  opacity: 0;
}

#dashboardPage .bg-gradient-cell {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.12);
}
