@font-face { font-family: "Bricolage Grotesque"; font-weight: 400 800; font-style: normal; font-display: swap; src: url(/fonts/bricolage-latin.woff2) format("woff2"); }

/* Tokens match finance/planner: warm monarch orange on deep navy (dark) and warm paper (light). data-mode is always light or dark. */
:root {
  --bg: #f5f2ec; --card: #ffffff; --ink: #0c1626; --mute: #3a485b; --line: #e1dbcf;
  --brand: #c2410c; --brand-ink: #ffffff; --hero: #0c1626; --hero-ink: #f5f2ec; --wing: #ea6a1c; --vein: #0c1626;
  --accent: #c2410c; --accent-ink: #ffffff;
  --ok: #15803d; --gold: #b45309; --rose: #be123c; --err: #b91c1c;
  --r: 22px; --dock: 68px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
[data-mode=dark] {
  --bg: #0a0e13; --card: #111821; --ink: #eef2f6; --mute: #a3b0bf; --line: #263140;
  --brand: #ff7a2e; --brand-ink: #1a0c02; --hero: #18212c; --hero-ink: #eef2f6; --wing: #ff7a2e; --vein: #0a0e13;
  --accent: #ff7a2e; --accent-ink: #1a0c02;
  --ok: #4ade80; --gold: #fbbf24; --rose: #fb7185; --err: #f87171;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; font: 16px/1.45 var(--font); color: var(--ink); background: var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--brand); }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }

.app { max-width: 720px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 14px) 16px calc(var(--dock) + env(safe-area-inset-bottom) + 40px); }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.top .mark { width: 34px; height: 34px; color: var(--wing); flex: none; }
.top h1 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.top .sub { font-size: 13px; color: var(--mute); }
.top .grow { flex: 1; min-width: 0; }
.chip { height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.chip:hover { border-color: var(--brand); }

/* hero: the butterfly and the one question */
.hero { position: relative; overflow: hidden; background: var(--hero); color: var(--hero-ink); border-radius: 30px; padding: 26px 22px 24px; margin-bottom: 14px; }
.hero::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--wing) 38%, transparent), transparent); pointer-events: none; }
.hero .bfly { position: absolute; right: -34px; top: -22px; width: 210px; height: 210px; color: var(--wing); opacity: .95; transform: rotate(14deg); pointer-events: none; }
.hero .bfly .half { transform-box: view-box; transform-origin: 256px 256px; }
.hero h2 { position: relative; margin: 0 0 4px; font-size: 34px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; max-width: 11ch; }
.hero p { position: relative; margin: 0; font-size: 15px; opacity: .78; max-width: 24ch; }
.hero.done h2 { max-width: 14ch; }

.rate { display: grid; gap: 10px; margin-bottom: 10px; }
.rate button { display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 0 22px; border-radius: 26px; background: var(--card); border: 2px solid var(--line); font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-align: left; transition: transform .12s, border-color .15s, background .15s; }
.rate button .dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--c); box-shadow: inset 0 0 0 2.5px var(--c); }
.rate button .dot .ico { width: 26px; height: 26px; stroke-width: 2.6; }
.rate button:hover { border-color: var(--c); }
.rate button:active { transform: scale(.975); }
.rate button.on { background: color-mix(in srgb, var(--c) 16%, var(--card)); border-color: var(--c); }
.rate .better { --c: var(--ok); } .rate .same { --c: var(--gold); } .rate .worse { --c: var(--rose); }
.note { margin-bottom: 6px; }
.note summary { list-style: none; cursor: pointer; color: var(--mute); font-weight: 600; padding: 10px 4px; display: inline-flex; gap: 6px; align-items: center; }
.note summary::-webkit-details-marker { display: none; }
.note textarea { width: 100%; min-height: 84px; padding: 14px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); resize: vertical; }
.skip { display: block; margin: 2px auto 18px; padding: 12px 22px; color: var(--mute); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.card .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.card .small, .small { font-size: 13px; color: var(--mute); }
.card.safe { border-style: dashed; background: transparent; }
.card.safe p { margin: 0; font-size: 14px; }
svg.spark { width: 100%; height: 64px; display: block; margin: 8px 0 4px; overflow: visible; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark .area { fill: color-mix(in srgb, var(--brand) 14%, transparent); stroke: none; }
.spark circle { fill: var(--brand); }
.file { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: var(--r); border: 2px dashed var(--line); font-weight: 700; color: var(--mute); margin-bottom: 12px; }
.file:hover { border-color: var(--brand); color: var(--ink); }

/* lists */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 700; overflow-wrap: anywhere; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 16%, var(--card)); color: var(--brand); margin-right: 4px; }
.tag.ok { background: color-mix(in srgb, var(--ok) 16%, var(--card)); color: var(--ok); }
.tag.err { background: color-mix(in srgb, var(--err) 16%, var(--card)); color: var(--err); }
.tag.mute { background: var(--line); color: var(--mute); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-weight: 800; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn:active { transform: scale(.97); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--mute); }
.icon-btn:hover { background: var(--line); color: var(--ink); }
input[type=text], input[type=search], input[type=date], select { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
h2.sec { margin: 20px 4px 8px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.stat:first-of-type { border-top: 0; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; margin-bottom: 8px; background: color-mix(in srgb, var(--err) 12%, var(--card)); border: 2px solid color-mix(in srgb, var(--err) 40%, var(--line)); }
.alert.info { background: color-mix(in srgb, var(--brand) 10%, var(--card)); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.alert .grow { flex: 1; min-width: 0; font-weight: 600; }
.md h1, .md h2, .md h3 { letter-spacing: -.02em; line-height: 1.2; } .md h2 { font-size: 20px; margin: 22px 0 6px; } .md p, .md li { overflow-wrap: anywhere; }
.empty { color: var(--mute); padding: 18px 4px; text-align: center; }
pre.log { white-space: pre-wrap; font: 12px/1.5 ui-monospace, Consolas, monospace; color: var(--mute); }

.dock { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 10px); transform: translateX(-50%); width: min(560px, calc(100% - 20px)); height: var(--dock); display: flex; gap: 4px; padding: 6px; border-radius: 26px; background: var(--hero); color: var(--hero-ink); box-shadow: 0 10px 30px rgb(0 0 0 / .28); z-index: 5; }
.dock button { flex: 1; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; font-weight: 700; opacity: .72; position: relative; }
.dock button.on { background: var(--brand); color: var(--brand-ink); opacity: 1; }
.dock .badge { position: absolute; top: 3px; right: calc(50% - 24px); min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--err); color: #fff; font-size: 11px; line-height: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--dock) + 30px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 700; z-index: 9; max-width: 90%; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: sp .8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 760px) { .hero h2 { font-size: 40px; } .rate { grid-template-columns: repeat(3, 1fr); } .rate button { flex-direction: column; justify-content: center; text-align: center; min-height: 130px; gap: 10px; } }

/* passcode pad */
.pindots { display: flex; justify-content: center; gap: 9px; margin: 10px 0 4px; }
.pindots i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--mute); transition: background .12s, border-color .12s; }
.pindots i.on { background: var(--brand); border-color: var(--brand); }
.pinmsg { min-height: 22px; margin: 6px 0 12px; text-align: center; color: var(--err); font-weight: 700; font-size: 14px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto 6px; }
.keys button { min-height: 66px; border-radius: 20px; background: var(--bg); border: 2px solid var(--line); font-size: 28px; font-weight: 800; display: grid; place-items: center; }
.keys button:active { background: color-mix(in srgb, var(--brand) 20%, var(--bg)); }
.keys .ghost { visibility: hidden; }
.card.gate { padding: 24px 16px 18px; }
