/* Sign-in, first-run setup, the AI consent page and the app before the first SMS. Self-contained: the app's own
   stylesheet is not loaded here, so its classes never leak in. Colours are the Figma tokens, light and dark. */
:root{color-scheme:light;--page:#f9fbfc;--surface:#fff;--ink:#122b47;--muted:#646d77;--line:#eeeef1;--blue:#1565d8;--blue-fill:#1565d8;--red-ink:#c03527;
 --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Inter","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){color-scheme:dark;--page:#00050f;--surface:#020f21;--ink:#fff;--muted:#7c8aa0;--line:#0e1a2c;--blue:#4c9aff;--blue-fill:#1565d8;--red-ink:#ff6b5e}}
:root[data-theme="dark"]{color-scheme:dark;--page:#00050f;--surface:#020f21;--ink:#fff;--muted:#7c8aa0;--line:#0e1a2c;--blue:#4c9aff;--blue-fill:#1565d8;--red-ink:#ff6b5e}
*{box-sizing:border-box}
body{margin:0;color:var(--ink);font:15px/1.35 var(--font);-webkit-font-smoothing:antialiased}
button,input{font:inherit;color:inherit}
h1{color:var(--ink)}
p{color:var(--muted);line-height:1.45}
a{color:var(--blue)}
/* The AI consent and hand-off pages the server writes. */
.fm p b{color:var(--ink)}
.btn1,.btn2{display:inline-flex;align-items:center;justify-content:center;min-width:120px;height:50px;padding:0 20px;border-radius:14px;border:1px solid var(--line);font-size:15px;font-weight:600;cursor:pointer}
.btn1{background:var(--blue-fill);border-color:var(--blue-fill);color:#fff}
.btn2{background:var(--surface);color:var(--ink)}
html,body{min-height:100%}
body{display:flex;flex-direction:column;align-items:center;background:var(--page)}
.acct{width:100%;max-width:430px;min-height:100dvh;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0) 0 env(safe-area-inset-bottom,0);box-sizing:border-box}
.acct [hidden]{display:none!important}
.step{flex:1;display:flex;flex-direction:column;padding:0 24px 24px}
.abar{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;height:52px;margin:0 -12px}
.abar h1{margin:0;text-align:center;font-size:17px;font-weight:600;letter-spacing:-.2px;color:var(--ink)}
.back{display:grid;place-items:center;width:44px;height:44px;border:0;background:none;color:var(--ink);padding:0;cursor:pointer}
.back svg{width:22px;height:22px}
.lead{margin:2px 0 28px;text-align:center;font-size:14px;line-height:1.45;color:var(--muted);font-weight:500}
.lead b{color:var(--ink);font-weight:600}
.ahero{margin:12vh 0 8px;text-align:center;font-size:24px;font-weight:700;letter-spacing:-.3px;color:var(--ink)}
.flex{flex:1;min-height:24px}
.anote{margin:0 0 14px;text-align:center;font-size:12.5px;color:var(--muted)}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:50px;margin:0 0 12px;border-radius:10px;border:1px solid var(--line);
 background:var(--surface);color:var(--ink);font:inherit;font-size:16px;font-weight:600;cursor:pointer;text-decoration:none;box-sizing:border-box}
.btn svg{width:18px;height:18px;flex:none}
.btn.apple{background:#122b47;border-color:#122b47;color:#fff}
.btn.primary{background:var(--blue-fill);border-color:var(--blue-fill);color:#fff}
.btn.danger{background:var(--red-ink);border-color:var(--red-ink);color:#fff}
.btn:disabled{opacity:.55;cursor:default}
.btn:active:not(:disabled){opacity:.7}
@media (prefers-color-scheme:dark){:root:where(:not([data-theme="light"])) .btn.apple{background:#fff;border-color:#fff;color:#000}}
:root[data-theme="dark"] .btn.apple{background:#fff;border-color:#fff;color:#000}
.or{display:flex;align-items:center;gap:12px;margin:24px 0 12px;font-size:13px;font-weight:500;color:var(--muted)}
.or:before,.or:after{content:"";flex:1;height:1px;background:var(--line)}
.field{display:block;width:100%;height:50px;margin:0 0 12px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);
 color:var(--ink);font:inherit;font-size:16px;text-align:center;box-sizing:border-box}
.field:focus{outline:2px solid var(--blue);outline-offset:-1px}
label.lbl{display:block;margin:0 0 6px;font-size:13px;font-weight:500;color:var(--muted);text-align:center}
.field.left{text-align:left}
/* One input takes the whole code, so fast typing, paste and autofill all land; the boxes only draw it. */
.digits{position:relative;display:flex;justify-content:center;gap:6px;margin:0 0 16px}
.digits input{position:absolute;inset:0;width:100%;height:100%;opacity:0;font-size:16px;caret-color:transparent;border:0;padding:0}
.digits .box{flex:1 1 0;min-width:0;max-width:46px;height:56px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:24px;font-weight:600}
.digits .box.on{outline:2px solid var(--blue);outline-offset:-1px}
.links{display:flex;flex-direction:column;align-items:center;gap:10px;margin:0 0 16px;font-size:14px;color:var(--muted)}
.lnkb{border:0;background:none;padding:0;font:inherit;color:var(--blue);font-weight:600;cursor:pointer;text-decoration:none}
.lnkb.quiet{color:var(--muted);font-weight:500}
.msg{min-height:20px;margin:0 0 12px;text-align:center;font-size:14px;color:var(--red-ink)}
.msg.ok{color:var(--muted)}
.badge-ic{display:grid;place-items:center;width:64px;height:64px;margin:12vh auto 20px;border-radius:18px;background:color-mix(in srgb,var(--blue) 12%,transparent);color:var(--blue)}
.badge-ic svg{width:28px;height:28px}
.acard{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:4px 16px;margin:0 0 16px}
.row{display:flex;align-items:center;gap:12px;min-height:52px;border-top:1px solid var(--line)}
.row:first-child{border-top:0}
.row .ic{font-size:20px;width:28px;text-align:center;flex:none}
.row .anm{flex:1;min-width:0;font-size:15px;color:var(--ink)}
.row .anm small{display:block;font-size:12.5px;color:var(--muted);font-weight:500;margin-top:2px}
.row input.amt{width:118px;height:38px;border:1px solid var(--line);border-radius:8px;background:var(--page);color:var(--ink);font:inherit;font-size:16px;text-align:right;padding:0 10px;box-sizing:border-box}
.row input[type=checkbox]{width:22px;height:22px;accent-color:var(--blue);flex:none;margin:0}
.row.off .anm,.row.off .ic{opacity:.45}
.sum{display:flex;justify-content:space-between;margin:0 4px 16px;font-size:14px;color:var(--muted)}
.sum b{color:var(--ink)}
.two{display:grid;grid-template-columns:1fr 104px;gap:10px}
.cta{position:sticky;bottom:0;padding:12px 0 calc(12px + env(safe-area-inset-bottom,0));background:var(--page)}
.cta .btn{margin:0}
.src{display:flex;gap:12px;align-items:flex-start;padding:14px 0;border-top:1px solid var(--line)}
.src:first-child{border-top:0}
.src .ic{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:color-mix(in srgb,var(--blue) 12%,transparent);color:var(--blue);flex:none}
.src .ic svg{width:20px;height:20px}
.src .atx{flex:1;min-width:0}
.src b{display:block;font-size:15px;font-weight:600;color:var(--ink)}
.src span{display:block;font-size:13px;line-height:1.4;color:var(--muted);margin-top:2px}
.src a,.src .pill{margin-top:8px;display:inline-flex}
.src a{color:var(--blue);font-weight:600;font-size:14px;text-decoration:none}
/* The app before the first SMS: the same black header as the dashboard, then the empty cards. */
.top{position:sticky;top:0;z-index:5;width:100%;background:#000;color:#fff;padding-top:env(safe-area-inset-top,0)}
.top .in{max-width:430px;margin:0 auto;display:grid;grid-template-columns:52px 1fr 52px;align-items:center;height:52px}
.top b{text-align:center;font-size:22px;font-weight:700;letter-spacing:-.3px}
.top button{display:grid;place-items:center;width:48px;height:44px;border:0;background:none;color:#5d93e6;padding:0;cursor:pointer}
.top button svg{width:24px;height:24px}
.home{padding:16px 16px 32px}
.wait{text-align:center;padding:22px 18px}
.wait .badge-ic{margin:0 auto 14px;width:52px;height:52px;border-radius:26px}
.wait h2{margin:0 0 6px;font-size:20px;font-weight:700;color:var(--ink)}
.wait p{margin:0;font-size:14px;line-height:1.45;color:var(--muted)}
.sec{display:flex;justify-content:space-between;margin:20px 4px 8px;font-size:13px;font-weight:500;color:var(--muted)}
.ghost{border:1.5px dashed var(--line);border-radius:14px;padding:18px;text-align:center}
.ghost b{display:block;color:var(--blue);font-size:15px;font-weight:600}
.ghost span{display:block;margin-top:4px;font-size:13px;color:var(--muted)}
/* Settings sheet */
.sheet{position:fixed;inset:0;z-index:50;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.4)}
.sheet .apane{width:100%;max-width:430px;max-height:92dvh;overflow:auto;background:var(--page);border-radius:18px 18px 0 0;padding:8px 16px calc(20px + env(safe-area-inset-bottom,0));box-sizing:border-box}
.sheet .grab{width:36px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 8px}
.sheet h2{margin:4px 0 16px;text-align:center;font-size:17px;font-weight:600;color:var(--ink)}
.sheet h3{margin:18px 4px 8px;font-size:13px;font-weight:500;color:var(--muted)}
.sheet .row button.lnkb{min-height:44px}
@media (min-width:700px){.sheet{align-items:center}.sheet .apane{border-radius:18px}}
.legal{display:flex;justify-content:center;gap:20px;padding:4px 24px 16px;font-size:13px}
.legal a{color:var(--muted);text-decoration:none}
.legal a:hover{text-decoration:underline}
.trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.mark{display:none;width:56px;height:56px;margin:0 auto 12px;border-radius:14px}
#start .abar{margin-bottom:16px}
/* On a wide screen a step is one centred column, with its button under its fields. */
@media (min-width:700px){
 .acct{justify-content:center;max-width:400px}
 .step{flex:none;padding-bottom:12vh}
 .step .flex{flex:none;min-height:8px}
 .mark{display:block}
 .abar,#start .abar{height:auto;margin-bottom:20px}
 .abar h1{font-size:24px;font-weight:700;letter-spacing:-.3px}
 .cta{position:static}
}
.hint{margin:8px 2px 0;font-size:13px;line-height:1.4;color:var(--muted)}
