@font-face { font-family: Plex; src: url(IBMPlexSans-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url(IBMPlexSans-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: PlexMono; src: url(IBMPlexMono-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
:root {
  --paper: #f3f2ee; --card: #ffffff; --ink: #24272b; --steel: #80868d; --rule: #d9d8d3;
  --green: #2a7450; --green-deep: #1f5a3d; --tint: #e2f0e9; --warn: #9a5a12; --warn-tint: #fbefdc;
  --r: 18px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.45 Plex, -apple-system, system-ui, sans-serif; }
body { min-height: 100vh; min-height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
.num, .money { font-family: PlexMono, ui-monospace, monospace; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#app { max-width: 520px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px calc(96px + var(--safe-b)); }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 2px 14px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.brand i { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); display: inline-grid; place-items: center; color: #fff; font: 600 10px PlexMono, monospace; font-style: normal; }
.badge { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); color: var(--steel); white-space: nowrap; }
.badge.due { background: var(--warn-tint); border-color: #ecd3ad; color: var(--warn); }
.card { background: var(--card); border-radius: var(--r); padding: 18px; margin-bottom: 12px; box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 6px 20px rgba(36,39,43,.05); }
.hero { background: var(--green); color: #fff; padding: 22px 20px 20px; }
.hero .k { font-size: 17px; opacity: .92; }
.hero .big { font-size: 56px; line-height: 1.05; margin: 6px 0 8px; }
.hero .sub { font-size: 15px; opacity: .9; }
.hero.short { background: var(--ink); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
.row:first-of-type { border-top: 0; }
.row .l { min-width: 0; } .row .l small { display: block; color: var(--steel); font-size: 13px; }
.row .r { white-space: nowrap; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
h1 { font-size: 24px; line-height: 1.2; margin: 6px 0 12px; }
p { margin: 0 0 10px; } .muted { color: var(--steel); font-size: 14px; }
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px 16px; font-weight: 600; font-size: 17px; background: var(--ink); color: #fff; cursor: pointer; text-align: center; }
.btn.green { background: var(--green); } .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn.small { display: inline-block; width: auto; padding: 9px 14px; font-size: 15px; border-radius: 11px; }
.btns { display: grid; gap: 10px; margin-top: 12px; } .btns.two { grid-template-columns: 1fr 1fr; }
label.f { display: block; margin: 10px 0; font-size: 14px; color: var(--steel); }
label.f input, label.f select { display: block; width: 100%; margin-top: 5px; padding: 13px 12px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); font-size: 17px; }
label.f input.money { font-size: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tick { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.tick:first-of-type { border-top: 0; }
.tick input { width: 24px; height: 24px; accent-color: var(--green); flex: none; }
.tick .l { flex: 1; } .tick .l small { display: block; color: var(--steel); font-size: 13px; }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--rule); display: flex; justify-content: center; padding-bottom: var(--safe-b); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 5; }
nav.tabs button { flex: 1; max-width: 104px; border: 0; background: none; padding: 9px 0 10px; font-size: 12px; color: var(--steel); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
nav.tabs button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
nav.tabs button.on { color: var(--green-deep); font-weight: 600; }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--green-deep); margin-left: 6px; vertical-align: 1px; }
.chip.grey { background: #eceae4; color: var(--steel); }
.seg { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.seg button { border: 1px solid var(--rule); background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sheet-bg { position: fixed; inset: 0; background: rgba(20,22,24,.42); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); }
.note { background: var(--warn-tint); color: #5b3a0c; border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; }
.note.green { background: var(--tint); color: var(--green-deep); }
.gate { position: fixed; inset: 0; z-index: 50; background: var(--paper); overflow: auto; padding: calc(28px + var(--safe-t)) 22px 40px; }
.gate .inner { max-width: 460px; margin: 0 auto; }
.gate ol { padding-left: 0; list-style: none; counter-reset: s; }
.gate li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.gate li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 600; }
.share-ic { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.demo { background: var(--ink); color: #fff; border-radius: 12px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.steps { display: flex; gap: 6px; margin-bottom: 14px; } .steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--rule); } .steps span.on { background: var(--green); }
.empty { text-align: center; color: var(--steel); padding: 22px 8px; }
.hist pre { font: inherit; white-space: pre-wrap; margin: 0; }
a { color: var(--green-deep); }
