/* Store Fixers — shared styles */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/atkinson-mono.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f3f6f5;
  --surface: #ffffff;
  --ink: #0e3b43;
  --ink-soft: #3d5b60;
  --line: #c9d6d4;
  --marker: #ffd84d;
  --fixed: #17663f;
  --fixed-bg: #e3f3ea;
  --removed: #a4262c;
  --removed-bg: #fbe9e9;

  --font: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Consolas, monospace;

  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.5rem + 3.6vw, 3.9rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
}

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

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: var(--step-1); font-weight: 700; }

p, li, dd { max-width: 66ch; }
p { margin: 0 0 1em; }

a { color: var(--ink); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--marker);
  border-radius: 2px;
}

code { font-family: var(--mono); font-size: 0.92em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  background: var(--marker);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-weight: 700;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark svg { flex: none; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a { text-decoration: none; padding-block: 0.4rem; display: inline-block; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 0.12em; }

/* Buttons */
.button {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  text-align: center;
}
.button--primary { background: var(--ink); color: #fff; }
.button--primary:hover { background: #082a30; }
.button--quiet { background: transparent; color: var(--ink); }
.button--quiet:hover { background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section__intro { margin-bottom: 2.5rem; }
.section__intro p { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.5; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }

/* Hero */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { max-width: 13ch; }
.hero .lede { max-width: 40ch; }

/* Diff panel: the signature element */
.diff {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(14, 59, 67, 0.45);
  margin: 0;
}
.diff__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.diff__bar code { color: var(--ink); font-weight: 700; }
.diff__body { padding: 0.5rem 0; }
.fix { padding: 0.65rem 1rem 0.85rem; }
.fix + .fix { border-top: 1px dashed var(--line); }
.fix pre {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.fix .del,
.fix .add { display: block; padding: 0.1rem 0.5rem 0.1rem 1.6rem; position: relative; border-radius: 3px; }
.fix .del { background: var(--removed-bg); color: var(--removed); text-decoration: line-through; text-decoration-thickness: 1px; }
.fix .add { background: var(--fixed-bg); color: var(--fixed); margin-top: 0.2rem; }
.fix .del::before,
.fix .add::before { position: absolute; left: 0.5rem; font-weight: 700; text-decoration: none; }
.fix .del::before { content: "−"; }
.fix .add::before { content: "+"; }
.fix .add mark {
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 85% / 100% 0.55em;
  color: inherit;
  padding: 0 0.05em;
}
.fix figcaption,
.fix p.note { margin: 0; font-size: var(--step--1); color: var(--ink); max-width: none; }
.fix .note strong { font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .diff .add mark { animation: mark-in 0.7s cubic-bezier(.3,.7,.3,1) both; }
  .diff .fix:nth-child(1) .add mark { animation-delay: 0.5s; }
  .diff .fix:nth-child(2) .add mark { animation-delay: 0.9s; }
  .diff .fix:nth-child(3) .add mark { animation-delay: 1.3s; }
}
@keyframes mark-in {
  from { background-size: 0% 0.55em; }
  to { background-size: 100% 0.55em; }
}

/* Two-column text block */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.figure-stat {
  font-size: clamp(4rem, 3rem + 5vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 0.75rem;
}
.source { font-size: var(--step--1); color: var(--ink-soft); }

/* Issue list */
.issues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0 3rem;
  margin: 0;
}
.issues div { padding-block: 1.1rem; border-top: 2px solid var(--ink); }
.issues dt { font-weight: 700; font-size: var(--step-1); line-height: 1.3; margin-bottom: 0.3rem; }
.issues dd { margin: 0; color: var(--ink-soft); }

/* Steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  max-width: none;
}
.steps li::before {
  content: counter(step);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--ink);
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* Pricing as rows, not identical cards */
.prices { border-top: 2px solid var(--ink); }
.price {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto;
  gap: 1rem 2.5rem;
  align-items: start;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.price h3 { margin: 0 0 0.15rem; }
.price__amount { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.price__amount small { font-size: var(--step-0); font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }
.price ul { margin: 0; padding-left: 1.1rem; }
.price li { margin-bottom: 0.3rem; }
.price .button { white-space: nowrap; align-self: center; }
.price--featured { background: var(--surface); margin-inline: calc(var(--gutter) * -0.5); padding-inline: calc(var(--gutter) * 0.5); border-radius: 8px; border-bottom-color: transparent; box-shadow: inset 4px 0 0 var(--marker); }
.price-note { margin-top: 1.25rem; font-size: var(--step--1); color: var(--ink-soft); }

/* Honesty band: the one dark section */
.band { background: var(--ink); color: #fff; }
.band a { color: #fff; }
.band :focus-visible { outline-color: var(--marker); box-shadow: none; }
.band .section__intro p,
.band .lede { color: #d5e4e2; }
.band h2 { max-width: 18ch; }
.promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.promise li { padding-left: 1.6rem; position: relative; }
.promise li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.7rem; height: 0.7rem; background: var(--marker); border-radius: 2px; }
.section.band + .section { border-top: 0; }

/* FAQ */
.faq { border-top: 2px solid var(--ink); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.35;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.95rem;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 1.25rem; color: var(--ink-soft); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Closing call to action */
.closer { text-align: left; }
.closer h2 { max-width: 20ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: var(--step--1); color: var(--ink-soft); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem 3rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.site-footer a { color: var(--ink); }
.site-footer p { margin: 0 0 0.5rem; }
.site-footer address { font-style: normal; }

/* Long-form pages (legal, contact, statement) */
.page { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.page h1 { font-size: var(--step-3); max-width: 22ch; }
.prose { max-width: 44rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2.25rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35rem; }
.updated { color: var(--ink-soft); font-size: var(--step--1); }

/* Sample report */
.report-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: end; }
.notice {
  background: var(--surface);
  border-left: 4px solid var(--marker);
  padding: 0.9rem 1.1rem;
  margin: 0 0 2rem;
  max-width: 44rem;
}
.notice p { margin: 0; }
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); margin: 0; }
.totals div { padding: 1rem 1rem 1rem 0; }
.totals div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.totals dt { font-size: var(--step--1); color: var(--ink-soft); }
.totals dd { margin: 0; font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.table-wrap { overflow-x: auto; margin-block: 1rem 0.5rem; }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 36rem; }
caption { text-align: left; font-weight: 700; font-size: var(--step-0); padding-bottom: 0.6rem; }
th, td { text-align: left; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.finding { margin-block: 2.5rem; }
.finding .diff { max-width: 46rem; }
.manual { padding-left: 1.25rem; }
.manual li { margin-bottom: 0.6rem; }

@media (max-width: 56rem) {
  .hero .wrap, .split, .report-head { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
  .price { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .price .button { justify-self: start; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  .totals { grid-template-columns: minmax(0, 1fr); }
  .totals div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .steps li { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.9rem; }
}
