:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efe7db;
  --text: #1d211f;
  --muted: #69736d;
  --border: #ded6c8;
  --brand: #7a4d24;
  --brand-2: #c9853b;
  --ok: #197a55;
  --shadow: 0 22px 60px rgba(42, 30, 18, 0.12);
  color-scheme: light;
}

body.theme-dark {
  --bg: #111817;
  --surface: #182321;
  --surface-2: #22302d;
  --text: #f5efe5;
  --muted: #b9c2ba;
  --border: #31423e;
  --brand: #d8974f;
  --brand-2: #f2c274;
  --ok: #62d39f;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1rem clamp(1rem, 3vw, 3rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand strong { display: block; font-size: 1.05rem; }
.brand small { display: block; color: var(--muted); font-size: .78rem; margin-top: .1rem; }

.nav {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a:not(.primary-btn), .ghost-btn {
  color: var(--muted);
  font-weight: 700;
  font-size: .95rem;
}

button, input, select, textarea {
  font: inherit;
}

.primary-btn, .secondary-btn, .ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: .72rem 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 14px 28px rgba(122, 77, 36, .22);
}

.secondary-btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.large { padding: .95rem 1.25rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 9vw, 7rem) clamp(1rem, 5vw, 5rem);
}

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 900;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(2.35rem, 5vw, 5.8rem);
  line-height: .95;
  letter-spacing: -0.07em;
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

h3 { letter-spacing: -0.02em; }

.hero-subtitle {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin: 2rem 0 .85rem;
}

.fineprint {
  color: var(--muted);
  font-size: .92rem;
}

.hero-card, .panel, .price-card, .auth-card, .steps article, .feature-grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero-card {
  padding: 1.2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 800;
}

.card-header b {
  color: var(--ok);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin: 1rem 0;
}

.metric-grid.wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 clamp(1rem, 5vw, 4rem);
}

.metric-grid div {
  background: var(--surface-2);
  border-radius: 22px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.metric-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: .4rem;
}

.metric-grid strong {
  font-size: 1.55rem;
}

.mini-table {
  display: grid;
  gap: .7rem;
}

.mini-table div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  padding: .9rem;
  border-radius: 16px;
}

.mini-table span { color: var(--muted); }

.section, .dashboard {
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 4rem);
}

.section-title {
  max-width: 780px;
  margin-bottom: 1.5rem;
}

.steps, .feature-grid, .price-grid, .panel-grid, .choice-grid {
  display: grid;
  gap: 1rem;
}

.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.steps article, .feature-grid article {
  padding: 1.2rem;
}

.steps span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 900;
  margin-bottom: .8rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
  padding: 1.3rem;
}

.price-card.featured {
  border-color: color-mix(in srgb, var(--brand) 60%, var(--border));
  transform: translateY(-8px);
}

.price {
  font-size: 2.25rem;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.price span {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0;
}

.price-card li {
  margin: .55rem 0;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem clamp(1rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.auth-layout {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 80px);
  padding: 2rem 1rem;
}

.auth-card {
  width: min(680px, 100%);
  padding: clamp(1.25rem, 4vw, 2.2rem);
}

.form {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0;
}

.form.compact {
  margin: .7rem 0 0;
}

label {
  display: grid;
  gap: .45rem;
  color: var(--muted);
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 16px;
  padding: .9rem 1rem;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.recaptcha-placeholder {
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: 16px;
  padding: 1rem;
  background: var(--surface-2);
}

.hidden { display: none; }

.choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.choice-card {
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.choice-card span { color: var(--muted); }

.page-heading {
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.warning {
  background: color-mix(in srgb, var(--brand-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-2) 45%, var(--border));
  border-radius: 24px;
  padding: 1.2rem;
}

.panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 1.2rem;
}

.check-list {
  padding-left: 1.1rem;
  color: var(--muted);
}

.check-list li {
  margin: .45rem 0;
}

@media (max-width: 920px) {
  .hero, .steps, .feature-grid, .price-grid, .panel-grid, .choice-grid, .metric-grid.wide {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .price-card.featured {
    transform: none;
  }
}

@media (max-width: 560px) {
  .nav {
    width: 100%;
  }

  .primary-btn, .secondary-btn, .ghost-btn {
    width: 100%;
  }

  h1 {
    font-size: 2.5rem;
  }
}
