/* Layout: a receipt on a cool paper ground. One bold move: the highlighter
   swipe that marks a duplicate line. Everything else stays quiet. */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #18202e;
  --muted: #586274;
  --line: #dde2ea;
  --mark: #ffe14d;
  --on-mark: #1b1b14;
  --focus: #2f5bd3;

  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Public Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.2rem, 5.5vw, 3.6rem);
  --radius: 10px;
  --wrap: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131b;
    --surface: #171e2a;
    --ink: #e7ebf1;
    --muted: #9aa4b5;
    --line: #283244;
    --mark: #f5d63d;
    --focus: #8fb0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e131b;
  --surface: #171e2a;
  --ink: #e7ebf1;
  --muted: #9aa4b5;
  --line: #283244;
  --mark: #f5d63d;
  --focus: #8fb0ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-3); font-weight: 700; }
h2 { font-size: var(--step-2); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.prose { max-width: 66ch; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mark {
  background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 88%, transparent 88%);
  color: var(--on-mark);
  padding-inline: 0.15em;
  border-radius: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand svg { flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: var(--step--1); }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  padding-block: 72px 80px;
}
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-copy .lede { font-size: var(--step-1); color: var(--muted); max-width: 34ch; line-height: 1.45; }
.hero-note { font-size: var(--step--1); color: var(--muted); }

/* The receipt */
.receipt {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  padding: 26px 24px 34px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(10, 20, 40, 0.35);
  transform: rotate(1.5deg);
  font-variant-numeric: tabular-nums;
}
.receipt::after {
  /* torn zigzag bottom edge */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -10px;
  height: 10px;
  background:
    linear-gradient(-45deg, transparent 7px, var(--surface) 0) 0 0 / 14px 10px repeat-x,
    linear-gradient(45deg, transparent 7px, var(--surface) 0) 0 0 / 14px 10px repeat-x;
}
.receipt header { text-align: center; margin-bottom: 14px; }
.receipt header strong { display: block; font-size: 0.95rem; letter-spacing: 0.06em; }
.receipt .meta { color: var(--muted); }
.receipt ol { list-style: none; margin: 0; padding: 0; }
.receipt li, .receipt .row { display: flex; justify-content: space-between; gap: 12px; }
.receipt .sub { color: var(--muted); padding-left: 1.2em; }
.receipt hr { border: 0; border-top: 1px dashed var(--line); margin: 10px 0; }
.receipt .total { font-weight: 600; font-size: 0.95rem; }
.receipt .dupe {
  position: relative;
  color: var(--on-mark);
  background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 50% / 100% 80%;
  margin-inline: -6px;
  padding-inline: 6px;
  animation: swipe 0.9s 0.4s cubic-bezier(.6,.1,.2,1) both;
}
.receipt .flag-row { justify-content: flex-end; margin-block: 2px 4px; }
.flag {
  transform: rotate(-2deg);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--ink);
  color: var(--bg);
  padding: 2px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
@keyframes swipe {
  from { background-size: 0% 80%; }
  to { background-size: 100% 80%; }
}
@media (prefers-reduced-motion: reduce) {
  .receipt .dupe { animation: none; }
}

/* Sections */
.section { padding-block: 72px; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 36px; max-width: 60ch; }
.section-head p { color: var(--muted); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.steps li { display: grid; gap: 8px; align-content: start; counter-increment: step; }
.steps li::before {
  content: "Step " counter(step);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}
.steps p { color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.split > * { min-width: 0; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.facts li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.facts li:first-child { border-top: 1px solid var(--line); }
.facts dt, .facts .k { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); padding-top: 2px; }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* FAQ */
.page-head { padding-block: 64px 24px; display: grid; gap: 14px; }
.page-head p { color: var(--muted); max-width: 60ch; }
.faq { display: grid; gap: 0; max-width: 760px; padding-bottom: 72px; }
.faq h2 { font-size: var(--step-1); margin: 40px 0 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 36px 18px 0;
  position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--muted);
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 20px; color: var(--muted); display: grid; gap: 12px; max-width: 66ch; }

/* Blog */
.post-list { list-style: none; margin: 0; padding: 0 0 72px; display: grid; max-width: 760px; }
.post-list li { border-top: 1px solid var(--line); padding-block: 26px; display: grid; gap: 8px; }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list a { text-decoration: none; }
.post-list a:hover h2 { text-decoration: underline; }
.post-list h2 { font-size: var(--step-1); }
.post-list p { color: var(--muted); }
time, .byline { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }

.article { padding-block: 56px 80px; }
.article header { display: grid; gap: 14px; margin-bottom: 32px; }
.article .body { display: grid; gap: 18px; }
.article .body h2 { font-size: var(--step-1); margin-top: 22px; }
.article .body ul, .article .body ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.article .callout {
  border-left: 3px solid var(--mark);
  background: var(--surface);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px 48px; font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 48px 64px; }
  .steps, .split { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: 56px; }
}
@media (max-width: 480px) {
  .site-header .wrap { flex-wrap: wrap; }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Blog: short answer, CTA, related, breadcrumbs */
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.answer {
  display: grid;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--mark);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin-bottom: 32px;
}
.answer p:last-child { font-size: 1.06rem; }
.app-cta {
  margin-top: 48px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.app-cta > div { display: grid; gap: 6px; min-width: 0; flex: 1 1 280px; }
.app-cta h2 { font-size: var(--step-1); }
.app-cta p { color: var(--muted); }
.related { margin-top: 40px; display: grid; gap: 12px; }
.related h2 { font-size: var(--step-1); }
.related ul, .guide-list { list-style: none; margin: 0; padding: 0; display: grid; }
.related li, .guide-list li { border-top: 1px solid var(--line); }
.related li:last-child, .guide-list li:last-child { border-bottom: 1px solid var(--line); }
.related a, .guide-list a { display: block; padding-block: 14px; text-decoration: none; font-weight: 600; }
.related a:hover, .guide-list a:hover { text-decoration: underline; }
.guide-list a::after { content: " →"; color: var(--muted); }

.tip {
  font-size: var(--step--1);
  color: var(--muted);
  margin: -16px 0 32px;
}
.tip strong { color: var(--ink); }
