/* Payback Health - Growth Green theme */
:root {
  --evergreen: #065F46;
  --evergreen-900: #043D2D;
  --evergreen-700: #047857;
  --mint-50: #ECFDF5;
  --mint-100: #D1FAE5;
  --lime: #84CC16;
  --paid: #16A34A;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --surface: #FFFFFF;
  --page: #F8FAF9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --max: 1160px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--evergreen-700); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--evergreen-700); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: var(--lime); }
.lead { font-size: 1.15rem; max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.section-head { margin-bottom: 48px; }

/* Skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.35rem; border-radius: 10px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--lime); outline-offset: 2px;
}
.btn-primary { background: var(--evergreen); color: #fff; box-shadow: 0 6px 16px rgba(6, 95, 70, .25); }
.btn-primary:hover { background: var(--evergreen-900); }
.btn-ghost { background: transparent; color: var(--evergreen); border-color: var(--evergreen); }
.btn-ghost:hover { background: var(--mint-50); }
.btn-lime { background: var(--lime); color: var(--evergreen-900); }
.btn-lime:hover { background: #A3E635; }
.btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-light:hover { background: rgba(255,255,255,.08); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--evergreen); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--lime); padding-bottom: 4px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* Hero */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(132, 204, 22, .18), transparent 60%),
    linear-gradient(180deg, var(--mint-50), var(--page));
  padding: 80px 0 96px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 span { color: var(--evergreen); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-note { font-size: .9rem; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { color: var(--evergreen-700); }

.hero-card {
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 28px;
}
.hero-card-label { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 0; }
.hero-total { font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; margin: 4px 0 6px; }
.hero-delta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: #15803D; background: #F0FDF4; padding: 4px 10px; border-radius: 999px; }
.hero-rows { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.hero-rows li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.hero-rows li:last-child { border-bottom: 0; }
.hero-rows .amt { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Status badges: always icon + label, never color alone */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 999px; }
.badge svg { width: 14px; height: 14px; }
.badge-paid { color: #166534; background: #DCFCE7; }
.badge-pending { color: #92400E; background: #FEF3C7; }
.badge-appeal { color: #9A3412; background: #FFEDD5; }

.placeholder-flag { font-size: .72rem; color: var(--muted); margin: 14px 0 0; font-style: italic; }

/* Proof strip */
.proof { padding: 40px 0; background: var(--evergreen); color: #fff; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.proof-item { border-left: 3px solid var(--lime); padding-left: 16px; }
.proof-value { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.proof-label { color: var(--mint-100); font-size: .92rem; margin: 4px 0 0; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #CBD5E1; }
.card p:last-child { margin-bottom: 0; }
.icon-tile {
  width: 48px; height: 48px; border-radius: 12px; background: var(--mint-50); color: var(--evergreen);
  display: grid; place-items: center; margin-bottom: 18px;
}
.icon-tile svg { width: 24px; height: 24px; }
.card ul { padding-left: 1.1rem; margin: 0; color: var(--ink-2); }
.card li { margin: 4px 0; }
.card-link { font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 56px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--evergreen); color: #fff; font-weight: 800; display: grid; place-items: center;
}
.steps li::after { content: ""; position: absolute; top: 20px; left: 52px; right: -12px; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }

/* Specialty chips */
.specialty { display: flex; gap: 16px; align-items: flex-start; }
.specialty .icon-tile { flex: none; margin: 0; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 12px; padding: 10px 0; color: var(--ink-2); }
.check-list svg { flex: none; color: var(--evergreen-700); margin-top: 3px; }

/* Quote */
.quote { background: var(--surface); border-radius: 20px; padding: 40px; border: 1px solid var(--line); position: relative; }
.quote blockquote { margin: 0; font-size: 1.3rem; font-weight: 600; line-height: 1.45; color: var(--ink); }
.quote cite { display: block; margin-top: 18px; font-style: normal; color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq { max-width: 780px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--evergreen); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 18px; margin: 0; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--evergreen), var(--evergreen-900)); color: #fff; border-radius: 24px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: var(--mint-100); margin: 0; max-width: 560px; }
.cta-band .btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Page hero (inner pages) */
.page-hero { background: linear-gradient(180deg, var(--mint-50), var(--page)); padding: 72px 0 56px; }

/* Form */
.form-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.req { color: #B91C1C; }
input, select, textarea {
  width: 100%; font: inherit; padding: .75rem .9rem; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.field-error { color: #B91C1C; font-size: .82rem; margin-top: 5px; display: none; }
.field.invalid input, .field.invalid select { border-color: #B91C1C; }
.field.invalid .field-error { display: block; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 12px; }
.form-success { display: none; text-align: center; padding: 24px 0; }
.form-success.show { display: block; }
.form-success .icon-tile { margin: 0 auto 16px; width: 64px; height: 64px; border-radius: 50%; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.checkbox-grid input { width: auto; }

/* Footer */
.site-footer { background: var(--evergreen-900); color: var(--mint-100); padding: 64px 0 28px; margin-top: 88px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand img { height: 52px; width: auto; border-radius: 10px; margin-bottom: 14px; }
.site-footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: var(--mint-100); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { color: var(--mint-100); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .split, .form-wrap { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .proof-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border: 0; margin-top: 12px; }
  .nav-links a[aria-current="page"] { box-shadow: none; color: var(--evergreen); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 64px 0; }
  .grid-3, .grid-2, .field-row, .checkbox-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Header CTA keeps button colors over nav link styles */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; box-shadow: 0 6px 16px rgba(6, 95, 70, .25); padding-bottom: .85rem; }
@media (max-width: 760px) { .nav-links li:last-child a.btn-primary { display: flex; border: 0; } }
.site-footer li { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.site-footer li svg { flex: none; }
