:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --line: #e4e1da;
  --line-2: #d6d2c9;
  --text: #1c1b19;
  --muted: #6d6a63;
  --accent: #23774f;
  --accent-soft: #e3f0e8;
  --accent-ink: #ffffff;
  --danger: #b5371f;
  --head-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #151514; --surface: #1c1c1a; --surface-2: #252523; --line: #2e2d2a; --line-2: #3a3935;
  --text: #ebe9e4; --muted: #9b978f; --accent: #5bb98c; --accent-soft: #1d3127; --accent-ink: #10241a; --danger: #f08a6f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151514; --surface: #1c1c1a; --surface-2: #252523; --line: #2e2d2a; --line-2: #3a3935;
    --text: #ebe9e4; --muted: #9b978f; --accent: #5bb98c; --accent-soft: #1d3127; --accent-ink: #10241a; --danger: #f08a6f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .25s, color .25s;
}
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
header.top { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s, background-color .25s; }
header.top.scrolled { border-bottom-color: var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--head-h); gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.head-right { display: flex; align-items: center; gap: 6px; }
nav.links { display: none; gap: 4px; font-size: 14px; color: var(--muted); }
nav.links a { text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: color .15s, background-color .15s; }
nav.links a:hover { color: var(--text); background: var(--surface-2); }
@media (min-width: 760px) { nav.links { display: flex; } .menu-btn { display: none !important; } }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); transition: color .15s, background-color .15s; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
.head-cta { display: none; }
@media (min-width: 480px) { .head-cta { display: inline-flex; } }

/* Mobile menu */
.menu-btn span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.menu-btn span + span { margin-top: 4px; }
.menu-btn { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-nav { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); border-bottom: 1px solid transparent; }
.mobile-nav > div { overflow: hidden; }
.mobile-nav a { display: block; padding: 12px 16px; text-decoration: none; font-size: 17px; border-top: 1px solid var(--line); }
.menu-open .mobile-nav { grid-template-rows: 1fr; border-bottom-color: var(--line); }
@media (min-width: 760px) { .mobile-nav { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px;
  font-weight: 500; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s var(--ease), filter .15s;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.94); }
.btn.ghost { border-color: var(--line-2); background: var(--surface); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }

/* Hero */
.hero { padding: 40px 0 48px; display: grid; gap: 40px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; align-items: center; padding: 72px 0 72px; } }
.hero h1 { font-size: clamp(31px, 5.4vw, 50px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 18px; font-weight: 650; text-wrap: balance; }
.hero p.lead { font-size: clamp(16px, 2vw, 18px); color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 479px) { .hero .cta .btn { flex: 1 1 100%; } }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* The before/after card in the hero. Real markup, animated on load. */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 12px 32px -18px rgba(0,0,0,.18); }
.demo .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 18px; font-size: 14px; color: var(--muted); }
.demo .head .bank { color: var(--text); font-weight: 600; }
.demo .head .total { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; white-space: nowrap; }
.demo .split-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); padding: 0 18px 8px; font-weight: 500; }
.demo .split-label::after { content: ''; flex: 1; border-top: 1px dashed var(--line-2); }
.demo .item { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "t tag amt"; gap: 4px 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.demo .item .t { grid-area: t; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo .item .tag { grid-area: tag; font-size: 12px; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; color: var(--muted); white-space: nowrap; }
.demo .item .amt { grid-area: amt; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
@media (max-width: 420px) {
  .demo .item { grid-template-columns: 1fr auto; grid-template-areas: "t amt" "tag ."; }
  .demo .item .tag { justify-self: start; }
}
.demo .foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.demo .foot .ok { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; }
.demo .foot .ok svg { width: 15px; height: 15px; }
.js .demo .item, .js .demo .split-label, .js .demo .foot { opacity: 0; transform: translateY(8px); }
.js .demo.play .split-label, .js .demo.play .item, .js .demo.play .foot { animation: rise .55s var(--ease) forwards; }
.js .demo.play .split-label { animation-delay: .35s; }
.js .demo.play .item { animation-delay: var(--d); }
.js .demo.play .foot { animation-delay: 1.15s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { section { padding: 88px 0; } }
section h2 { font-size: clamp(25px, 3.4vw, 34px); letter-spacing: -0.018em; line-height: 1.15; margin: 0 0 12px; font-weight: 650; text-wrap: balance; }
section p.sub { color: var(--muted); margin: 0 0 36px; max-width: 40em; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); margin: 0 0 10px; }

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* Steps */
.steps { display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 22px; transition: border-color .2s, transform .25s var(--ease); }
.step:hover { border-color: var(--line-2); transform: translateY(-2px); }
.step .art { background: var(--surface-2); border-radius: 9px; aspect-ratio: 16 / 10; display: grid; place-items: center; margin-bottom: 18px; color: var(--muted); overflow: hidden; }
.step .art svg { width: 78%; height: auto; }
.step .n { font-size: 12px; font-weight: 600; color: var(--accent); margin: 0 14px 4px; }
.step h3 { margin: 0 14px 6px; font-size: 17px; }
.step p { margin: 0 14px; color: var(--muted); font-size: 15px; }

/* Feature grid */
.grid2 { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.feature { background: var(--surface); padding: 22px 22px 24px; }
.feature svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 12px; }
.feature h3 { margin: 0 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Privacy diagram, HTML so it reflows on small screens */
.privacy { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .privacy { grid-template-columns: 1fr 1.05fr; } }
.privacy p.sub { margin-bottom: 0; }
.flowmap { display: flex; flex-direction: column; align-items: stretch; max-width: 520px; width: 100%; justify-self: center; }
.fm-browser { border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); padding: 14px; }
.fm-label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 12px 2px; }
.fm-pair { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; }
.fm-box { border-radius: 10px; background: var(--surface-2); padding: 12px 14px; min-width: 0; }
.fm-box strong { display: block; font-size: 15px; }
.fm-box small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.fm-lines { display: grid; gap: 6px; margin: 10px 0 8px; }
.fm-lines i { display: block; height: 5px; border-radius: 3px; background: currentColor; opacity: .18; width: 80%; }
.fm-lines i:nth-child(2) { width: 58%; } .fm-lines i:nth-child(3) { width: 70%; }
.fm-accent { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.fm-accent .fm-lines i { background: var(--accent); opacity: .5; }
.fm-wide { background: var(--surface); border: 1px solid var(--line-2); }
.fm-link { display: block; }
.fm-h { height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 11px); background-size: 11px 2px; animation: dash-h 1s linear infinite; }
.fm-v { width: 2px; height: 28px; margin: 0 auto; background: repeating-linear-gradient(180deg, var(--accent) 0 5px, transparent 5px 11px); background-size: 2px 11px; animation: dash-v 1s linear infinite; }
@keyframes dash-h { to { background-position: 11px 0; } }
@keyframes dash-v { to { background-position: 0 11px; } }
.fm-server { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 10px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.fm-server strong { color: var(--text); font-weight: 600; }
.fm-server svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* Pricing */
.pricing { display: grid; gap: 16px; }
@media (min-width: 820px) { .pricing { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; position: relative; transition: border-color .2s, transform .25s var(--ease); }
.plan:hover { transform: translateY(-2px); border-color: var(--line-2); }
.plan.best { border-color: var(--accent); }
.plan .badge { position: absolute; top: -11px; left: 20px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 15px; font-weight: 600; }
.plan .price { font-size: 36px; font-weight: 650; letter-spacing: -0.02em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan .per { font-size: 13px; color: var(--muted); min-height: 20px; }
.plan ul { padding: 0; margin: 16px 0 24px; list-style: none; font-size: 14px; color: var(--muted); }
.plan li { padding: 5px 0 5px 24px; position: relative; }
.plan li::before { content: ''; position: absolute; left: 3px; top: 11px; width: 10px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }

/* Install */
.install { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 28px; }
@media (min-width: 820px) { .install { grid-template-columns: 1.1fr 1fr; padding: 36px; } }
.install h2 { margin-bottom: 8px; }
.install .detected { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.install .detected strong { color: var(--text); font-weight: 600; }
.stores { display: grid; gap: 8px; }
.store { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: border-color .15s, background-color .15s; }
a.store:hover { border-color: var(--line-2); background: var(--surface-2); }
.store.mine { border-color: var(--accent); }
.store .txt { min-width: 0; display: flex; flex-direction: column; }
.store .name { font-weight: 500; font-size: 15px; }
.store .also { font-size: 12px; color: var(--muted); }
.store .state { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.store .state.live { color: var(--accent); background: var(--accent-soft); }
.store .logo { width: 26px; height: 26px; flex: none; color: var(--muted); }
.notify h3 { margin: 0 0 6px; font-size: 17px; }
.notify p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.notify form { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.notify input { flex: 1 1 200px; min-width: 0; height: 44px; margin: 0; -webkit-appearance: none; appearance: none; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.notify input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.notify button { height: 44px; min-height: 0; flex: 0 0 auto; }
@media (max-width: 400px) { .notify button { flex: 1 1 100%; } }
.notify .msg { flex-basis: 100%; font-size: 14px; min-height: 22px; margin: 4px 0 0; color: var(--muted); }
.notify .msg.ok { color: var(--accent); }
.notify .msg.err { color: var(--danger); }
.beta { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; display: grid; gap: 20px; }
.beta[hidden] { display: none; }
@media (min-width: 820px) { .beta { grid-template-columns: 1fr 1fr; } }
.beta h3 { margin: 0 0 6px; font-size: 17px; }
.beta p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.beta ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; display: grid; gap: 6px; }
.beta strong { color: var(--text); font-weight: 600; }
.beta code { font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; color: var(--text); overflow-wrap: anywhere; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* FAQ */
.faq { max-width: 760px; }
details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; -webkit-tap-highlight-color: transparent; }
details summary::-webkit-details-marker { display: none; }
details summary .pm { position: relative; width: 14px; height: 14px; flex: none; color: var(--muted); }
details summary .pm::before, details summary .pm::after { content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
details summary .pm::after { transform: rotate(90deg); }
details[open] summary .pm::after { transform: rotate(0deg); }
details summary:hover .pm { color: var(--text); }
details .body { overflow: hidden; }
details .body p { color: var(--muted); margin: 0; padding: 0 0 18px; max-width: 60ch; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 13px; color: var(--muted); }
footer .cols { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
footer .brand { color: var(--text); }
footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
footer nav a { text-decoration: none; display: inline-block; padding: 10px 0; }
footer nav a:hover { color: var(--text); }
footer p { margin: 6px 0; max-width: 60em; }

/* Legal pages */
.doc { max-width: 720px; padding: 32px 0 64px; }
.doc h1 { font-size: clamp(28px, 4vw, 34px); letter-spacing: -0.015em; margin: 0 0 6px; }
.doc h2 { font-size: 19px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc a { color: var(--accent); }
.doc .updated { font-size: 14px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fm-h, .fm-v { animation: none !important; }
  .js .reveal, .js .demo .item, .js .demo .split-label, .js .demo .foot { opacity: 1; transform: none; }
}

/* Store rows: name and status share a line, the browsers list runs underneath. Status drops below on narrow phones. */
.store { display: grid; grid-template-columns: 26px 1fr auto; grid-template-areas: "logo txt state"; column-gap: 12px; }
.store .logo { grid-area: logo; }
.store .txt { grid-area: txt; }
.store .state { grid-area: state; margin-left: 0; justify-self: end; }
@media (max-width: 460px) {
  .install { padding: 18px; }
  .store { grid-template-columns: 26px 1fr; grid-template-areas: "logo txt" ". state"; row-gap: 8px; }
  .store .state { justify-self: start; }
}
