:root {
  --navy: #1b2559;
  --amber: #f5a524;
  --amber-ink: #1b2559;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2333;
  --muted: #5b6075;
  --heading: var(--navy);
  --border: #e6e3dc;
  --accent-soft: #fdf1da;
  --chart-history: #1b2559;
  --chart-band: rgba(245, 165, 36, 0.22);
  --radius: 14px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1430;
    --surface: #161c3d;
    --text: #e7e9f3;
    --muted: #a3a8c3;
    --heading: #ffffff;
    --border: #283063;
    --accent-soft: #2a2a3a;
    --chart-history: #c9cff0;
    --chart-band: rgba(245, 165, 36, 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1430;
  --surface: #161c3d;
  --text: #e7e9f3;
  --muted: #a3a8c3;
  --heading: #ffffff;
  --border: #283063;
  --accent-soft: #2a2a3a;
  --chart-history: #c9cff0;
  --chart-band: rgba(245, 165, 36, 0.25);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0 0 0.6em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 0.6em;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.4em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--heading);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

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

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--amber);
  color: var(--amber-ink);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  border-color: var(--border);
  color: var(--heading);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sections */
main section {
  padding: 64px 0;
}

main section + section {
  border-top: 1px solid var(--border);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 1.6em;
}

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

.chart-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--chart-history);
}

.chart-legend .forecast::before {
  background: var(--amber);
}

.chart-legend .band::before {
  height: 10px;
  background: var(--chart-band);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}

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

.card p {
  margin: 0;
  color: var(--muted);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--heading);
  font-weight: 700;
  margin-bottom: 12px;
}

.callout {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 28px;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Pricing */
.plans {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
  max-width: 820px;
}

.plan {
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border: 2px solid var(--amber);
}

.price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--heading);
  margin: 0.2em 0 0;
}

.price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.plan ul {
  padding-left: 1.2em;
  margin: 1em 0 0;
}

.plan li {
  margin: 0.35em 0;
}

.badge {
  display: inline-block;
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Prose pages */
.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 1.8em;
}

.prose ul {
  padding-left: 1.2em;
}

.meta {
  color: var(--muted);
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 12px 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--heading);
}

details[open] summary {
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  main section {
    padding: 44px 0;
  }

  .hero,
  .grid,
  .plans {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 32px;
  }
}
