/* Fizz Credit Control (netterms). Identity: a trade ledger. Ruled paper, a red margin line, green ink for money in,
   red ink for holds, totals under an accountant's double rule. Serif display, sans body, tabular figures. */
:root {
  --paper: #f4f7f4; --surface: #ffffff; --sunk: #eef3ef;
  --ink: #0f2219; --ink-2: #4b5e55; --ink-3: #6f8178;
  --rule: #d8e3db; --ledger: #e3ece5; --margin: #e6b7ae;
  --green: #17603a; --green-2: #1f7a4b; --green-soft: #e1efe5; --on-green: #ffffff;
  --red: #b0331f; --red-soft: #fbe8e3; --amber: #9a5a06; --amber-soft: #fbf0dc;
  --shadow: 0 1px 2px rgba(15, 34, 25, .06), 0 6px 18px -8px rgba(15, 34, 25, .14);
  --shadow-lg: 0 2px 4px rgba(15, 34, 25, .05), 0 24px 60px -24px rgba(15, 34, 25, .28);
  --glow: rgba(31, 122, 75, .16);
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1511; --surface: #121e18; --sunk: #0f1a15;
    --ink: #e5eee8; --ink-2: #a3b5ab; --ink-3: #7d9187;
    --rule: #22342b; --ledger: #18261f; --margin: #5a2a24;
    --green: #5fd197; --green-2: #4bbd84; --green-soft: #143222; --on-green: #062012;
    --red: #ff8f7c; --red-soft: #3a1914; --amber: #f0b35a; --amber-soft: #33240c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -28px rgba(0, 0, 0, .8);
    --glow: rgba(95, 209, 151, .12);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); overflow-x: clip;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 3px solid var(--green-2); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
.sr, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.12; margin: 0; }
p { margin: 0 0 1em; }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 650; font-size: 1.08rem; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand small { font-family: var(--sans); color: var(--ink-3); font-weight: 500; font-size: .8rem; }
.nav { display: flex; gap: 22px; font-size: .93rem; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav a:not(.nav-keep) { display: none; } .brand small { display: none; } }

/* Buttons and the CTA the build fills in */
.cta-btn, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem var(--sans); text-decoration: none;
  color: var(--on-green); background: var(--green); border: 0; border-radius: 8px; padding: 13px 22px; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 20px -10px var(--green); transition: transform .2s var(--ease), background-color .2s; }
.cta-btn:hover, .btn:hover { color: var(--on-green); background: var(--green-2); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn.ghost:hover { color: var(--ink); background: var(--surface); }
.btn.small { padding: 8px 14px; font-size: .88rem; border-radius: 7px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cta-note { font-size: .86rem; color: var(--ink-3); max-width: 26em; }

/* Hero: ruled ledger paper with a red margin line */
.hero { position: relative; padding: 64px 0 80px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 616px), var(--margin) calc(50% - 616px), var(--margin) calc(50% - 615px), transparent calc(50% - 615px),
      transparent calc(50% - 611px), var(--margin) calc(50% - 611px), var(--margin) calc(50% - 610px), transparent calc(50% - 610px)),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--ledger) 31px 32px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
@media (min-width: 1000px) { .hero .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; } .hero { padding: 48px 0 88px; } }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 22px; font-weight: 600; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 26em; margin-bottom: 24px; }
.chip-price { display: inline-block; padding: 10px 16px; line-height: 1.5; margin: 0 0 26px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); font-size: .93rem; max-width: 100%; }
.chip-price strong { color: var(--green); font-size: 1.02rem; }
.chip-price span { color: var(--ink-2); }
.chip-price a { color: var(--ink-3); font-size: .8rem; margin-left: 4px; white-space: nowrap; }
.aside-note { margin: 22px 0 0; font-size: .86rem; color: var(--ink-3); max-width: 30em; }

/* Hero demo: account ledger + checkout */
.demo { position: relative; min-width: 0; margin: 0; }
.demo::before { content: ""; position: absolute; inset: 8% -6% -4% 10%; z-index: -1; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(8px); }
.sheet { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--rule); }
.sheet-head h2 { font-size: 1.22rem; }
.sheet-head p { margin: 2px 0 0; color: var(--ink-3); font-size: .84rem; }
.status { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: .8rem; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  transition: background-color .4s, color .4s; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.hold { background: var(--red-soft); color: var(--red); }
.status.ok { background: var(--green-soft); color: var(--green); }
.limit { padding: 14px 20px 4px; }
.limit-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .85rem; color: var(--ink-2); }
.limit-row b { font-size: 1.05rem; color: var(--ink); font-weight: 650; }
.bar { position: relative; height: 12px; margin: 10px 0 8px; border-radius: 6px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--green-2); transition: width .9s var(--ease), background-color .5s; }
.bar i.over { background: linear-gradient(90deg, var(--green-2), var(--green-2) var(--cut, 80%), var(--red) var(--cut, 80%)); }
.bar s { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--red); opacity: 0; transition: opacity .3s, left .6s var(--ease); }
.bar.trying s { opacity: 1; }
.ledger { width: 100%; border-collapse: collapse; font-size: .86rem; margin: 6px 0 0; }
.ledger th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .76rem; padding: 8px 20px 6px; border-bottom: 1px solid var(--rule); }
.ledger td { padding: 7px 20px; border-bottom: 1px solid var(--ledger); transition: background-color .5s, color .5s, opacity .5s; }
.ledger td.r, .ledger th.r { text-align: right; }
.ledger tr.paid td { color: var(--ink-3); }
.ledger tr.paid td.amt { text-decoration: line-through; text-decoration-color: var(--green); }
.ledger tr.flash td { background: var(--green-soft); }
.ledger tr.new td { animation: rowin .6s var(--ease); }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.tag.late { background: var(--red-soft); color: var(--red); }
.tag.due { background: var(--sunk); color: var(--ink-2); }
.tag.paid { background: var(--green-soft); color: var(--green); }
.ledger tfoot td { font-weight: 700; border-bottom: 0; }
.ledger tfoot td.r span { border-bottom: 3px double var(--ink); padding-bottom: 1px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 20px 16px; }
.sheet-actions small { color: var(--ink-3); font-size: .8rem; }
.checkout { margin: 0; border-top: 1px dashed var(--rule); background: var(--sunk); padding: 16px 20px 18px; }
.checkout h3 { font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--ink-3); margin: 0 0 10px; letter-spacing: 0; }
.cart { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: .92rem; }
.cart b { font-size: 1.05rem; }
.terms { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; font-size: .84rem; color: var(--ink-2); }
.terms .radio { width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--green); background: var(--surface); flex: none; }
.co-msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; font-size: .86rem; line-height: 1.45; border: 1px solid; display: none; }
.co-msg.err { display: block; background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); animation: shake .45s var(--ease); }
.co-msg.ok { display: block; background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); animation: rowin .5s var(--ease); }
.steps { display: flex; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .8rem; color: var(--ink-3); flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); transition: border-color .3s, color .3s; }
.steps li b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--sunk); font-size: .7rem; color: var(--ink-2); }
.steps li.on { border-color: var(--green-2); color: var(--ink); }
.steps li.on b { background: var(--green); color: var(--on-green); }
.steps li.done b { background: var(--green-soft); color: var(--green); }
.demo-cap { margin: 12px 4px 0; font-size: .82rem; color: var(--ink-3); }
.stamp { position: absolute; right: 18px; top: 66px; font: 700 .82rem var(--sans); color: var(--green); border: 2px solid currentColor; border-radius: 6px;
  padding: 3px 10px; transform: rotate(-8deg) scale(1.4); opacity: 0; pointer-events: none; }
.stamp.show { animation: stamp .55s var(--ease) forwards; }
@keyframes stamp { 60% { opacity: .95; transform: rotate(-8deg) scale(.95); } to { opacity: .9; transform: rotate(-8deg) scale(1); } }
@keyframes rowin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* Sections */
section.band { padding: 88px 0; }
section.band.alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.shead { max-width: 640px; margin: 0 0 40px; }
.shead h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); margin-bottom: 12px; }
.shead p { color: var(--ink-2); font-size: 1.08rem; margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
section.band.alt .panel { background: var(--paper); }

/* Hold timeline */
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 30px 24px 26px; }
.timeline::before { content: ""; position: absolute; left: calc(10% + 12px); right: calc(10% + 12px); top: 52px; height: 2px; background: var(--rule); }
.timeline .prog { position: absolute; left: calc(10% + 12px); top: 52px; height: 2px; width: 0; background: linear-gradient(90deg, var(--ink-3), var(--red) 40%, var(--red) 60%, var(--green-2)); transition: width 2.6s var(--ease); }
.reveal.in .timeline .prog, .timeline.in .prog { width: calc(80% - 24px); }
.tl { position: relative; text-align: center; padding: 0 6px; }
.tl .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--rule); color: var(--ink-2); transition: border-color .4s, background-color .4s, color .4s; }
.tl .dot svg { width: 20px; height: 20px; }
.tl b { display: block; font-size: .95rem; }
.tl span { display: block; color: var(--ink-3); font-size: .82rem; }
.reveal.in .tl.red .dot { border-color: var(--red); color: var(--red); background: var(--red-soft); transition-delay: 1.1s; }
.reveal.in .tl.grn .dot { border-color: var(--green-2); color: var(--green); background: var(--green-soft); transition-delay: 2.1s; }
.reveal.in .tl.amb .dot { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); transition-delay: .6s; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 18px; }
  .timeline::before, .timeline .prog { left: 41px; right: auto; top: 40px; bottom: 40px; width: 2px; height: auto; }
  .reveal.in .timeline .prog { width: 2px; }
  .tl { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 14px; text-align: left; align-items: center; }
  .tl .dot { margin: 0; grid-row: span 2; }
}
.hold-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.hold-actions li { font-size: .88rem; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink-2); }
.hold-actions li strong { color: var(--ink); font-weight: 600; }

/* Aging */
.aging-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 960px) { .aging-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.aging { padding: 8px 0 4px; overflow-x: auto; }
.aging table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 520px; }
.aging th { text-align: right; font-weight: 600; font-size: .76rem; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.aging th:first-child, .aging td:first-child { text-align: left; }
.aging td { text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--ledger); white-space: nowrap; }
.aging td.z { color: var(--ink-3); }
.aging td.w { color: var(--amber); font-weight: 600; }
.aging td.x { color: var(--red); font-weight: 650; }
.aging tfoot td { font-weight: 700; border-bottom: 0; }
.aging tfoot td span { border-bottom: 3px double var(--ink); }
.aging .mini { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; display: flex; }
.aging .mini i { display: block; height: 100%; width: 0; transition: width 1s var(--ease); }
.aging .mini i:nth-child(1) { background: var(--green-2); } .aging .mini i:nth-child(2) { background: var(--amber); } .aging .mini i:nth-child(3) { background: var(--red); }
.reveal.in .aging .mini i { width: var(--w); }
.aging-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 12px; border-top: 1px solid var(--rule); align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 4px 10px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); border: 1px solid var(--rule); }
.statement { position: relative; padding: 22px 22px 18px; font-size: .84rem; }
.statement::after { content: ""; position: absolute; inset: auto 10px -8px 10px; height: 100%; z-index: -1; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); transform: rotate(1.4deg); }
.statement h3 { font-size: 1.1rem; margin-bottom: 2px; }
.statement .meta { color: var(--ink-3); margin: 0 0 14px; font-size: .8rem; }
.statement dl { margin: 0; }
.statement dl div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--ledger); }
.statement dt { color: var(--ink-2); } .statement dd { margin: 0; }
.statement .tot { font-weight: 700; border-bottom: 0; }
.statement .tot dd { border-bottom: 3px double var(--ink); }
.statement .pay { margin: 14px 0 0; color: var(--ink-3); font-size: .78rem; }

/* Split payment */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 4fr) 80px minmax(0, 6fr); } }
.transfer { padding: 22px; }
.transfer small { color: var(--ink-3); font-size: .8rem; display: block; }
.transfer .big { font-family: var(--serif); font-size: 2.6rem; letter-spacing: -0.02em; line-height: 1.1; margin: 6px 0 4px; }
.transfer .ref { font-size: .84rem; color: var(--ink-2); }
.arrows { position: relative; height: 100%; min-height: 40px; }
.arrows svg { width: 100%; height: 100%; display: block; }
.arrows path { fill: none; stroke: var(--green-2); stroke-width: 2; stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset 1.2s var(--ease); }
.reveal.in .arrows path { stroke-dashoffset: 0; }
.reveal.in .arrows path:nth-child(2) { transition-delay: .2s; } .reveal.in .arrows path:nth-child(3) { transition-delay: .4s; }
@media (max-width: 899px) { .arrows { display: none; } }
.allocs { display: grid; gap: 10px; }
.alloc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 16px; }
.alloc b { font-weight: 650; }
.alloc .r { text-align: right; font-weight: 650; }
.alloc small { grid-column: 1 / -1; color: var(--ink-3); font-size: .8rem; }
.alloc .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.alloc .track i { display: block; height: 100%; width: 0; background: var(--green-2); border-radius: 3px; transition: width 1.1s var(--ease) .6s; }
.alloc.part .track i { background: repeating-linear-gradient(135deg, var(--green-2) 0 6px, var(--green) 6px 12px); }
.reveal.in .alloc .track i { width: var(--w); }

/* Activity log */
.log { list-style: none; margin: 0; padding: 6px 0; }
.log li { display: grid; grid-template-columns: 92px 20px minmax(0, 1fr); gap: 12px; padding: 12px 20px; align-items: start; border-bottom: 1px solid var(--ledger); font-size: .9rem; }
.log li:last-child { border-bottom: 0; }
.log time { color: var(--ink-3); font-size: .8rem; padding-top: 2px; }
.log i { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--ink-3); }
.log i.r { background: var(--red); } .log i.g { background: var(--green-2); } .log i.a { background: var(--amber); }
.log b { font-weight: 600; }
.log span { display: block; color: var(--ink-3); font-size: .82rem; }
@media (max-width: 600px) { .log li { grid-template-columns: 20px minmax(0, 1fr); padding: 12px 14px; } .log time { grid-column: 2; order: 3; } }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
@media (min-width: 960px) { .two { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; } }
.two .shead { margin-bottom: 0; }

/* Before you install */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.fact { padding: 22px 22px 20px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fact svg { width: 26px; height: 26px; color: var(--green); margin-bottom: 12px; }
.fact h3 { font-size: 1.12rem; margin-bottom: 6px; }
.fact p { margin: 0; color: var(--ink-2); font-size: .9rem; }

/* Comparison cards (markup from the build) */
.cmp-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); align-items: stretch; }
.cmp-card { position: relative; display: flex; flex-direction: column; padding: 22px 18px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); }
.cmp-card.us { background: linear-gradient(170deg, var(--green-soft), var(--surface) 60%); border-color: color-mix(in srgb, var(--green-2) 55%, var(--rule));
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--green-2) 40%, transparent), 0 30px 70px -36px var(--green-2); }
@media (min-width: 1000px) { .cmp-card.us { transform: translateY(-10px); } }
.cmp-badge { position: absolute; top: -11px; left: 16px; font-size: .74rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--green); color: var(--on-green); }
.cmp-name { font-size: 1.08rem; margin: 0 0 4px; }
.cmp-plan { margin: 0 0 14px; color: var(--ink-3); font-size: .84rem; min-height: 2.6em; }
.cmp-price { margin: 0; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.cmp-amount { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1; }
.cmp-card.us .cmp-amount { color: var(--green); }
.cmp-per { color: var(--ink-3); font-size: .9rem; }
.cmp-tag { display: inline-block; align-self: flex-start; margin: 10px 0 0; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--amber-soft); color: var(--amber); }
.cmp-card.us .cmp-tag { background: var(--green-soft); color: var(--green); }
.cmp-checks { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.cmp-checks li { position: relative; padding: 9px 0 9px 28px; border-bottom: 1px solid var(--ledger); font-size: .86rem; color: var(--ink-2); }
.cmp-checks li:last-child { border-bottom: 0; }
.cmp-checks li::before { position: absolute; left: 0; top: 9px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.cmp-checks li.yes::before { content: "\2713"; background: var(--green-soft); color: var(--green); }
.cmp-checks li.no::before { content: "\2013"; background: var(--sunk); color: var(--ink-3); }
.cmp-sources { font-size: .76rem; color: var(--ink-3); margin: 22px 0 0; max-width: 70em; }
.cmp-sources a { color: var(--ink-3); }
.cmp-win { margin: 18px 0 0; font-size: .9rem; color: var(--ink-2); max-width: 52em; }

/* Tool teaser */
.tool { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; padding: 28px; }
@media (min-width: 900px) { .tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 36px 40px; } }
.tool h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.tool p { color: var(--ink-2); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: .78rem; text-align: center; max-width: 360px; justify-self: center; width: 100%; }
.cal span { padding: 7px 0; border-radius: 6px; color: var(--ink-3); }
.cal span.h { font-weight: 600; color: var(--ink-2); }
.cal span.d { background: var(--sunk); color: var(--ink-2); }
.cal span.s { background: var(--ink); color: var(--paper); font-weight: 700; }
.cal span.e { background: var(--green); color: var(--on-green); font-weight: 700; }
.cal span.t { background: var(--green-soft); color: var(--green); }

/* Guides list (from the build) */
.guide-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.guide-list li { border-bottom: 1px solid var(--rule); padding: 18px 0; display: grid; gap: 4px; }
.guide-list a { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.guide-list a:hover { color: var(--green); text-decoration: underline; }
.guide-list span { color: var(--ink-2); font-size: .93rem; }

/* FAQ */
.faq { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 1.05rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--ink-3); transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 18px; color: var(--ink-2); max-width: 44em; }
.faq-a p:last-child { margin-bottom: 0; }

/* End CTA and footer */
.end { text-align: left; padding: 40px; border-radius: 16px; background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow-lg);
  border-top: 4px double var(--green-2); }
.end h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 10px; }
.end p { color: var(--ink-2); margin-bottom: 22px; }
@media (max-width: 600px) { .end { padding: 26px 20px; } }
footer.foot { padding: 40px 0 56px; border-top: 1px solid var(--rule); font-size: .88rem; color: var(--ink-3); }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer.foot a { color: var(--ink-2); }

/* Scroll reveal: content is visible without JS; JS adds .js-reveal then .in */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* Articles and tools */
.doc { max-width: 760px; padding: 48px 0 72px; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin: 0 0 18px; }
.crumbs a { color: var(--ink-3); }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); line-height: 1.08; letter-spacing: -0.025em; margin-bottom: 14px; }
.doc .updated { color: var(--ink-3); font-size: .88rem; margin: 0 0 30px; padding-bottom: 20px; border-bottom: 3px double var(--rule); }
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.6rem; margin: 2.1em 0 .55em; }
.prose h3 { font-size: 1.22rem; margin: 1.7em 0 .45em; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--margin); font-family: var(--serif); font-size: 1.12rem; color: var(--ink-2); }
.prose blockquote p { margin: 0; }
.prose code { font-size: .9em; background: var(--sunk); padding: 1px 6px; border-radius: 4px; }
.prose pre { background: var(--sunk); padding: 14px; border-radius: 8px; overflow-x: auto; }
.prose .table { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--ledger); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose hr { border: 0; border-top: 3px double var(--rule); margin: 2.4em 0; }
.aside-cta { margin: 44px 0 0; padding: 24px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.aside-cta h2 { font-size: 1.35rem; margin-bottom: 8px; }
.aside-cta p { color: var(--ink-2); }
.related { margin: 48px 0 0; }
.related h2 { font-size: 1.3rem; margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
.linkish { font: inherit; color: var(--green); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Due date calculator */
.toolpage { max-width: 980px; padding: 48px 0 72px; }
.toolpage h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: -0.025em; margin-bottom: 12px; }
.toolpage .lead { color: var(--ink-2); font-size: 1.1rem; max-width: 40em; }
.calc { padding: 24px; margin: 28px 0 0; }
.calc h2 { font-size: 1.4rem; margin-bottom: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 16px; align-items: end; }
.fields label, .lbl { display: grid; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.fields input, .fields select, textarea { font: 1rem var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
textarea { min-height: 170px; font-variant-numeric: tabular-nums; line-height: 1.5; resize: vertical; }
.fields input:focus, .fields select:focus, textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 500 !important; padding-bottom: 10px; }
.check input { width: auto; }
.answer { margin: 22px 0 0; padding: 20px; border-radius: 10px; background: var(--green-soft); display: grid; gap: 4px; }
.answer .big { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.answer .sub { color: var(--ink-2); font-size: .95rem; }
.answer.late { background: var(--red-soft); }
.answer.late .sub b { color: var(--red); }
.hint { font-size: .84rem; color: var(--ink-3); margin: 10px 0 0; }
.buckets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 20px 0 0; }
.bucket { padding: 12px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--rule); min-width: 0; }
.bucket small { display: block; font-size: .78rem; color: var(--ink-3); }
.bucket b { display: block; font-size: 1.1rem; overflow-wrap: anywhere; }
.bucket span { font-size: .8rem; color: var(--ink-2); }
.bucket.w { background: var(--amber-soft); } .bucket.x { background: var(--red-soft); }
@media (max-width: 640px) { .buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rtable { overflow-x: auto; margin: 16px 0 0; border: 1px solid var(--rule); border-radius: 10px; }
.rtable table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rtable th { text-align: left; font-size: .78rem; color: var(--ink-3); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.rtable td { padding: 8px 12px; border-bottom: 1px solid var(--ledger); white-space: nowrap; }
.rtable td.r, .rtable th.r { text-align: right; }
.rtable tr.bad td { color: var(--red); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 0; }
.errs { color: var(--red); font-size: .86rem; margin: 10px 0 0; }
.explain { margin: 36px 0 0; max-width: 46em; }
.explain h2 { font-size: 1.4rem; margin: 1.6em 0 .5em; }
.explain p, .explain li { color: var(--ink-2); }
@media (max-width: 600px) {
  .demo::before { inset: 8% 0 -4% 0; }
  .statement::after { transform: none; inset: auto 6px -6px 6px; }
  .ledger { font-size: .8rem; table-layout: auto; }
  .ledger th, .ledger td { padding-left: 6px; padding-right: 6px; white-space: nowrap; }
  .ledger th:first-child, .ledger td:first-child { padding-left: 14px; }
  .ledger th:last-child, .ledger td:last-child { padding-right: 14px; }
  .ledger .tag { padding-left: 6px; padding-right: 6px; }
  .ledger td:nth-child(2) { white-space: nowrap; }
  .sheet-head, .limit, .sheet-actions, .checkout { padding-left: 14px; padding-right: 14px; }
  .sheet-head p { max-width: 14em; }
  .hero { padding-top: 32px; }
}
