@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --ink: #232a31;
  --muted: #5b6670;
  --line: #e8e0d2;
  --brand: #0f6b5c;
  --brand-dark: #0a4f44;
  --brand-tint: #e7f2ef;
  --accent: #e07a4f;
  --accent-dark: #c4633b;
  --gold: #f1c453;
  --success-bg: #eaf5ef;
  --success-line: #bfdfcd;
  --success-ink: #1f5c3d;
  --warning-bg: #fdf3dd;
  --warning-line: #ecd096;
  --danger-bg: #fdf0ec;
  --danger-line: #f0c8b8;
  --shadow: 0 14px 36px rgba(35, 42, 49, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; } /* 18px base — easier reading for 60+ visitors */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
h1, h2, h3, .price { font-family: "Fraunces", Georgia, "Times New Roman", serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px clamp(20px, 5vw, 72px); background: rgba(250, 246, 239, .94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.brand { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.25rem; color: var(--ink); }
nav { display: flex; gap: 18px; align-items: center; font-size: .92rem; font-weight: 500; }
nav a { color: var(--ink); }
.nav-cta { padding: 10px 16px; border-radius: 999px; background: var(--brand); color: #fff !important; font-weight: 700; }
.nav-cta:hover { text-decoration: none; background: var(--brand-dark); }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* Hero */
.hero { padding: 72px 0 56px; max-width: 920px; }
.badge { display: inline-block; padding: 8px 14px; background: var(--brand-tint); border: 1px solid #c4ddd6; border-radius: 999px; color: var(--brand-dark); font-weight: 700; font-size: .85rem; margin-bottom: 22px; letter-spacing: .01em; }
.badge.accent-badge { background: #fdeee5; border-color: #f3cfb9; color: var(--accent-dark); }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.06; letter-spacing: -.02em; font-weight: 600; margin: 0 0 22px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -.01em; font-weight: 600; margin: 0 0 14px; }
h3 { margin-top: 0; font-weight: 600; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 780px; margin: 0 0 28px; }
.cta-row, .form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 24px; border-radius: 14px; font-weight: 700; font-size: 1rem; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: background .15s ease, border-color .15s ease, transform .05s ease; }
.button:active { transform: translateY(1px); }
.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(15, 107, 92, .25); }
.primary:hover { background: var(--brand-dark); text-decoration: none; }
.secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.secondary:hover { text-decoration: none; border-color: #cfc6ba; }
.accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(224, 122, 79, .28); }
.accent:hover { background: var(--accent-dark); text-decoration: none; }
.microcopy { color: var(--muted); font-size: .9rem; }
.nowrap { white-space: nowrap; }

/* Cards & layout */
.cards { display: grid; gap: 18px; margin: 28px 0 56px; }
.three { grid-template-columns: repeat(3, 1fr); }
.two { grid-template-columns: repeat(2, 1fr); }
.card, .warning-box, .waitlist, .content-page, .seo-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card p, .warning-box p { color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; margin: 0 0 56px; }
.warning-box { background: var(--warning-bg); border-color: var(--warning-line); box-shadow: none; }
ul { padding-left: 22px; }
.checklist { list-style: none; padding: 0; }
.checklist li { margin: 12px 0; padding-left: 32px; position: relative; }
.checklist li:before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--brand); }

/* Step circles (how it works) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0 56px; counter-reset: step; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); counter-increment: step; }
.step-card:before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark); font-weight: 800; font-size: 1.15rem; margin-bottom: 14px; font-family: "Fraunces", Georgia, serif; }
.step-card p { color: var(--muted); margin-bottom: 0; }

/* Cost comparison */
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0 16px; }
.compare-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.compare-card.highlight { border: 2px solid var(--brand); background: var(--brand-tint); position: relative; }
.compare-card .tag { display: inline-block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.compare-card.highlight .tag { color: var(--brand-dark); }
.compare-card .amount { font-family: "Fraunces", Georgia, serif; font-size: 2.2rem; font-weight: 700; line-height: 1.1; margin: 4px 0 10px; }
.compare-card.highlight .amount { color: var(--brand-dark); }
.compare-card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Waitlist / email */
.waitlist { margin: 0 0 56px; background: linear-gradient(135deg, #fff, #f6efe2); }
.email-form label { display: block; font-weight: 700; margin-bottom: 8px; }
input, textarea, select { width: 100%; border: 1px solid #cfc6ba; background: #fff; border-radius: 12px; padding: 14px 15px; font: inherit; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(15, 107, 92, .3); border-color: var(--brand); }
.form-row input { max-width: 420px; }
.form-status { font-weight: 700; }

/* SEO sections / FAQ */
.seo-section { margin: 0 0 64px; }
.faq-grid { display: grid; gap: 10px; }
details { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); }

/* Footer */
.site-footer { padding: 32px clamp(20px, 5vw, 72px); background: #20303c; color: #d7dee4; font-size: .9rem; margin-top: 24px; }
.site-footer a { color: #fff; text-decoration: underline; }

/* Content pages */
.content-page { margin: 48px auto 70px; max-width: 900px; }
.content-page h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.callout { padding: 18px; border-radius: 16px; background: #eef5f3; border: 1px solid #d3e5e0; margin: 22px 0; }
.source-note { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }

/* Screener wizard */
.screener-page { max-width: 860px; }
.compact { padding: 16px 18px; margin: 20px 0 26px; }
.screener-form { display: grid; gap: 20px; }
.wizard-progress { display: flex; align-items: center; gap: 8px; margin: 6px 0 20px; flex-wrap: wrap; }
.wizard-progress .dot { width: 12px; height: 12px; border-radius: 50%; background: #d8cfc0; transition: background .2s ease; }
.wizard-progress .dot.active { background: var(--brand); transform: scale(1.25); }
.wizard-progress .dot.done { background: #8fbfb3; }
.wizard-progress .progress-label { font-size: .88rem; font-weight: 700; color: var(--muted); margin-left: 6px; }
.form-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.form-section h2 { margin-bottom: 6px; }
.section-intro { color: var(--muted); margin: 0 0 18px; }
.form-section label { display: block; font-weight: 700; margin: 18px 0 7px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 10px; margin: 16px 0; }
legend { font-weight: 800; padding: 0 8px; }
.checkbox { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 500 !important; margin: 12px 0 !important; line-height: 1.45; }
.checkbox input { width: 22px; height: 22px; min-width: 22px; margin-top: 2px; accent-color: var(--brand); }
.checkbox .sub { display: block; color: var(--muted); font-size: .88rem; font-weight: 400; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }

/* "Check your card" helper */
.card-helper { margin: 16px 0 4px; background: #fcfaf6; }
.card-helper summary { color: var(--brand-dark); }
.card-helper-row { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: center; margin: 18px 0; }
.card-helper-row p { margin: 0; font-size: .95rem; color: var(--muted); }
.id-card { position: relative; width: 280px; aspect-ratio: 1.586; border: 1px solid #d5cdbf; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(35,42,49,.08); padding: 30px 16px 26px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.id-card-brand { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: #9aa4ad; text-transform: uppercase; }
.id-card-title { margin: 0; font-size: .88rem; font-weight: 800; color: var(--ink); }
.id-card-line { margin: 0; font-size: .76rem; color: var(--muted); }
.id-highlight { background: #fdeec9; border-radius: 4px; padding: 1px 4px; font-weight: 700; color: var(--ink); }
.id-card-original .id-card-title { color: #1d3f6e; }
.id-stripe { position: absolute; left: 0; right: 0; height: 14px; }
.id-stripe.top { top: 0; background: #c0392b; }
.id-stripe.bottom { bottom: 0; background: #2c5f9e; }
@media (max-width: 700px) {
  .card-helper-row { grid-template-columns: 1fr; }
  .id-card { width: 100%; max-width: 300px; }
}
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.hidden { display: none; }

/* Results */
.result-panel { margin-top: 30px; border-top: 2px solid var(--line); padding-top: 28px; }
.result-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 0 0 22px; background: #fff; }
.result-card.appears-to-match-published-pathway { background: var(--success-bg); border-color: var(--success-line); }
.result-card.appears-to-match-published-pathway h3 { color: var(--success-ink); }
.result-card.unclear-clinician-review-needed,
.result-card.possible-part-d-routing-issue { background: var(--warning-bg); border-color: var(--warning-line); }
.result-card.may-not-match-published-criteria { background: var(--danger-bg); border-color: var(--danger-line); }
#doctor-message { min-height: 340px; font-size: .95rem; line-height: 1.55; }

/* Packet upsell (result panel) */
.packet-upsell { border: 2px solid var(--accent); border-radius: var(--radius); padding: 26px; margin: 26px 0; background: linear-gradient(135deg, #fff, #fdf1ea); box-shadow: var(--shadow); }
.packet-upsell h3 { margin: 0 0 10px; }
.packet-upsell p { color: var(--muted); }

/* Paid packet */
.packet-panel { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; box-shadow: var(--shadow); }
.packet-header { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.packet-header h3 { margin: 0 0 8px; }
.compact-buttons { margin: 0; }
#packet-output { min-height: 560px; font-size: .92rem; line-height: 1.5; }
.price-card { border: 2px solid var(--brand); border-radius: var(--radius); padding: 28px; background: linear-gradient(135deg, #fff, var(--brand-tint)); margin: 26px 0; box-shadow: var(--shadow); }
.price { font-size: 3rem; line-height: 1; font-weight: 700; margin: 10px 0; color: var(--brand-dark); }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 26px 0; }
code { background: #f2ece1; padding: 2px 6px; border-radius: 7px; font-size: .92em; }

/* SEO article layer */
.seo-article h2 { margin-top: 30px; }
.seo-article li { margin: 8px 0; }
.inline-faq { box-shadow: none; margin-top: 30px; }
.seo-list { margin-top: 24px; }
.lead-small { color: var(--muted); font-size: 1.02rem; }

/* Misc legacy blocks */
.code-block, pre { background: #20303c; color: #eef5f7; border-radius: 16px; padding: 18px; overflow: auto; font-size: .85rem; line-height: 1.45; }
.timeline { display: grid; gap: 18px; margin: 24px 0; }
.timeline-item { border-left: 5px solid var(--brand); background: #fff; border-radius: 16px; padding: 18px 22px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#success-packet-output { min-height: 620px; font-size: .92rem; line-height: 1.5; }

/* Print */
@media print {
  .site-header, .site-footer, .screener-form, .button-row, .badge, .wizard-progress { display: none !important; }
  body { background: white; }
  main, .content-page { width: 100%; margin: 0; box-shadow: none; border: 0; }
  .result-panel { display: block !important; }
  textarea { border: 0; min-height: 0; }
  #unlock-packet, #copy-packet, #print-packet, #packet-status, #download-pdf, #success-pdf, #success-copy, #success-print { display: none !important; }
  .packet-panel { box-shadow: none; border: 0; }
}

/* Responsive */
@media (max-width: 820px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { flex-wrap: wrap; }
  .three, .two, .split, .steps, .compare { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}
@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .card-grid { grid-template-columns: 1fr; }
}
