/* (signin-1031) Sign in, sign up, phone and code screens: one calm, premium look. Loaded after app.css and polish.css.
   Hero brand on the first screen of a flow, big labelled inputs, one obvious button, quiet links for everything else. */
.overlay:has(.si-page) { background: radial-gradient(120% 46% at 50% -6%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%), var(--bg); }
.overlay-top:has(+ .overlay-body .si-page), .overlay-top:has(+ .overlay-body.si-page) { padding-bottom: 0; }
.si-page { max-width: 420px; padding: 6px 6px calc(var(--safe-bottom, 0px) + 36px); scroll-padding-bottom: 140px; }
.si-page .si-over { display: none; }
.si-center { text-align: center; }
.si-center .si-lead { margin-left: auto; margin-right: auto; max-width: 30ch; }

/* brand */
.si-brand.hero { display: grid; justify-items: center; gap: 10px; margin: 4px 0 18px; }
.si-brand .si-logo { display: block; width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent), 0 2px 6px rgba(0, 0, 0, .12); animation: si-pop .55s var(--spring, cubic-bezier(.2, .85, .25, 1)) both; }
.si-brand .si-logo .ai-art { width: 100%; height: 100%; border-radius: 22px; box-shadow: none; display: block; }
.si-brand .si-word { display: grid; gap: 1px; }
.si-brand .si-word b { font-size: 22px; letter-spacing: -.03em; font-weight: 800; color: var(--text); }
.si-brand .si-word small { font-size: var(--fs-sub, 15px); color: var(--muted); }
@keyframes si-pop { from { opacity: 0; transform: scale(.82) translateY(8px); } to { opacity: 1; transform: none; } }

/* titles */
.si-page .si-title { font-size: 30px; font-weight: 780; line-height: 1.12; letter-spacing: -.04em; margin: 0 0 8px; }
.si-page .si-lead { font-size: var(--fs-row, 16px); line-height: 1.5; margin: 0 0 24px; }
.si-page .si-lead .nw { white-space: nowrap; }

/* inputs */
.si-page .si-label { margin: 18px 0 8px; font-size: var(--fs-sub, 14px); font-weight: 650; color: var(--text); letter-spacing: -.01em; }
.si-page .si-input { min-height: 56px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 17px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: border-color .15s, box-shadow .15s; }
.si-page .si-input:focus, .si-page .si-input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.si-page .si-input.bad { border-color: var(--bad); color: var(--text); }
.si-page .si-eye { right: 6px; color: var(--muted); }
.si-page .err { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); font-size: var(--fs-sub, 14px); font-weight: 600; line-height: 1.4; }
.si-page .err::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.si-page .err[hidden] { display: none; }
.si-page .si-notice { border-radius: 14px; padding: 12px 14px; margin: 0 0 16px; }

/* buttons: one primary, the rest quiet */
.si-page .btn.si-go { min-height: 56px; margin-top: 22px; border-radius: 16px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 90%, #fff), var(--accent)); color: var(--on-accent, #fff); border: 0; box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; gap: 8px; }
.si-page .btn.si-go:active { transform: scale(.985); box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 28%, transparent); }
.si-page .btn.si-go:disabled { opacity: .92; }
.si-page .btn.si-alt { min-height: 56px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); color: var(--text); font-weight: 650; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.si-page .btn.si-alt:active { background: var(--surface-2); }
.si-page .btn.si-go.si-morph { width: 56px; padding: 0; border-radius: 28px; }
.si-choices { display: grid; gap: 12px; margin-top: 4px; }
.si-choices .btn.si-go { margin-top: 0; }
.si-choice { position: relative; }
.si-choice .si-ico { width: 22px; height: 22px; flex: none; }
.si-choice .si-last { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); }
.si-page .si-create { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin: 26px 0 0; color: var(--muted); font-size: var(--fs-body, 15px); }
.si-page .si-create .link, .si-page .si-swap, .si-page .si-skip { min-height: 44px; padding: 0 6px; font-weight: 700; color: var(--accent); }
.si-page .si-swap { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; color: var(--text); font-weight: 650; }
.si-page .si-swap .si-ico { width: 18px; height: 18px; color: var(--muted); }
.si-page .si-skip { display: block; margin: 4px auto 0; color: var(--muted); font-weight: 600; font-size: var(--fs-sub, 14px); }
.si-page .si-links { justify-content: center; gap: 0 18px; margin-top: 12px; }
.si-page .si-links .link { min-height: 44px; padding: 0 4px; font-weight: 650; }
.si-page .si-note { justify-content: center; text-align: center; margin: 22px 8px 0; font-size: var(--fs-foot, 13px); }
.si-page .si-note .i { flex: none; }

/* code screens: a round badge, big boxes */
.si-badge { display: grid; place-items: center; width: 60px; height: 60px; margin: 6px 0 16px; border-radius: 20px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--accent); animation: si-pop .5s var(--spring, cubic-bezier(.2, .85, .25, 1)) both; }
.si-badge .si-ico { width: 28px; height: 28px; }
.si-page .code-in { margin: 6px 0 4px; max-width: 100%; }
.si-page .code-cells { gap: 9px; }
.si-page .code-cells i { height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 26px; font-weight: 750; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: border-color .15s, box-shadow .15s, background .15s; }
.si-page .code-cells i.full { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.si-page .code-cells i.on { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.si-page .code-wait { justify-content: center; }

/* agree row: a real 44px tap target */
.si-page .si-agree { align-items: flex-start; gap: 12px; min-height: 44px; margin: 18px 0 0; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 500; font-size: var(--fs-sub, 14px); line-height: 1.4; }
.si-page .si-agree input { width: 24px; height: 24px; margin-top: 0; border-radius: 8px; }
.si-page .si-agree a { color: var(--accent); font-weight: 650; }
.si-page .cc-field { margin-top: 6px; }
.si-page .cc-open { min-height: 44px; padding: 0 2px; font-weight: 650; }

/* sign up welcome */
.ob-welcome .si-brand.hero { margin-bottom: 14px; }
.ob-welcome .si-brand .si-logo { width: 68px; height: 68px; border-radius: 20px; }
.ob-welcome .si-brand .si-logo .ai-art { border-radius: 20px; }
.ob-welcome .ob-free, .ob-welcome .ob-founding { text-align: center; }
.ob-welcome .ob-free { display: table; margin: -6px auto 14px; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 11%, var(--surface)); color: var(--text); font-size: var(--fs-detail, 13px); font-weight: 600; line-height: 1.35; }
.ob-welcome .ob-perks { margin: 4px 0 20px; padding: 6px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.ob-welcome .ob-perks li { padding: 11px 0; gap: 12px; align-items: center; }
.ob-welcome .ob-perks li + li { border-top: 1px solid var(--line); }
.ob-welcome .ob-perks .ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.ob-welcome .ob-perks b { font-size: var(--fs-body, 15px); margin-bottom: 1px; }
.ob-welcome .ob-perks li > span:last-child { font-size: var(--fs-sub, 14px); line-height: 1.35; }
.ob-welcome .btn.si-go { margin-top: 0; }
.ob-welcome .si-create { margin-top: 18px; }

/* the top bar of sign up: a slim progress line, quiet Sign in */
.overlay:has(.ob-stage) .overlay-top { padding-bottom: 2px; }
.overlay:has(.ob-stage) .ob-progress { height: 4px; }
.overlay:has(.ob-stage) .ob-top-signin { color: var(--muted); font-weight: 650; font-size: var(--fs-sub, 14px); }
.ob-pane.si-page .ob-preview { font-size: var(--fs-row, 17px); }
.ob-pane.si-page .ob-meter { margin: 12px 2px 4px; }
.ob-done .ob-title { font-size: 30px; letter-spacing: -.04em; }
.ob-done .btn.primary.ob-finish { min-height: 56px; border-radius: 16px; font-size: 17px; box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 30%, transparent); }

/* phone */
.ph-flow.si-page { max-width: none; padding: 6px max(16px, calc((100% - 420px) / 2)) calc(var(--safe-bottom, 0px) + 36px); }
.ph-flow .si-title { margin-top: 0; }

/* short phones: tighten, drop the hero's size */
@media (max-height: 700px) { .si-brand .si-logo { width: 60px; height: 60px; border-radius: 18px; } .si-brand .si-logo .ai-art { border-radius: 18px; } .si-brand.hero { margin-bottom: 10px; } .si-page .si-lead { margin-bottom: 16px; } .si-page .si-title { font-size: 27px; } }
@media (max-width: 360px) { .si-page .si-title { font-size: 27px; } .si-page .code-cells { gap: 6px; } .si-page .code-cells i { height: 58px; } }
@media (prefers-reduced-motion: reduce) { .si-brand .si-logo, .si-badge { animation: none; } }
.si-page .si-note a { color: var(--accent); font-weight: 650; }
.si-page .cc-open { display: block; text-align: left; padding: 0 4px; color: var(--muted); }
/* the welcome has to fit a 844 px phone with its buttons and the skip link in view: perk titles only unless the screen is tall */
.ob-welcome .ob-perks li > span:last-child { font-size: 0; line-height: 0; }
.ob-welcome .ob-perks li > span:last-child b { font-size: var(--fs-body, 15px); line-height: 1.3; margin: 0; }
.ob-welcome .ob-perks { margin-bottom: 16px; }
.ob-welcome .ob-perks li { padding: 9px 0; }
@media (min-height: 900px) { .ob-welcome .ob-perks li > span:last-child { font-size: var(--fs-sub, 14px); line-height: 1.35; } .ob-welcome .ob-perks li > span:last-child b { margin-bottom: 1px; } }
.ob-welcome .si-brand .si-logo { width: 60px; height: 60px; border-radius: 18px; } .ob-welcome .si-brand .si-logo .ai-art { border-radius: 18px; }
.ob-welcome .si-brand.hero { margin-bottom: 10px; gap: 6px; }
.ob-welcome .si-title { font-size: 28px; }
.ob-welcome .si-lead { margin-bottom: 14px; }
