/* Loonie Ledger — cool ledger-paper greens, loonie-bronze accent used sparingly. */
:root {
  --paper: #f5f9f6;
  --sheet: #ffffff;
  --ink: #102a22;
  --ink-soft: #46605a;
  --rule: #cfe0d6;
  --rule-strong: #9dbcaa;
  --spruce: #1d5a45;
  --bronze: #9a6b14;
  --ok: #1f7a4d;
  --warn: #a14a1a;
  --focus: #2a6ff0;
  --radius-sheet: 10px;
  --radius-control: 6px;
  --max: 68rem;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { 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: 1.0625rem; line-height: 1.55;
  font-feature-settings: "tnum" 1;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--spruce); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--sheet); padding: 8px 12px; z-index: 10; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-coin { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; font-size: 0.98rem; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 7px 12px; border-radius: 99px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--rule); }
.nav a[aria-current="page"] { color: var(--spruce); background: #e3eee7; font-weight: 600; }
/* Phones: brand on top, menu as one tidy row you can swipe sideways (no wrapping) */
@media (max-width: 719px) {
  .site-head .wrap { display: block; min-height: 0; padding-top: 12px; }
  .brand { display: inline-flex; }
  .nav { overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 0 16px 10px; scroll-padding: 0 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 0.93rem; padding: 6px 9px; }
  .nav a[href="/"] { display: none; } /* the logo already goes home */
  .nav a:first-of-type + a { margin-left: -9px; }
}

/* Type scale (1.25) */
h1 { font-size: clamp(2.1rem, 6vw, 3.3rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; font-weight: 700; }
h2 { font-size: 1.65rem; line-height: 1.2; letter-spacing: -0.015em; margin: 2.2em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 0.4em; }
p { margin: 0 0 1em; max-width: 38em; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 32em; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.92rem; }

main { padding: 40px 0 72px; }

/* Hero */
.hero { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.05fr; gap: 56px; } }

/* The sheet: the one signature element — a ledger page with real cells */
.sheet {
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-sheet);
  overflow: hidden; box-shadow: 0 1px 0 var(--rule), 0 12px 32px -24px rgba(16, 42, 34, 0.45);
}
.sheet-title { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule-strong); font-weight: 600; }
.sheet-title span { color: var(--ink-soft); font-weight: 400; font-size: 0.92rem; }
.cells { width: 100%; border-collapse: collapse; }
.cells th, .cells td { border-bottom: 1px solid var(--rule); padding: 10px 16px; text-align: left; vertical-align: middle; }
.cells th { font-weight: 500; color: var(--ink-soft); font-size: 0.95rem; width: 55%; }
.cells td { text-align: right; }
.cells tr:last-child th, .cells tr:last-child td { border-bottom: 0; }
.cells .total th, .cells .total td { border-top: 2px solid var(--ink); font-weight: 700; color: var(--ink); }
.cell-input { width: 100%; max-width: 9.5rem; font: inherit; text-align: right; padding: 8px 10px; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--paper); color: var(--ink); }
.cell-input:focus { background: #fff; }
.meter { height: 10px; background: var(--rule); border-radius: 99px; overflow: hidden; margin: 6px 16px 4px; }
.meter > i { display: block; height: 100%; width: 0; background: var(--spruce); transition: width 0.4s ease; }
.meter.over > i { background: var(--warn); }
.verdict { padding: 12px 16px 16px; margin: 0; font-weight: 600; }
.verdict.over { color: var(--warn); }
.verdict.ok { color: var(--ok); }
.sheet-foot { padding: 0 16px 14px; margin: 0; font-size: 0.88rem; color: var(--ink-soft); max-width: none; }

/* Buttons */
.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; padding: 12px 20px; border-radius: var(--radius-control); border: 1px solid var(--spruce); background: var(--spruce); color: #fff; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.secondary { background: transparent; color: var(--spruce); }
.btn.secondary:hover { background: var(--sheet); color: var(--ink); }
.btn[aria-disabled="true"] { background: var(--rule); border-color: var(--rule); color: var(--ink-soft); cursor: not-allowed; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }

/* Ledger list of products — rows, not cards */
.ledger { border-top: 2px solid var(--ink); margin: 0; padding: 0; list-style: none; }
.ledger li { border-bottom: 1px solid var(--rule); }
.ledger a.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 18px 0; text-decoration: none; color: var(--ink); }
.ledger .row-name { font-weight: 650; font-size: 1.1rem; }
.ledger .row-desc { grid-column: 1 / -1; color: var(--ink-soft); max-width: 40em; }
.ledger .row-price { font-weight: 650; text-align: right; }
.ledger a.row:hover .row-name { text-decoration: underline; }
@media (min-width: 720px) {
  .ledger a.row { grid-template-columns: 1fr 2fr auto; align-items: baseline; }
  .ledger .row-desc { grid-column: auto; }
}
.status { display: inline-block; font-size: 0.85rem; font-weight: 500; color: var(--bronze); margin-left: 8px; }

/* Product page */
.product { display: grid; gap: 8px 32px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.15fr 0.85fr; gap: 56px; } }
.buy-box { position: sticky; top: 16px; }
.price { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.facts { margin: 16px 0 0; padding: 0; list-style: none; font-size: 0.95rem; color: var(--ink-soft); }
.facts li { padding: 6px 0; border-top: 1px solid var(--rule); }

/* Prose pages */
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; max-width: 38em; }
.prose li { margin: 0.3em 0; }
.note { border-left: 3px solid var(--bronze); background: var(--sheet); padding: 12px 16px; margin: 24px 0; max-width: 40em; }
.note p:last-child { margin: 0; }
dl.faq dt { font-weight: 650; margin-top: 1.2em; }
dl.faq dd { margin: 0.3em 0 0; color: var(--ink-soft); max-width: 38em; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 32px 0 48px; font-size: 0.95rem; color: var(--ink-soft); }
.site-foot .cols { display: grid; gap: 24px; }
@media (min-width: 720px) { .site-foot .cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 6px 0; }
.site-foot a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Mobile refinements */
@media (max-width: 899px) {
  .product aside { order: -1; }
  .buy-box { position: static; }
}
@media (max-width: 599px) {
  .cells.stack th, .cells.stack td { display: block; width: auto; text-align: left; }
  .cells.stack th { border-bottom: 0; padding-bottom: 2px; }
  .cells.stack td { padding-top: 0; }
}

/* Contact form */
.contact-form { display: grid; gap: 8px; padding: 20px; max-width: 36rem; margin-top: 24px; }
.contact-form label { font-weight: 500; font-size: 0.95rem; margin-top: 6px; }
.contact-form input, .contact-form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--paper); color: var(--ink); width: 100%; }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Product cover image */
.cover { width: 100%; max-width: 880px; height: auto; border-radius: var(--radius-sheet); border: 1px solid var(--rule); margin: 8px 0 28px; background: var(--sheet); }

/* Tools page: shelves of cards */
.tools-head { margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; margin: 14px 0 0; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
.chips li { display: inline-flex; align-items: center; gap: 7px; }
.chips li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--spruce) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }

.feature { display: grid; gap: 16px; align-items: center; padding: 24px; border-radius: var(--radius-sheet); background: var(--spruce); color: #fff; text-decoration: none; position: relative; overflow: hidden;
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(255,255,255,0.06) 31px 32px); box-shadow: 0 18px 40px -24px rgba(16,42,34,0.7); }
.feature:hover { background-color: var(--ink); color: #fff; }
.feature-coin svg { width: 56px; height: 56px; }
.feature-text { display: grid; gap: 6px; }
.feature-kicker { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #e8cf98; margin: 0; }
.feature-title { font-size: clamp(1.35rem, 3.5vw, 1.75rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
.feature-sub { color: #cfe0d6; }
.feature-price { font-size: 1rem; color: #cfe0d6; }
.feature-price strong { font-size: 2.2rem; color: #fff; letter-spacing: -0.02em; }
.feature-price span { font-size: 0.95rem; }
@media (min-width: 760px) { .feature { grid-template-columns: auto 1fr auto; padding: 28px 32px; gap: 28px; } .feature-price { text-align: right; } }

.shelf h2 { margin-bottom: 0.2em; }
.shelf > p { margin-bottom: 18px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-sheet); overflow: hidden;
  box-shadow: 0 1px 0 var(--rule), 0 12px 32px -26px rgba(16,42,34,0.5); }
.card a:hover { transform: translateY(-2px); }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--rule); background: var(--paper); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.card-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.card-desc { color: var(--ink-soft); flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--rule); }
.card-price { font-weight: 700; font-size: 1.3rem; }
.card-go { color: var(--spruce); font-weight: 600; font-size: 0.95rem; }
.card a:hover .card-go { text-decoration: underline; }
.badge { align-self: flex-start; font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #fffaf0; border: 1px solid #d9c08f; color: #7a5410; }
.shelf:has(.badge) .cards { grid-template-columns: 1fr; }
@media (min-width: 640px) { .shelf:has(.badge) .card a { flex-direction: row; } .shelf:has(.badge) .card img { width: 50%; border-bottom: 0; border-right: 1px solid var(--rule); } }

.free-tool { display: grid; gap: 16px; align-items: center; padding: 24px; margin-top: 56px; border-left: 4px solid var(--bronze); }
.free-tool h2 { margin: 4px 0 8px; font-size: 1.4rem; }
.free-tool p { margin-bottom: 0; }
.free-tool .btn { justify-self: start; }
@media (min-width: 760px) { .free-tool { grid-template-columns: 1fr auto; padding: 28px 32px; } }

/* iOS-style motion: content slides in like a pushed screen, header stays put, taps respond instantly */
:root { --ease-ios: cubic-bezier(0.32, 0.72, 0, 1); }
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
picture { display: block; }
@view-transition { navigation: auto; }
.site-head { view-transition-name: site-head; }
.site-foot { view-transition-name: site-foot; }
::view-transition-group(site-head) { animation: none; }
::view-transition-old(root) { animation: 0.12s ease-out both vt-out-left; }
::view-transition-new(root) { animation: 0.22s var(--ease-ios) both vt-in-right; }
html:active-view-transition-type(back)::view-transition-old(root) { animation-name: vt-out-right; }
html:active-view-transition-type(back)::view-transition-new(root) { animation-name: vt-in-left; }
@keyframes vt-in-right { from { transform: translateX(14%); opacity: 0; } }
@keyframes vt-out-left { to { opacity: 0; } }
@keyframes vt-in-left { from { transform: translateX(-14%); opacity: 0; } }
@keyframes vt-out-right { to { opacity: 0; } }

/* Press feedback: things shrink a touch under your finger, then spring back */
.btn, .nav a, .card a, .feature, .row, .brand { transition: transform 0.18s var(--ease-ios), background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
.btn:active, .nav a:active, .brand:active { transform: scale(0.96); transition-duration: 0.08s; }
.card a:active, .feature:active { transform: scale(0.985); transition-duration: 0.08s; }
@media (hover: none) { .card a:hover { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .card a:hover, .btn:active, .nav a:active, .brand:active, .card a:active, .feature:active { transform: none; }
}

/* Membership plan picker */
.plans { display: grid; gap: 10px; margin-top: 4px; }
.plan { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--rule-strong); background: var(--sheet); color: var(--ink); text-decoration: none;
  transition: transform 0.15s var(--ease-ios), background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
.plan:hover { border-color: var(--spruce); }
.plan:active { transform: scale(0.97); transition-duration: 0.08s; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-name { font-weight: 650; }
.plan-tag { font-size: 0.78rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #fffaf0; border: 1px solid #d9c08f; color: #7a5410; }
.plan-price { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.plan-price small { font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.plan-go { display: none; font-weight: 600; font-size: 0.92rem; margin-top: 4px; }
.plan.is-picked { background: var(--spruce); border-color: var(--spruce); color: #fff; box-shadow: 0 10px 24px -14px rgba(16,42,34,0.7); }
.plan.is-picked .plan-price small { color: #cfe0d6; }
.plan.is-picked .plan-tag { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); color: #fff; }
.plan.is-picked .plan-go { display: block; }
.plan-help { margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) { .plan:active { transform: none; } }

/* Follow band (footer) */
.follow { border-bottom: 1px solid var(--rule); padding: 0 0 18px; margin-bottom: 22px; }
.follow p { margin: 0 0 10px; }
.follow ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.follow a { display: inline-block; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--sheet); }
.follow a:hover { border-color: var(--ink); }
/* Checker example note + next step */
.cells-note { margin: 0; padding: 8px 16px; font-size: .85rem; color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
.next-step { max-width: 36rem; margin-top: 18px; padding: 20px; }
.next-step p { margin: 0 0 12px; }
/* Home rows with thumbnails */
.ledger a.row.has-thumb { grid-template-columns: 72px 1fr auto; }
.ledger .row-thumb { grid-row: 1 / span 2; width: 72px; align-self: start; }
.ledger .row-thumb img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); display: block; }
.ledger a.row.has-thumb .row-desc { grid-column: 2 / -1; }
@media (min-width: 720px) {
  .ledger a.row.has-thumb { grid-template-columns: 96px 1fr 2fr auto; align-items: center; }
  .ledger .row-thumb { grid-row: auto; width: 96px; }
  .ledger .row-thumb img { width: 96px; height: 72px; }
  .ledger a.row.has-thumb .row-desc { grid-column: auto; }
}
/* Product demo video */
.demo-video { max-width: 320px; }
.demo-video video { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--rule); background: #102a22; display: block; }
.ledger a.row.has-thumb .row-name { grid-column: 2; grid-row: 1; }
.ledger a.row.has-thumb .row-price { grid-column: 3; grid-row: 1; }
.ledger a.row.has-thumb .row-desc { grid-row: 2; }
@media (min-width: 720px) {
  .ledger a.row.has-thumb .row-name, .ledger a.row.has-thumb .row-price, .ledger a.row.has-thumb .row-desc { grid-row: auto; }
  .ledger a.row.has-thumb .row-name { grid-column: 2; } .ledger a.row.has-thumb .row-desc { grid-column: 3; } .ledger a.row.has-thumb .row-price { grid-column: 4; }
}
