/* ClaimJumper design system — light theme, green accent.
   Source of truth: "ClaimJumper Landing v2 SMB" (claude.ai/design). */

:root {
  --bg: #F4F2EC;
  --fg: #12140F;
  --dim: #6A6D64;
  --panel: #FFFFFF;
  --panel2: #E9E6DE;
  --line: #D9D5C9;
  --soft: #EFF7F0;
  --neg: #C6461C;
  --acc: #1FC875;
  --acc-text: color-mix(in oklab, var(--acc) 62%, #0B1710);
  --acc-ink: #07100B;
  --sans: Archivo, "Helvetica Neue", Helvetica, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--acc-text); }
input, button { font-family: inherit; }
[hidden] { display: none !important; }

@keyframes cjDash { to { background-position: 0 -18px; } }
@keyframes cjFall {
  0% { top: -6%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 104%; opacity: 0; }
}
@keyframes cjBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .18; } }
@keyframes cjLoop { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 11px clamp(18px, 3.4vw, 44px);
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { color: inherit; }
.brand-mark { width: 9px; height: 9px; background: var(--acc); display: block; transform: rotate(45deg); }
.brand-name { margin: 0; font-weight: 600; letter-spacing: -.02em; font-size: 16.5px; }
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-cta { color: var(--acc-ink); background: var(--acc); padding: 9px 14px; font-weight: 500; letter-spacing: .1em; }
.nav-cta:hover { color: var(--acc-ink); filter: brightness(1.08); }

/* ---------- Shared primitives ---------- */

.shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3.4vw, 44px);
}

.kicker,
.section-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.kicker { align-items: center; gap: 10px; }
.kicker-rule { width: 22px; height: 1px; background: var(--acc); display: block; }

.cell-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--dim);
}
.opt-label {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.btn-primary {
  background: var(--acc);
  color: var(--acc-ink);
  border: none;
  padding: 15px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.btn-primary:hover { color: var(--acc-ink); filter: brightness(1.08); }
.btn-primary .arrow { font-family: var(--mono); font-size: 12px; }
.btn-primary.lg { padding: 16px 24px; font-size: 14.5px; }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 15px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-ghost:hover { border-color: var(--acc); color: var(--fg); }
.btn-ghost.lg { padding: 16px 24px; font-size: 14.5px; }
.play-mark { width: 7px; height: 7px; background: var(--acc); display: block; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.live { display: flex; align-items: center; gap: 7px; }
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
  animation: cjBlink 1.6s steps(1, end) infinite;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.error a { color: inherit; text-decoration: underline; }
.error {
  margin: 18px 0 0;
  border: 1px solid var(--neg);
  background: color-mix(in srgb, var(--neg) 5%, transparent);
  color: var(--neg);
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* ---------- Landing: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: clamp(36px, 5vw, 70px);
  align-items: start;
  padding: clamp(48px, 7vw, 104px) 0 clamp(40px, 6vw, 88px);
}
.hero h1,
.hero .hero-headline {
  margin: 22px 0 0;
  font-size: clamp(38px, 6.1vw, 86px);
  line-height: .95;
  letter-spacing: -.038em;
  font-weight: 600;
  max-width: 15ch;
}
.hero-sub {
  margin: 26px 0 0;
  font-size: clamp(16px, 1.35vw, 19.5px);
  line-height: 1.5;
  color: var(--dim);
  max-width: 46ch;
}
.hero-purpose {
  margin: 20px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--acc);
  font-size: 15px;
  line-height: 1.55;
  color: var(--dim);
  max-width: 54ch;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 0; }

.hero-facts { display: flex; flex-wrap: wrap; margin: 44px 0 0; border-top: 1px solid var(--line); }
.hero-fact { flex: 1 1 150px; padding: 16px 18px 0 0; }
.hero-fact + .hero-fact { padding-left: 18px; }
.hero-fact:not(:last-child) { border-right: 1px solid var(--line); }
.fact-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.fact-value { margin-top: 7px; font-size: 14.5px; }

/* ---------- Landing: decision card ---------- */

.decision {
  border: 1px solid var(--line);
  background: var(--panel);
  scroll-margin-top: 120px;
}
.decision-title-row { padding: 18px 16px 0; }
.decision-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.decision-id { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; }
.decision-id .n { color: var(--dim); }
.status-chip {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--acc);
  color: var(--acc-text);
}
.status-chip[data-state="rejected"] { border-color: var(--neg); color: var(--neg); }
.status-chip[data-state="scanning"] { border-color: var(--line); color: var(--dim); }
.decision-headline {
  margin: 14px 0 0;
  font-size: clamp(21px, 2vw, 27px);
  letter-spacing: -.025em;
  font-weight: 600;
  line-height: 1.15;
}

.decision-flow { padding: 18px 16px 0; }
.flow-panel { border: 1px solid var(--line); padding: 13px 14px; background: var(--panel2); }
.flow-panel.dest { border-color: var(--acc); background: var(--soft); }
.flow-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.trend-down { color: var(--neg); }
.trend-up { color: var(--acc-text); }
.flow-panel-title { margin-top: 8px; font-size: 16px; font-weight: 500; }
.flow-panel-stats {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
}

.flow-drop { position: relative; height: 74px; width: 100%; }
.flow-drop-line {
  position: absolute;
  left: 26px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-image: linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px);
  background-size: 1px 12px;
  animation: cjDash .9s linear infinite;
}
.flow-drop-chip {
  position: absolute;
  left: 26px;
  top: 0;
  transform: translate(-50%, -50%);
  animation: cjFall 2.6s cubic-bezier(.5, 0, .5, 1) infinite;
}
.flow-drop-chip span {
  display: block;
  background: var(--acc);
  color: var(--acc-ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 9px;
  white-space: nowrap;
}
.flow-drop-note {
  position: absolute;
  left: 58px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.5;
}
.flow-drop-note b { color: var(--fg); font-weight: normal; }

.decision-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 18px 16px 0;
}
.decision-cell { background: var(--panel); padding: 11px 12px; }
.cell-label-row { display: flex; justify-content: space-between; gap: 10px; }
.cell-label-row .val { color: var(--fg); }
.cell-text { margin-top: 5px; font-size: 14px; line-height: 1.45; }
.cell-mono { margin-top: 5px; font-family: var(--mono); font-size: 14px; }
.cell-mono .dim { color: var(--dim); }
.confidence-bar { margin-top: 8px; height: 4px; background: var(--panel2); position: relative; }
.confidence-fill { position: absolute; inset: 0 18% 0 0; background: var(--acc); }
.checks {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
.checks .ok { color: var(--acc-text); }

.halt-banner {
  margin: 16px 16px 0;
  border: 1px solid var(--neg);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--neg);
}

.decision-actions { padding: 16px; }
.actions-pending { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.btn-approve {
  flex: 1 1 190px;
  background: var(--acc);
  color: var(--acc-ink);
  border: none;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-approve:hover { filter: brightness(1.08); }
.btn-reject {
  flex: 0 1 130px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn-reject:hover { border-color: var(--neg); color: var(--neg); }
.actions-settled {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.settled-note { font-family: var(--mono); font-size: 11.5px; color: var(--dim); line-height: 1.5; }
.btn-replay {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-replay:hover { border-color: var(--acc); }

/* ---------- Landing: sections ---------- */

.section {
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.section h2 {
  margin: 20px 0 0;
  font-size: clamp(29px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -.032em;
  font-weight: 600;
}
.section-sub {
  margin: 20px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 52ch;
}

/* Problem */
.problem-grid,
.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.problem-grid { margin: clamp(28px, 4vw, 44px) 0 0; }
.problem-card { background: var(--panel); padding: 22px 20px 24px; }
.problem-card.us { background: var(--soft); border-top: 1px solid var(--acc); }
.problem-card-head { display: flex; align-items: center; gap: 12px; }
.problem-card-name { font-size: 16.5px; font-weight: 600; }
.problem-card-text { margin-top: 6px; font-size: 15px; line-height: 1.45; }
.spinner {
  width: 20px;
  height: 20px;
  border: 1px solid var(--dim);
  border-top-color: transparent;
  border-radius: 50%;
  display: block;
  animation: cjLoop 4s linear infinite;
}
.spinner.rev { animation-direction: reverse; }
.spinner.slow { animation-duration: 5.5s; }
.pull-quote {
  margin: clamp(30px, 4vw, 46px) 0 0;
  font-family: var(--serif);
  font-size: clamp(23px, 2.8vw, 38px);
  line-height: 1.22;
  letter-spacing: -.015em;
  max-width: 34ch;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr));
  gap: clamp(20px, 2.6vw, 32px);
  margin: clamp(30px, 4vw, 50px) 0 0;
}
.step { border-top: 1px solid var(--line); padding: 18px 0 0; }
.step.first { border-top-color: var(--acc); }
.step-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--dim); }
.step-title { margin-top: 12px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.step-text { margin-top: 9px; font-size: 14.5px; line-height: 1.5; color: var(--dim); }

/* Autonomy */
.autonomy-panel { margin: clamp(32px, 4.4vw, 52px) 0 0; border: 1px solid var(--line); background: var(--panel); }
.autonomy-slider { padding: clamp(26px, 3.4vw, 40px) clamp(18px, 3vw, 34px) clamp(18px, 2.4vw, 26px); }
.slider-track { position: relative; height: 2px; background: var(--line); margin: 0 12px; }
.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--acc);
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.slider-knob {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: var(--acc);
  transition: left .35s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 18%, transparent);
}
.autonomy-levels { display: flex; margin: 18px 0 0; gap: 8px; }
.autonomy-level {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 0;
  text-align: left;
  cursor: pointer;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.autonomy-level:last-child { text-align: right; }
.autonomy-level.active { color: var(--fg); }
.autonomy-level .most {
  display: block;
  margin-top: 5px;
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--acc-text);
}
.autonomy-detail { border-top: 1px solid var(--line); padding: clamp(24px, 3.2vw, 34px) clamp(18px, 3vw, 34px); }
.level-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.level-num { font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; }
.level-name { font-size: clamp(23px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.028em; }
.level-claim { font-family: var(--serif); font-size: clamp(18px, 2vw, 25px); color: var(--acc-text); }
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: clamp(20px, 2.6vw, 34px);
  margin: clamp(22px, 3vw, 30px) 0 0;
}
.level-cell-text { margin-top: 8px; font-size: 15px; line-height: 1.5; }

/* Safety */
.safety-grid { margin: clamp(30px, 4vw, 48px) 0 0; }
.safety-card { background: var(--panel); padding: 22px 20px 26px; }
.safety-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--dim);
}
.safety-title { margin-top: 12px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.safety-text { margin-top: 9px; font-size: 14.5px; line-height: 1.5; color: var(--dim); }
.stop-card {
  background: var(--soft);
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.stop-copy { max-width: 56ch; }
.btn-halt {
  background: transparent;
  border: 1px solid var(--neg);
  color: var(--neg);
  padding: 16px 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.btn-halt:hover { background: var(--neg); color: var(--bg); }
.halt-dot { width: 9px; height: 9px; background: var(--neg); display: block; border-radius: 50%; }
.btn-halt:hover .halt-dot { background: var(--bg); }

/* Pricing */
.pricing-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(30px, 4.4vw, 60px);
  align-items: start;
  margin: 20px 0 0;
}
.pricing-cols h2 { margin: 0; max-width: 20ch; }
.pricing-sub { margin: 22px 0 0; font-size: 16.5px; line-height: 1.5; color: var(--dim); max-width: 44ch; }
.spend-picker { margin: 26px 0 0; font-family: var(--mono); font-size: 11px; color: var(--dim); line-height: 1.7; }
.spend-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.spend-chip {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 9px 13px;
  font-family: var(--mono);
  font-size: 11.5px;
  cursor: pointer;
}
.spend-chip.active { background: var(--acc); color: var(--acc-ink); }
.fee-panel { border: 1px solid var(--line); background: var(--panel); padding: clamp(20px, 2.6vw, 28px); }
.fee-panel-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.fee-row { margin-top: 24px; }
.fee-row + .fee-row { margin-top: 20px; }
.fee-row-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.fee-row-head .amount { font-family: var(--mono); color: var(--dim); }
.fee-row.ours .name { font-weight: 600; }
.fee-row.ours .amount { color: var(--acc-text); }
.fee-bar { margin-top: 8px; height: 14px; background: var(--panel2); }
.fee-bar-fill { height: 14px; background: var(--dim); }
.fee-row.ours .fee-bar-fill { background: var(--acc); }
.fee-total {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.fee-total-label { font-size: 14px; color: var(--dim); max-width: 26ch; }
.fee-total-amount { font-family: var(--mono); font-size: clamp(20px, 2.4vw, 30px); color: var(--acc-text); }
.fee-note { margin-top: 14px; font-family: var(--mono); font-size: 10px; line-height: 1.6; color: var(--dim); }

/* FAQ */
.faq-list { margin: clamp(30px, 4vw, 48px) 0 0; border-top: 1px solid var(--line); }
.faq-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(24px, 4vw, 56px);
  padding: clamp(20px, 2.6vw, 32px) 0;
  border-bottom: 1px solid var(--line);
}
.faq-q {
  flex: 1 1 240px;
  max-width: 30ch;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.faq-a { flex: 2 1 460px; max-width: 68ch; }
.faq-a p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--dim); }
.faq-a p + p { margin-top: 11px; }
.faq-a a { color: var(--acc-text); border-bottom: 1px solid var(--acc); }
.faq-a a:hover { color: var(--fg); border-color: var(--fg); }

/* Apply */
.apply {
  padding: clamp(60px, 9vw, 130px) 0 clamp(48px, 7vw, 100px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.apply h2 {
  margin: 0;
  font-size: clamp(33px, 6vw, 84px);
  line-height: .98;
  letter-spacing: -.038em;
  font-weight: 600;
  max-width: 20ch;
}
.apply-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(26px, 4vw, 56px);
  margin: clamp(30px, 4vw, 50px) 0 0;
  align-items: end;
}
.apply-text { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--dim); max-width: 42ch; }
.apply-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-mark { width: 7px; height: 7px; background: var(--acc); display: block; transform: rotate(45deg); }
.footer-links { display: flex; gap: 18px; }

/* ---------- Legal pages ---------- */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(18px, 3.4vw, 44px) clamp(56px, 8vw, 96px);
}
.legal-page h1 {
  margin: 18px 0 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 600;
}
.legal-meta {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.legal-page h2 {
  margin: clamp(36px, 5vw, 48px) 0 0;
  font-size: 21px;
  letter-spacing: -.02em;
  font-weight: 600;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.legal-page h3 { margin: 26px 0 0; font-size: 16.5px; letter-spacing: -.01em; font-weight: 600; }
.legal-page p { margin: 14px 0 0; font-size: 15px; line-height: 1.65; }
.legal-page ul { margin: 14px 0 0; padding-left: 22px; }
.legal-page li { font-size: 15px; line-height: 1.6; margin-top: 8px; }
.legal-page a { color: var(--acc-text); border-bottom: 1px solid var(--acc); }
.legal-page a:hover { color: var(--fg); border-color: var(--fg); }
.legal-intro { color: var(--dim); }
.legal-contact { margin-top: 14px; border: 1px solid var(--line); background: var(--panel); padding: 16px 18px; font-size: 15px; line-height: 1.7; }

/* ---------- Connect page ---------- */

.connect-page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(18px, 3.4vw, 44px) 96px;
}
.connect-page h1 {
  margin: 18px 0 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 600;
}
.connect-page .subtitle {
  margin: 16px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 52ch;
}

.platform-group { margin-top: clamp(30px, 4vw, 40px); }
.platform-group-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.platform-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.platform-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.platform {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.platform-row .platform { flex: 1 1 220px; width: auto; }
.platform .soon {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.platform .go { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--acc-text); }
.platform:disabled { cursor: not-allowed; color: var(--dim); background: transparent; }
.platform:disabled svg { opacity: .5; }
a.platform:hover { border-color: var(--acc); color: var(--fg); }
.platform-ready { border-color: var(--acc); background: var(--soft); }

.connect-later-row { margin-top: clamp(32px, 4vw, 44px); text-align: center; }
.later {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.later:hover { color: var(--acc-text); border-color: var(--acc); }

.connected-panel { margin-top: clamp(28px, 4vw, 40px); border: 1px solid var(--line); background: var(--panel); }
.connected-body { padding: 20px 18px 24px; }
.connected-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.connected-header h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.connected-view-head { margin-top: clamp(28px, 4vw, 40px); }
.platform-title { margin: 0; font-size: clamp(20px, 2.4vw, 26px); }
.connected-header .subtitle { margin: 10px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--dim);
}
.ghost:hover { border-color: var(--neg); color: var(--neg); }

.accounts-panel { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.accounts-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.accounts-panel-header h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
}
.btn-load {
  background: var(--acc);
  color: var(--acc-ink);
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-load:hover { filter: brightness(1.08); }
.btn-load:disabled { opacity: .45; cursor: not-allowed; }

.hint { color: var(--dim); font-size: 13px; line-height: 1.5; margin: 12px 0 0; }
.hint code { font-family: var(--mono); font-size: 12px; background: var(--panel2); padding: 2px 6px; }

.accounts { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.account-card {
  border: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
}
.account-card .name { font-weight: 600; font-size: 15px; }
.account-card .meta { color: var(--dim); font-family: var(--mono); font-size: 11.5px; margin-top: 4px; }
.account-card .card-error { color: var(--neg); font-size: 13px; margin-top: 4px; }
.badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--acc-text);
  border: 1px solid var(--acc);
  padding: 4px 8px;
  white-space: nowrap;
}

/* Campaign metrics under an account card */
.btn-campaigns {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--acc-text);
  background: transparent;
  border: 1px solid var(--acc);
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-campaigns:hover { background: var(--soft); }
.btn-campaigns:disabled { opacity: .45; cursor: not-allowed; }
.campaigns-row { list-style: none; margin-top: -10px; }
.campaigns { border: 1px solid var(--line); border-top: 0; padding: 12px 16px 16px; background: var(--panel2); }
.campaigns .hint { margin: 0 0 10px; }
.table-scroll { overflow-x: auto; }
.campaign-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.campaign-table th, .campaign-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.campaign-table th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.campaign-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.campaign-table td:first-child { white-space: normal; min-width: 160px; }
.campaign-table tfoot td { border-bottom: 0; font-weight: 600; }

/* Budgets */
.notice { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel2); font-size: 13px; line-height: 1.5; }
.notice code { font-family: var(--mono); font-size: 12px; }
.campaign-table td.dim { color: var(--dim); }
.ad-group-row td { color: var(--dim); font-size: 12.5px; }
.ad-group-row td:first-child { padding-left: 22px; }
.btn-inline {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--acc-text);
  background: transparent;
  border: 1px solid var(--line);
  padding: 3px 7px;
  margin-left: 8px;
  cursor: pointer;
}
.btn-inline:hover { border-color: var(--acc); }
.btn-inline.primary { border-color: var(--acc); background: var(--soft); }
.btn-inline:disabled { opacity: .45; cursor: not-allowed; }
.budget-edit { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.budget-edit input { width: 96px; font: inherit; font-variant-numeric: tabular-nums; padding: 3px 6px; border: 1px solid var(--acc); background: var(--panel); text-align: right; }
.budget-edit .btn-inline { margin-left: 2px; }
.cell-error { flex-basis: 100%; color: var(--neg); font-size: 12px; white-space: normal; text-align: left; }

/* ---------- Autopilot rules page ---------- */

.connected-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.connected-actions .btn-load { text-decoration: none; }
.rules-page { max-width: 760px; }
.rules-form { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.field { border: 1px solid var(--line); background: var(--panel); padding: 18px 18px 20px; }
.field-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.field-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.field-help { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--dim); max-width: 56ch; }
.field-row { margin-top: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-grid:not(:empty) { margin-top: 14px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.input { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; min-height: 44px; font-family: var(--mono); font-size: 15px; }
.input:focus-within { border-color: var(--acc); }
.input input { border: 0; outline: 0; background: transparent; font: inherit; font-variant-numeric: tabular-nums; text-align: right; width: 110px; min-width: 0; padding: 10px 0; }
.input .unit { color: var(--dim); font-size: 12px; }
.seg { display: flex; border: 1px solid var(--line); margin-top: 14px; }
.seg-item { flex: 1 1 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--dim); border-right: 1px solid var(--line); background: var(--panel); padding: 0 12px; text-align: center; cursor: pointer; }
.seg-item:last-child { border-right: 0; }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item:has(input:checked) { background: var(--soft); color: var(--fg); box-shadow: inset 0 -2px 0 var(--acc); }
.chip-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 8px 12px; font-size: 13px; background: var(--panel); min-height: 36px; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--acc); background: var(--soft); }
.chip.dim { color: var(--dim); cursor: default; }
.chip .x { font-family: var(--mono); color: var(--dim); font-size: 11px; }
.chip input { margin: 0; accent-color: var(--acc); }
.rules-actions { margin-top: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.summary-line { margin-top: 14px; }
.summary-list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.summary-list .dim { color: var(--dim); }

/* ---------- Autopilot home ---------- */

.home-page { max-width: 1100px; }
.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.mono-sub { font-family: var(--mono); font-size: 11.5px !important; }
.site-nav .nav-on { color: var(--fg); border-bottom: 1px solid var(--acc); padding-bottom: 2px; }
.nav-signout { background: transparent; border: 1px solid var(--line); padding: 7px 12px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.nav-signout:hover { border-color: var(--neg); color: var(--neg); }
.grid-cells { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-cells .cell { background: var(--panel); padding: 14px 16px; }
.strip { margin-top: 28px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cell-mono.big { margin-top: 8px; font-family: var(--mono); font-size: 22px; font-variant-numeric: tabular-nums; }
.cell-mono .small, .dim.small { font-size: 13px; color: var(--dim); }
.hint.small { font-size: 12px; margin-top: 8px; }
.hint.down { color: var(--neg); }
.bar { margin-top: 8px; height: 4px; background: var(--panel2); position: relative; }
.bar-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--acc); }
.bar-mark { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--fg); }

/* ---------- Autopilot activity ---------- */

.home-grid { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
@media (max-width: 800px) { .home-grid { grid-template-columns: 1fr; } }
.home-grid .connected-panel { margin-top: 0; }
.decision-headline { margin: 0; font-size: 20px; letter-spacing: -.02em; font-weight: 600; line-height: 1.25; }
.small-mono { font-family: var(--mono); font-size: 12px; margin-top: 8px; }
.dim-text { color: var(--dim); }
.chip-gap { margin-top: 6px; }
.events { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.event-day { display: flex; flex-direction: column; gap: 10px; }
.event-row { margin-top: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; padding: 14px 16px; align-items: start; }
@media (max-width: 640px) { .event-row { grid-template-columns: 1fr; } }
.event-text { font-size: 15px; font-weight: 500; line-height: 1.4; }
.status-chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--acc); color: var(--acc-text); white-space: nowrap; }
.status-chip.neg { border-color: var(--neg); color: var(--neg); }
.status-chip.dim { border-color: var(--line); color: var(--dim); }

/* ---------- Autopilot digest ---------- */

.digest-page { max-width: 640px; }
.digest-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.digest-nav { display: flex; gap: 8px; }
.digest-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
.digest-section { margin-top: 26px; }
.digest-section .events { margin-top: 10px; gap: 10px; }
.digest-row { grid-template-columns: 72px minmax(0, 1fr) 0; }
.digest-next { margin-top: 10px; padding: 14px 16px; background: var(--soft); border-color: var(--acc); }
.digest-next .summary-list { margin: 0; }
.digest-actions { margin-top: 26px; }

.seg-inline { margin-top: 0; display: inline-flex; }
.seg-inline .seg-item { flex: 0 0 auto; min-height: 44px; padding: 0 16px; }

.email-auth {
  display: grid;
  gap: 12px;
  max-width: 420px;
  margin: 24px 0 32px;
}
.email-auth input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font: inherit;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: inherit;
  background: transparent;
}
.email-auth .hint { margin: 0; }
