/* E2E Billing — design tokens
   Inspired by the CMS-1500 claim form: dropout-red rules on cool paper,
   ink-navy type, and one "paid" green reserved for outcomes. */
:root {
  --paper: #f6f8f7;
  --white: #ffffff;
  --ink: #1b2430;
  --ink-soft: #4a5663;
  --rule: #d4dbdd;
  --form-red: #b4232b;
  --form-red-tint: #fbeeee;
  --paid: #1f7a4d;
  --paid-tint: #e8f3ed;
  --radius-sm: 4px;
  --radius: 10px;
  --wrap: 1120px;
  --measure: 68ch;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--form-red); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--form-red); }
:focus-visible { outline: 3px solid var(--form-red); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); padding: .5rem 1rem; z-index: 10; }

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

/* Type scale (1.25 ratio) */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); font-weight: 800; margin-top: 0; }
h3 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol, dl, table { margin: 0 0 1.1em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.prose { max-width: var(--measure); }
.prose li { margin-bottom: .4em; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a[aria-current="page"] { color: var(--form-red); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .45rem .7rem; font: inherit; font-weight: 600; color: var(--ink); }

/* Buttons */
.btn { display: inline-block; background: var(--form-red); color: var(--white); text-decoration: none; font-weight: 700; padding: .8rem 1.25rem; border-radius: var(--radius-sm); border: 2px solid var(--form-red); line-height: 1.2; }
.btn:hover { background: #941c23; border-color: #941c23; color: var(--white); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.nav .btn { padding: .55rem 1rem; color: var(--white); }

/* Breadcrumbs */
.crumbs { font-size: .9rem; color: var(--ink-soft); padding-top: 1.4rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--rule); }

/* Hero */
.hero { padding: 3rem 0 3.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-note { font-size: .95rem; color: var(--ink-soft); margin-top: 1rem; }

/* The memorable element: an example claim, styled like a CMS-1500 */
.claim {
  position: relative;
  background: var(--white);
  border: 2px solid var(--form-red);
  border-radius: var(--radius-sm);
  padding: 0;
  color: var(--ink);
  font-size: .92rem;
  box-shadow: 6px 6px 0 var(--form-red-tint);
}
.claim-head { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem .9rem; border-bottom: 2px solid var(--form-red); color: var(--form-red); font-weight: 800; }
.claim-head small { font-weight: 600; color: var(--ink-soft); }
.claim-grid { display: grid; grid-template-columns: 1fr 1fr; }
.claim-field { padding: .55rem .9rem .7rem; border-bottom: 1px solid var(--form-red); }
.claim-field:nth-child(odd) { border-right: 1px solid var(--form-red); }
.claim-field span { display: block; font-size: .74rem; color: var(--form-red); font-weight: 600; }
.claim-field strong { font-size: 1rem; }
.claim-status { padding: .9rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.claim-status s { color: var(--ink-soft); }
.stamp {
  display: inline-block;
  color: var(--paid);
  border: 3px solid var(--paid);
  border-radius: 6px;
  padding: .15rem .7rem;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: .06em;
  transform: rotate(-6deg);
  animation: stamp .5s cubic-bezier(.2,1.4,.4,1) .6s both;
}
@keyframes stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.8); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }
.claim-caption { font-size: .82rem; color: var(--ink-soft); margin-top: .7rem; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-white { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: var(--measure); margin-bottom: 2rem; }

/* Ruled lists: form-style rows instead of card soup */
.ruled { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.ruled li { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.ruled h3 { margin: 0; font-size: 1.08rem; }
.ruled p { margin: 0; color: var(--ink-soft); }
.ruled a { font-weight: 700; }

/* Steps: a real sequence, so numbers are earned */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin: 0; }
.steps li { counter-increment: step; border-top: 3px solid var(--form-red); padding-top: .9rem; }
.steps li::before { content: "Step " counter(step); display: block; font-weight: 800; color: var(--form-red); margin-bottom: .3rem; font-size: .95rem; }
.steps h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.steps p { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* Link grid for specialties / related pages */
.link-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 2rem; }
.link-grid li { border-bottom: 1px solid var(--rule); }
.link-grid a { display: block; padding: .8rem 0; font-weight: 700; text-decoration: none; }
.link-grid a:hover { color: var(--form-red); }
.link-grid small { display: block; font-weight: 400; color: var(--ink-soft); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--white); font-size: .98rem; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); font-weight: 800; }

/* Callout */
.callout { background: var(--paid-tint); border-left: 4px solid var(--paid); padding: 1.2rem 1.4rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; max-width: var(--measure); }
.callout p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--rule); padding: .9rem 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style-position: outside; }
.faq details[open] summary { color: var(--form-red); }
.faq details p { margin: .7rem 0 0; color: var(--ink-soft); }

/* CTA band */
.cta-band { background: var(--ink); color: var(--white); padding: 3rem 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .3rem; }
.cta-band p { margin: 0; color: #c9d1d8; max-width: 60ch; }
.cta-band .btn { border-color: var(--white); background: var(--white); color: var(--ink); }
.cta-band .btn:hover { background: transparent; color: var(--white); }

/* Form */
.form { display: grid; gap: 1rem; max-width: 560px; background: var(--white); border: 2px solid var(--form-red); border-radius: var(--radius-sm); padding: 1.5rem; }
.form label { font-weight: 700; font-size: .95rem; display: grid; gap: .35rem; }
.form input, .form select, .form textarea { font: inherit; padding: .65rem .75rem; border: 1px solid #aeb8bd; border-radius: var(--radius-sm); background: var(--white); color: var(--ink); }
.form textarea { min-height: 110px; resize: vertical; }
.form .hint { font-weight: 400; color: var(--ink-soft); font-size: .88rem; }
.form-status { font-weight: 700; }
.form-status.ok { color: var(--paid); }
.form-status.err { color: var(--form-red); }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--white); border-top: 2px solid var(--ink); padding: 3rem 0 2rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1rem; margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .85rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem 1.4rem; gap: .9rem; }
  .nav.open { display: flex; }
  .ruled li { grid-template-columns: 1fr; gap: .3rem; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .claim-grid { grid-template-columns: 1fr; }
  .claim-field:nth-child(odd) { border-right: 0; }
}
