/* AccessPatched — house styles.
   Identity: diff semantics (del = what the industry sells, ins = what we ship),
   engineering-paper background, monospace accents, focus visibility as a feature. */

:root {
  --paper: #f7fafc;
  --card: #ffffff;
  --ink: #0f2536;
  --muted: #46617a;
  --line: #d7e2ea;
  --add-bg: #dcf5e4;
  --add-ink: #135c33;
  --del-bg: #fbe3df;
  --del-ink: #8f2011;
  --accent: #147a3d;
  --accent-dark: #0f5e2f;
  --mark: #ffe066;
  --merged: #6f42c1;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(15, 37, 54, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 37, 54, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* ---------- Focus visibility is a feature, not an afterthought ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout primitives ---------- */
.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 4.5rem 0; }
section + section { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 0.75rem;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 750; margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 44rem; }

/* ---------- House diff style ---------- */
del {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--del-bg);
  color: var(--del-ink);
  text-decoration-color: var(--del-ink);
  text-decoration-thickness: 2px;
  padding: 0.05em 0.3em;
  border-radius: 4px;
  white-space: nowrap;
}
ins {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--add-bg);
  color: var(--add-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--add-ink);
  padding: 0.05em 0.3em;
  border-radius: 4px;
  white-space: nowrap;
}
mark {
  background: var(--mark);
  color: var(--ink);
  padding: 0.05em 0.25em;
  border-radius: 3px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 250, 252, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.wordmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .patched {
  background: var(--add-bg);
  color: var(--add-ink);
  border-bottom: 2px solid var(--add-ink);
  padding: 0.05em 0.25em;
  border-radius: 4px;
}
.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover { border-bottom-color: var(--accent); }
.site-nav a.btn-primary { color: #ffffff; padding-bottom: 0.75rem; }
.site-nav a.btn-primary:hover { border-bottom-color: var(--accent-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.3rem;
  border-radius: 8px;
  border: 2px solid var(--accent-dark);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--card); color: var(--accent-dark); }
.btn-secondary:hover { background: var(--add-bg); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(15, 37, 54, 0.12); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 4.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
}
@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-note {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.1rem;
}

/* ---------- PR card (hero visual) ---------- */
.pr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 37, 54, 0.1);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.85rem;
  position: relative;
}
.pr-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.pr-branch {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
}
.pr-state {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
}
.anim .pr-state {
  animation: merged-flip 0.5s ease 5.2s both;
}
@keyframes merged-flip {
  0% { background: var(--accent); transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { background: var(--merged); transform: scale(1); }
}
.anim .pr-state::after { content: ""; }
.pr-state[data-final]::after { content: ""; }

.pr-diff { padding: 0.9rem 0; line-height: 1.9; }
.pr-diff .row { padding: 0 1rem; white-space: pre-wrap; word-break: break-word; }
.pr-diff .del-row { background: var(--del-bg); color: var(--del-ink); }
.pr-diff .add-row { background: var(--add-bg); color: var(--add-ink); }
.pr-diff .ctx-row { color: var(--muted); }
.anim .pr-diff .row { clip-path: inset(0 100% 0 0); animation: line-in 0.4s ease forwards; }
.anim .pr-diff .row:nth-child(1) { animation-delay: 0.6s; }
.anim .pr-diff .row:nth-child(2) { animation-delay: 1.3s; }
.anim .pr-diff .row:nth-child(3) { animation-delay: 2.0s; }
.anim .pr-diff .row:nth-child(4) { animation-delay: 2.7s; }
.anim .pr-diff .row:nth-child(5) { animation-delay: 3.4s; }
@keyframes line-in {
  to { clip-path: inset(0 -2% 0 0); }
}

.pr-checks {
  border-top: 1px solid var(--line);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.check {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  color: var(--add-ink);
  background: var(--add-bg);
}
.anim .check { clip-path: inset(0 100% 0 0); animation: line-in 0.35s ease forwards; }
.anim .check:nth-child(1) { animation-delay: 4.0s; }
.anim .check:nth-child(2) { animation-delay: 4.4s; }
.anim .check:nth-child(3) { animation-delay: 4.8s; }

@media (prefers-reduced-motion: reduce) {
  .anim .pr-diff .row, .anim .check { clip-path: none; animation: none; }
  .anim .pr-state { animation: none; background: var(--merged); }
}

/* ---------- Annotation stats ---------- */
.annotations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
@media (max-width: 56rem) { .annotations { grid-template-columns: 1fr; } }
.annotation {
  border-left: 3px solid var(--mark);
  padding-left: 1rem;
  font-size: 0.98rem;
}
.annotation strong { font-size: 1.5rem; display: block; font-family: var(--mono); }
.annotation .src { font-size: 0.82rem; color: var(--muted); display: block; margin-top: 0.2rem; }

/* ---------- Screen reader demo ---------- */
.sr-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (max-width: 56rem) { .sr-demo { grid-template-columns: 1fr; } }
.sr-pane {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
}
.sr-pane h3 { font-family: var(--mono); font-size: 0.95rem; }
.sr-pane.broken h3 { color: var(--del-ink); }
.sr-pane.fixed h3 { color: var(--add-ink); }
.sr-transcript {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
}
.sr-transcript li {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.45rem;
}
.sr-pane.broken .sr-transcript li { background: var(--del-bg); color: var(--del-ink); }
.sr-pane.fixed .sr-transcript li { background: var(--add-bg); color: var(--add-ink); }

/* ---------- Cards row (the three things you can buy) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.cards.four { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 56rem) { .cards, .cards.four { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
}
.card .price { font-family: var(--mono); color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.card ul { padding-left: 1.1rem; margin: 0 0 1rem; }
.card li { margin-bottom: 0.5rem; }
.card .verdict {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
}
.card.us { border: 2px solid var(--accent); box-shadow: 0 8px 24px rgba(20, 122, 61, 0.12); }

/* ---------- Process ---------- */
.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.6rem 1.4rem 4.4rem;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.3rem;
  top: 1.35rem;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps .free-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--mark);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* ---------- Enforcement table ---------- */
.enf-table-scroll { overflow-x: auto; margin-top: 1.5rem; }
table.enf {
  border-collapse: collapse;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.95rem;
  min-width: 40rem;
}
table.enf th, table.enf td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.enf th { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.enf tr:last-child td { border-bottom: none; }
.honesty {
  margin-top: 1.5rem;
  background: var(--card);
  border-left: 4px solid var(--mark);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
}

/* ---------- Illustrations (decorative, aria-hidden, reduced-motion safe) ---------- */

/* Screen-reader transcript lines type in like live captions */
.sr-transcript li { clip-path: inset(0 100% 0 0); animation: line-in 0.5s ease forwards; }
.sr-transcript li:nth-child(1) { animation-delay: 0.2s; }
.sr-transcript li:nth-child(2) { animation-delay: 0.7s; }
.sr-transcript li:nth-child(3) { animation-delay: 1.2s; }
.sr-transcript li:nth-child(4) { animation-delay: 1.7s; }
.sr-transcript li:nth-child(5) { animation-delay: 2.2s; }

/* Keyboard demo: focus ring cycles through three controls */
.tab-demo {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}
.tab-demo .td-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.td-el {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  position: relative;
}
.td-el::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 3px solid var(--accent);
  border-radius: 11px;
  opacity: 0;
}
.td-el:nth-child(1)::after { animation: td-focus 6s infinite; }
.td-el:nth-child(2)::after { animation: td-focus 6s infinite 2s; }
.td-el:nth-child(3)::after { animation: td-focus 6s infinite 4s; }
@keyframes td-focus {
  0%, 30% { opacity: 1; }
  33%, 100% { opacity: 0; }
}
.td-key {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  background: var(--card);
  animation: td-press 2s infinite;
}
@keyframes td-press {
  0%, 84%, 100% { transform: none; }
  90% { transform: translateY(2px); }
}

/* Card thumbs */
.thumb { height: 96px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); position: relative; overflow: hidden; margin-bottom: 1.2rem; }
.thumb .bar { position: absolute; left: 14px; right: 14px; height: 9px; border-radius: 4px; }
.th-overlay .bar { background: var(--del-bg); }
.th-overlay .bar:nth-child(1) { top: 18px; }
.th-overlay .bar:nth-child(2) { top: 40px; right: 40%; }
.th-overlay .bar:nth-child(3) { top: 62px; right: 25%; }
.th-overlay .widget {
  position: absolute; right: 12px; top: 26px; width: 40px; height: 40px;
  background: #ffffff; border: 2px solid var(--line); border-radius: 50%;
  box-shadow: 0 4px 10px rgba(15,37,54,0.15);
  animation: bob 3.2s ease-in-out infinite;
}
.th-overlay .widget::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--del-bg); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.th-pdf .page {
  position: absolute; width: 58px; height: 72px; background: #fff; border: 1px solid var(--line); border-radius: 4px;
}
.th-pdf .page:nth-child(1) { left: 20px; top: 16px; transform: rotate(-6deg); }
.th-pdf .page:nth-child(2) { left: 36px; top: 12px; transform: rotate(-2deg); }
.th-pdf .page:nth-child(3) { left: 52px; top: 10px; transform: rotate(3deg); animation: shuffle 5s ease-in-out infinite; }
.th-pdf .page::before, .th-pdf .page::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 5px; border-radius: 2px; background: var(--del-bg);
}
.th-pdf .page::before { top: 12px; }
.th-pdf .page::after { top: 24px; right: 20px; }
@keyframes shuffle { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(7deg) translateY(-3px); } }
.th-us .bar { height: 12px; }
.th-us .bar.old { top: 22px; background: var(--del-bg); }
.th-us .bar.old::after { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--del-ink); }
.th-us .bar.new { top: 48px; background: var(--add-bg); clip-path: inset(0 100% 0 0); animation: grow-in 4.5s ease infinite; }
@keyframes grow-in { 0% { clip-path: inset(0 100% 0 0); } 30%, 85% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); } }
.th-us .dot {
  position: absolute; right: 14px; top: 40px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--merged); animation: pop 4.5s ease infinite;
}
@keyframes pop { 0%, 30% { transform: scale(0); } 42%, 100% { transform: scale(1); } }

/* Step illustrations */
.steps li { display: grid; grid-template-columns: 1fr 170px; gap: 1.5rem; align-items: center; }
@media (max-width: 44rem) { .steps li { grid-template-columns: 1fr; } .step-illo { display: none; } }
.step-illo { height: 104px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); position: relative; overflow: hidden; }
.step-illo .row-line { position: absolute; left: 14px; right: 14px; height: 8px; border-radius: 4px; background: var(--line); }
.step-illo .row-line:nth-child(1) { top: 20px; }
.step-illo .row-line:nth-child(2) { top: 42px; right: 34%; }
.step-illo .row-line:nth-child(3) { top: 64px; right: 22%; }
.illo-scan .sweep {
  position: absolute; top: 0; bottom: 0; width: 34px;
  background: linear-gradient(90deg, transparent, rgba(20, 122, 61, 0.22), transparent);
  animation: sweep 2.8s linear infinite;
}
@keyframes sweep { from { left: -40px; } to { left: 110%; } }
.illo-audit .tick {
  position: absolute; left: 14px; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--line); background: #fff;
}
.illo-audit .tick:nth-child(1) { top: 17px; }
.illo-audit .tick:nth-child(2) { top: 44px; }
.illo-audit .tick:nth-child(3) { top: 71px; }
.illo-audit .tick { animation: tick 6s infinite; }
.illo-audit .tick:nth-child(2) { animation-delay: 1s; }
.illo-audit .tick:nth-child(3) { animation-delay: 2s; }
@keyframes tick {
  0%, 15% { background: #fff; border-color: var(--line); }
  25%, 90% { background: var(--accent); border-color: var(--accent); }
  100% { background: var(--accent); border-color: var(--accent); }
}
.illo-audit .row-line { left: 40px; }
.illo-patch .patch-bar { position: absolute; left: 14px; right: 14px; height: 14px; border-radius: 4px; }
.illo-patch .patch-bar.minus { top: 26px; background: var(--del-bg); }
.illo-patch .patch-bar.plus { top: 56px; background: var(--add-bg); clip-path: inset(0 100% 0 0); animation: grow-in 5s ease infinite; }
.illo-prove .doc {
  position: absolute; left: 24px; top: 14px; width: 62px; height: 76px;
  background: #fff; border: 1px solid var(--line); border-radius: 5px;
}
.illo-prove .doc::before, .illo-prove .doc::after {
  content: ""; position: absolute; left: 9px; right: 9px; height: 6px; border-radius: 3px; background: var(--line);
}
.illo-prove .doc::before { top: 14px; }
.illo-prove .doc::after { top: 28px; right: 22px; }
.illo-prove .seal {
  position: absolute; right: 26px; bottom: 18px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); animation: pop 5s ease infinite;
}
.illo-prove .seal::after {
  content: ""; position: absolute; left: 9px; top: 10px; width: 14px; height: 8px;
  border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .sr-transcript li { clip-path: none; animation: none; }
  .td-el:nth-child(1)::after { animation: none; opacity: 1; }
  .td-el:nth-child(2)::after, .td-el:nth-child(3)::after { animation: none; }
  .td-key, .th-overlay .widget, .th-pdf .page:nth-child(3), .illo-scan .sweep { animation: none; }
  .th-us .bar.new, .illo-patch .patch-bar.plus { animation: none; clip-path: none; }
  .th-us .dot, .illo-prove .seal { animation: none; transform: scale(1); }
  .illo-audit .tick { animation: none; background: var(--accent); border-color: var(--accent); }
}

/* ---------- Trust ---------- */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
@media (max-width: 56rem) { .trust-grid { grid-template-columns: 1fr; } }
.self-audit {
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
}
.self-audit .badge-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-top: 0.9rem;
}
.self-audit .badge-row span {
  background: var(--add-bg);
  color: var(--add-ink);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 0.9rem;
  padding: 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 1.1rem 1.4rem;
  border-radius: 10px;
}
.faq summary:hover { background: var(--paper); }
.faq details[open] summary { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.faq .a { padding: 1rem 1.4rem 1.2rem; }
.faq .a p:last-child { margin-bottom: 0; }

/* ---------- Final CTA + footer ---------- */
.final-cta { text-align: center; }
.final-cta .btn { margin-top: 1rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer .cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.site-footer h2 { font-size: 0.85rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--ink); }
.footer-legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px dashed var(--line); }
.footer-wit { font-family: var(--mono); font-size: 0.82rem; margin-top: 0.75rem; }

/* ---------- Scan request form (scan.html) ---------- */
.scan-intro { max-width: 46rem; }
.scan-expect {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin-top: 2rem;
  max-width: 46rem;
}
.scan-expect h2 { font-size: 1.05rem; font-family: var(--mono); }
.scan-expect ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.scan-expect li { margin-bottom: 0.5rem; }
.scan-form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem 2rem 1.6rem;
  margin-top: 2rem;
  max-width: 46rem;
}
.field { margin-bottom: 1.5rem; }
.field > label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.field .hint { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.55rem; }
.field input[type="url"],
.field input[type="email"],
.field input[type="text"],
.field select {
  width: 100%;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.field select { appearance: auto; }
.field input:focus-visible,
.field select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.field input[aria-invalid="true"] { border-color: var(--del-ink); }
.field-error {
  color: var(--del-ink);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.45rem 0 0;
}
.consent-row { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
.consent-row input[type="checkbox"] {
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}
.consent-row label { font-weight: 500; margin: 0; }
.hp { display: none; }
.form-status {
  font-family: var(--mono);
  font-size: 0.92rem;
  margin: 1rem 0 0;
  min-height: 1.5em;
  color: var(--muted);
}
.form-status.is-error { color: var(--del-ink); font-weight: 600; }
.form-smallprint { font-size: 0.85rem; color: var(--muted); margin-top: 1.25rem; }
.form-success {
  display: none;
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin-top: 2rem;
  max-width: 46rem;
}
.form-success:target,
.form-success.show { display: block; }
.form-success h2 { color: var(--accent-dark); }

/* ---------- Legal / subpage layout ---------- */
.subpage main { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem 5rem; }
.subpage h1 { font-size: 2rem; }
.subpage h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.subpage .updated { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.subpage main a { color: var(--accent-dark); }

/* ---------- Global overflow safety ---------- */
img, svg, video, canvas { max-width: 100%; height: auto; }
.enf-table-scroll { max-width: 100%; }

/* ---------- Phone pass (<= 40rem) ---------- */
@media (max-width: 40rem) {
  /* Root cause of the mobile zoom-out: the 40rem min-width table. Let it fit + wrap. */
  table.enf { min-width: 0; font-size: 0.9rem; }
  table.enf th, table.enf td { padding: 0.6rem 0.7rem; }

  /* Condensed header: keep the wordmark + the primary CTA, drop in-page anchor links */
  .site-nav ul li:not(:last-child) { display: none; }
  .site-header .wrap { gap: 0.75rem; }

  /* Diff chips wrap instead of forcing page width */
  del, ins { white-space: normal; }

  /* Tighter vertical rhythm and fluid headings on phones */
  section { padding: 3rem 0; }
  .hero { padding: 2.5rem 0; }
  h1 { font-size: clamp(1.9rem, 7.5vw, 2.4rem); }
  h2 { font-size: clamp(1.5rem, 6vw, 1.9rem); }
  .lede { font-size: 1.08rem; }

  /* Cards/steps/PR card comfortable on small screens */
  .pr-card { font-size: 0.78rem; }
  .card, .tier, .sr-pane, .tab-demo, .honesty, .self-audit { padding: 1.25rem; }
  .steps li { padding: 1.2rem 1.2rem 1.2rem 3.6rem; }
  .steps li::before { left: 1rem; top: 1.15rem; }

  /* Buttons go full-width and stack for easy thumb taps */
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { text-align: center; }
}

/* ===================== Free-scan flow (scan.html) ===================== */
.scan-section { padding: 4rem 0 3rem; }
.scan-wrap { max-width: 52rem; }
.scan-stage[tabindex] { outline: none; }

/* Stage 1: entry */
.scan-entry { margin-top: 1.75rem; }
.scan-entry-row { display: flex; gap: 0.75rem; }
.scan-entry-row input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 1rem;
  padding: 0.85rem 1rem; border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.scan-entry-row input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.scan-entry-row .btn { flex: 0 0 auto; white-space: nowrap; }
.hint { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin: 0.6rem 0 0; }
.scan-error { color: var(--del-ink); background: var(--del-bg); border-radius: 6px; padding: 0.6rem 0.8rem; margin: 0.75rem 0 0; font-size: 0.92rem; }

/* Stage 2: scanning */
#stage-scanning { text-align: center; padding: 2rem 0; }
.scanner { max-width: 30rem; margin: 0 auto 2rem; }
.scanner-viewport {
  position: relative; height: 150px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); overflow: hidden; box-shadow: 0 10px 30px rgba(15,37,54,0.08);
}
.scanner-line { position: absolute; left: 18px; height: 12px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); }
.scanner-line.l1 { top: 24px; right: 18px; }
.scanner-line.l2 { top: 52px; right: 40%; }
.scanner-line.l3 { top: 80px; right: 22%; }
.scanner-line.l4 { top: 108px; right: 55%; }
.scanner-sweep {
  position: absolute; top: 0; bottom: 0; width: 60px; left: -60px;
  background: linear-gradient(90deg, transparent, rgba(20,122,61,0.28), transparent);
  animation: scan-sweep 1.8s linear infinite;
}
@keyframes scan-sweep { to { left: 110%; } }
.scanning-title { margin-bottom: 0.5rem; }
.scanning-status { font-family: var(--mono); color: var(--accent-dark); min-height: 1.5em; font-size: 0.98rem; }
@media (prefers-reduced-motion: reduce) { .scanner-sweep { animation: none; left: 40%; opacity: 0.5; } }

/* Stage 3: results */
.result-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin: 1.5rem 0; }
.count { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 0.75rem; text-align: center; border-top: 4px solid var(--line); }
.count-critical { border-top-color: #8f2011; }
.count-serious { border-top-color: #b25a00; }
.count-moderate { border-top-color: #46617a; }
.count-minor { border-top-color: #7c8ea0; }
.count-n { display: block; font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1; }
.count-l { display: block; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 0.4rem; }
.result-sub { margin-top: 1.75rem; }
.result-preview { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.result-preview .pv { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.sev { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 999px; margin-right: 0.5rem; white-space: nowrap; }
.sev-critical { background: #fbe3df; color: #8f2011; }
.sev-serious { background: #fbeadb; color: #8a4b00; }
.sev-moderate { background: #eef2f5; color: #3c556b; }
.sev-minor { background: #eef2f5; color: #3c556b; }
.pv-wcag { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

/* Stage 3: the locked / gated section. The gate sits in normal flow (so it never
   clips), with the blurred placeholder rows as an absolute backdrop behind it. */
.result-locked { position: relative; margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.locked-rows { position: absolute; inset: 0; padding: 1.25rem; filter: blur(6px); user-select: none; pointer-events: none; }
.locked-row { display: grid; grid-template-columns: 1fr; gap: 0.5rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.lr-title { height: 12px; width: 40%; background: var(--add-bg); border-radius: 4px; }
.lr-body { height: 10px; width: 92%; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.lock-gate {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 2.5rem 1.5rem; background: rgba(247, 250, 252, 0.94);
}
.lock-headline { font-weight: 750; font-size: 1.15rem; max-width: 34rem; margin: 0 0 0.5rem; }
.lock-sub { color: var(--muted); max-width: 34rem; margin: 0 0 1.25rem; }
.gate-form { width: 100%; max-width: 26rem; }
.gate-form input[type="email"] { width: 100%; font-family: var(--mono); font-size: 1rem; padding: 0.8rem 1rem; border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.gate-form input[type="email"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.gate-consent { display: flex; gap: 0.6rem; text-align: left; margin: 0.9rem 0; font-size: 0.9rem; }
.gate-consent input { margin-top: 0.2rem; flex: 0 0 auto; }
.gate-form .btn { width: 100%; text-align: center; }

/* Stage 4: sent */
#stage-sent { text-align: center; padding: 2rem 0; }
.sent-check { width: 64px; height: 64px; margin: 0 auto 1.25rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 2rem; line-height: 64px; }

/* Scan flow — phone */
@media (max-width: 40rem) {
  .scan-entry-row { flex-direction: column; }
  .scan-entry-row .btn { width: 100%; text-align: center; }
  .result-counts { grid-template-columns: repeat(2, 1fr); }
  .count-n { font-size: 1.7rem; }
  .lock-gate { padding: 1.5rem 1rem; }
}

/* Keep the sticky header from overlapping revealed scan stages */
.scan-stage { scroll-margin-top: 5rem; }

/* ===================== Storefront before/after (index) ===================== */
/* One product on the left, its before/after callouts on the right; rotates. */
.sf-stage { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 2.5rem; align-items: start; margin-top: 2rem; }
@media (max-width: 52rem) { .sf-stage { grid-template-columns: 1fr; gap: 1.75rem; } }

.sf-card { background: var(--card); border: 2px solid var(--accent); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 34px rgba(20,122,61,0.12); max-width: 24rem; }
@media (max-width: 52rem) { .sf-card { margin-inline: auto; } }
.sf-photo { position: relative; aspect-ratio: 1 / 1; background: #eef4fa; }
.sf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-info { padding: 1rem 1.15rem 1.25rem; }
.sf-name { font-weight: 700; font-size: 1.1rem; }
.sf-price { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; margin: 0.2rem 0 0.85rem; position: relative; display: inline-block; }
.sf-buy { position: relative; display: block; text-align: center; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 0.92rem; font-weight: 600; padding: 0.7rem 1rem; border-radius: 8px; }
.sf-marker { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--card); z-index: 2; }
.sf-photo .m1 { top: 10px; left: 10px; }
.sf-price .m3 { top: -8px; right: -26px; }
.sf-buy .m2 { top: -9px; right: -9px; }

/* Callouts (stacked on the right) */
.sf-callouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.sf-callout { display: grid; grid-template-columns: 34px 1fr; gap: 0.9rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem; align-content: start; }

/* Rotator controls */
.sf-controls { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.sf-dots { display: flex; gap: 0.5rem; }
.sf-dot { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid var(--muted); background: transparent; cursor: pointer; }
.sf-dot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.sf-dot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sf-toggle { font-family: var(--mono); font-size: 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.7rem; cursor: pointer; color: var(--ink); }
.sf-toggle:hover { background: var(--paper); }
.sf-num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 700; display: grid; place-items: center; }
.sf-el { font-weight: 700; margin-bottom: 0.5rem; }
.sf-hear { margin: 0.25rem 0; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.sf-lab { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); flex: 0 0 auto; min-width: 4.8rem; }
.sf-foot { margin-top: 2rem; font-size: 1.05rem; font-weight: 600; }

/* Scan-page "what it is / isn't" — 2-up, accented, tighter */
.scan-explainer .wrap { max-width: 54rem; }
.scan-explainer-cards { grid-template-columns: 1fr 1fr; }
@media (max-width: 40rem) { .scan-explainer-cards { grid-template-columns: 1fr; } }
.scan-is { border-top: 4px solid var(--accent); }
.scan-isnt { border-top: 4px solid var(--muted); }
.scan-is ul, .scan-isnt ul { list-style: none; padding: 0; margin: 0; }
.scan-is li, .scan-isnt li { position: relative; padding-left: 1.7rem; margin-bottom: 0.8rem; }
.scan-is li:last-child, .scan-isnt li:last-child { margin-bottom: 0; }
.scan-is li::before { content: "✓"; position: absolute; left: 0; top: -0.05em; color: var(--accent-dark); font-weight: 800; }
.scan-isnt li::before { content: "✕"; position: absolute; left: 0; top: -0.05em; color: var(--del-ink); font-weight: 800; }
