/* Sorted Receipts — ledger-paper design system */
:root {
  --paper: #eff3ec;        /* ledger mint */
  --paper-deep: #e4ebe1;
  --ink: #1d2a23;
  --ink-soft: #52655b;
  --green: #1e6b4e;        /* accountant green */
  --green-deep: #16523c;   /* demo card — the one dark block on the page */
  --mint: #a8d3bc;         /* light accents on dark green */
  --green-soft: #d7e8de;
  --red: #b23a2a;          /* audit ink — missing/chase only */
  --red-soft: #f3ddd8;
  --manila: #eae0c9;       /* receipt scraps */
  --manila-edge: #d9cba6;
  --rule: #c9d6cc;         /* ledger rules */
  --white: #fbfcfa;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 "Public Sans", -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: "Bitter", Georgia, serif; line-height: 1.15; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* header */
header.site {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.brand { font-family: "Bitter", serif; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand .tick { color: var(--green); }
header.site nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
header.site nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500; }
header.site nav a:hover { color: var(--ink); }
header.site nav a.btn, header.site nav a.btn:hover { color: var(--white); }
.btn {
  display: inline-block; background: var(--green); color: var(--white);
  font-weight: 600; text-decoration: none; border: none; cursor: pointer;
  padding: 13px 22px; border-radius: 6px; font-size: 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.18);
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #185a41; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn.ghost:hover { background: var(--green-soft); }
.btn.small { padding: 8px 16px; font-size: 14.5px; white-space: nowrap; }

.email-fallback { margin-top: 16px; font-size: 15px; color: var(--ink-soft); }
.email-fallback .mono { color: var(--ink); font-size: 14.5px; user-select: all; }
.copy-email {
  font: 600 12.5px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em;
  color: var(--green); background: transparent; border: 1.5px solid var(--green);
  border-radius: 6px; padding: 5px 10px; margin-left: 6px; cursor: pointer;
}
.copy-email:hover { background: var(--green-soft); }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 72px 0 64px; }
.eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--green); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; }
.hero p.lede { font-size: 19px; color: var(--ink-soft); margin: 22px 0 30px; max-width: 34ch; }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .price-note { margin-top: 18px; font-size: 15px; color: var(--ink-soft); }
.hero .price-note strong { color: var(--ink); }

/* the signature: pile → ledger */
.sorter { position: relative; min-height: 430px; }
.scrap {
  position: absolute; left: 50%; top: 46%;
  width: 240px; padding: 9px 12px;
  background: var(--manila); border: 1px solid var(--manila-edge); border-radius: 3px;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: #4a4234;
  box-shadow: 0 2px 5px rgba(40,40,20,.18);
  display: flex; gap: 10px; align-items: baseline; white-space: nowrap;
  transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) rotate(var(--sr));
  transition: transform .9s cubic-bezier(.2,.8,.2,1), background .9s, box-shadow .9s;
  transition-delay: var(--d);
}
.scrap .v { font-weight: 600; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.scrap .a { margin-left: auto; }
.scrap .ck { color: var(--green); opacity: 0; transition: opacity .4s; transition-delay: calc(var(--d) + .55s); }
.month-tag {
  position: absolute; left: 0; top: 0; width: 100%; margin-top: var(--row);
  font-family: "Bitter", serif; font-weight: 700; font-size: 14px;
  letter-spacing: .04em; color: var(--ink);
  border-bottom: 2px solid var(--ink); padding-bottom: 3px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s, transform .6s; transition-delay: 1.1s;
}
.month-tag .sum { float: right; font-family: "IBM Plex Mono", monospace; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); }
.sorter.sorted .scrap {
  transform: translate(0, 0) rotate(0deg);
  left: 0; top: 0; width: 100%;
  margin-top: var(--row);
  background: var(--white); border-color: var(--rule); box-shadow: none;
}
.sorter.sorted .scrap .ck { opacity: 1; }
.sorter.sorted .month-tag { opacity: 1; transform: none; }
.sorter .missing {
  position: absolute; left: 0; top: 0; width: 100%; margin-top: var(--row);
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--red);
  padding: 9px 12px; border: 1px dashed var(--red); border-radius: 3px;
  background: var(--red-soft); opacity: 0; transition: opacity .6s; transition-delay: 1.6s;
}
.sorter.sorted .missing { opacity: 1; }
.replay {
  position: absolute; right: 0; bottom: -34px; background: none; border: none;
  font: 13px "IBM Plex Mono", monospace; color: var(--ink-soft); cursor: pointer;
}
.replay:hover { color: var(--ink); }

/* sections */
section { padding: 72px 0; }
section.alt { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.kicker { font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }
section h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; max-width: 24ch; }
.section-lede { color: var(--ink-soft); font-size: 18px; max-width: 62ch; margin: 18px 0 0; }

/* pain */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.pain-card {
  background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 22px;
}
.pain-card .tag { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--red); display: block; margin-bottom: 10px; }
.pain-card p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.pain-card p strong { color: var(--ink); }

/* steps — ledger rules, echoing the hero month tags */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.step { border-top: 2px solid var(--ink); padding-top: 14px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 600;
  letter-spacing: .1em; color: var(--green);
}
.step h3 { font-size: 20px; margin: 10px 0 10px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.step .fine {
  font-size: 13px; margin-top: 12px; color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  border-left: 3px solid var(--green-soft); padding-left: 10px;
}

/* live demo — the one dark block on the page; whole card is the link */
.demo-card {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 44px; align-items: center;
  margin-top: 36px; padding: 40px 44px;
  background: var(--green-deep); border-radius: 14px; color: var(--white);
}
.demo-eyebrow {
  display: block; margin-bottom: 14px;
  color: var(--mint); font: 600 12px/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .07em; text-transform: uppercase;
}
.demo-card h3 { font-size: clamp(22px, 2.6vw, 28px); color: var(--white); }
.demo-card p { margin: 12px 0 24px; max-width: 46ch; color: #cfe2d6; font-size: 16px; }
.demo-open { background: var(--white); color: var(--green-deep); }
.demo-open:hover { background: var(--paper); }
.demo-open .arrow { display: inline-block; transition: transform .15s ease; }
.demo-card:hover .demo-open .arrow { transform: translateX(4px); }
/* stretch the CTA over the whole card */
.demo-open::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.demo-card :focus-visible { outline-color: var(--white); }

.demo-window {
  background: var(--white); border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(10, 30, 20, .35);
  transform: rotate(-1.2deg);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.demo-card:hover .demo-window { transform: rotate(0deg) translateY(-3px); }
.demo-chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--rule);
}
.demo-chrome .dots { display: flex; gap: 5px; }
.demo-chrome .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.demo-address {
  font: 12px/1.4 "IBM Plex Mono", monospace; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo-page { padding: 16px; display: grid; gap: 10px; }
.demo-drop {
  border: 1.5px dashed var(--green); border-radius: 8px; padding: 18px 14px;
  text-align: center; color: var(--green); font-weight: 600; font-size: 14.5px;
}
.demo-drop small {
  display: block; margin-top: 4px;
  font: 400 11px/1.4 "IBM Plex Mono", monospace; color: var(--ink-soft);
}
.demo-chip {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px;
  padding: 8px 10px; font: 11.5px/1.5 "IBM Plex Mono", monospace; color: var(--ink-soft);
}
.demo-chip .s { color: var(--ink); font-weight: 600; }

/* comparison */
.compare { overflow-x: auto; margin-top: 40px; border: 1px solid var(--rule); border-radius: 8px; background: var(--white); }
.compare table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.compare th { font-family: "Bitter", serif; font-size: 15px; }
.compare tr:last-child td { border-bottom: none; }
.compare td.num { font-family: "IBM Plex Mono", monospace; white-space: nowrap; }
.compare .us { background: var(--green-soft); }
.compare .bad { color: var(--red); }
.compare-note { font-size: 13.5px; color: var(--ink-soft); margin-top: 12px; }
.compare-cta { margin-top: 24px; }

/* price */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.price-card {
  background: var(--white); border: 2px solid var(--ink); border-radius: 10px; padding: 34px;
  box-shadow: 6px 6px 0 var(--green-soft);
}
.price-card.tier { padding: 24px 28px; }
.price-card .tier-name { font-family: "Bitter", serif; font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tier-badge { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 400; background: var(--green-soft); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.price-card .amount { font-family: "Bitter", serif; font-size: 56px; font-weight: 800; }
.price-card.tier .amount { font-size: 44px; }
.price-card .amount small { font-size: 18px; font-weight: 400; color: var(--ink-soft); }
.tier-fit { color: var(--ink-soft); font-size: 15px; margin: 2px 0 0; }
.price-includes { list-style: none; margin: 26px 0 0; padding: 0; max-width: 640px; }
.price-includes li { padding: 7px 0; border-bottom: 1px dashed var(--rule); font-size: 15.5px; }
.price-includes li:last-child { border: none; }
.price-includes li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.price-includes li.no::before { content: "✗ "; color: var(--red); }
.price-fine { font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; max-width: 640px; }

/* faq */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 6px 0; }
.faq summary { font-family: "Bitter", serif; font-weight: 700; font-size: 17px; padding: 12px 0; cursor: pointer; }
.faq summary:hover { color: var(--green); }
.faq p { color: var(--ink-soft); margin: 4px 0 16px; font-size: 15.5px; }

/* footer */
footer.site { border-top: 1px solid var(--rule); padding: 36px 0 48px; color: var(--ink-soft); font-size: 14.5px; }
footer.site .cols { display: flex; gap: 28px; flex-wrap: wrap; align-items: baseline; }
footer.site a { color: var(--ink-soft); }
footer.site .fact { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; margin-top: 14px; }

/* prose pages (privacy/terms) */
.prose { max-width: 720px; padding: 56px 0 80px; }
.prose h1 { font-size: 34px; margin-bottom: 8px; }
.prose h2 { font-size: 21px; margin: 34px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 16px; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 44px 0 40px; }
  .sorter { min-height: 400px; margin-top: 8px; }
  .pain-grid, .steps, .tier-grid { grid-template-columns: 1fr; }
  .demo-card { grid-template-columns: 1fr; gap: 28px; padding: 28px 24px; }
  .demo-window { transform: none; max-width: 420px; }
  .demo-open { display: block; text-align: center; }
  section { padding: 52px 0; }
  header.site nav a.hide-m { display: none; }
}
@media (max-width: 480px) {
  .scrap {
    left: 0;
    top: 0;
    width: 100%;
    transform: translate(var(--sx), calc(184px + var(--sy))) rotate(var(--sr));
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scrap, .month-tag, .missing, .scrap .ck, .demo-window, .demo-open .arrow, .btn { transition: none !important; }
}
