:root {
  color-scheme: light;
  --ink: #14211f;
  --muted-ink: #5d6865;
  --soft-ink: #7a8581;
  --paper: #f7f8f4;
  --paper-2: #eef3ee;
  --surface: #ffffff;
  --surface-strong: #f2eee6;
  --line: #dbe2dd;
  --line-strong: #bcc8c1;
  --teal: #0f766e;
  --teal-dark: #0a5d57;
  --teal-soft: #d9efeb;
  --amber: #b86b18;
  --amber-soft: #faead7;
  --rose: #9f1239;
  --rose-soft: #f8dce5;
  --blue: #245b9a;
  --blue-soft: #dce9f7;
  --primary-ink: #ffffff;
  --cta-bg: #14211f;
  --cta-hover-bg: #0a5d57;
  --cta-ink: #ffffff;
  --inverse-bg: #14211f;
  --inverse-ink: #ffffff;
  --inverse-muted: rgba(255, 255, 255, 0.78);
  --card-bg: rgba(255, 255, 255, 0.88);
  --band-bg: rgba(238, 243, 238, 0.6);
  --input-bg: #ffffff;
  --skeleton-a: #dce4df;
  --skeleton-b: #f3f6f2;
  --success-ink: #16433f;
  --shadow: 0 18px 50px rgba(20, 33, 31, 0.1);
  --font-sans: "Geist", "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf4ef;
  --muted-ink: #b5c3bc;
  --soft-ink: #93a59c;
  --paper: #101816;
  --paper-2: #17231f;
  --surface: #1a2824;
  --surface-strong: #23332e;
  --line: #30433d;
  --line-strong: #4a625a;
  --teal: #67d8c9;
  --teal-dark: #8fe7dd;
  --teal-soft: #183f3a;
  --amber: #f0ad66;
  --amber-soft: #382817;
  --rose: #f28aaa;
  --rose-soft: #3a1824;
  --blue: #8bbcf2;
  --blue-soft: #172a40;
  --primary-ink: #09201d;
  --cta-bg: #67d8c9;
  --cta-hover-bg: #8fe7dd;
  --cta-ink: #081411;
  --inverse-bg: #0b1412;
  --inverse-ink: #edf4ef;
  --inverse-muted: #c0d0c8;
  --card-bg: #1a2824;
  --band-bg: #202f2a;
  --input-bg: #0f1916;
  --skeleton-a: #263a34;
  --skeleton-b: #3a5149;
  --success-ink: #d9fff7;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 180ms ease, color 180ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(20, 33, 31, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 33, 31, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

:root[data-theme="dark"] body::before {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(237, 244, 239, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 244, 239, 0.04) 1px, transparent 1px);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  outline-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 6px;
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  padding: 0.65rem 0.9rem;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1160px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--muted-ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border-radius: 6px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  padding: 0 1rem;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  background: var(--cta-hover-bg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
}

.theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 3.05rem;
  height: 1.55rem;
}

.theme-toggle-sun,
.theme-toggle-moon,
.theme-toggle-thumb {
  display: block;
}

.theme-toggle-sun {
  position: relative;
  z-index: 2;
  width: 0.58rem;
  height: 0.58rem;
  margin-left: 0.36rem;
  border-radius: 999px;
  background: var(--amber);
}

.theme-toggle-sun::before {
  content: "";
  position: absolute;
  inset: -0.26rem;
  border-radius: 999px;
  background:
    linear-gradient(var(--amber), var(--amber)) center 0 / 2px 5px no-repeat,
    linear-gradient(var(--amber), var(--amber)) center 100% / 2px 5px no-repeat,
    linear-gradient(90deg, var(--amber), var(--amber)) 0 center / 5px 2px no-repeat,
    linear-gradient(90deg, var(--amber), var(--amber)) 100% center / 5px 2px no-repeat;
  opacity: 0.92;
}

.theme-toggle-moon {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.26rem;
  border-radius: 999px;
  background: var(--blue);
  overflow: hidden;
}

.theme-toggle-moon::after {
  content: "";
  position: absolute;
  top: -0.08rem;
  left: 0.28rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--surface);
}

.theme-toggle-thumb {
  position: absolute;
  top: 0.04rem;
  left: 0;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(20, 33, 31, 0.18);
  z-index: 1;
  transition: transform 180ms ease, background 180ms ease;
}

:root[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(1.6rem);
  background: var(--surface-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
}

.section-band {
  padding: clamp(4rem, 7vw, 7rem) 0;
}

.hero {
  padding-top: clamp(2.25rem, 5vw, 5rem);
  padding-bottom: clamp(2rem, 3vw, 3.25rem);
}

.hero-grid,
.content-grid,
.tool-grid,
.paid-grid,
.final-cta {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1.4rem;
  font-size: 5.2rem;
  line-height: 0.94;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 1rem;
  font-size: 3.6rem;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 64ch;
  color: var(--muted-ink);
  font-size: 1.2rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.hero-actions {
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.82rem 1.1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.99);
}

.button-primary {
  background: var(--teal);
  color: var(--primary-ink);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--teal);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted-ink);
}

.button-quiet:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.support-list {
  display: grid;
  gap: 0.65rem;
  max-width: 650px;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.support-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--muted-ink);
  font-weight: 600;
}

.support-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--amber);
}

.microcopy,
.help-text {
  color: var(--soft-ink);
  font-size: 0.88rem;
}

.microcopy {
  margin-top: 1rem;
}

.hero-panel {
  position: relative;
  display: grid;
  gap: 1rem;
}

.document-visual,
.result-preview,
.tool-panel,
.output-shell,
.step-card,
.offer-card,
.faq-grid article,
.action-box,
.comparison-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.document-visual {
  padding: 1.1rem;
  transform: rotate(-1deg);
}

.doc-topline,
.doc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.doc-topline {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.doc-row {
  min-height: 2.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  color: var(--muted-ink);
  font-size: 0.94rem;
}

.doc-row:last-child {
  border-bottom: 0;
}

.doc-row.strong {
  color: var(--ink);
  font-weight: 700;
}

.doc-row.alert {
  border-radius: 6px;
  background: var(--rose-soft);
  color: var(--rose);
  padding: 0 0.55rem;
  font-weight: 700;
}

.result-preview {
  width: min(94%, 380px);
  margin-left: auto;
  padding: 1.1rem;
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  transform: translateY(-1.5rem) rotate(1deg);
}

.result-preview p {
  margin-bottom: 0;
  color: var(--inverse-muted);
}

.preview-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.4rem;
  border-radius: 2px;
  background: #f3b23b;
}

.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.trust-inner span {
  min-height: 4.5rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--muted-ink);
  font-weight: 700;
  text-align: center;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.problem-band,
.compare-band,
.faq-band {
  background: var(--band-bg);
}

.prose {
  max-width: 68ch;
  color: var(--muted-ink);
  font-size: 1.04rem;
}

.prose p {
  margin-bottom: 1rem;
}

.quote-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.quote-list li {
  border-left: 4px solid var(--teal);
  padding: 0.3rem 0 0.3rem 1rem;
  color: var(--ink);
  font-weight: 700;
}

.section-heading {
  width: min(840px, calc(100% - 32px));
  margin: 0 auto 2rem;
  text-align: center;
}

.section-heading.left {
  width: min(1160px, calc(100% - 32px));
  text-align: left;
}

.section-heading p {
  color: var(--muted-ink);
  font-size: 1.04rem;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.step-card {
  padding: 1.25rem;
}

.step-number {
  display: block;
  margin-bottom: 1rem;
  color: var(--amber);
  font-family: var(--font-mono);
  font-weight: 800;
}

.step-card p,
.offer-card p,
.faq-grid p {
  color: var(--muted-ink);
}

.tool-section {
  background: var(--surface);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: 1.25rem;
  align-items: start;
}

.tool-panel,
.output-shell,
.offer-card,
.paid-builder {
  padding: 1.25rem;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.panel-header p {
  margin-bottom: 0;
  color: var(--muted-ink);
}

.tag,
.price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.tag-dark {
  background: var(--inverse-bg);
  color: var(--inverse-ink);
}

.price {
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 1rem;
}

.field-group {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--ink);
  padding: 0.8rem 0.85rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--input-bg);
  padding: 0.7rem;
  color: var(--muted-ink);
}

textarea {
  resize: vertical;
  min-height: 180px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--teal);
}

.checkbox-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.checkbox-row label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 0.7rem;
  color: var(--muted-ink);
  font-size: 0.86rem;
}

.file-summary,
.form-error {
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  font-size: 0.9rem;
}

.file-summary {
  margin-bottom: 1rem;
  background: var(--paper-2);
  color: var(--muted-ink);
}

.form-error {
  margin-bottom: 1rem;
  border: 1px solid rgba(159, 18, 57, 0.35);
  background: var(--rose-soft);
  color: var(--rose);
  font-weight: 700;
}

.output-shell {
  min-height: 560px;
  background: var(--paper);
}

.empty-state,
.loading-state {
  display: grid;
  place-items: start;
  align-content: center;
  min-height: 500px;
  padding: 2rem;
  color: var(--muted-ink);
  text-align: left;
}

.empty-state.horizontal {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 180px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
}

.horizontal .empty-icon {
  margin-bottom: 0;
}

.loading-state {
  gap: 0.85rem;
}

.skeleton {
  width: 72%;
  height: 1rem;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--skeleton-a), var(--skeleton-b), var(--skeleton-a));
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton.wide {
  width: 94%;
  height: 1.6rem;
}

.skeleton.short {
  width: 46%;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.result-content {
  display: grid;
  gap: 1rem;
}

.result-card,
.draft-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
}

.result-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.result-kicker {
  margin-bottom: 0.4rem;
  color: var(--teal-dark);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.result-list,
.feature-list,
.timeline-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-list li,
.feature-list li,
.timeline-list li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--muted-ink);
}

.result-list li::before,
.feature-list li::before,
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 2px;
  background: var(--teal);
}

.concern-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--amber);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
}

.concern-card.high {
  border-left-color: var(--rose);
}

.concern-card.low {
  border-left-color: var(--blue);
}

.confidence {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--muted-ink);
  padding: 0.25rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
}

.evidence-line {
  margin: 0.6rem 0;
  border-radius: 6px;
  background: var(--paper);
  padding: 0.75rem;
  color: var(--muted-ink);
  font-size: 0.92rem;
}

.upgrade-box {
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: var(--radius);
  background: var(--teal-soft);
  padding: 1rem;
}

.upgrade-box p {
  color: var(--success-ink);
}

.resolution-band {
  background: var(--surface-strong);
}

.paid-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(320px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.paid-output {
  width: min(1160px, calc(100% - 32px));
  min-height: 220px;
  margin: 1.25rem auto 0;
}

.paid-result {
  grid-template-columns: 1fr;
}

.matrix-wrap {
  overflow-x: auto;
}

.issue-matrix {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.issue-matrix th,
.issue-matrix td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.issue-matrix th {
  color: var(--ink);
  font-size: 0.8rem;
}

.letter-box,
.script-box {
  white-space: pre-wrap;
  border-radius: 6px;
  background: var(--paper);
  padding: 1rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
}

.comparison-table {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  box-shadow: none;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  min-height: 4rem;
  border-bottom: 1px solid var(--line);
}

.comparison-row:last-child {
  border-bottom: 0;
}

.comparison-row > div {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  color: var(--muted-ink);
  font-weight: 600;
}

.comparison-row > div + div {
  border-left: 1px solid var(--line);
}

.comparison-row.header {
  background: var(--inverse-bg);
}

.comparison-row.header > div {
  color: var(--inverse-ink);
}

.action-box {
  padding: 1.2rem;
}

.draft-box {
  margin-top: 1rem;
  white-space: pre-wrap;
  color: var(--muted-ink);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.faq-grid article {
  padding: 1.2rem;
  box-shadow: none;
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.final-cta h2 {
  max-width: 16ch;
}

.final-cta p {
  color: var(--muted-ink);
  font-size: 1.08rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2.25rem 0 3rem;
  color: var(--muted-ink);
}

.site-footer p {
  max-width: 76ch;
  margin: 0.4rem 0 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
}

.footer-links a {
  font-weight: 700;
}

@media (max-width: 900px) {
  .nav-shell {
    min-height: auto;
    padding: 0.75rem 0;
  }

  .nav-links {
    display: none;
  }

  .hero-grid,
  .content-grid,
  .tool-grid,
  .paid-grid,
  .step-grid,
  .faq-grid,
  .trust-inner {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 13ch;
    font-size: 3.8rem;
  }

  h2 {
    font-size: 3rem;
  }

  .result-preview {
    transform: none;
  }

  .document-visual {
    transform: none;
  }

  .output-shell {
    min-height: 360px;
  }

  .empty-state,
  .loading-state {
    min-height: 320px;
  }

  .final-cta,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .nav-cta {
    display: none;
  }

  .hero {
    padding-top: 1.45rem;
    padding-bottom: 1rem;
  }

  .section-band {
    padding: 3.5rem 0;
  }

  h1 {
    max-width: 15ch;
    font-size: 2.85rem;
    line-height: 0.98;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .support-list {
    display: none;
  }

  .hero-copy .microcopy {
    display: none;
  }

  .document-visual {
    margin-top: 0.5rem;
    padding: 0.85rem;
    max-height: 112px;
    overflow: hidden;
  }

  .doc-row {
    min-height: 2.15rem;
    font-size: 0.86rem;
  }

  .document-visual .doc-row:nth-of-type(n + 4) {
    display: none;
  }

  .result-preview {
    display: none;
  }

  .field-row,
  .checkbox-row,
  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-row > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .panel-header {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-actions,
  .button-row {
    width: 100%;
  }

  .empty-state.horizontal {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ====================================================================
   v7.1 additions — May 2026
   - .form-success for B2B demo confirmation
   - .is-selected-tier for tier CTA highlighting
   - .offer-card baseline (free tier card without paid-offer treatment)
   - Spacing tweaks for the 4-up pricing grid + stats grid
   ==================================================================== */

.form-success {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(58, 135, 123, 0.4);
  background: rgba(58, 135, 123, 0.08);
  color: var(--accent, #2c6b62);
  font-weight: 600;
  font-size: 0.95rem;
}

.offer-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, rgba(20, 33, 31, 0.12));
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.offer-card:hover {
  border-color: var(--accent, #3a877b);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 33, 31, 0.06);
}

.offer-card .feature-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  flex: 1;
}

.offer-card .feature-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink, #14211f);
}

.offer-card .feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0; /* reset original square pseudo position */
  width: auto; /* reset square size */
  height: auto;
  border-radius: 0;
  background: transparent; /* reset square fill */
  color: var(--accent, #3a877b);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
}

.offer-card .price {
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--ink, #14211f);
  white-space: nowrap;
}

[data-tier].is-selected-tier {
  outline: 2px solid var(--accent, #3a877b);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(58, 135, 123, 0.18);
}

/* Stats band cards */
.section-band [aria-label="Why patients use BillBusted"] .step-card .step-number {
  display: block;
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 800;
  color: var(--accent, #3a877b);
  margin-bottom: 0.5rem;
}

/* Tighter spacing for the 4-up pricing grid on mobile */
@media (max-width: 768px) {
  .paid-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .offer-card {
    padding: 1.25rem;
  }
  .offer-card .price {
    font-size: 1.6rem;
  }
}

/* Footer links wrap nicely */
.site-footer .footer-links {
  flex-wrap: wrap;
}

/* ====================================================================
   v7.2 additions — May 2026
   - Hamburger nav for screens < 900px
   - Hero-panel mobile fit (no horizontal cutoff)
   - FAQ-grid overflow protection (long blog post body)
   - Blog index card with shared hero thumbnail
   - .video-embed for /business/ and similar pages
   - Pricing CTA scroll-anchoring polish
   ==================================================================== */

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-hamburger {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-hamburger-icon,
.nav-hamburger-icon::before,
.nav-hamburger-icon::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink, #14211f);
  border-radius: 2px;
  position: relative;
  transition: transform 200ms ease, top 200ms ease, background 200ms ease;
}
.nav-hamburger-icon::before {
  position: absolute;
  top: -7px;
  left: 0;
}
.nav-hamburger-icon::after {
  position: absolute;
  top: 7px;
  left: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon { background: transparent; }
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon::before { top: 0; transform: rotate(45deg); }
.nav-hamburger[aria-expanded="true"] .nav-hamburger-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav-hamburger { display: inline-flex; }

  /* Mobile-collapsing nav-links */
  .nav-links {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface, #fff);
    border-top: 1px solid var(--border, rgba(20, 33, 31, 0.08));
    padding: 0.5rem 1rem 1rem;
    gap: 0.25rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 200ms ease, opacity 200ms ease;
    z-index: 50;
    box-shadow: 0 14px 40px rgba(20, 33, 31, 0.08);
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 0.85rem 0.6rem;
    border-bottom: 1px solid var(--border, rgba(20, 33, 31, 0.05));
    font-size: 1rem;
  }
  .nav-links a:last-child { border-bottom: 0; }
  .site-header { position: relative; }
  .nav-shell { position: relative; }
}

/* Hero panel cuts off on small screens — clamp width and allow scaling */
@media (max-width: 1024px) {
  .hero-panel {
    transform: none !important;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .document-visual,
  .result-preview {
    transform: none !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  /* Make sure the hero panel fits within viewport with safe padding */
  .hero-panel { padding: 1rem; }
  .document-visual { padding: 1rem; font-size: 0.9rem; }
  .result-preview { padding: 1rem; }
  .doc-row span:last-child { white-space: nowrap; }

  /* CPT page hero panels */
  .hero-grid > .hero-panel { order: 2; }
  .hero-grid > .hero-copy { order: 1; }

  /* Pricing tier price size on small phones */
  .offer-card .price { font-size: 1.35rem; }

  /* Trust strip horizontal scroll */
  .trust-strip .trust-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }
}

/* FAQ overflow on desktop — grid columns getting too narrow with long answers */
.faq-grid article {
  overflow-wrap: break-word;
  word-break: break-word;
}
.faq-grid article p,
.faq-grid article h3 {
  max-width: 100%;
}

/* Article body cleanup for blog posts (overlong words/links don't break layout) */
.prose,
article.section-band .prose,
article.section-band .prose p,
article.section-band .prose li {
  overflow-wrap: break-word;
  word-break: break-word;
}
article.section-band .prose pre,
article.section-band .prose code {
  overflow-x: auto;
  max-width: 100%;
  white-space: pre-wrap;
}

/* Blog index post cards with feature image */
.blog-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(20, 33, 31, 0.08));
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(20, 33, 31, 0.08);
  border-color: var(--accent, #3a877b);
}
.blog-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #fcfaf5;
  background-size: cover;
  background-position: center;
}
.blog-card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.blog-card-body .microcopy {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent, #3a877b);
  font-weight: 600;
}
.blog-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.blog-card-body h3 a {
  color: var(--ink, #14211f);
  text-decoration: none;
}
.blog-card-body h3 a:hover { color: var(--accent, #3a877b); }
.blog-card-body p { margin: 0; font-size: 0.92rem; color: var(--color-muted, #5f6b6a); line-height: 1.5; }
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Video embed wrapper — 16:9 responsive, rounded */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #14211f;
  box-shadow: 0 12px 32px rgba(20, 33, 31, 0.08);
}
.video-embed video,
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Form file-upload group on paid form (matches free scan styling) */
.paid-builder .file-field {
  border: 1px dashed var(--border, rgba(20, 33, 31, 0.2));
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: var(--surface-strong, #fcfaf5);
}

/* ====================================================================
   v7.3 fixes — May 2026
   - Comparison tables: support 4+ columns via [data-cols] attribute,
     horizontal-scroll on mobile (no more cell stacking chaos)
   - /business/ hero panel mobile: undo aggressive truncation rules
     so all doc-rows + result-preview show on mobile
   - General table robustness: opt-in stacked-card mode on very small
     screens via [data-cols][data-stack-mobile]
   ==================================================================== */

/* Adaptive column count: each .comparison-table can declare data-cols=N */
.comparison-table[data-cols="2"] .comparison-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.comparison-table[data-cols="3"] .comparison-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.comparison-table[data-cols="4"] .comparison-row { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
.comparison-table[data-cols="5"] .comparison-row { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); }

/* Mobile comparison: horizontal scroll instead of stacking cells (which lost the table structure entirely) */
@media (max-width: 900px) {
  .comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line, rgba(20, 33, 31, 0.12));
    border-radius: 12px;
  }
  /* Override the original v7 rule that collapsed comparison-row to 1fr — it stacked the cells and lost structure */
  .comparison-row,
  .comparison-table[data-cols="2"] .comparison-row,
  .comparison-table[data-cols="3"] .comparison-row,
  .comparison-table[data-cols="4"] .comparison-row,
  .comparison-table[data-cols="5"] .comparison-row {
    grid-template-columns: 160px repeat(var(--cols-data, 3), minmax(140px, 180px)) !important;
    min-width: 600px;
  }
  .comparison-table[data-cols="3"] .comparison-row { --cols-data: 2; }
  .comparison-table[data-cols="4"] .comparison-row { --cols-data: 3; }
  .comparison-table[data-cols="5"] .comparison-row { --cols-data: 4; }
  /* Restore the desktop side borders on mobile so the table still reads as a table when swiped */
  .comparison-row > div + div {
    border-left: 1px solid var(--line, rgba(20, 33, 31, 0.08)) !important;
    border-top: 0 !important;
  }
  .comparison-table::after {
    content: "swipe →";
    display: block;
    text-align: center;
    color: var(--color-muted, #5f6b6a);
    font-size: 0.75rem;
    padding: 0.4rem;
    border-top: 1px solid var(--line, rgba(20, 33, 31, 0.08));
  }
}

/* /business/ hero panel: override the aggressive mobile clipping (max-height + nth-of-type display:none + result-preview hidden) */
body[data-page="business"] .document-visual {
  max-height: none !important;
  overflow: visible !important;
}
body[data-page="business"] .document-visual .doc-row:nth-of-type(n + 4) {
  display: flex !important;
}
body[data-page="business"] .result-preview {
  display: block !important;
}

/* Same for /audit/, /blog/, /cpt-codes/, /state/, home pages — these all have hero panels with content that should fully show on mobile */
body[data-page="audit"] .document-visual,
body[data-page="blog"] .document-visual,
body[data-page="cpt-code"] .document-visual,
body[data-page="cpt-index"] .document-visual,
body[data-page="state"] .document-visual,
body[data-page="state-index"] .document-visual,
body[data-page="home"] .document-visual,
body[data-page="legacy"] .document-visual {
  max-height: none !important;
  overflow: visible !important;
}
body[data-page="audit"] .document-visual .doc-row:nth-of-type(n + 4),
body[data-page="blog"] .document-visual .doc-row:nth-of-type(n + 4),
body[data-page="cpt-code"] .document-visual .doc-row:nth-of-type(n + 4),
body[data-page="cpt-index"] .document-visual .doc-row:nth-of-type(n + 4),
body[data-page="state"] .document-visual .doc-row:nth-of-type(n + 4),
body[data-page="state-index"] .document-visual .doc-row:nth-of-type(n + 4),
body[data-page="home"] .document-visual .doc-row:nth-of-type(n + 4),
body[data-page="legacy"] .document-visual .doc-row:nth-of-type(n + 4) {
  display: flex !important;
}
body[data-page="audit"] .result-preview,
body[data-page="blog"] .result-preview,
body[data-page="cpt-code"] .result-preview,
body[data-page="cpt-index"] .result-preview,
body[data-page="state"] .result-preview,
body[data-page="state-index"] .result-preview,
body[data-page="home"] .result-preview,
body[data-page="legacy"] .result-preview {
  display: block !important;
}

/* ============================================================
   v7.8 — Chat widget mobile fix (full-screen-ish on small screens),
          blog article body spacing, FAQ heading span fix.
   ============================================================ */

/* Chat panel mobile — full-screen with safe top padding */
@media (max-width: 640px) {
  .bb-chat-panel {
    width: calc(100vw - 0.5rem) !important;
    right: 0.25rem !important;
    bottom: 0.25rem !important;
    top: 0.25rem !important;
    height: auto !important;
    max-height: calc(100vh - 0.5rem) !important;
  }
  .bb-chat-fab {
    bottom: 0.85rem !important;
    right: 0.85rem !important;
    width: 52px !important;
    height: 52px !important;
  }
  .bb-chat-input {
    max-height: 80px !important;
  }
  .bb-chat-send {
    align-self: stretch;
    min-height: 44px;
  }
  .bb-chat-greeting strong { font-size: 1rem !important; }
  .bb-chat-greeting { font-size: 0.92rem !important; }
}

/* Blog article body — fix tight headings & overflowing FAQ titles */
article.section-band .prose h2,
article.section-band h2 {
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}
article.section-band .prose h3,
article.section-band h3 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
article.section-band .prose p {
  margin: 0 0 1rem;
  line-height: 1.7;
}
article.section-band .prose ul,
article.section-band .prose ol {
  margin: 0.5rem 0 1.25rem;
  padding-left: 1.5rem;
  line-height: 1.7;
}
article.section-band .prose ul li,
article.section-band .prose ol li {
  margin-bottom: 0.5rem;
}
article.section-band .prose blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent, #3a877b);
  background: var(--surface-strong, #fcfaf5);
  font-style: italic;
}
article.section-band .prose strong {
  color: var(--ink, #14211f);
}
article.section-band .prose a {
  color: var(--accent, #3a877b);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Blog FAQ disclosure rows: keep marker and question on the same line */
.faq-list details {
  min-width: 0;
}

.faq-list summary {
  display: flex;
  align-items: start;
  gap: 0.85rem;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before {
  content: "\25B6";
  display: block;
  flex: 0 0 1rem;
  color: var(--ink, #14211f);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: 0.1rem;
}

.faq-list details[open] summary::before {
  transform: rotate(90deg);
  transform-origin: center;
}

.faq-list summary h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
}

/* FAQ section heading must span full grid width on every page */
.faq-grid > h2,
.faq-grid > h3,
.faq-grid > p,
.faq-grid > .section-heading,
section.faq-grid > h2,
section.faq-grid > h3 {
  grid-column: 1 / -1 !important;
  width: 100%;
}

/* Article-internal FAQ block — keep heading from being squeezed in a column */
article.section-band > section.faq-grid h2,
article.section-band > section.faq-grid h3 {
  grid-column: 1 / -1 !important;
}

/* Ensure long words / URLs in FAQ articles don't push layout */
.faq-grid article {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Generous mobile breathing room on blog body */
@media (max-width: 720px) {
  article.section-band .prose h2,
  article.section-band h2 {
    margin-top: 2.25rem;
    font-size: 1.45rem;
  }
  article.section-band .prose h3,
  article.section-band h3 {
    margin-top: 1.5rem;
    font-size: 1.15rem;
  }
}

/* ============================================================
   v7.11 — Comprehensive global mobile-overflow guards.
   PURPOSE: prevent ANY element from causing horizontal scroll on
   any viewport down to 320px. These are HARD STOPS — every page,
   every component, every future addition is covered automatically.

   ROOT CAUSES OF HORIZONTAL SCROLL (now blocked):
   1. Element with fixed width > viewport
   2. Long unbreakable words/URLs (CPT codes, links, code samples)
   3. Images / videos / iframes / tables wider than parent
   4. Padding without box-sizing: border-box
   5. Grid columns that don't collapse below their minmax min
   6. Negative margins or transforms extending beyond viewport
   7. <pre> / <code> blocks with long lines
   ============================================================ */

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
  max-width: 100%;
}

img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

pre, code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Aggressive word-breaking on every text-bearing element so long words
   (CPT codes, URLs, hospital names, plan names) NEVER cause horizontal scroll */
h1, h2, h3, h4, h5, h6,
p, li, td, th, dt, dd,
span, a, strong, em, label,
button, .button, .price,
.eyebrow, .microcopy, .hero-lede,
.feature-list li, .step-card h3, .step-card p,
.offer-card *, .blog-card *,
.doc-row *, .result-preview *,
.faq-grid * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Headlines specifically — allow hyphenation for nicer line-breaks */
h1, h2, h3, .hero-copy h1, .hero-copy h2 {
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Responsive heading scale on small screens — clamp keeps headings from
   being absurdly large on narrow viewports */
@media (max-width: 480px) {
  h1, .hero-copy h1 {
    font-size: clamp(1.65rem, 7.5vw, 2.5rem) !important;
    line-height: 1.15 !important;
  }
  h2, .hero-copy h2, .section-heading h2 {
    font-size: clamp(1.3rem, 6vw, 1.9rem) !important;
    line-height: 1.2 !important;
  }
  h3 {
    font-size: clamp(1.1rem, 5vw, 1.4rem);
    line-height: 1.25;
  }
  .price {
    font-size: clamp(1.4rem, 7vw, 2rem) !important;
  }
  /* Section bands — keep horizontal padding generous on phones */
  .section-band {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .nav-shell {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .step-grid,
  .blog-card-grid,
  .paid-grid,
  .faq-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  /* Trust strip at small widths — wrap instead of horizontal scroll */
  .trust-strip .trust-inner {
    flex-wrap: wrap !important;
    justify-content: flex-start;
    gap: 0.5rem;
  }
  .trust-strip .trust-inner span {
    font-size: 0.78rem;
    flex: 0 0 auto;
  }
}

/* Slightly larger but still narrow tablets — keep grids responsive */
@media (max-width: 720px) {
  .step-grid,
  .blog-card-grid,
  .paid-grid {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
  }
  /* Comparison tables can scroll horizontally instead of stacking */
  .comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .comparison-row {
    min-width: max-content;
  }
}

/* Code blocks within blog post bodies must wrap or scroll on mobile */
article.section-band .prose pre,
article.section-band .prose code {
  word-break: break-word;
  white-space: pre-wrap;
}

/* Defensive: any anchor with a long URL should not push layout */
a[href] {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ====================================================================
   v7.11 — global horizontal-scroll prevention + CPT search styling
   Root cause investigation:
   - Some descendant element (long URLs, wide grids, hero-panel transforms,
     comparison tables) was exceeding viewport width on mobile, causing
     the entire page to be horizontally scrollable.
   - Fix: clip horizontal overflow at html+body, ensure grid items can
     shrink below content width via min-width: 0, and keep all wide
     interactive elements (tables, code blocks) inside a scrollable
     wrapper rather than causing the page to scroll.
   ==================================================================== */

html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Allow grid items to shrink below their content width — prevents long words / URLs from forcing horizontal expansion */
.step-grid > *,
.blog-card-grid > *,
.paid-grid > *,
.faq-grid > *,
.hero-grid > *,
.content-grid > *,
.tool-grid > * {
  min-width: 0;
}

/* Defensive: any element with auto-fit grid columns must allow shrinking */
[style*="repeat(auto-fit"] > *,
[style*="repeat(auto-fill"] > * {
  min-width: 0;
}

/* Long inline content (URLs, codes, IDs) must wrap rather than expand the parent */
.prose code,
.prose a,
.prose pre,
.faq-grid p,
.faq-grid h3,
.step-card p,
.step-card h3,
.blog-card-body p,
.blog-card-body h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Hero panels — never wider than the column they sit in */
.hero-panel,
.document-visual,
.result-preview,
.tool-panel,
.output-shell,
.offer-card {
  max-width: 100%;
  box-sizing: border-box;
}

/* Tables that need horizontal scroll: scroll INSIDE a wrapper, not on the page */
.comparison-table,
.data-table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* CPT codes search bar */
.cpt-search-wrap {
  position: sticky;
  top: 72px;
  z-index: 10;
  background: var(--paper, #f7f8f4);
  border-bottom: 1px solid var(--line, rgba(20, 33, 31, 0.08));
  padding: 1rem 1.25rem;
  margin: -1.5rem -1.25rem 1.5rem;
}
.cpt-search-input {
  width: 100%;
  max-width: 720px;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--line-strong, rgba(20, 33, 31, 0.18));
  border-radius: 999px;
  background: var(--surface, #ffffff)
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6865' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E")
    no-repeat 1rem center / 1.1rem 1.1rem;
  color: var(--ink, #14211f);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.cpt-search-input:focus {
  outline: none;
  border-color: var(--teal, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}
.cpt-search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted-ink, #5d6865);
  font-size: 0.95rem;
}
.cpt-search-empty[hidden] { display: none; }

@media (max-width: 480px) {
  .cpt-search-wrap {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }
}

/* Each CPT code list item gets data attributes the search filter reads */
[data-cpt-code] { transition: opacity 100ms ease; }
[data-cpt-code][hidden] { display: none !important; }

/* Result count micro */
.cpt-search-count {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted-ink, #5d6865);
}

/* ============================================================
   v7.12 — May 7, 2026 Mobile Polish
   Fixes from production observation:
   1. Stats grid (.step-grid) was forced into N columns on phones
      because the 720px override used minmax(0, 1fr) — that lets
      ANY number of cards "fit" since min is 0px. Result: 4 stats
      → 4 squished 80px columns at 360px viewport, with each digit
      wrapping onto its own line.
   2. Global word-break: break-word + overflow-wrap: anywhere on
      every text element broke single words mid-character into
      "ur-gent" / "incom-plete" any time a column was narrow.
   3. hyphens: auto on h1/h2 added separator hyphens that made (2)
      visually worse.
   4. Hero copy max-width: 13ch at 900px squeezed headlines into
      ~120px columns on phones.
   5. Charts / iframes / wide tables didn't have a universal cap.
   ============================================================ */

/* 1. Step-grid + blog-card-grid + paid-grid actually stack when columns
      can't fit a real minimum width. Replaces the broken minmax(0, 1fr) */
@media (max-width: 720px) {
  .step-grid,
  .blog-card-grid,
  .paid-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 1rem !important;
  }
}

@media (max-width: 480px) {
  .step-grid,
  .blog-card-grid,
  .paid-grid,
  .faq-grid,
  .content-grid,
  .tool-grid,
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* Inline-style auto-fit grids on home page also need a sane minimum */
@media (max-width: 720px) {
  [style*="repeat(auto-fit"] {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  }
}

@media (max-width: 480px) {
  [style*="repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
}

/* 2. Headlines and prose text never break single words mid-character.
      Override the over-aggressive global rule that made every column
      a word-shredder. */
h1, h2, h3, h4, h5, h6,
.hero-copy h1, .hero-copy h2,
.section-heading h2,
.step-card h3, .step-card p,
.offer-card h3, .offer-card p,
.blog-card h3, .blog-card p,
.faq-grid h3, .faq-grid p,
.eyebrow, .microcopy, .hero-lede,
p, li, dt, dd, label, span, strong, em {
  overflow-wrap: break-word !important;
  word-break: normal !important;
  hyphens: manual !important;
  -webkit-hyphens: manual !important;
}

/* But genuinely long tokens (URLs, code blocks, CPT IDs) MUST wrap so
   they don't push the layout horizontal-scroll. Re-enable aggressive
   breaking only for those specific elements. */
.prose code, .prose pre, .prose a[href*="://"],
code, pre, kbd, samp,
.doc-row, .doc-row *,
.cpt-code-id,
[data-cpt-code] {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* 3. Hero h1/h2 sensible width on small viewports — let them use the
      full content column instead of being clamped to ~13 characters. */
@media (max-width: 900px) {
  h1 {
    max-width: none;
  }
  .hero-copy h1 {
    max-width: 22ch;
  }
  h2, .hero-copy h2 {
    max-width: none;
  }
}

@media (max-width: 480px) {
  h1, .hero-copy h1,
  h2, .hero-copy h2,
  .section-heading h2 {
    max-width: none !important;
  }
}

/* 4. Charts, embeds, iframes, video — never wider than container */
.chart-container,
.chart,
iframe,
embed,
object,
video,
canvas {
  max-width: 100% !important;
  height: auto;
}

iframe {
  width: 100%;
}

img, picture, figure {
  max-width: 100%;
  height: auto;
}

/* 5. Tables outside the .comparison-table system — wrap them in a
      horizontal-scroll container automatically. */
table:not(.comparison-table) {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
table:not(.comparison-table) th,
table:not(.comparison-table) td {
  white-space: normal;
}

/* 6. .trust-strip on home page — wrap items rather than scroll on phones */
@media (max-width: 720px) {
  .trust-strip .trust-inner {
    flex-wrap: wrap !important;
    justify-content: flex-start;
    gap: 0.6rem;
  }
  .trust-strip .trust-inner span {
    font-size: 0.78rem;
    flex: 0 0 auto;
    white-space: normal;
  }
}

/* 7. Hero panel doc-rows — don't let inline content blow the column.
      Also make doc-row text size scale a touch on phones for legibility. */
@media (max-width: 480px) {
  .doc-row {
    font-size: 0.82rem !important;
    padding: 0.5rem 0.7rem !important;
  }
  .document-visual {
    padding: 0.85rem !important;
  }
}

/* 8. Footer — don't horizontal-scroll the link rows on phones */
@media (max-width: 720px) {
  .site-footer .footer-links {
    flex-wrap: wrap !important;
    white-space: normal !important;
  }
}

/* ============================================================
   v7.14 — Mobile hero-panel overflow hardening
   Prevent nested document rows from forcing hero panels wider than
   the phone viewport on index-style pages such as /cpt-codes/.
   ============================================================ */
.hero-panel > *,
.document-visual > *,
.doc-topline > *,
.doc-row > * {
  min-width: 0;
}

.doc-topline,
.doc-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.doc-topline span:first-child,
.doc-row span:first-child {
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 480px) {
  body[data-page="cpt-index"] .doc-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body[data-page="cpt-index"] .doc-row span:last-child {
    white-space: normal;
    overflow-wrap: break-word;
  }
}

/* ==========================================================================
   Thank-you modal (post-checkout confirmation)
   Shown immediately on /?checkout=success&... so the customer sees a clear
   "your purchase succeeded, your email is on the way" message regardless of
   whether the inline pack-render path completes.
   ========================================================================== */
.bb-thankyou-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(20, 33, 31, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 220ms ease;
  font-family: var(--font-sans, "Geist", system-ui, sans-serif);
}

.bb-thankyou-overlay.bb-thankyou-open {
  opacity: 1;
}

.bb-thankyou-overlay.bb-thankyou-closing {
  opacity: 0;
}

.bb-thankyou-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(20, 33, 31, 0.25), 0 8px 20px rgba(20, 33, 31, 0.12);
  padding: 2rem 1.75rem 1.75rem;
  transform: translateY(12px) scale(0.98);
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
  color: #14211f;
}

.bb-thankyou-overlay.bb-thankyou-open .bb-thankyou-card {
  transform: translateY(0) scale(1);
}

.bb-thankyou-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(58, 135, 123, 0.12);
  color: #3a877b;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}

.bb-thankyou-title {
  font-family: var(--font-serif, "Geist", system-ui, sans-serif);
  text-align: center;
  font-size: 1.65rem;
  line-height: 1.15;
  margin: 0 0 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #14211f;
}

.bb-thankyou-lede {
  text-align: center;
  font-size: 1rem;
  line-height: 1.55;
  color: #3a4543;
  margin: 0 0 1.4rem;
}

.bb-thankyou-steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.bb-thankyou-steps li {
  background: #fcfaf5;
  border: 1px solid #efeae0;
  border-left: 3px solid #3a877b;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: #1f2c2a;
}

.bb-thankyou-steps li strong {
  color: #14211f;
}

.bb-thankyou-steps a {
  color: #3a877b;
  text-decoration: underline;
}

.bb-thankyou-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.bb-thankyou-close {
  min-width: 160px;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
}

.bb-thankyou-link {
  color: #5f6b6a;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 0.25rem 0;
}

.bb-thankyou-link:hover {
  color: #14211f;
  border-bottom-color: rgba(20, 33, 31, 0.25);
}

@media (max-width: 480px) {
  .bb-thankyou-card {
    padding: 1.5rem 1.1rem 1.25rem;
    border-radius: 14px;
  }
  .bb-thankyou-title {
    font-size: 1.4rem;
  }
  .bb-thankyou-lede {
    font-size: 0.95rem;
  }
  .bb-thankyou-steps li {
    font-size: 0.9rem;
    padding: 0.75rem 0.85rem;
  }
}
