/* ============================================================
   Billfy - screen layouts
   ============================================================ */

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.5);} 70%{box-shadow:0 0 0 8px rgba(52,211,153,0);} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0);} }

.check-burst { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--emerald-dim); color: var(--emerald); animation: pop .4s ease both; }
.check-burst.sm { width: 18px; height: 18px; }

/* ================= LANDING ================= */
.landing { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; }
.lp-nav-links { display: flex; align-items: center; gap: 22px; }
.lp-nav-link { color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; cursor: pointer; transition: color .2s; }
.lp-nav-link:hover { color: var(--ink); }
.lp-nav-cta { height: 44px; padding: 0 18px; font-size: 14.5px; }
.lp-nav-signin { height: 44px; padding: 0 18px; font-size: 14.5px; }
@media (max-width: 560px) { .lp-nav-links { gap: 12px; } .lp-nav-signin { padding: 0 14px; } }

/* inert, blurred screen rendered behind a modal (e.g. the dashboard teaser
   behind the post-login source picker). The modal's .overlay backdrop-filter
   does the actual blurring; this just makes the backdrop non-interactive. */
.screen-behind { pointer-events: none; user-select: none; }
.lp-preview-label { margin-bottom: 12px; text-align: center; }
.lp-mission {
  text-align: center; margin: 40px auto 8px; max-width: 30em;
  font-size: 22px; font-weight: 500; font-style: italic;
  letter-spacing: -0.01em; color: var(--ink-2);
}
.lp-mission::before, .lp-mission::after { content: "—"; color: var(--ink-3); margin: 0 12px; font-style: normal; }

.lp-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; padding: 10px 0 80px; }
.lp-copy, .lp-visual { min-width: 0; } /* let grid tracks shrink below content width (no mobile overflow) */
.lp-pill { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 15px; border-radius: var(--r-pill); background: rgba(255,255,255,0.05); border: 1px solid var(--hairline); font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 26px; }
/* "Operational" status badge - emerald chrome, keeps the green blinking dot */
.lp-pill-ok { background: var(--emerald-dim); border-color: rgba(16,185,129,0.28); color: #6EE7B7; font-weight: 600; letter-spacing: .01em; }
.lp-h1 { font-size: clamp(40px, 5vw, 68px); line-height: 1.02; font-weight: 500; letter-spacing: -0.025em; margin: 0 0 22px; }
.lp-h1 .grad-text { background-size: 220% 100%; animation: shimmerText 7s ease-in-out infinite; }
@keyframes shimmerText { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.lp-sub { font-size: 19px; line-height: 1.55; max-width: 30em; margin: 0 0 34px; }
.lp-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.lp-google { height: 56px; padding: 0 26px; font-size: 16px; }
.lp-trust { display: flex; gap: 30px; flex-wrap: wrap; }
.lp-demo-btn {
  height: 46px; padding: 0 20px; font-size: 14.5px; font-weight: 600;
  margin-bottom: 36px; color: var(--cyan);
  background: rgba(34,211,238,0.10);
  border: 1px solid rgba(34,211,238,0.45);
  box-shadow: 0 0 0 0 rgba(34,211,238,0.35);
  animation: demoPulse 2.6s ease-in-out infinite;
  transition: background .2s, border-color .2s, transform .15s;
}
.lp-demo-btn:hover { background: rgba(34,211,238,0.18); border-color: var(--cyan); transform: translateY(-1px); }
@keyframes demoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0.0); }
  50% { box-shadow: 0 0 0 5px rgba(34,211,238,0.10); }
}

/* primary lead-gen CTA - opens the connect-source popup */
.lp-cta-block { margin-bottom: 38px; }
.lp-scan-btn {
  height: 58px; padding: 0 30px; font-size: 16.5px; gap: 11px;
  animation: scanPulse 2.8s ease-in-out infinite;
}
.lp-scan-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 56px -10px rgba(99,102,241,0.78); }
@keyframes scanPulse {
  0%, 100% { box-shadow: 0 14px 40px -12px rgba(99,102,241,0.55); }
  50% { box-shadow: 0 16px 50px -8px rgba(99,102,241,0.85); }
}
.lp-cta-note { display: flex; align-items: center; gap: 8px; margin-top: 15px; font-size: 13px; color: var(--ink-3); }

/* kill the white background browsers force on autofilled inputs */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset;
  box-shadow: 0 0 0 1000px var(--bg-2) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}

/* waitlist form */
.waitlist-wrap { margin-bottom: 40px; }
.waitlist-form {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 5px; max-width: 480px; margin-bottom: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.waitlist-form:focus-within {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.waitlist-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--ink); font-size: 15px; padding: 0 14px; height: 46px;
}
.waitlist-input::placeholder { color: var(--ink-3); }
.waitlist-btn { height: 46px; padding: 0 20px; font-size: 14.5px; flex: none; }
.waitlist-error { color: var(--red); font-size: 13px; margin: 0 0 12px; }
.waitlist-demo-link {
  height: 44px; padding: 0 18px; font-size: 14px;
  color: var(--ink-2); border-color: transparent; background: none;
}
.waitlist-demo-link:hover { color: var(--ink); background: rgba(255,255,255,0.04); border-color: var(--hairline); }
.waitlist-done { margin-bottom: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.waitlist-confirm {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 600; color: var(--emerald);
}
.lp-trust-item { display: flex; gap: 11px; align-items: flex-start; }
.lp-trust-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--grad-soft); color: var(--cyan); border: 1px solid var(--hairline); }
.lp-trust-t { font-size: 13.5px; font-weight: 600; }
.lp-trust-s { font-size: 12px; }

/* intro video */
.lp-video-section { margin: 10px 0 56px; }
.lp-video-wrap { position: relative; padding: 8px; overflow: hidden; max-width: 880px; margin: 0 auto; }
.lp-video { display: block; width: 100%; height: auto; border-radius: calc(var(--r-card) - 6px); background: #000; }

/* merchant marquee - seamless ticker under the hero */
.mq { display: flex; align-items: center; gap: 20px; padding-bottom: 44px; margin-top: -22px; }
.mq-label { flex: none; }
.mq-view { position: relative; flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 93%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 93%, transparent); }
.mq-track { display: flex; align-items: center; gap: 12px; width: max-content; animation: marquee 42s linear infinite; }
.mq:hover .mq-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mq-chip { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 15px 0 8px; border-radius: var(--r-pill); background: rgba(255,255,255,0.04); border: 1px solid var(--hairline); white-space: nowrap; }
.mq-name { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 720px) { .mq-label { display: none; } .mq { margin-top: 4px; padding-bottom: 36px; } }

/* preview card */
.lp-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.preview-wrap { position: relative; width: 100%; max-width: 420px; min-width: 0; }
.preview-glow { position: absolute; inset: -40px 0; background: var(--grad); filter: blur(80px); opacity: .25; border-radius: 50%; pointer-events: none; }
.preview { position: relative; padding: 26px; transform: rotate(-1.4deg); overflow: hidden; }
.preview::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(34,211,238,0.16), transparent);
  animation: scanY 3.6s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes scanY {
  0% { transform: translateY(-130px); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translateY(420px); opacity: 1; }
  62%, 100% { transform: translateY(420px); opacity: 0; }
}
.preview-wrap { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.preview-rows { display: flex; flex-direction: column; gap: 4px; }
.preview-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; animation: rise .5s ease both; }
.preview-row:hover { background: rgba(255,255,255,0.04); }
.preview-found { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--ink-2); font-weight: 500; }

/* ================= OVERLAY / AUTH ================= */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5,7,12,0.66); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; }
.auth-sheet { width: 100%; max-width: 420px; overflow: hidden; padding: 0; }
.auth-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--hairline); }
.auth-body { padding: 24px 22px 8px; }
.auth-app { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-title { text-align: center; font-size: 16px; margin-bottom: 22px; color: var(--ink); }
.auth-account { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); margin-bottom: 10px; transition: background .2s, border-color .2s; }
.auth-account:hover { background: rgba(255,255,255,0.05); border-color: var(--hairline-strong); }
.auth-account.ghost { border-style: dashed; }
.auth-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #0A0E1A; font-weight: 700; font-size: 14px; }
.auth-scopes { margin-top: 18px; padding: 16px; border-radius: var(--r-md); background: rgba(255,255,255,0.03); border: 1px solid var(--hairline); }
.auth-scope { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; }
.auth-scope-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--emerald-dim); color: var(--emerald); flex: none; }
.auth-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-top: 1px solid var(--hairline); }

/* bank connect */
.bank-shield { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--emerald-dim); color: var(--emerald); }
.bank-ro { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--emerald); background: var(--emerald-dim); padding: 3px 9px; border-radius: 999px; }
.bank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bank-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 8px 13px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: rgba(255,255,255,0.03); transition: all .18s; }
.bank-tile:hover { background: rgba(255,255,255,0.06); border-color: var(--hairline-strong); }
.bank-tile.on { border-color: var(--indigo); background: rgba(99,102,241,0.12); box-shadow: 0 0 0 1px var(--indigo) inset; }
.bank-mono { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #fff; font-weight: 800; font-size: 17px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.bank-name { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; }
.bank-check { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--indigo); color: #0A0E1A; }
.bank-search { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px dashed var(--hairline); background: transparent; transition: border-color .2s; }
.bank-search:hover { border-color: var(--hairline-strong); }
.bank-skip { font-size: 13.5px; font-weight: 600; background: none; }
.bank-skip:hover { color: var(--ink-2); }

/* ================= SETU AA CONSENT JOURNEY =================
   FIU-branded, Setu-hosted screen. Light themed (the redirect target),
   colours driven by --setu-primary / --setu-secondary set inline from config. */
.setu-card {
  width: 100%; max-width: 380px; overflow: hidden; padding: 0;
  background: #FFFFFF; color: #1B2232;
  border-radius: 22px;
  border: 1px solid rgba(20, 27, 46, 0.08);
  box-shadow: 0 30px 80px -28px rgba(0,0,0,0.65);
  animation: rise .4s cubic-bezier(.2,.8,.2,1) both;
}
.setu-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid rgba(20, 27, 46, 0.08);
}
.setu-brand { display: flex; align-items: center; gap: 10px; }
.setu-logo {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; overflow: hidden; background: #F1F3F9; flex: none;
}
.setu-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.setu-logo-fallback { font-weight: 800; font-size: 14px; color: var(--setu-primary); }
.setu-fiu { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: #1B2232; }
.setu-exit { font-size: 14px; font-weight: 600; color: var(--setu-primary); background: none; }
.setu-exit:hover { opacity: .8; }

.setu-body { padding: 22px 20px 18px; }
.setu-h { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 10px; color: #141A28; }
.setu-reason { font-size: 13px; line-height: 1.5; color: #5B6477; margin: 0 0 22px; }

.setu-otp-label { display: block; font-size: 13px; color: #5B6477; margin-bottom: 9px; }
.setu-otp-label b { color: #1B2232; font-weight: 700; }
.setu-otp-row { display: flex; gap: 9px; }
.setu-otp-input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  border-radius: 10px; border: 1.5px solid rgba(20, 27, 46, 0.16);
  background: #fff; color: #1B2232; font-size: 16px; letter-spacing: 0.12em;
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.setu-otp-input::placeholder { color: #C2C8D6; letter-spacing: 0.18em; }
.setu-otp-input:focus { border-color: var(--setu-primary); box-shadow: 0 0 0 3px var(--setu-secondary); }
.setu-login {
  flex: none; height: 46px; padding: 0 22px; border-radius: 10px;
  background: var(--setu-primary); color: #fff; font-size: 14.5px; font-weight: 600;
  transition: opacity .18s, filter .18s, transform .12s;
}
.setu-login:hover:not(:disabled) { filter: brightness(1.06); }
.setu-login:active:not(:disabled) { transform: translateY(1px); }
.setu-login:disabled { opacity: .45; cursor: not-allowed; }

.setu-resend { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.setu-resend-btn { font-size: 13px; font-weight: 600; color: var(--setu-primary); background: none; }
.setu-resend-btn:hover:not(:disabled) { opacity: .8; }
.setu-resend-btn:disabled { color: #B6BCCA; cursor: not-allowed; }
.setu-retries { font-size: 12.5px; color: #8A92A4; }

.setu-foot {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 14px 20px; border-top: 1px solid rgba(20, 27, 46, 0.07);
  background: #F7F8FC;
}
.setu-foot-ic { display: grid; place-items: center; color: #8A92A4; flex: none; margin-top: 1px; }
.setu-foot-txt { font-size: 11.5px; line-height: 1.45; color: #7A8294; }
.setu-learn { color: var(--setu-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.setu-learn:hover { text-decoration: underline; }

/* real hand-off (SetuConnect) + return (SetuReturn) states */
.setu-spinner {
  width: 46px; height: 46px; margin: 6px auto 18px; border-radius: 50%;
  border: 3px solid var(--hairline-strong); border-top-color: var(--indigo-bright);
  animation: spin 0.9s linear infinite;
}
.setu-err-ic {
  display: grid; place-items: center; width: 46px; height: 46px; margin: 6px auto 16px;
  border-radius: 50%; background: var(--red-dim); color: var(--red);
}
.setu-result { width: 100%; max-width: 420px; padding: 34px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.setu-result .check-burst { background: var(--emerald-dim); color: var(--emerald); }
.setu-subs { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.setu-sub {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.03); border: 1px solid var(--hairline);
}
.setu-sub-name { font-size: 13.5px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.setu-sub-meta { font-size: 12.5px; }

/* ================= SIGNUP (lead capture before bank connect) ================= */
.signup-fields { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; align-items: center; gap: 11px; height: 52px; padding: 0 15px; border-radius: var(--r-md); border: 1px solid var(--hairline-strong); background: rgba(255,255,255,0.04); transition: border-color .2s, box-shadow .2s; }
.field:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.field-ic { display: grid; place-items: center; color: var(--ink-3); flex: none; }
.field-prefix { font-size: 15px; font-weight: 600; color: var(--ink-2); flex: none; padding-right: 11px; border-right: 1px solid var(--hairline); }
.field-input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--ink); font-size: 15px; }
.field-input::placeholder { color: var(--ink-3); }

/* method chooser */
.choice { position: relative; width: 100%; max-width: 600px; padding: 30px; max-height: 92vh; overflow-y: auto; }
.choice .choice-card { padding: 20px; }
.choice .choice-ic { width: 46px; height: 46px; margin-bottom: 10px; }
.choice .choice-desc { font-size: 12.5px; }
.choice-close { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--ink-3); transition: all .2s; }
.choice-close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.choice-head { text-align: center; max-width: 30em; margin: 0 auto 24px; }
.choice-title { font-size: 25px; font-weight: 600; letter-spacing: -0.01em; margin: 8px 0 10px; line-height: 1.12; }
.choice-lead { font-size: 14px; line-height: 1.5; margin: 0; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 4px; padding: 22px; border-radius: var(--r-card); border: 1px solid var(--hairline); background: rgba(255,255,255,0.03); transition: transform .18s cubic-bezier(.2,.8,.2,1), border-color .2s, background .2s; }
.choice-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.06); border-color: var(--hairline-strong); }
.choice-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--hairline); }
.choice-indigo .choice-ic { color: var(--indigo-bright); }
.choice-emerald .choice-ic { color: var(--emerald); background: var(--emerald-dim); border-color: transparent; }
.choice-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.choice-indigo .choice-tag { color: var(--indigo-bright); background: rgba(99,102,241,0.16); }
.choice-emerald .choice-tag { color: var(--emerald); background: var(--emerald-dim); }
.choice-cyan .choice-ic { color: var(--cyan); background: rgba(34,211,238,0.12); border-color: transparent; }
.choice-cyan .choice-tag { color: var(--cyan); background: rgba(34,211,238,0.14); }
.choice-slate .choice-ic { color: var(--ink); background: rgba(255,255,255,0.06); }
.choice-slate .choice-tag { color: var(--ink-2); background: rgba(255,255,255,0.08); }
.choice-name { font-size: 16.5px; font-weight: 700; margin-top: 8px; letter-spacing: -0.01em; }
.choice-desc { font-size: 13px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.choice-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--ink); transition: gap .2s; }
.choice-card:hover .choice-go { gap: 11px; }
/* coming-soon (disabled) cards */
.choice-soon { cursor: not-allowed; opacity: .5; }
.choice-soon:hover { transform: none; background: rgba(255,255,255,0.03); border-color: var(--hairline); }
.choice-soon:hover .choice-go { gap: 6px; }
.choice-go-soon { color: var(--ink-3); }
.choice-soon-badge { position: absolute; top: 14px; right: 14px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: var(--ink-2); background: rgba(255,255,255,0.07); border: 1px solid var(--hairline); }
.choice-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-size: 12px; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } .choice { padding: 24px 20px; } }

/* ================= LOADING ================= */
.loading { min-height: 100vh; display: grid; place-items: center; padding: 40px; }
.loading-center { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 460px; }
.scanner { position: relative; width: 180px; height: 180px; display: grid; place-items: center; margin-bottom: 30px; }
.scan-ring { position: absolute; border-radius: 50%; border: 1px solid var(--hairline); }
.scan-ring.r1 { inset: 0; border-color: rgba(99,102,241,0.3); }
.scan-ring.r2 { inset: 22px; border-color: rgba(34,211,238,0.2); }
.scan-ring.r3 { inset: 44px; border-color: var(--hairline); }
.scan-ring.r1 { animation: spin 8s linear infinite; }
.scan-ring.r2 { animation: spin 6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-core { width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(99,102,241,0.3), rgba(10,14,26,0.6)); display: grid; place-items: center; box-shadow: var(--glow-indigo); }
.scan-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg, rgba(34,211,238,0.4) 40deg, transparent 80deg); animation: spin 1.6s linear infinite; mask: radial-gradient(circle, transparent 56%, #000 57%); -webkit-mask: radial-gradient(circle, transparent 56%, #000 57%); }
.loading-phase { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.loading-count { font-size: 13.5px; margin-bottom: 26px; }
.loading-list { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.loading-item { display: flex; align-items: center; gap: 13px; padding: 13px 16px; animation: rise .4s ease both; }
.found-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--emerald); }

/* ================= DASHBOARD ================= */
.dash-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; border-bottom: 1px solid var(--hairline); background: rgba(10,14,26,0.72); backdrop-filter: blur(16px); }
.dash-tabs { display: flex; gap: 6px; }
.dash-tabs a { font-size: 14px; font-weight: 500; color: var(--ink-3); padding: 8px 14px; border-radius: 9px; cursor: pointer; transition: color .2s, background .2s; }
.dash-tabs a:hover { color: var(--ink-2); }
.dash-tabs a.active { color: var(--ink); background: rgba(255,255,255,0.06); }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--ink-2); border: 1px solid var(--hairline); transition: background .2s, color .2s; }
.icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.ping { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg-1); }
.nav-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #0A0E1A; font-weight: 700; font-size: 14px; overflow: hidden; }
.nav-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

.dash { display: flex; align-items: flex-start; min-height: 100vh; }
.dash-main { flex: 1; min-width: 0; padding: 36px 44px 160px; }
.dash-inner { max-width: 1180px; margin: 0 auto; }
.dash-head { margin-bottom: 34px; }
.dash-h1 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0; max-width: 18em; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 42px; }
.card { padding: 22px 22px 18px; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .3s; }
.card:hover::before { opacity: 1; }
.card-label { margin-bottom: 14px; }
.card-value { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.card-sub { font-size: 12.5px; margin-top: 8px; }
.card-foot { display: flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.card-foot.up { color: var(--red); }
.card-emerald .card-value { color: var(--emerald); }
.card-indigo .card-value { color: var(--indigo-bright); }

/* sections */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sec-title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.insights { margin-bottom: 46px; }
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.insight { padding: 22px; display: flex; flex-direction: column; }
.insight-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 16px; }
.insight-amber .insight-ic { background: var(--amber-dim); color: var(--amber); }
.insight-indigo .insight-ic { background: rgba(99,102,241,0.16); color: var(--indigo-bright); }
.insight-emerald .insight-ic { background: var(--emerald-dim); color: var(--emerald); }
.insight-big { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.insight-txt { font-size: 14px; line-height: 1.45; flex: 1; }
.insight-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink); align-self: flex-start; transition: gap .2s; }
.insight-cta:hover { gap: 10px; }

/* table */
.search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; border-radius: var(--r-md); background: rgba(255,255,255,0.04); border: 1px solid var(--hairline); }
.search input { background: none; border: none; outline: none; color: var(--ink); font-size: 14px; width: 170px; }
.search input::placeholder { color: var(--ink-3); }
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: rgba(255,255,255,0.03); border: 1px solid var(--hairline); color: var(--ink-2); font-size: 13.5px; font-weight: 600; transition: all .2s; }
.filter:hover { color: var(--ink); border-color: var(--hairline-strong); }
.filter.on { background: var(--grad); color: #0A0E1A; border-color: transparent; }
.filter-n { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,0.18); }
.filter:not(.on) .filter-n { background: rgba(255,255,255,0.08); color: var(--ink-2); }

.table { padding: 8px; }
.thead, .tr { display: grid; grid-template-columns: 2.4fr 1.4fr 1.5fr 1fr 1.1fr; align-items: center; gap: 16px; }
.thead { padding: 12px 16px; }
.th { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.th-cost { text-align: right; }
.tr { padding: 12px 16px; border-radius: 14px; animation: fade .4s ease both; transition: background .2s; }
.tr:hover { background: rgba(255,255,255,0.035); }
.tr.marked { background: rgba(251,113,133,0.06); }
.tr.marked .tr-name, .tr.marked .tr-cost { text-decoration: line-through; text-decoration-color: var(--red); opacity: .7; }
.tr.marked .rec-flag { text-decoration: none; opacity: 1; }
.td.th-name { display: flex; align-items: center; gap: 14px; }
.tr-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-meta { font-size: 12px; margin-top: 2px; }
.rec-flag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--red); background: var(--red-dim); padding: 2px 7px; border-radius: 999px; }
.usage { display: flex; flex-direction: column; gap: 5px; }
.usage-bar { width: 84px; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.usage-bar span { display: block; height: 100%; border-radius: 99px; }
.usage-t { font-size: 11.5px; font-weight: 600; }
.th-cost .tr-cost { font-size: 15.5px; font-weight: 600; }
.th-cost .tr-cost-sub { font-size: 11.5px; margin-left: 2px; }
.td.th-cost { text-align: right; }
.td.th-act { text-align: right; }
.cancel-toggle { height: 36px; padding: 0 16px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; border: 1px solid var(--hairline); color: var(--ink-2); background: rgba(255,255,255,0.03); transition: all .2s; display: inline-flex; align-items: center; gap: 6px; }
.cancel-toggle:hover:not(:disabled) { color: var(--red); border-color: rgba(251,113,133,0.5); }
.cancel-toggle.on { background: var(--red-dim); color: var(--red); border-color: rgba(251,113,133,0.5); }
.cancel-toggle.ghost { opacity: .45; cursor: not-allowed; }
.empty { text-align: center; padding: 50px 20px; display: flex; flex-direction: column; align-items: center; }

/* cancel bar */
.cancel-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 20px; padding: 14px 16px 14px 20px; width: min(720px, calc(100% - 48px)); animation: rise .4s ease both; }
.cb-avatars { display: flex; }
.cb-avatars > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg-1); border-radius: 9px; }
.cb-avatars > *:first-child { margin-left: 0; }
.cb-more { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,0.08); font-size: 12px; font-weight: 700; margin-left: -8px; box-shadow: 0 0 0 2px var(--bg-1); }
.cb-text { flex: 1; }

/* "operational" status pill (dashboard nav) */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  color: #6EE7B7; background: var(--emerald-dim);
  border: 1px solid rgba(16,185,129,0.28);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); box-shadow: 0 0 8px var(--emerald);
  animation: statusPulse 2.4s ease-in-out infinite;
}
@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* clean, empty dashboard (signed in, no bank connected yet) */
.dash-empty {
  max-width: 540px; margin: 40px auto 0;
  padding: 48px 40px 40px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.dash-empty-ic {
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--grad-soft); color: var(--indigo-bright);
  border: 1px solid var(--hairline);
  margin-bottom: 24px;
}
.dash-empty-h { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 12px; }
.dash-empty-p { font-size: 15px; line-height: 1.6; margin: 0 0 28px; max-width: 30em; }
.dash-empty-cta { height: 48px; padding: 0 22px; font-size: 15px; }
.dash-empty-foot { display: flex; align-items: center; gap: 7px; margin-top: 26px; font-size: 12.5px; }

/* ---- modal cards inside .overlay: disconnect confirm, marketplace waitlist,
   "add a subscription" header icon. The .glass surface supplies the
   background/border/radius; these add the sizing + column layout. Without a
   max-width the long body copy stretched the card edge-to-edge. ---- */
.dash-gate-card {
  position: relative;
  width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
  padding: 28px;
  display: flex; flex-direction: column; align-items: stretch; text-align: left;
}
.dash-gate-ic {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--grad-soft); color: var(--indigo-bright);
  border: 1px solid var(--hairline);
  margin-bottom: 16px;
}
.dash-gate-h { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 10px; }
.dash-gate-p { font-size: 14.5px; line-height: 1.6; margin: 0; }
.dash-gate-form { width: 100%; margin-top: 18px; }

/* ---- left sidebar nav ---- */
.dash-sidebar {
  position: sticky; top: 0; flex: none;
  width: 244px; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid var(--hairline);
  background: rgba(10,14,26,0.55);
  backdrop-filter: blur(16px);
}
.dash-sb-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 6px 10px 22px; }
.dash-sb-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-sb-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 12px; border-radius: 11px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-3);
  text-align: left; transition: color .18s, background .18s;
}
.dash-sb-item:hover { color: var(--ink-2); background: rgba(255,255,255,0.04); }
.dash-sb-item.active { color: var(--ink); background: rgba(255,255,255,0.07); }
.dash-sb-item.active .dash-sb-ic { color: var(--indigo-bright); }
.dash-sb-ic { display: grid; place-items: center; width: 22px; color: inherit; flex: none; }
.dash-sb-label { flex: 1; }
.dash-sb-badge { font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--grad); color: #0A0E1A; }
.dash-sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 8px 4px; border-top: 1px solid var(--hairline); }
.dash-sb-tools { display: flex; gap: 8px; }
.dash-sb-user { display: flex; align-items: center; gap: 10px; }
.dash-sb-user-meta { min-width: 0; }
.dash-sb-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- connected accounts page ---- */
.acct-add { height: 40px; padding: 0 16px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.acct-card { padding: 22px; display: flex; flex-direction: column; gap: 15px; }
.acct-card-top { display: flex; align-items: center; gap: 12px; }
.acct-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--grad-soft); color: var(--indigo-bright); border: 1px solid var(--hairline); flex: none; }
.acct-bank { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-type { font-size: 12.5px; text-transform: capitalize; }
.acct-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #6EE7B7; flex: none; }
.acct-number { font-size: 16px; letter-spacing: 0.1em; color: var(--ink-2); font-weight: 600; }
.acct-balance { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.acct-balance > span:first-child { font-size: 12.5px; }
.acct-balance-v { font-size: 22px; font-weight: 600; }
.acct-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.acct-chip { font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: rgba(255,255,255,0.05); border: 1px solid var(--hairline); padding: 4px 9px; border-radius: 999px; }
.acct-foot { display: flex; align-items: center; gap: 7px; font-size: 12px; }

/* restart pill */
.restart { position: fixed; left: 20px; bottom: 20px; z-index: 45; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-solid); border: 1px solid var(--hairline-strong); color: var(--ink-2); box-shadow: var(--shadow-card); transition: all .2s; }
.restart:hover { color: var(--ink); transform: rotate(-90deg); }

/* no-glass */
.no-glass .glass, .no-glass .dash-nav, .no-glass .mkt-nav, .no-glass .overlay { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.no-glass .glass { background: var(--surface-solid); }

/* ================= MARKETPLACE ================= */
.mkt-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; border-bottom: 1px solid var(--hairline); background: rgba(10,14,26,0.72); backdrop-filter: blur(16px); }
.mkt-logo { background: none; }
.mkt-nav-right { display: flex; align-items: center; gap: 20px; }
.mkt-nav-link { color: var(--ink-2); font-size: 14.5px; font-weight: 500; cursor: pointer; transition: color .2s; }
.mkt-nav-link:hover { color: var(--ink); }
.mkt-nav-demo { height: 42px; padding: 0 16px; font-size: 14px; }

.mkt-main { max-width: 1180px; margin: 0 auto; padding: 48px 40px 160px; }
.mkt-head { text-align: center; max-width: 40em; margin: 0 auto 48px; display: flex; flex-direction: column; align-items: center; }
.mkt-h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 18px; }
.mkt-lead { font-size: 17px; line-height: 1.6; margin: 0; }
.mkt-section { margin-bottom: 48px; }

/* bundles */
.mkt-bundles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mkt-bundle { padding: 24px; display: flex; flex-direction: column; }
.mkt-bundle-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mkt-bundle-avatars { display: flex; }
.mkt-bundle-avatars > * { margin-left: -10px; box-shadow: 0 0 0 2px var(--bg-1); border-radius: 12px; }
.mkt-bundle-avatars > *:first-child { margin-left: 0; }
.mkt-bundle-name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.mkt-bundle-tag { font-size: 13.5px; margin-top: 3px; }
.mkt-bundle-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.mkt-bundle-chip { font-size: 12px; font-weight: 600; color: var(--ink-2); background: rgba(255,255,255,0.05); border: 1px solid var(--hairline); padding: 4px 10px; border-radius: 999px; }

.mkt-off { font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--emerald); background: var(--emerald-dim); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.mkt-off.sm { font-size: 11px; padding: 3px 8px; }

.mkt-price-row { display: flex; align-items: baseline; gap: 8px; margin: auto 0 18px; padding-top: 16px; }
.mkt-mrp { font-size: 14px; color: var(--ink-3); text-decoration: line-through; }
.mkt-price { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.mkt-price.sm { font-size: 22px; }
.mkt-per { font-size: 13px; }
.mkt-buy { width: 100%; height: 46px; }

/* services grid */
.mkt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mkt-card { padding: 20px; display: flex; flex-direction: column; }
.mkt-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.mkt-card-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.mkt-card-cat { font-size: 12.5px; margin-top: 2px; }

/* cart bar */
.mkt-cart { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 20px; width: min(760px, calc(100% - 48px)); animation: rise .4s ease both; }

@media (max-width: 1080px) { .mkt-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .mkt-bundles { grid-template-columns: 1fr; }
  .mkt-grid { grid-template-columns: repeat(2, 1fr); }
  .mkt-nav, .mkt-main { padding-left: 20px; padding-right: 20px; }
  .mkt-nav-link { display: none; }
  .mkt-cart { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .mkt-main { padding-top: 32px; }
  .mkt-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mkt-nav-demo { padding: 0 14px; font-size: 13px; }
}
@media (max-width: 380px) { .mkt-grid { grid-template-columns: 1fr; } }

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .insight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; gap: 36px; padding: 24px 0 60px; }
  .lp-visual { order: -1; }
  .lp-nav-links a:not(:last-child) { display: none; }
  .preview { transform: none; }

  /* dashboard: the left sidebar splits into a slim fixed top bar (brand + tools)
     and a fixed bottom tab bar (the section nav) - a mobile-native layout that
     never scrolls sideways the way the old single horizontal bar did. */
  .dash { flex-direction: column; }
  .dash-sidebar {
    position: fixed; inset: 0 0 auto 0;
    width: 100%; height: auto;
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 12px; padding: 9px 16px;
    border-right: none; border-bottom: 1px solid var(--hairline);
    background: rgba(10,14,26,0.85); backdrop-filter: blur(16px);
    overflow: visible; z-index: 40;
  }
  .dash-sb-brand { flex-direction: row; align-items: center; gap: 10px; padding: 0; flex: none; min-width: 0; }

  .dash-sb-nav {
    position: fixed; inset: auto 0 0 0;
    flex-direction: row; gap: 2px; justify-content: space-around;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--hairline);
    background: rgba(10,14,26,0.92); backdrop-filter: blur(16px);
    z-index: 40;
  }
  .dash-sb-item {
    position: relative;
    flex: 1 1 0; width: auto; min-width: 0;
    flex-direction: column; align-items: center; gap: 4px;
    padding: 7px 4px; border-radius: 12px;
    font-size: 11px; text-align: center;
  }
  .dash-sb-ic { width: auto; }
  .dash-sb-label { flex: none; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dash-sb-item.active { background: rgba(99,102,241,0.12); color: var(--ink); }
  .dash-sb-badge { position: absolute; top: 3px; left: 50%; margin-left: 4px; }

  .dash-sb-foot { margin-top: 0; flex-direction: row; align-items: center; gap: 8px; padding: 0; border-top: none; flex: none; }
  .dash-sb-user-meta { display: none; }

  /* content clears the fixed top bar and bottom tab bar */
  .dash-main { padding: 74px 24px 96px; }
  /* float the flagged-to-cancel bar above the bottom tab bar */
  .cancel-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 720px) {
  .landing, .dash-main { padding-left: 20px; padding-right: 20px; }
  .dash-nav { padding: 14px 20px; }
  .dash-tabs { display: none; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-value { font-size: 28px; }
  .thead { display: none; }
  .tr { grid-template-columns: 1fr auto; grid-template-areas: "name cost" "status act" "usage usage"; gap: 10px 12px; padding: 14px; background: rgba(255,255,255,0.025); margin-bottom: 8px; }
  .td.th-name { grid-area: name; }
  .td.th-status { grid-area: status; }
  .td.th-usage { grid-area: usage; }
  .td.th-cost { grid-area: cost; }
  .td.th-act { grid-area: act; text-align: left; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .search input { width: 100%; }
  .search { width: 100%; }
  .cancel-bar { flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 600px) {
  .landing { padding-left: 18px; padding-right: 18px; }
  .lp-mission { font-size: 18px; margin: 28px auto 4px; }
  .lp-mission::before, .lp-mission::after { display: none; }
  .lp-nav { padding: 18px 0; gap: 12px; }
  .lp-nav-cta { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .lp-nav-cta svg { width: 14px; height: 14px; }
  /* declutter the dashboard top bar: drop the decorative status pill so the
     brand + tools never crowd each other on a phone */
  .dash-sb-brand .status-pill { display: none; }
  .preview-wrap { max-width: 360px; }
  .preview { padding: 20px; }
  .preview .serif.tnum { font-size: 38px !important; }
  .preview-glow { filter: blur(60px); opacity: .2; }
  .lp-scan-btn { width: 100%; }
  .lp-sub { font-size: 17px; }
}
@media (max-width: 380px) {
  .cta-visit { display: none; } /* "Visit Marketplace" -> "Marketplace" on tiny screens */
}
@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr; }
  .lp-h1 { font-size: 34px; }
  .lp-trust { gap: 18px; }
  .preview .preview-row { padding: 8px 6px; }
  /* shrink the dashboard top-bar tools so brand + tools + avatar fit narrow phones */
  .dash-sb-tools { gap: 6px; }
  .dash-sb-tools .icon-btn { width: 36px; height: 36px; }
}

/* ================= ADD SUBSCRIPTION (manual) ================= */
.add-sub-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px; white-space: nowrap; border-radius: var(--r-md); font-size: 13.5px; font-weight: 700; color: var(--indigo-bright); background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.28); transition: all .2s; }
.add-sub-btn:hover { background: rgba(99,102,241,0.2); border-color: rgba(99,102,241,0.45); }

.picker { position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 30px; }
.picker-head { text-align: center; max-width: 28em; margin: 0 auto 18px; display: flex; flex-direction: column; align-items: center; }
.picker-title { font-size: 23px; font-weight: 600; letter-spacing: -0.015em; margin: 8px 0 8px; line-height: 1.14; }
.picker-lead { font-size: 14px; line-height: 1.5; margin: 0; }
.picker-search { width: 100%; margin-bottom: 16px; }
.picker-search input { width: 100%; }

.picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.picker-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px; border-radius: 16px; border: 1px solid var(--hairline); background: rgba(255,255,255,0.03); transition: transform .16s cubic-bezier(.2,.8,.2,1), border-color .2s, background .2s; }
.picker-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.06); border-color: var(--hairline-strong); }
.picker-card > .mtile { margin-bottom: 6px; }
.picker-card-name { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.picker-card-cat { font-size: 11.5px; }
.picker-card-custom { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 12px; }

.safe-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; color: #6EE7B7; background: var(--emerald-dim); border: 1px solid rgba(52,211,153,0.22); }
.safe-note svg { flex-shrink: 0; }

/* confirm step */
.picker-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 16px; transition: color .2s; }
.picker-back:hover { color: var(--ink); }
.confirm-merchant { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.confirm-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.confirm-fields { display: flex; flex-direction: column; gap: 16px; }
.confirm-field { display: flex; flex-direction: column; gap: 8px; }
.confirm-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.confirm-amount { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: var(--r-md); background: rgba(255,255,255,0.04); border: 1px solid var(--hairline); }
.confirm-amount:focus-within { border-color: var(--hairline-strong); }
.confirm-cur { font-size: 17px; color: var(--ink-3); }
.confirm-amount input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-size: 17px; font-weight: 600; }
.confirm-cycles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.confirm-cycle { height: 44px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: rgba(255,255,255,0.04); border: 1px solid var(--hairline); transition: all .18s; }
.confirm-cycle:hover { color: var(--ink); border-color: var(--hairline-strong); }
.confirm-cycle.on { color: var(--indigo-bright); background: rgba(99,102,241,0.14); border-color: rgba(99,102,241,0.4); }
.confirm-date { height: 48px; padding: 0 14px; border-radius: var(--r-md); background: rgba(255,255,255,0.04); border: 1px solid var(--hairline); color: var(--ink); font-size: 15px; outline: none; color-scheme: dark; }
.confirm-date:focus { border-color: var(--hairline-strong); }
.confirm-hint { font-size: 13px; margin-top: 12px; }
.confirm-add { width: 100%; height: 50px; margin-top: 20px; gap: 8px; }

@media (max-width: 560px) { .picker { padding: 24px 20px; } .picker-grid { grid-template-columns: repeat(2, 1fr); } }

/* ================= REMINDERS + PRICE-HIKE ALERTS ================= */
.reminders { margin-bottom: 40px; }

/* price-hike alert cards */
.hike-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.hike { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-left: 3px solid var(--amber); }
.hike-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; color: var(--amber); background: var(--amber-dim); }
.hike-body { flex: 1; min-width: 0; }
.hike-title { font-size: 14.5px; }
.hike-sub { font-size: 12.5px; margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; }
.hike-old { text-decoration: line-through; }
.hike-new { color: var(--ink); font-weight: 600; }
.hike-pct { margin-left: 8px; font-weight: 700; color: #FCD34D; background: var(--amber-dim); padding: 1px 7px; border-radius: 999px; font-size: 11.5px; }
.hike-extra { flex-shrink: 0; font-weight: 700; color: #FCD34D; font-size: 14px; }

/* upcoming renewals */
.remind-card { padding: 20px 22px; }
.remind-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.remind-total { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.remind-rows { display: flex; flex-direction: column; }
.remind-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--hairline); }
.remind-row:first-child { border-top: none; }
.remind-name { min-width: 0; }
.remind-when { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.remind-ink { color: var(--ink-2); background: rgba(255,255,255,0.05); }
.remind-amber { color: #FCD34D; background: var(--amber-dim); }
.remind-red { color: #FCA5B4; background: var(--red-dim); }
.remind-amt { font-weight: 700; font-size: 15px; min-width: 64px; text-align: right; }
.remind-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 12.5px; }
.remind-foot svg { flex-shrink: 0; color: var(--indigo-bright); }

@media (max-width: 720px) {
  .remind-row { grid-template-columns: auto 1fr auto; grid-template-areas: "tile name amt" "tile when amt"; gap: 4px 12px; }
  .remind-row > .mtile { grid-area: tile; }
  .remind-name { grid-area: name; }
  .remind-when { grid-area: when; justify-self: start; }
  .remind-amt { grid-area: amt; align-self: center; }
  .hike { flex-wrap: wrap; }
  .hike-extra { width: 100%; text-align: right; }
}
