/* The 4 Horse Ledger — built from the Nocturne design system with the light
   green/orange theme from the Claude Design handoff. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f8f6;
  --color-text: #1b1d24;
  --color-divider: color-mix(in srgb, #1b1d24 14%, transparent);

  --color-neutral-100: #1b1d24;
  --color-neutral-200: #2b2e37;
  --color-neutral-300: #454955;
  --color-neutral-400: #5d6170;
  --color-neutral-500: #767a87;
  --color-neutral-600: #9a9ea9;
  --color-neutral-700: #c9cbd1;
  --color-neutral-800: #e4e4e2;
  --color-neutral-900: #efeee9;

  --color-accent: #2f8f4e;
  --color-accent-100: #0f3a1f;
  --color-accent-200: #1c5a31;
  --color-accent-300: #236a3a;
  --color-accent-400: #2f8f4e;
  --color-accent-500: #3aa65c;
  --color-accent-600: #6cc287;
  --color-accent-700: #a6dcb5;
  --color-accent-800: #d6efdd;
  --color-accent-900: #e9f6ec;

  --color-orange: #e8772e;
  --color-orange-700: #b85518;
  --color-orange-900: #fdebdc;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 0 0 1px #e4e2da;
  --shadow-md: 0 0 0 1px #dcd9cf, 0 6px 18px rgba(40, 30, 10, 0.08);
  --shadow-lg: 0 0 0 1px #d2cfc4, 0 16px 40px rgba(40, 30, 10, 0.12);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-300); }
img { display: block; max-width: 100%; }
strong { font-weight: 600; color: var(--color-text); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* ── Components (Nocturne) ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }

.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-orange-700); }
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid transparent;
}
.table td { padding: var(--space-2); border-bottom: 1px solid transparent; }
.table thead tr {
  background: linear-gradient(to right, transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr {
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
    color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr:hover {
  background:
    linear-gradient(color-mix(in srgb, var(--color-text) 4%, transparent),
                    color-mix(in srgb, var(--color-text) 4%, transparent)) no-repeat 0 0 / 100% 100%,
    linear-gradient(to right, transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
      color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}

/* ── Page layout ──────────────────────────────────────────────────────── */
.page { min-height: 100vh; background: var(--color-bg); color: var(--color-text); }
.page--flex { display: flex; flex-direction: column; }
.wrap { max-width: 1200px; width: 100%; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.prose { max-width: 680px; margin: 0 auto; }

.logo { padding-top: 28px; display: flex; justify-content: center; }
.logo img, .logo a { display: block; width: 100%; max-width: 520px; height: auto; }
.logo a img { max-width: none; }

/* Hero */
.hero {
  padding-top: 56px; padding-bottom: 40px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 36px;
}
.hero h1 {
  font-size: clamp(36px, 6.4vw, 84px); line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 auto 20px; max-width: 22ch; text-wrap: balance;
}
.hero-sub { color: var(--color-neutral-400); max-width: 60ch; font-size: 19px; margin: 0 auto; text-wrap: pretty; }
.profit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.profit-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-400); }
.profit-value {
  font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.03em; font-weight: 500;
  color: var(--color-accent-200); font-variant-numeric: tabular-nums;
}
.profit-note { font-size: 14px; color: var(--color-neutral-400); }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; gap: 4px; }
.stat-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-400); }
.stat-value { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-note { font-size: 12px; color: var(--color-neutral-500); }

/* Sales letter */
.letter { padding-top: 56px; }
.prose p { margin: 0 0 14px; font-size: 17px; line-height: 1.65; color: var(--color-neutral-200); text-wrap: pretty; }
.prose h2 { font-size: 28px; margin: 56px auto 16px; max-width: 26ch; text-wrap: balance; text-align: center; }
/* Breaks out of the 680px text column to span the page width. */
.prose h2.wide {
  max-width: none; width: min(1144px, calc(100vw - 56px));
  margin-left: 50%; transform: translateX(-50%);
}
@media (max-width: 480px) { .prose h2.wide { width: calc(100vw - 32px); } }
.brand-banner {
  margin: 40px 0 20px; padding: 24px 0; text-align: center;
  font-size: clamp(36px, 5.5vw, 64px); line-height: 1.05; letter-spacing: 0.02em;
  font-weight: 500; color: var(--color-accent-200);
}
.prose p.shout {
  margin: 28px 0 24px; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.25; font-weight: 700;
  letter-spacing: -0.01em; color: var(--color-accent-200); text-align: center; text-wrap: balance;
}

/* Monthly table */
.table-card { padding: 6px 18px; margin: 8px 0 20px; }
.table-card .table { font-variant-numeric: tabular-nums; }
.table .num { text-align: right; }
.table .neg { color: var(--color-orange-700); }
.table .total { font-size: 18px; }

/* Download card */
.download { padding-top: 8px; }
.download .card { padding: 28px 24px; align-items: center; text-align: center; gap: 18px; }
.download h2 { font-size: 22px; margin: 0; }
.download-head { display: flex; flex-direction: column; gap: 4px; }
.muted-14 { font-size: 14px; color: var(--color-neutral-400); }

/* Chart */
.chart-section { padding-top: 64px; }
.chart-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; margin-bottom: 20px; }
.chart-head h2 { font-size: 26px; margin: 0 0 4px; }
.chart-card { padding: 24px 20px 16px 20px; }
.chart-row { display: flex; gap: 12px; }
.y-axis { position: relative; width: 52px; flex: none; height: 320px; }
.y-tick {
  position: absolute; right: 0; transform: translateY(-50%);
  font-size: 11px; color: var(--color-neutral-500); font-variant-numeric: tabular-nums;
}
.plot-col { flex: 1; min-width: 0; }
.plot { position: relative; height: 320px; cursor: crosshair; }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hover-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--color-orange);
  box-shadow: 0 0 0 3px var(--color-surface), 0 0 12px var(--color-orange);
  transform: translate(-50%, -50%); pointer-events: none;
}
.tooltip {
  position: absolute; top: 8px; pointer-events: none; background: var(--color-surface);
  border-radius: var(--radius-md); padding: 10px 12px; min-width: 170px; font-size: 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.tooltip-title, .tooltip-sub { color: var(--color-neutral-400); }
.tooltip-value { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.x-axis { position: relative; height: 28px; margin-top: 8px; }
.x-axis button {
  position: absolute; transform: translateX(-50%); background: none; border: 0; padding: 4px 6px;
  font: inherit; font-size: 12px; cursor: pointer; border-radius: var(--radius-sm);
  color: var(--color-neutral-500);
}
.x-axis button.active { color: var(--color-accent-300); }
.x-axis button:hover { color: var(--color-accent-300); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.faq details { padding: 0; gap: 0; }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 18px; font-size: 17px; font-weight: 500; color: var(--color-text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--color-accent); }
.faq details[open] > summary svg { transform: rotate(180deg); }
.faq .answer { padding: 0 18px 16px; }
.prose .faq .answer p { margin: 0; }

/* Opt-in */
.optin { padding-top: 72px; }
.optin .card { padding: 28px; max-width: 760px; margin: 0 auto; gap: 18px; background: var(--color-surface); }
.optin-head { text-align: center; }
.optin-head .card-kicker { margin-bottom: 8px; }
.optin-head h2 { font-size: 26px; margin: 0 0 6px; }
.optin-head p { margin: 0; font-size: 15px; color: var(--color-neutral-300); }
.optin-form { display: flex; justify-content: center; text-align: center; width: 100%; }
.optin-form getresponse-form { display: block; width: 100%; max-width: 100%; }
/* GetResponse caps its form's width but leaves it pinned left inside a
   full-width wrapper; auto side margins on everything inside centre it. */
.optin-form * { margin-left: auto !important; margin-right: auto !important; }

/* Sign-off */
.signoff-space { height: 40px; }
.signoff { margin: 0 0 32px; display: flex; flex-direction: column; gap: 4px; }
.signoff-line { font-size: 17px; color: var(--color-neutral-200); }
.signoff-name { font-size: 24px; font-weight: 500; color: var(--color-text); }
.signoff--center { padding-top: 48px; margin: 0 auto; align-items: center; text-align: center; }

/* Footer */
.site-footer { padding-top: 56px; padding-bottom: 40px; font-size: 12px; line-height: 1.6; color: var(--color-neutral-500); }
.site-footer p { margin: 0 auto 6px; max-width: 90ch; font-style: italic; text-align: center; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer p.plain { font-style: normal; }
.page--flex .site-footer { margin-top: auto; }

/* ── Thank-you page ───────────────────────────────────────────────────── */
.thanks-hero {
  padding-top: 48px; padding-bottom: 32px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.tick {
  width: 56px; height: 56px; border-radius: 50%; background: var(--color-accent-900);
  color: var(--color-accent); display: flex; align-items: center; justify-content: center;
}
.thanks-hero h1 {
  font-size: clamp(36px, 6vw, 72px); line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 auto; max-width: 20ch; text-wrap: balance;
}
.thanks-hero p { max-width: 56ch; font-size: 19px; line-height: 1.6; color: var(--color-neutral-300); margin: 0 auto; text-wrap: pretty; }
.steps-section { padding-top: 16px; }
.steps-section h2 { font-size: 28px; margin: 24px auto 20px; text-align: center; text-wrap: balance; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; max-width: 960px; margin: 0 auto; }
.step { padding: 22px; gap: 8px; align-items: center; text-align: center; }
.step-num { font-size: 32px; font-weight: 500; color: var(--color-orange); line-height: 1; }
.step-title { font-size: 17px; font-weight: 500; }
.step-body { font-size: 15px; line-height: 1.55; color: var(--color-neutral-300); }

@media (max-width: 480px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
}
