/* Boot Camp Ready — account screens (js/auth.js) and the account bits in the app (Phase 2).
   The landing + login overlay reuses the setup-flow classes from css/onboarding.css (ob-*), so it looks like
   part of setup. Only tokens from css/styles.css: follows light/dark and every app color. */

/* the overlay sits above the setup questions (z-index 1000) */
html.bca-open, html.bca-open body { overflow: hidden; }
.ob-overlay.bca-gate { z-index: 1100; }

/* landing: what's inside */
.bca-list { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 10px; }
.bca-list li { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.bca-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.bca-ico svg { width: 22px; height: 22px; }
.bca-list .ob-opt-text b { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.bca-list .ob-opt-text > span { color: var(--muted); font-size: .92rem; line-height: 1.4; }

/* email + code */
.bca-turnstile { min-height: 65px; margin: 2px 0 10px; }
.bca-turnstile:empty { min-height: 0; margin: 0; }
.bca-gate input[type="email"] { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 1.05rem; }
.bca-gate input.bca-code { min-height: 56px; font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; letter-spacing: .4em; text-align: center; padding-left: .4em; font-variant-numeric: tabular-nums; }
.bca-gate .ob-msg { margin: 0 0 10px; }
.bca-dev { margin-bottom: 14px; }
.bca-dev b { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: .12em; }
.bca-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px -10px 0; }

/* waiting, offline, problems */
.bca-wait, .bca-center { text-align: center; padding-top: 10vh; }
.bca-wait .ob-lead, .bca-center .ob-lead { max-width: 30em; margin-left: auto; margin-right: auto; }
.bca-spin { display: inline-block; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 50%; border: 4px solid var(--track); border-top-color: var(--primary); animation: bca-spin .9s linear infinite; }
@keyframes bca-spin { to { transform: rotate(360deg); } }
.bca-big-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.bca-big-ico svg { width: 32px; height: 32px; }
.bca-step-choose .ob-opt { min-height: 72px; }

/* focus: visible on every control in the overlay */
.bca-gate button:focus-visible, .bca-gate input:focus-visible, .bca-gate a:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.bca-gate input:focus { border-color: var(--primary); }

/* top chip during the trial (taps open Settings) */
.topbar .chip-count.trial { white-space: nowrap; }

/* lock card on premium screens after the trial */
.bca-lock { text-align: center; padding: 24px 18px; }
.bca-lock-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.bca-lock-ico svg { width: 28px; height: 28px; }
.bca-lock h2 { margin-top: 0; }
.bca-lock .big-btn { max-width: 360px; margin: 4px auto 12px; }
.bca-lock .bca-free { margin: 0; line-height: 1.9; }

/* Settings → Account */
.bca-acct-list { margin: 0 0 14px; }
.bca-acct-list > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.bca-acct-list > div:first-child { border-top: 0; padding-top: 0; }
.bca-acct-list dt { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.bca-acct-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .bca-acct-list > div { grid-template-columns: minmax(0, 1fr); } }
.bca-acct .row .btn { min-height: 44px; }
.bca-acct-del { margin: 12px 0 0; }
.link-btn.bca-danger { color: var(--danger); min-height: 44px; display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .bca-spin { animation-duration: 2.4s; }
}

/* The trial and unlock pop-ups (js/pay.js): the app's bottom sheet on a phone, a centered card on a wider screen. Under the toast (60), so "Copied" shows. */
.pay-back { position: fixed; inset: 0; z-index: 54; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; }
.pay-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; max-height: 85vh; max-height: 85dvh; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--surface); color: var(--text); border-radius: 18px 18px 0 0; padding: 0 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease; }
.pay-show .pay-back { opacity: 1; }
.pay-show .pay-sheet { transform: none; }
.pay-sheet:focus { outline: none; }
.pay-sheet .sheet-head { padding-left: 0; padding-right: 0; }
.pay-sheet p { margin: 0 0 12px; line-height: 1.45; }
.pay-sheet .btn + .btn { margin-top: 10px; }
.pay-sheet .big-btn + .muted { margin-top: 12px; }
.pay-text { display: block; width: 100%; box-sizing: border-box; min-height: 186px; resize: none; font: inherit; font-size: 16px; line-height: 1.4; padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
@media (min-width: 640px) {
  .pay-sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 420px; max-height: 80vh; padding-bottom: 20px; border-radius: 18px; transform: translate(-50%, -46%); opacity: 0; transition: transform .2s ease, opacity .2s; }
  .pay-show .pay-sheet { transform: translate(-50%, -50%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .pay-back, .pay-sheet { transition: none; } }
