:root {
  color-scheme: light;

  --brand: #21b369;
  --brand-strong: #199055;
  --brand-soft: #e7f7ef;

  --bg: #ffffff;
  --bg-muted: #f7f8f7;
  --surface: #ffffff;
  --text: #0e1512;
  --text-muted: #5b6b63;
  --border: #e3e8e5;
  --shadow: 0 1px 2px rgb(14 21 18 / 0.06), 0 8px 24px -12px rgb(14 21 18 / 0.18);

  --radius: 12px;
  --maxw: 1120px;
}

html.dark {
  color-scheme: dark;

  --brand: #2ecb7c;
  --brand-strong: #21b369;
  --brand-soft: #11291e;

  --bg: #0b100d;
  --bg-muted: #0f1512;
  --surface: #121a16;
  --text: #f1f5f3;
  --text-muted: #9aaaa2;
  --border: #222e28;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.6);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding-inline: 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-muted);
}

.btn-sm {
  height: 34px;
  padding-inline: 14px;
  font-size: 14px;
}

.btn-lg {
  height: 48px;
  padding-inline: 28px;
  font-size: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand img {
  height: 30px;
  width: auto;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--bg-muted);
}

.icon-btn .moon {
  display: none;
}

html.dark .icon-btn .moon {
  display: block;
}

html.dark .icon-btn .sun {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 50% auto;
  width: 900px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent) 0%, transparent 62%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  font-size: 13px;
  font-weight: 600;
}

.hero h1 {
  margin: 22px auto 0;
  max-width: 16ch;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  font-weight: 800;
}

.hero .lede {
  margin: 20px auto 0;
  max-width: 60ch;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.hero-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

/* App preview */
.preview {
  margin: 56px auto 0;
  max-width: 880px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}

.preview-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.preview-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  margin-top: 4px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.progress {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  width: 72%;
  border-radius: 999px;
  background: var(--brand);
}

.chart {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 108px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.chart i {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: color-mix(in srgb, var(--brand) 35%, transparent);
}

.chart i:nth-child(even) {
  background: var(--brand);
}

/* Sections */
.section {
  padding: 72px 0;
  scroll-margin-top: 64px;
}

.section-muted {
  background: var(--bg-muted);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: 18px;
  margin-top: 44px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card svg {
  color: var(--brand);
}

.card h3 {
  margin-top: 14px;
  font-size: 1.05rem;
  font-weight: 650;
}

.card p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
  margin-top: 44px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.step {
  position: relative;
  padding-top: 46px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  font-weight: 700;
  font-size: 14px;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 650;
}

.step p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
}

.cta {
  text-align: center;
}

.cta .btn {
  margin-top: 28px;
}

/* Legal pages */
.legal {
  padding: 56px 0 72px;
}

.legal .container {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 800;
}

.legal .updated {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.legal h2 {
  margin-top: 40px;
  font-size: 1.25rem;
  font-weight: 650;
}

.legal p,
.legal ul {
  margin-top: 14px;
  color: var(--text-muted);
}

.legal ul {
  padding-left: 22px;
}

.legal li + li {
  margin-top: 6px;
}

.legal strong {
  color: var(--text);
  font-weight: 600;
}

.callout {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 15px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  padding: 36px 0;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-footer img {
  height: 26px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 15px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.copyright {
  width: 100%;
  font-size: 14px;
  color: var(--text-muted);
}

.kofi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding-inline: 14px;
  border-radius: 10px;
  background: #4c7056;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.kofi:hover {
  opacity: 0.9;
  text-decoration: none;
}

@media (max-width: 640px) {
  .hero {
    padding: 56px 0 48px;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 56px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
