/* GIZMO — black, precise, quiet. */
:root {
  --bg: #000; --s1: #0a0a0b; --s2: #121214; --s3: #1c1c1f; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #f5f5f7; --muted: #8b8b90; --dim: #5b5b60; --blue: #3e6ae1; --glow: rgba(62,106,225,.35);
  --good: #30d158; --warn: #ffb340; --bad: #ff453a; --r: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
body::before { content: ""; position: fixed; inset: -20% -20% auto; height: 60vh; background: radial-gradient(ellipse at 50% 0%, rgba(62,106,225,.18), transparent 60%); pointer-events: none; z-index: 0; }
#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--text); }

/* header */
header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: rgba(0,0,0,.72); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.wordmark { font-weight: 600; letter-spacing: .42em; font-size: 15px; padding-left: .42em; }
.wordmark i { font-style: normal; color: var(--blue); }
.hbtns { display: flex; gap: 6px; align-items: center; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 17px; height: 17px; }
.badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--blue); font-size: 10px; display: grid; place-items: center; font-weight: 600; }
.planpill { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; }
.testbar { text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 7px 10px; border-bottom: 1px solid var(--line); }
.testbar a { color: var(--muted); }

main { flex: 1; padding: 6px 16px calc(176px + env(safe-area-inset-bottom)); }

/* tabs */
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: center; background: rgba(0,0,0,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs .inner { display: flex; width: 100%; max-width: 560px; }
nav.tabs button { flex: 1; background: none; border: 0; color: var(--dim); padding: 10px 0 11px; font: 500 10px var(--font); letter-spacing: .12em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
nav.tabs button svg { width: 21px; height: 21px; }
nav.tabs button.on { color: var(--text); }

/* type */
.label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin: 14px 2px 4px; }
.big { font-size: 40px; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
.mid { font-size: 24px; font-weight: 300; letter-spacing: -.02em; }
.muted { color: var(--muted); font-size: 13.5px; }
.dim { color: var(--dim); font-size: 12px; }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sec { margin: 22px 2px 8px; }

/* surfaces */
.panel { background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 10px 0; }
.panel.glow { box-shadow: 0 0 0 1px rgba(62,106,225,.25), 0 20px 60px -30px var(--glow); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat .v { font-size: 16px; font-weight: 500; margin-top: 3px; }
.tag { display: inline-block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.tag.good { color: var(--good); border-color: rgba(48,209,88,.35); } .tag.warn { color: var(--warn); border-color: rgba(255,179,64,.35); } .tag.blue { color: #8fb0ff; border-color: rgba(62,106,225,.5); }
.prov { font-size: 11px; color: var(--dim); } .prov.unknown { color: var(--bad); } .prov.est { color: var(--warn); }
.bar { height: 3px; border-radius: 3px; background: var(--s3); overflow: hidden; margin: 10px 0 6px; }
.bar > i { display: block; height: 100%; background: var(--text); border-radius: 3px; }
.bar > i.warn { background: var(--warn); } .bar > i.bad { background: var(--bad); }

/* buttons & inputs */
.btn { appearance: none; border: 0; border-radius: 99px; padding: 13px 20px; font: 600 14.5px var(--font); letter-spacing: .01em; cursor: pointer; background: var(--text); color: #000; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s ease, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); }
.btn.blue { background: var(--blue); color: #fff; box-shadow: 0 8px 30px -10px var(--glow); }
.btn.sm { padding: 9px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; }
input, select, textarea { width: 100%; background: var(--s2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; font: 16px var(--font); margin: 6px 0 14px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(62,106,225,.6); }
label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.err { color: var(--bad); font-size: 13px; min-height: 1em; }

/* auth */
.hero { padding: 13vh 6px 24px; text-align: center; }
.hero .wordmark { font-size: 26px; letter-spacing: .5em; display: block; margin-bottom: 18px; }
.hero h1 { font-size: 34px; font-weight: 600; letter-spacing: -.03em; margin: 0 0 10px; line-height: 1.12; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 330px; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 18px; padding-top: 14px; }
.msg { animation: rise .35s ease both; }
.msg.user { align-self: flex-end; max-width: 82%; background: var(--s3); padding: 10px 14px; border-radius: 20px 20px 6px 20px; white-space: pre-wrap; }
.msg.assistant { align-self: stretch; }
.msg.assistant .who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.orb { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #8fb0ff 35%, var(--blue) 70%); box-shadow: 0 0 14px var(--glow); flex: none; }
.msg.assistant .body { white-space: pre-wrap; line-height: 1.55; }
.msg .meta { margin-top: 8px; display: flex; gap: 10px; align-items: center; }
.msg .card-slot { white-space: normal; }
.thumbs { display: inline-flex; gap: 2px; }
.thumbs button { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 2px 4px; }
.thumbs button svg { width: 14px; height: 14px; }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.thinking .orb { animation: pulse 1.2s ease-in-out infinite; }
.shimmer { background: linear-gradient(90deg, var(--muted) 0%, #fff 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 9; display: flex; justify-content: center; padding: 10px 14px 10px; background: linear-gradient(to top, #000 65%, transparent); }
.composer .wrap { width: 100%; max-width: 532px; }
.composer form { display: flex; gap: 8px; align-items: center; background: var(--s2); border: 1px solid var(--line2); border-radius: 99px; padding: 5px 5px 5px 16px; }
.composer input { margin: 0; border: 0; background: transparent; padding: 9px 0; }
.composer .send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--text); color: #000; display: grid; place-items: center; cursor: pointer; flex: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { white-space: nowrap; background: transparent; color: var(--muted); border: 1px solid var(--line2); border-radius: 99px; padding: 7px 12px; font: 13px var(--font); cursor: pointer; }

/* in-chat cards */
.xcard { margin-top: 12px; background: var(--s1); border: 1px solid var(--line2); border-radius: var(--r); padding: 16px; position: relative; overflow: hidden; }
.xcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(143,176,255,.6), transparent); }
.xcard .amt { font-size: 34px; font-weight: 300; letter-spacing: -.03em; }
.xcard .to { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.xcard .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.xcard .stats .v { font-size: 14px; font-weight: 500; margin-top: 2px; }
.xcard .btns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.xcard .btns .btn { flex: 1 1 auto; }
.why { margin-top: 10px; }
.why summary { cursor: pointer; list-style: none; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.why summary::-webkit-details-marker { display: none; }
.why ul { margin: 8px 0 0; padding-left: 16px; color: var(--muted); font-size: 13px; }
.why li { margin: 4px 0; }
.life { display: flex; gap: 4px; margin-top: 14px; }
.life span { flex: 1; height: 2px; background: var(--s3); border-radius: 2px; }
.life span.on { background: var(--text); }
.lifelbl { display: flex; justify-content: space-between; margin-top: 6px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.choice { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin: 6px 0 0; font: 15px var(--font); cursor: pointer; }
.choice:hover, .choice:active { border-color: var(--line2); background: rgba(255,255,255,.03); }
.choice svg { width: 14px; height: 14px; color: var(--dim); }

/* timeline */
.tl { position: relative; height: 48px; margin: 16px 4px 6px; }
.tl .track { position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: var(--line2); }
.tl .pt { position: absolute; top: 8px; transform: translateX(-50%); text-align: center; }
.tl .pt i { display: block; width: 11px; height: 11px; border-radius: 50%; margin: 0 auto; background: var(--s3); border: 1px solid var(--line2); }
.tl .pt.pay i { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 12px var(--glow); }
.tl .pt.close i { background: var(--text); }
.tl .pt b { display: block; font: 500 9px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; white-space: nowrap; }

/* score rings */
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ring { text-align: center; }
.ring svg { width: 100%; max-width: 104px; }
.ring .n { font-size: 24px; font-weight: 300; }

.plan { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 10px 0; cursor: pointer; }
.plan.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 20px 50px -30px var(--glow); }
.plan .price { font-size: 28px; font-weight: 300; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { transform: scale(.85); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 380px) { main { padding-left: 12px; padding-right: 12px; } .big { font-size: 34px; } .xcard .amt { font-size: 30px; } }

.steps4 { display: grid; position: relative; margin: 16px 0 8px; }
.steps4::before { content: ""; position: absolute; left: 12%; right: 12%; top: 5px; height: 1px; background: var(--line2); }
.steps4 .st { text-align: center; position: relative; }
.steps4 .st i { display: block; width: 11px; height: 11px; border-radius: 50%; margin: 0 auto 6px; background: var(--s3); border: 1px solid var(--line2); }
.steps4 .st.pay i { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 12px var(--glow); }
.steps4 .st.close i { background: var(--text); }
.steps4 .st b { display: block; font: 500 9.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.steps4 .st span { font-size: 12.5px; }
.steps4 .st.pay span { color: #8fb0ff; }

.choice.goal .tick { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; color: transparent; flex: none; transition: all .15s; }
.choice.goal .tick svg { width: 13px; height: 13px; }
.choice.goal.on { border-color: rgba(62,106,225,.6); background: rgba(62,106,225,.08); }
.choice.goal.on .tick { background: var(--blue); border-color: var(--blue); color: #fff; }
