:root {
  --forest: #1b4332;
  --forest-light: #2d6a4f;
  --mint: #95d5b2;
  --dawn: #d8f3dc;
  --cream: #f8f9fa;
  --text: #1a1c1e;
  --text-muted: #414941;
  --surface: #ffffff;
  --surface-border: rgba(27, 67, 50, 0.08);
  --page-bg: linear-gradient(180deg, var(--dawn) 0%, var(--cream) 28%, #fff 100%);
  --heading: var(--forest);
  --link: var(--forest-light);
  --link-hover: var(--forest);
  --max: 42rem;
  --wide: 56rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
  min-height: 100vh;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

.site-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
}

.site-nav a[aria-current="page"] {
  color: var(--heading);
  font-weight: 600;
}

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

main.narrow {
  max-width: var(--max);
}

.hero {
  padding: 1.5rem 0 2rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin: 0 0 0.75rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  background: var(--forest);
  color: #fff !important;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.button:hover {
  background: var(--forest-light);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  color: var(--forest) !important;
  box-shadow: inset 0 0 0 2px var(--forest);
}

.button.secondary:hover {
  background: var(--dawn);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 2rem 0;
}

.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(27, 67, 50, 0.08);
  border: 1px solid var(--surface-border);
}

.card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--heading);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.panel {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--surface-border);
  max-width: var(--max);
  margin: 2rem auto;
  color: var(--text);
}

.panel h1 {
  margin-top: 0;
  color: var(--heading);
  font-size: 1.5rem;
}

.panel p {
  color: var(--text);
}

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  border-top: 1px solid var(--surface-border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0.35rem 0;
}

.policy h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.5rem;
  color: var(--heading);
}

.policy h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.35rem;
  color: var(--text);
}

.policy p,
.policy li {
  color: var(--text);
}

.policy ul {
  padding-left: 1.25rem;
}

.policy li {
  margin: 0.35rem 0;
}

.policy .updated {
  font-size: 0.9rem;
  color: var(--text-muted);
}

body.auth-only #landing-main,
body.auth-only .site-footer-marketing {
  display: none;
}

body.auth-only main {
  padding-top: 3rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8f0ea;
    --text-muted: #bfc9bf;
    --surface: #1e2421;
    --surface-border: rgba(149, 213, 178, 0.18);
    --page-bg: linear-gradient(180deg, #0d100e 0%, #161a18 55%, #121614 100%);
    --heading: var(--mint);
    --link: #b8e6c8;
    --link-hover: var(--mint);
  }

  .button.secondary {
    background: transparent;
    color: var(--mint) !important;
    box-shadow: inset 0 0 0 2px var(--mint);
  }

  .button.secondary:hover {
    background: rgba(149, 213, 178, 0.12);
  }

  code {
    background: rgba(149, 213, 178, 0.12);
    padding: 0.1em 0.35em;
    border-radius: 4px;
  }
}
