    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --green:   #059669; --green-l: #34D399; --green-xl:#D1FAE5;
      --yellow:  #F59E0B; --yellow-l:#FEF3C7;
      --red:     #EF4444; --red-l:   #FEE2E2;
      --dark:    #0E1629; --dark2:   #1E2D45;
      --gray:    #6B7280; --gray-l:  #F3F4F6;
      --border:  #E5E7EB; --white:   #FFFFFF;
    }
    body { font-family: 'Outfit', 'Inter', sans-serif; background: var(--white); color: var(--dark); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
    html { overflow-x: hidden; }
    /* ── Prevent iOS Safari double-tap zoom on all interactive elements ── */
    button, [role="button"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
    /* user-select: none only on stepper buttons (long-press hold) */
    .sm-btn { -webkit-user-select: none; user-select: none; }

    /* PAGES */
    .page-landing, .page-profiling, .page-spendmix { display: none; }
    .page-landing.active, .page-profiling.active, .page-spendmix.active { display: block; }

    /* ══════════ NAV ══════════ */
    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      padding: 0 24px; height: 64px;
      display: flex; align-items: center; justify-content: space-between;
    }
    body { padding-top: 64px; }
    .nav-logo img { height: 30px; display: block; cursor: pointer; }
    .nav-cta, .nav-recalc-btn, .nav-step-label {
      font-family: inherit; font-size: 14px; font-weight: 600;
      border: none; cursor: pointer; border-radius: 10px;
    }
    .nav-cta, .nav-recalc-btn {
      background: var(--green); color: #fff;
      padding: 10px 20px; transition: background .15s;
      display: flex; align-items: center; gap: 6px;
    }
    .nav-cta:hover, .nav-recalc-btn:hover { background: #047857; }
    .nav-step-label { background: none; color: var(--gray); padding: 0; cursor: default; }
    .nav-step-label b { color: var(--dark); }

    /* ══════════ LANDING ══════════ */
    .hero { padding: 48px 24px 96px; max-width: 680px; margin: 0 auto; text-align: center; }
    .hero-badge {
      display: inline-flex; align-items: center; gap: 6px;
      background: var(--green-xl); color: var(--green);
      padding: 6px 14px; border-radius: 100px;
      font-size: 13px; font-weight: 600; margin-bottom: 18px;
    }
    .uae-flag-circle {
      width: 18px; height: 18px; border-radius: 50%; overflow: hidden;
      display: grid; grid-template-columns: 5px 1fr;
      flex-shrink: 0; border: 0.5px solid rgba(0,0,0,.1);
    }
    .uae-flag-circle .fc-red { background: #EF3340; grid-column:1; grid-row:1/4; }
    .uae-flag-circle .fc-g   { background: #00732F; grid-column:2; grid-row:1; }
    .uae-flag-circle .fc-w   { background: #ffffff; grid-column:2; grid-row:2; }
    .uae-flag-circle .fc-b   { background: #000000; grid-column:2; grid-row:3; }
    .hero h1 { font-size: clamp(36px,7vw,58px); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; color: var(--dark); margin-bottom: 20px; }
    .hero h1 em { font-style: normal; color: var(--green); }
    .hero p { font-size: 18px; color: var(--gray); line-height: 1.65; margin-bottom: 0; }
    .hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
    .btn-primary {
      display: inline-flex; align-items: center; gap: 8px;
      background: var(--green); color: #fff;
      padding: 16px 32px; border-radius: 14px;
      font-family: inherit; font-size: 17px; font-weight: 700;
      border: none; cursor: pointer;
      box-shadow: 0 4px 24px rgba(5,150,105,.35);
      transition: all .15s;
    }
    .btn-primary:hover { background: #047857; transform: translateY(-1px); box-shadow: 0 6px 30px rgba(5,150,105,.4); }
    .hero-note { font-size: 13px; color: var(--gray); margin-top: 32px; margin-bottom: 4px; }
    .hero-note b { color: var(--dark); }

    /* stats-wrap sits inside .hero — full-width strip with top breathing room */
    .stats-wrap { max-width: 712px; margin: 40px auto 0; padding: 0 24px; }

    /* disclaimer below cta-banner */
    .page-disclaimer { font-size: 12px; color: #9CA3AF; margin: 20px auto 24px; line-height: 1.6; max-width: 500px; padding: 0 24px; text-align: center; }
    .page-disclaimer b { color: #6B7280; }
    .stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .stat { display: flex; align-items: baseline; gap: 16px; padding: 15px 0; background: transparent; }
    .stat + .stat { border-top: 1px solid var(--border); }
    .stat .num { font-size: 30px; font-weight: 800; color: var(--dark); letter-spacing: -1px; min-width: 100px; flex-shrink: 0; }
    .stat .num em { color: var(--green); font-style: normal; }
    .stat .lbl { font-size: 14px; color: var(--gray); line-height: 1.4; }

    .section { padding: 0 24px 96px; max-width: 760px; margin: 0 auto; }
    .section-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--green); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 12px; }
    .section h2 { font-size: clamp(26px,5vw,38px); font-weight: 800; letter-spacing: -1px; color: var(--dark); margin-bottom: 48px; line-height: 1.2; }

    .steps { display: flex; flex-direction: column; }
    .step { display: flex; gap: 24px; padding-bottom: 40px; position: relative; }
    .step:not(:last-child)::before { content: ''; position: absolute; left: 19px; top: 44px; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--border) 0%, transparent 100%); }
    .step-num { width: 40px; height: 40px; border-radius: 12px; background: var(--green-xl); color: var(--green); font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; z-index: 1; }
    .step-num.active { background: var(--green); color: #fff; box-shadow: 0 4px 16px rgba(5,150,105,.35); }
    .step-body { padding-top: 6px; }
    .step-body h3 { font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
    .step-body p { font-size: 14px; color: var(--gray); line-height: 1.6; }

    .why-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
    @media(max-width:540px){ .why-grid { grid-template-columns: 1fr; } }
    .why-card { background: var(--gray-l); border-radius: 18px; padding: 28px 24px; }
    .why-card h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
    .why-card p { font-size: 14px; color: var(--gray); line-height: 1.6; }

    .faq-list { display: flex; flex-direction: column; }
    .faq-item { border-bottom: 1px solid var(--border); }
    .faq-item:first-child { border-top: 1px solid var(--border); }
    .faq-question { width: 100%; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; text-align: left; font-family: inherit; font-size: 16px; font-weight: 600; color: var(--dark); transition: color .15s; }
    .faq-question:hover { color: var(--green); }
    .faq-question.open { color: var(--green); }
    .faq-chevron { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; background: var(--gray-l); display: flex; align-items: center; justify-content: center; transition: background .15s, transform .25s; }
    .faq-question.open .faq-chevron { background: var(--green-xl); transform: rotate(180deg); }
    .faq-answer { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
    .faq-answer.open { max-height: 2000px; }
    .faq-answer-inner { padding-bottom: 22px; font-size: 15px; color: var(--gray); line-height: 1.7; }

    .cta-banner { margin: 0 auto 68px; max-width: 712px; padding: 0 24px; }

    /* ── Tutorial banner (Y4 — warm neutral + yellow stripe) ───── */
    .tutorial-banner-wrap { padding: 0 24px 80px; max-width: 760px; margin: -48px auto 0; }
    .tutorial-banner {
      background: #FAFAF7;
      border: 1.5px solid #E8E4D9;
      border-left: 4px solid #FACC15;
      border-radius: 18px;
      padding: 28px 24px;
      position: relative;
      overflow: hidden;
    }
    .tb-coin {
      position: absolute;
      bottom: -60px;
      right: -80px;
      width: 320px;
      pointer-events: none;
      z-index: 0;
      opacity: 0.10;
    }
    .tb-content {
      position: relative;
      z-index: 1;
    }
    .tb-eyebrow {
      display: inline-flex; align-items: center; gap: 7px;
      background: #FEF9C3;
      border: 1px solid #FDE047;
      border-radius: 99px;
      padding: 4px 12px;
      font-size: 12px; font-weight: 700; color: #78350F;
      letter-spacing: .4px; margin-bottom: 14px;
    }
    .tb-eyebrow-icon { width: 16px; height: 16px; flex-shrink: 0; }
    .tb-title {
      font-size: clamp(20px, 4vw, 26px);
      font-weight: 800; letter-spacing: -0.8px;
      color: #2C2416; line-height: 1.15;
      margin-bottom: 10px;
    }
    .tb-title em { color: #2C2416; font-style: normal; }
    .tb-sub {
      font-size: 15px; color: #7C6F52;
      line-height: 1.6; margin-bottom: 20px;
    }
    .tb-topics {
      display: flex; flex-direction: column; gap: 8px;
      margin-bottom: 24px;
    }
    .tb-topic {
      display: flex; align-items: center; gap: 10px;
      font-size: 14px; color: #5C5241;
    }
    .tb-topic-dot {
      width: 5px; height: 5px; border-radius: 50%;
      background: #FACC15; flex-shrink: 0;
    }
    .tb-btn {
      display: inline-flex; align-items: center; gap: 8px;
      background: #FAFAF7;
      color: #2C2416;
      padding: 11px 20px; border-radius: 10px;
      font-family: inherit; font-size: 14px; font-weight: 600;
      border: 1.5px solid #D6CFC0;
      cursor: pointer;
      transition: all .15s; text-decoration: none;
      position: relative; z-index: 2;
    }
    .tb-btn:hover { border-color: #2C2416; background: #F0EDE3; }
    .tb-free { font-size: 12px; color: #AFA48C; margin-top: 10px; }

    /* ── Who It's For section ─────────────────────────────────── */
    .wif-list { display: flex; flex-direction: column; gap: 0; margin-top: 40px; }
    .wif-item { padding: 28px 0; border-top: 1px solid var(--border); display: flex; align-items: flex-start; gap: 20px; }
    .wif-item:last-child { border-bottom: 1px solid var(--border); }
    .wif-ico { flex-shrink: 0; width: 48px; height: 48px; background: #F0FDF8; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
    .wif-ico svg { width: 28px; height: 28px; }
    .wif-body { flex: 1; }
    .wif-item h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 10px; line-height: 1.35; }
    .wif-item p { font-size: 15px; color: var(--gray); line-height: 1.7; margin: 0; }
    .cta-inner { background: var(--dark); border-radius: 28px; padding: 56px 40px; text-align: center; position: relative; overflow: hidden; }
    .cta-inner::before { content: ''; position: absolute; top: -80px; right: -60px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(52,211,153,.15) 0%, transparent 70%); pointer-events: none; }
    .cta-inner h2 { font-size: clamp(24px,5vw,36px); font-weight: 800; color: #fff; letter-spacing: -1px; margin-bottom: 12px; }
    .cta-inner h2 em { color: var(--green-l); font-style: normal; }
    .cta-inner p { font-size: 16px; color: rgba(255,255,255,.5); margin-bottom: 36px; }
    .cta-time { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 13px; color: rgba(255,255,255,.3); }

    footer { border-top: 1px solid var(--border); padding: 28px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer-logo img { height: 24px; display: block; cursor: pointer; }
    footer .copy { font-size: 12px; color: var(--gray); }
    .footer-legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
    .footer-legal-links a { font-size: 12px; color: var(--gray); text-decoration: none; }
    .footer-legal-links a:hover { color: var(--green); text-decoration: underline; }
    .footer-legal-links .sep { font-size: 12px; color: #D1D5DB; }
    .footer-bottom { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
    .footer-trademark { font-size: 11px; color: #C4C9D4; line-height: 1.5; }
    /* Disclaimer bar on results page */
    .aff-bar { background: #F8FAFC; border-bottom: 1px solid #E5E7EB; padding: 8px 16px; font-size: 11.5px; color: #6B7280; line-height: 1.5; display: flex; align-items: flex-start; gap: 7px; }
    .aff-bar a { color: #059669; text-decoration: none; }
    .aff-bar a:hover { text-decoration: underline; }
    .aff-bar-close { margin-left: auto; flex-shrink: 0; background: none; border: none; padding: 0 0 0 8px; cursor: pointer; color: #9CA3AF; font-size: 16px; line-height: 1; align-self: center; }
    .aff-bar-close:hover { color: #6B7280; }
    /* Cookie consent banner */
    #cookieBanner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 99990; background: #fff; border-top: 1px solid #E5E7EB; border-radius: 16px 16px 0 0; padding: 20px 18px 28px; box-shadow: 0 -4px 24px rgba(14,22,41,0.10); transform: translateY(100%); visibility: hidden; transition: transform .32s cubic-bezier(.4,0,.2,1), visibility 0s .32s; }
    #cookieBanner.visible { transform: translateY(0); visibility: visible; transition: transform .32s cubic-bezier(.4,0,.2,1), visibility 0s 0s; }
    .ck-handle { width: 36px; height: 3px; background: #E5E7EB; border-radius: 99px; margin: 0 auto 16px; }
    .ck-title { font-size: 15px; font-weight: 700; color: #0E1629; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
    .ck-body { font-size: 12.5px; color: #6B7280; line-height: 1.55; margin-bottom: 16px; }
    .ck-body a { color: #059669; text-decoration: none; }
    .ck-body a:hover { text-decoration: underline; }
    .ck-btns { display: flex; flex-direction: column; gap: 8px; }
    .ck-btn-primary { background: #059669; color: #fff; border: none; border-radius: 10px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; text-align: center; }
    .ck-btn-ghost { background: transparent; color: #374151; border: 1px solid #D1D5DB; border-radius: 10px; padding: 12px; font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: center; }
    /* Cookie manage panel */
    #cookieManage { position: fixed; bottom: 0; left: 0; right: 0; z-index: 99991; background: #fff; border-top: 1px solid #E5E7EB; border-radius: 16px 16px 0 0; padding: 20px 18px 28px; transform: translateY(100%); visibility: hidden; transition: transform .32s cubic-bezier(.4,0,.2,1), visibility 0s .32s; }
    #cookieManage.visible { transform: translateY(0); visibility: visible; transition: transform .32s cubic-bezier(.4,0,.2,1), visibility 0s 0s; }
    .ck-mgmt-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
    .ck-mgmt-title { font-size: 15px; font-weight: 700; color: #0E1629; }
    .ck-back { font-size: 12.5px; color: #6B7280; cursor: pointer; display: flex; align-items: center; gap: 4px; background: none; border: none; padding: 0; }
    .ck-mgmt-desc { font-size: 12px; color: #6B7280; line-height: 1.5; margin-bottom: 14px; }
    .ck-mgmt-desc a { color: #059669; text-decoration: none; }
    .ck-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #F3F4F6; }
    .ck-row-info .ck-row-name { font-size: 13px; font-weight: 600; color: #0E1629; margin-bottom: 3px; }
    .ck-row-info .ck-row-desc { font-size: 11.5px; color: #9CA3AF; line-height: 1.45; max-width: 230px; }
    .ck-toggle-wrap { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; padding-top: 2px; }
    .ck-toggle { width: 38px; height: 22px; border-radius: 11px; position: relative; cursor: pointer; border: none; padding: 0; transition: background .2s; }
    .ck-toggle[data-on="true"] { background: #059669; }
    .ck-toggle[data-on="false"] { background: #D1D5DB; }
    .ck-toggle.locked { background: #059669; opacity: 0.5; cursor: not-allowed; }
    .ck-toggle::after { content: ''; position: absolute; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
    .ck-toggle[data-on="true"]::after { left: 19px; }
    .ck-toggle[data-on="false"]::after { left: 3px; }
    .ck-toggle.locked::after { left: 19px; }
    .ck-always-on { font-size: 10px; color: #9CA3AF; margin-top: 4px; }
    .ck-save-btn { background: #059669; color: #fff; border: none; border-radius: 10px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; text-align: center; width: 100%; margin-top: 16px; }
    /* Q1 terms notice */
    .q-terms-notice { font-size: 11px; color: #9CA3AF; text-align: center; margin-top: 8px; line-height: 1.5; }
    .q-terms-notice a { color: #6B7280; text-decoration: underline; }
    /* Legal Hub page */
    .page-legal { display: none; }
    .page-legal.active { display: block; min-height: 100vh; background: #F8FAFC; }
    /* About Us page */
    .page-about { display: none; }
    .page-about.active { display: block; min-height: 100vh; background: #F8FAFC; }
    .legal-body { max-width: 680px; margin: 0 auto; padding: 24px 20px 80px; }
    .legal-body h1 { font-size: 22px; font-weight: 800; color: #0E1629; margin-bottom: 6px; }
    .legal-body .legal-updated { font-size: 12px; color: #9CA3AF; margin-bottom: 28px; }
    .legal-section { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid #E5E7EB; }
    .legal-section:last-child { border-bottom: none; }
    .legal-section h2 { font-size: 15px; font-weight: 700; color: #0E1629; margin-bottom: 8px; }
    .legal-section p { font-size: 13.5px; color: #374151; line-height: 1.7; margin-bottom: 8px; }
    .legal-section b { color: #0E1629; }
    .legal-doc-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: #059669; text-decoration: none; padding: 7px 12px; border: 1.5px solid #A7F3D0; border-radius: 8px; background: #F0FDF4; }
    .legal-doc-link:hover { background: #D1FAE5; }
    .legal-contact { font-size: 13.5px; color: #374151; }
    .legal-contact a { color: #059669; }


    /* ══════════ WHY — VARIANT B ══════════ */
    .why-b-wrap { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
    .why-b-header { display: grid; grid-template-columns: 0.65fr 1fr 1fr; gap: 1px; background: var(--border); }
    .why-b-col-head { padding: 11px 20px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
    .why-b-col-head.crit { background: #fafaf8; color: #888; }
    .why-b-col-head.bad  { background: #FEF2F2; color: #DC2626; }
    .why-b-col-head.good { background: var(--green-xl); color: var(--green); }
    .why-b-rows { display: flex; flex-direction: column; gap: 1px; background: var(--border); }
    .why-b-row  { display: grid; grid-template-columns: 0.65fr 1fr 1fr; gap: 1px; background: var(--border); }
    .why-b-cell { padding: 14px 20px; font-size: 14px; line-height: 1.5; display: flex; align-items: flex-start; gap: 10px; }
    .why-b-cell.crit { background: #fafaf8; color: #374151; font-weight: 600; font-size: 13px; align-items: center; }
    .why-b-cell.bad  { background: #FFF5F5; color: #7F1D1D; }
    .why-b-cell.good { background: #F0FDF4; color: #065F46; }
    @media (max-width: 560px) {
      .why-b-header { grid-template-columns: 1fr 1fr; }
      .why-b-col-head.crit { display: none; }
      .why-b-row { grid-template-columns: 1fr 1fr; }
      .why-b-cell.crit {
        grid-column: 1 / -1;
        background: #f0f0ec;
        font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
        padding: 8px 14px;
      }
      .why-b-cell.bad, .why-b-cell.good { padding: 11px 12px; font-size: 13px; }
    }
    .why-b-dot { width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
                 background-size: 9px; background-repeat: no-repeat; background-position: center; }
    .why-b-dot.bad-dot  { background-color: #FECACA; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DC2626' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E"); }
    .why-b-dot.good-dot { background-color: #BBF7D0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E"); }

    /* ══════════ PROFILING ══════════ */
    .prof-body { background: #F8FAFC; min-height: calc(100vh - 64px); }
    .prof-page { max-width: 560px; margin: 0 auto; padding: 28px 20px 40px; display: flex; flex-direction: column; gap: 12px; }

    .screen-dots { display: flex; justify-content: center; gap: 6px; }
    .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: all .3s; }
    .dot.active { width: 20px; border-radius: 3px; background: var(--dark); }
    .dot.done { background: var(--green); }

    /* ── Forecast accuracy notification ── */
    .accuracy-block { border-radius: 10px; padding: 9px 12px 10px; margin-top: 0; animation: fadeUp .25s ease; }
    .accuracy-block.red    { background: #FEF2F2; border: 1px solid #FECACA; }
    .accuracy-block.yellow { background: #FFFBEB; border: 1px solid #FDE68A; }
    .accuracy-block.green  { background: #F0FDF4; border: 1px solid #A7F3D0; }
    .acc-level-label { font-size: 13px; font-weight: 700; letter-spacing: .2px; margin-bottom: 7px; }
    .accuracy-block.red    .acc-level-label { color: #DC2626; }
    .accuracy-block.yellow .acc-level-label { color: #D97706; }
    .accuracy-block.green  .acc-level-label { color: #059669; }
    .seg-bar { display: flex; gap: 4px; margin-bottom: 6px; }
    .seg { flex: 1; height: 5px; border-radius: 100px; background: rgba(0,0,0,.10); transition: background .3s; }
    .seg.lit-red    { background: #EF4444; }
    .seg.lit-yellow { background: #F59E0B; }
    .seg.lit-green  { background: #059669; }
    .acc-improve-hint { font-size: 12px; color: #9CA3AF; line-height: 1.4; margin-top: 5px; }
    .acc-block-submit { width: 100%; margin-top: 10px; padding: 12px; border-radius: 10px; background: #EF4444; color: #fff; border: none; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
    .acc-block-submit:hover { background: #DC2626; }
    .drop-select { width:100%; padding:14px 16px; border:2px solid #E5E7EB; border-radius:14px; font-size:15px; font-family:inherit; color:#0E1629; background:#fff; -webkit-appearance:none; appearance:none; outline:none; cursor:pointer; transition:border-color .2s; }
    .drop-select:focus { border-color:var(--green); }
    .drop-select option { color:#0E1629; }
    .country-wrap { position:relative; }
    .country-input { width:100%; padding:14px 16px; border:2px solid #E5E7EB; border-radius:14px; font-size:15px; font-family:inherit; color:#0E1629; background:#fff; outline:none; transition:border-color .2s; box-sizing:border-box; }
    .country-input:focus { border-color:var(--green); }
    .country-input::placeholder { color:#9CA3AF; }
    .country-list { position:absolute; top:calc(100% + 6px); left:0; right:0; background:#fff; border:1.5px solid #E5E7EB; border-radius:14px; box-shadow:0 8px 24px rgba(0,0,0,.10); max-height:220px; overflow-y:auto; z-index:100; display:none; }
    .country-list.open { display:block; }
    .country-item { padding:12px 16px; font-size:15px; font-family:inherit; color:#0E1629; cursor:pointer; transition:background .12s; }
    .country-item:hover, .country-item.focused { background:#F0FDF8; color:var(--green); }
    .country-item em { font-style:normal; color:var(--green); font-weight:700; }
    .country-empty { padding:14px 16px; font-size:14px; color:#9CA3AF; text-align:center; }
    .submit-btn { width: 100%; padding: 14px; border-radius: 12px; font-family: inherit; font-size: 15px; font-weight: 700; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .3s; }
    .submit-btn.hidden { display: none; }
    .submit-btn.yellow { background: var(--yellow); color: #fff; box-shadow: 0 4px 16px rgba(245,158,11,.35); }
    .submit-btn.yellow:hover { background: #D97706; transform: translateY(-1px); }
    .submit-btn.green  { background: var(--green);  color: #fff; box-shadow: 0 4px 16px rgba(5,150,105,.35); }
    .submit-btn.green:hover  { background: #047857; transform: translateY(-1px); }

    .question-card { background: var(--white); border-radius: 20px; border: 1.5px solid var(--border); padding: 24px 24px 18px; animation: fadeUp .3s ease; }
    .q-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
    .q-num { font-size: 12px; font-weight: 700; color: var(--gray); }
    .q-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px; }
    .q-badge.required { background: #FEE2E2; color: var(--red); }
    .q-badge.optional  { background: var(--gray-l); color: var(--gray); }
    .q-meta.req-meta { justify-content: space-between; }
    .q-mandatory-hint { font-size: 11px; font-weight: 600; color: var(--red); }
    .q-counter { font-size: 11px; font-weight: 700; background: #FEE2E2; color: var(--red); padding: 2px 10px; border-radius: 100px; white-space: nowrap; }
    .q-title { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; color: var(--dark); margin-bottom: 8px; }
    .q-sub { font-size: 14px; color: var(--gray); margin-bottom: 24px; }

    .period-toggle { display: flex; gap: 4px; background: var(--gray-l); border-radius: 10px; padding: 4px; margin-bottom: 12px; width: fit-content; }
    .period-btn { padding: 6px 16px; border-radius: 7px; border: none; background: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--gray); cursor: pointer; transition: all .15s; }
    .period-btn.active { background: var(--white); color: var(--dark); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
    .monthly-equiv { font-size: 13px; color: var(--green); font-weight: 600; margin-top: 4px; min-height: 0; }

    .input-aed { display: flex; align-items: center; border: 2px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .15s; }
    .input-aed:focus-within { border-color: var(--green); }
    .input-aed .currency { padding: 0 16px; background: var(--gray-l); font-size: 15px; font-weight: 700; color: var(--gray); height: 56px; display: flex; align-items: center; border-right: 2px solid var(--border); }
    .input-aed input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 22px; font-weight: 700; padding: 0 16px; height: 56px; color: var(--dark); background: transparent; }
    .input-aed input::placeholder { color: #D1D5DB; font-weight: 400; font-size: 18px; }
    .input-hint { font-size: 12px; color: var(--gray); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

    .options-list { display: flex; flex-direction: column; gap: 10px; }
    .option-btn { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--border); border-radius: 14px; background: var(--white); cursor: pointer; font-family: inherit; text-align: left; transition: all .15s; }
    @media (hover: hover) { .option-btn:hover { border-color: #9CA3AF; background: var(--gray-l); } }
    .option-btn.selected { border-color: var(--green); background: #F0FDF8; }
    .opt-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .15s; }
    .option-btn.selected .opt-radio { border-color: var(--green); background: var(--green); }
    .option-btn.selected .opt-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: white; }
    .option-btn:focus, .option-btn:focus-visible { outline: none; box-shadow: none; }
    .opt-label { font-size: 15px; font-weight: 600; color: var(--dark); }
    .opt-desc { font-size: 13px; color: var(--gray); margin-top: 1px; }

    .q-privacy-note { font-size: 11px; color: #9CA3AF; margin: 10px 0 -2px; display: flex; align-items: center; gap: 5px; }
    .nav-btns { display: flex; gap: 12px; align-items: center; }
    .btn-back { height: 36px; padding: 0 4px; border: none; border-radius: 0; background: transparent; font-family: inherit; font-size: 13px; font-weight: 500; color: #C0C4CC; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: color .15s; flex-shrink: 0; }
    .btn-back:hover { color: #9CA3AF; }
    .btn-next { flex: 1; height: 46px; margin-left: 12px; border: none; border-radius: 12px; background: var(--dark); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .15s; opacity: .35; pointer-events: none; }
    .btn-next.active { opacity: 1; pointer-events: all; }
    .btn-next.active:hover { background: #1E2D45; transform: translateY(-1px); }
    .btn-skip { height: 36px; padding: 0 4px; border: none; border-radius: 0; background: transparent; font-family: inherit; font-size: 13px; font-weight: 500; color: #C0C4CC; cursor: pointer; display: flex; align-items: center; gap: 4px; transition: color .15s; flex-shrink: 0; }
    .btn-skip:hover { color: #9CA3AF; }
    .nav-btns-inner { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid #F3F4F6; }

    @keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

    /* ══════════ LOADING OVERLAY ══════════ */
    #loadingOverlay {
      display: none;
      position: fixed; inset: 0; z-index: 9999;
      background: rgba(255,255,255,.78);
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
      flex-direction: column; align-items: center; justify-content: center; gap: 28px;
      animation: overlayIn .3s ease forwards;
      cursor: pointer;
    }
    #loadingOverlay.visible { display: flex; }
    @keyframes overlayIn {
      from { opacity: 0; } to { opacity: 1; }
    }
    .lo-wordmark { height: 30px; opacity: .5; }
    .lo-icon     { width: 88px; height: 88px; transform-origin: 50% 50%; }
    @keyframes loSpin {
      0%   { transform: rotate(0deg)   scale(1);    }
      20%  { transform: rotate(72deg)  scale(1.15); }
      30%  { transform: rotate(108deg) scale(1);    }
      45%  { transform: rotate(162deg) scale(1.12); }
      55%  { transform: rotate(198deg) scale(1);    }
      100% { transform: rotate(360deg) scale(1);    }
    }
    .lo-icon { animation: loSpin 2s linear infinite; }
    .lo-dots { display: flex; gap: 6px; }
    .lo-dot  { width: 5px; height: 5px; border-radius: 50%; background: rgba(0,0,0,.15);
               animation: loDot 1.2s ease-in-out infinite; }
    .lo-dot:nth-child(2) { animation-delay: .2s; }
    .lo-dot:nth-child(3) { animation-delay: .4s; }
    @keyframes loDot {
      0%,80%,100% { opacity:.15; transform:scale(1); }
      40% { opacity:1; transform:scale(1.4); background:#059669; }
    }
    .lo-text { font-size: 13px; color: rgba(0,0,0,.35); letter-spacing: .03em; font-weight: 500; will-change: opacity, transform; }
    .lo-progress { width: 120px; height: 3px; background: rgba(0,0,0,.08); border-radius: 100px; overflow: hidden; }
    .lo-progress-fill { height: 100%; background: #059669; border-radius: 100px;
                        width: 0%; transition: width linear; }

    /* ══════════ OFFERS ══════════ */
    .page-offers { display: none; }
    .page-offers.active { display: block; }
    .offers-body { background: #F8FAFC; min-height: calc(100vh - 64px); padding-bottom: 100px; }

    /* ── Email CTA sticky footer ── */
    .email-cta {
      position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
      width: 100%; max-width: 480px; z-index: 200;
      background: #0F172A;
      border-radius: 20px 20px 0 0;
      padding: 16px 20px 24px;
      box-shadow: 0 -8px 40px rgba(15,23,42,0.38);
      display: none;
      transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
    }
    .email-cta.visible { display: block; }
    .email-cta.hiding { opacity: 0; transform: translateX(-50%) translateY(20px); }
    /* pill handle */
    .email-cta::before {
      content: ''; display: block; width: 32px; height: 3px;
      background: rgba(255,255,255,0.15); border-radius: 2px;
      margin: 0 auto 16px;
    }
    /* top row: icon box + text */
    .email-cta-top {
      display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px;
    }
    .email-cta-icon-box {
      width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
      background: linear-gradient(135deg, #059669, #10B981);
      display: flex; align-items: center; justify-content: center;
    }
    .email-cta-text { flex: 1; min-width: 0; }
    .email-cta-heading {
      font-size: 13.5px; font-weight: 700; color: #fff;
      margin-bottom: 3px; line-height: 1.3;
    }
    .email-cta-sub {
      font-size: 11.5px; color: rgba(255,255,255,0.45); line-height: 1.4;
    }
    .email-cta-input {
      width: 100%; box-sizing: border-box;
      padding: 11px 14px; border: 1.5px solid rgba(255,255,255,0.1); border-radius: 11px;
      font-size: 14px; font-family: inherit; color: #fff; outline: none;
      background: rgba(255,255,255,0.07);
      transition: border-color .15s, background .15s;
    }
    .email-cta-input::placeholder { color: rgba(255,255,255,0.3); }
    .email-cta-input:focus { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.11); }
    .email-cta-expand {
      overflow: hidden; max-height: 0; opacity: 0;
      transition: max-height .32s ease, opacity .28s ease, margin-top .3s;
      margin-top: 0;
    }
    .email-cta.expanded .email-cta-expand {
      max-height: 260px; opacity: 1; margin-top: 12px;
    }
    .email-cta-consent {
      display: flex; align-items: flex-start; gap: 9px;
      font-size: 12px; color: rgba(255,255,255,0.45); line-height: 1.5; cursor: pointer;
      margin-bottom: 12px; user-select: none;
    }
    .email-cta-consent input[type=checkbox] {
      margin-top: 2px; flex-shrink: 0; accent-color: #34D399;
      width: 16px; height: 16px; cursor: pointer;
    }
    .email-cta-consent a { color: #6EE7B7; text-decoration: none; }
    .email-cta-consent a:hover { text-decoration: underline; }
    .email-cta-submit {
      width: 100%; padding: 13px;
      background: linear-gradient(135deg, #059669, #10B981);
      color: #fff; border: none; border-radius: 11px;
      font-size: 14px; font-weight: 700; font-family: inherit;
      cursor: pointer; opacity: .35; pointer-events: none;
      transition: opacity .2s, filter .15s;
    }
    .email-cta-submit.active { opacity: 1; pointer-events: auto; }
    .email-cta-submit.active:active { filter: brightness(0.9); }
    .email-cta-submitted {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      padding: 10px 0 2px; font-size: 14px; font-weight: 600; color: #34D399;
    }

    /* sticky toolbar */
    .offers-toolbar {
      position: sticky; top: 0; z-index: 50;
      background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
      border-bottom: 1px solid var(--border);
      padding: 10px 20px; display: flex; flex-direction: column; gap: 0;
    }
    .offers-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .offers-count { font-size: 13px; font-weight: 600; color: var(--gray); flex-shrink: 0; }
    .offers-count b { color: var(--dark); }
    .offers-ctrl-row { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
    /* active filter chips — second row, shown only when not empty */
    .filter-chips { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; }
    .filter-chips:empty { display: none; padding-top: 0; }
    /* ── Responsive offers toolbar ── */
    @media (max-width: 540px) {
      .offers-toolbar { padding: 8px 16px; }
      .sort-label-text { display: none; }
      .sort-toggle-wrap { margin-left: 0 !important; }
    }
    .fchip {
      display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 11px;
      background: #FEF2F2; border: 1.5px solid #FECACA; border-radius: 100px;
      font-size: 12px; font-weight: 600; color: #B91C1C; white-space: nowrap;
      cursor: default; flex-shrink: 0;
    }
    .fchip-x {
      width: 16px; height: 16px; border-radius: 50%; background: #FECACA;
      border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
      color: #B91C1C; font-size: 10px; font-weight: 800; padding: 0; line-height: 1;
      transition: background .15s; flex-shrink: 0;
    }
    .fchip-x:hover { background: #FCA5A5; }
    .offers-btn {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 14px; border-radius: 10px;
      border: 1.5px solid var(--border); background: var(--white);
      font-family: inherit; font-size: 13px; font-weight: 600; color: var(--dark);
      cursor: pointer; transition: border-color .15s, background .15s; white-space: nowrap;
    }
    .offers-btn:hover { border-color: #9CA3AF; }
    .offers-btn.has-active { border-color: var(--green); color: var(--green); background: #F0FDF8; }
    .offers-btn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
    .offers-btn svg { flex-shrink: 0; }

    /* card list */
    .offers-list { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 10px; }

    /* single offer card */
    .offer-card {
      background: var(--white); border: 1.5px solid var(--border); border-radius: 18px;
      padding: 16px; display: flex; gap: 12px; align-items: flex-start;
      cursor: pointer; transition: border-color .15s, box-shadow .15s;
    }
    .offer-card:hover { border-color: #9CA3AF; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
    .offer-card.top { border-color: #FCD34D; background: #FFFDF5; }

    /* rank badge */
    .offer-rank { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; margin-top: 2px; }
    .offer-rank.r1 { background: #FEF3C7; color: #D97706; }
    .offer-rank.r2 { background: #F3F4F6; color: #6B7280; }
    .offer-rank.r3 { background: #FEF3C7; color: #92400E; }
    .offer-rank.rn { background: var(--gray-l); color: var(--gray); font-size: 11px; }

    /* bank logo circle */
    .offer-logo { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: white; flex-shrink: 0; }

    /* card body */
    .offer-body { flex: 1; min-width: 0; }
    .offer-name { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 2px; line-height: 1.3; }
    .offer-bank { font-size: 12px; color: var(--gray); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
    .offer-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 100px; background: var(--gray-l); color: var(--gray); }
    .offer-tag.salary { background: #EDE9FE; color: #6D28D9; }
    .offer-tag.premium { background: #FEF3C7; color: #92400E; }
    .offer-perks { font-size: 12px; color: var(--gray); line-height: 1.5; }

    /* amount */
    .offer-amount { text-align: right; flex-shrink: 0; }
    .offer-aed { font-size: 18px; font-weight: 800; color: var(--green); letter-spacing: -.5px; }
    .offer-aed-label { font-size: 10px; color: var(--gray); font-weight: 500; margin-top: 1px; line-height: 1.3; }
    .offer-arrow { font-size: 12px; color: #D1D5DB; margin-top: 8px; text-align: right; }

    /* ── Bottom sheets ── */
    .sheet-backdrop {
      display: none; position: fixed; inset: 0; z-index: 200;
      background: rgba(0,0,0,.3); opacity: 0; transition: opacity .2s ease;
    }
    .sheet-backdrop.open { display: block; }
    .sheet-backdrop.visible { opacity: 1; }
    .sheet {
      position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
      z-index: 201; width: 100%; max-width: 520px;
      background: var(--white); border-radius: 20px 20px 0 0;
      padding: 0 0 32px; transition: transform .28s cubic-bezier(.32,1,.5,1);
    }
    .sheet.open { transform: translateX(-50%) translateY(0); }
    .sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: #E5E7EB; margin: 12px auto 0; }
    .sheet-title { font-size: 15px; font-weight: 800; color: var(--dark); padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
    .sheet-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #F3F4F6; cursor: pointer; }
    .sheet-row:last-of-type { border-bottom: none; }
    .sheet-row.filter-row { justify-content: flex-start; gap: 14px; align-items: flex-start; }
    .sheet-row.filter-row .ft-check { margin-top: 2px; }
    .sheet-row-label { font-size: 14px; font-weight: 600; color: var(--dark); }
    .sheet-row-sub { font-size: 12px; color: var(--gray); margin-top: 2px; }

    /* toggle switch */
    .toggle { width: 42px; height: 24px; border-radius: 12px; background: #E5E7EB; position: relative; transition: background .2s; cursor: pointer; flex-shrink: 0; }
    .toggle.on { background: var(--green); }
    .toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
    .toggle.on::after { transform: translateX(18px); }

    /* filter checkbox */
    .ft-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #D1D5DB; background: white; position: relative; flex-shrink: 0; transition: background .15s, border-color .15s; }
    .ft-check.on { background: var(--green); border-color: var(--green); }
    .ft-check.on::after { content: ''; position: absolute; top: 2px; left: 6px; width: 6px; height: 11px; border: 2.5px solid white; border-top: none; border-left: none; transform: rotate(45deg); }

    /* sort radio (kept for legacy sheet, hidden now) */
    .sort-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0; }
    .sort-radio.selected { border-color: var(--green); background: var(--green); }
    .sort-radio.selected::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: white; }

    /* ── Sort pill toggle ── */
    .sort-toggle-wrap { display: flex; align-items: center; gap: 6px; }
    .sort-pill { display: flex; background: #F3F4F6; border-radius: 10px; padding: 3px; gap: 2px; }
    .sort-pill-btn {
      padding: 5px 13px; border-radius: 7px; font-size: 13px; font-weight: 600;
      color: #6B7280; cursor: pointer; transition: all .18s; border: none;
      background: none; font-family: inherit; line-height: 1.4; position: relative;
    }
    .sort-pill-btn.active { background: #fff; color: #0E1629; box-shadow: 0 1px 4px rgba(0,0,0,.10); }
    /* ── Global tap tooltip ─────────────────────────────────────────── */
    .g-tip-pop {
      position: fixed; z-index: 99999;
      background: #0E1629; color: #fff;
      font-size: 12.5px; font-weight: 500; line-height: 1.5;
      padding: 10px 13px; border-radius: 10px; max-width: 220px;
      text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.28);
      opacity: 0; pointer-events: none;
      transition: opacity .15s;
    }
    .g-tip-pop.open { opacity: 1; pointer-events: all; }
    .g-tip-pop .g-tip-arrow {
      position: absolute; left: 50%; transform: translateX(-50%);
      width: 0; height: 0;
      border: 6px solid transparent;
    }
    .g-tip-pop .g-tip-arrow.up   { top: -12px;  border-bottom-color: #0E1629; }
    .g-tip-pop .g-tip-arrow.down { bottom: -12px; border-top-color: #0E1629; }
    /* tip trigger icon */
    .tip-ico {
      display: inline-flex; align-items: center; justify-content: center;
      width: 14px; height: 14px; border-radius: 50%;
      border: 1.2px solid #C4C9D4; color: #9CA3AF;
      font-size: 9px; font-weight: 800; font-style: normal; cursor: pointer;
      vertical-align: middle; flex-shrink: 0; transition: border-color .15s, color .15s;
      line-height: 1; user-select: none;
    }
    .tip-ico:hover, .tip-ico:active { border-color: #059669; color: #059669; }
    /* desktop hover tooltip */
    .sort-pill-btn .stt {
      position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
      background: #0E1629; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.45;
      padding: 8px 11px; border-radius: 9px; pointer-events: none; opacity: 0;
      transition: opacity .15s; z-index: 200; width: 190px; text-align: center;
      box-shadow: 0 4px 16px rgba(0,0,0,.2);
    }
    .sort-pill-btn .stt::after {
      content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
      border: 5px solid transparent; border-top-color: #0E1629;
    }
    /* hover tooltips disabled — use ? button instead */
    @media (hover: hover) { .sort-pill-btn:hover .stt { opacity: 0; } }
    /* mobile info button */
    .sort-info-btn {
      width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #D1D5DB;
      background: #fff; color: #9CA3AF; font-size: 12px; font-weight: 700;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: all .15s; font-family: inherit; flex-shrink: 0; line-height: 1;
    }
    .sort-info-btn:hover { border-color: #6B7280; color: #374151; }
    /* info popover */
    .sort-info-pop {
      position: absolute; right: 0; top: calc(100% + 8px);
      background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px;
      padding: 12px 14px; width: 230px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.12);
      opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
      transform: translateY(-4px);
    }
    .sort-info-pop.open { opacity: 1; pointer-events: all; transform: translateY(0); }
    .sort-info-pop-row { display: flex; gap: 10px; align-items: flex-start; }
    .sort-info-pop-row + .sort-info-pop-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid #F3F4F6; }
    .sort-info-label { font-size: 13px; font-weight: 700; color: #0E1629; margin-bottom: 2px; }
    .sort-info-desc { font-size: 12px; color: #6B7280; line-height: 1.45; }
    .sort-info-dot { width: 8px; height: 8px; border-radius: 50%; background: #059669; flex-shrink: 0; margin-top: 4px; }

    /* apply button */
    .sheet-apply { margin: 8px 20px 0; padding: 14px; border-radius: 12px; background: var(--green); color: white; font-family: inherit; font-size: 15px; font-weight: 700; border: none; cursor: pointer; width: calc(100% - 40px); transition: background .15s; }
    .sheet-apply:hover { background: #047857; }

    /* ══════════ ASSUMPTIONS ══════════ */
    .page-assumptions { display: none; }
    .page-assumptions.active { display: block; }
    .assumptions-body { background: #F8FAFC; min-height: calc(100vh - 64px); }
    .assumptions-page { max-width: 520px; margin: 0 auto; padding: 28px 20px 48px; }
    .asmp-header { margin-bottom: 24px; }
    .asmp-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
    .asmp-header p  { font-size: 13px; color: var(--gray); }

    /* stacked bar card */
    .asmp-bar-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 20px; padding: 24px 24px 20px; margin-bottom: 20px; }
    .asmp-chart-wrap { position: relative; padding-top: 36px; padding-bottom: 8px; margin-bottom: 4px; }
    /* floating name labels */
    .asmp-seg-label { position: absolute; white-space: nowrap; transition: left .25s ease, opacity .2s ease; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; }
    .asmp-seg-label .lbl-flag { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 15px; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
    .asmp-seg-label .lbl-name { color: var(--gray); font-weight: 600; font-size: 10px; letter-spacing: .02em; }
    .asmp-seg-label .tick { width: 1.5px; height: 8px; background: #D1D5DB; }
    .asmp-seg-label.top { top: 0; flex-direction: column; }
    .asmp-seg-label.top .tick { order: 3; }
    .asmp-seg-label.bottom { bottom: 0; flex-direction: column-reverse; }
    .asmp-seg-label.bottom .tick { order: 3; }
    /* bar */
    .asmp-flow-bar { display: flex; height: 44px; border-radius: 10px; overflow: hidden; gap: 2px; }
    .asmp-flow-seg { display: flex; align-items: center; justify-content: center; transition: width .25s ease; overflow: hidden; min-width: 0; flex-shrink: 0; }
    .asmp-flow-seg.europe   { background: #6366F1; }
    .asmp-flow-seg.other    { background: linear-gradient(90deg, #059669, #34D399); }
    .asmp-flow-seg.domestic { background: #CBD5E1; }
    .asmp-seg-num { font-size: 13px; font-weight: 800; color: rgba(255,255,255,.95); transition: opacity .2s ease; white-space: nowrap; }
    .asmp-flow-seg.domestic .asmp-seg-num { color: #475569; }

    /* sliders inside card */
    .asmp-sliders { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
    .asmp-sl-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
    .asmp-sl-name { font-size: 13px; font-weight: 700; color: var(--dark); }
    .asmp-sl-val  { font-size: 16px; font-weight: 900; }
    .asmp-sl-sub  { font-size: 11px; color: var(--gray); margin-bottom: 8px; }
    .asmp-slider  { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 100px; outline: none; cursor: pointer; }
    .asmp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: white; border: 2.5px solid var(--green); box-shadow: 0 2px 8px rgba(5,150,105,.25); cursor: grab; transition: transform .15s; }
    .asmp-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.2); }
    .asmp-slider.blue::-webkit-slider-thumb { border-color: #6366F1; box-shadow: 0 2px 8px rgba(99,102,241,.25); }
    .asmp-sl-ticks { display: flex; justify-content: space-between; font-size: 11px; color: #9CA3AF; margin-top: 5px; }
    .asmp-eu-block { transition: opacity .2s; }
    .asmp-eu-block.disabled { opacity: 0.35; pointer-events: none; }

    /* actions */
    .asmp-actions { display: flex; gap: 8px; align-items: center; }
    .asmp-back-btn   { height: 48px; padding: 0 16px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--white); font-family: inherit; font-size: 14px; font-weight: 600; color: var(--gray); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s; flex-shrink: 0; }
    .asmp-back-btn:hover { border-color: #9CA3AF; color: var(--dark); }
    .asmp-reset-btn  { height: 48px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--white); font-family: inherit; font-size: 13px; font-weight: 600; color: var(--gray); cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all .15s; flex-shrink: 0; }
    .asmp-reset-btn:hover { border-color: #9CA3AF; color: var(--dark); }
    .asmp-confirm-btn { flex: 1; height: 48px; border: none; border-radius: 12px; background: var(--green); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 4px 16px rgba(5,150,105,.25); transition: all .15s; }
    .asmp-confirm-btn:hover { background: #047857; transform: translateY(-1px); }

    /* ══════════ SPEND MIX ══════════ */
    .spendmix-body { background: #F8FAFC; min-height: calc(100vh - 64px); }
    .spendmix-page { max-width: 660px; margin: 0 auto; padding: 28px 20px 48px; }

    .sm-header { margin-bottom: 20px; }
    .sm-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
    .sm-header p  { font-size: 13px; color: var(--gray); }

    .sm-card { background: var(--white); border-radius: 20px; border: 1.5px solid var(--border); overflow: hidden; }

    .tbl { width: 100%; border-collapse: collapse; }
    .tbl thead th { font-size: 11px; font-weight: 700; color: var(--gray); letter-spacing: .5px; text-transform: uppercase; padding: 12px 10px; text-align: left; border-bottom: 1.5px solid var(--border); background: var(--gray-l); }
    .tbl thead th.right { text-align: right; }
    .tbl tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
    .tbl tbody tr:last-child { border-bottom: none; }
    .tbl tbody tr:hover { background: #FAFAFA; }
    .tbl td { padding: 9px 10px; vertical-align: middle; }

    .sm-ico-cell { width: 26px; padding-right: 0; padding-left: 4px; cursor: pointer; }
    .sm-ico-cell svg { display: block; }
    .cat-name-cell { font-size: 13px; font-weight: 600; color: var(--dark); max-width: 160px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; line-height: 1.35; padding-left: 2px; cursor: pointer; }
    #smCatTooltip { position: fixed; z-index: 9999; background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px; padding: 11px 14px; box-shadow: 0 4px 20px rgba(14,22,41,.10); max-width: 280px; pointer-events: auto; display: none; }
    #smCatTooltip p { font-size: 12.5px; color: #374151; line-height: 1.55; margin: 0; }
    .bar-cell { width: 72px; }
    .sm-mini-bar { height: 6px; border-radius: 100px; background: var(--green-xl); }
    .sm-mini-fill { height: 100%; border-radius: 100px; background: var(--green); }
    .val-cell { text-align: right; width: 100px; white-space: nowrap; }
    .val-pct  { font-size: 13px; font-weight: 700; color: var(--dark); }
    .val-sep  { font-size: 12px; color: var(--gray); }
    .val-aed  { font-size: 12px; color: var(--gray); }
    .ctrl-cell { text-align: right; width: 148px; padding-right: 10px; }
    .ctrl-btns { display: inline-flex; gap: 4px; }
    .sm-btn:hover { background: #F3F4F6; border-color: #9CA3AF; }
    .sm-btn:active { transform: scale(0.92); }
    .sm-btn:disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
    .sm-btn.reset-default-btn { color: #C0C4CC; border-color: #E5E7EB; }
    .sm-btn.reset-default-btn:hover { border-color: #D1D5DB; color: #9CA3AF; background: #F9FAFB; }
    .tbl tbody tr:hover { background: #F9FAFB; }
    .tbl tbody tr.pinned-row { background: #F0FDF4; }
    .tbl tbody tr.pinned-row td:first-child { border-left: 3px solid #22C55E; box-sizing: border-box; }
    .tbl tbody tr.pinned-row:hover { background: #ECFDF5; }
    .tbl tbody tr { box-sizing: border-box; }
    .sm-btn { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid #D1D5DB; background: var(--white); font-family: inherit; font-size: 16px; font-weight: 700; color: #374151; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s, color .15s; box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
    .sm-btn.sm-plus-btn, .sm-btn.sm-minus-btn { font-size: 20px; line-height: 1; letter-spacing: -0.5px; position: relative; overflow: visible; }
    /* Extend touch area to ~44px without affecting layout */
    .sm-btn.sm-plus-btn::after, .sm-btn.sm-minus-btn::after { content: ''; position: absolute; inset: -8px; }
    .sm-btn.reset-btn { font-size: 11px; font-weight: 800; color: #9CA3AF; border-color: #E5E7EB; }
    .tbl-hint { font-size: 12px; color: var(--gray); padding: 8px 14px 0; display: flex; align-items: center; gap: 5px; }

    /* Toggle row */
    .toggle-tr td { padding: 0; border-bottom: none; }
    .sm-toggle-btn { width: 100%; padding: 10px; background: var(--gray-l); border: none; border-top: 1px dashed var(--border); border-bottom: 1.5px solid var(--border); font-family: inherit; font-size: 13px; font-weight: 600; color: var(--gray); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .15s; }
    .sm-toggle-btn.open { background: var(--green-xl); color: var(--green); }
    .sm-chevron { width: 20px; height: 20px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; transition: transform .25s; flex-shrink: 0; }
    .sm-toggle-btn.open .sm-chevron { transform: rotate(180deg); background: rgba(5,150,105,.15); }
    .sm-badge { background: var(--border); color: var(--gray); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 100px; transition: all .15s; }
    .sm-toggle-btn.open .sm-badge { background: rgba(5,150,105,.15); color: var(--green); }
    .collapsed-tbody tr { display: none; }
    .collapsed-tbody.expanded tr { display: table-row; }

    /* ── Responsive spend-mix table (mobile) ── */
    @media (max-width: 500px) {
      .spendmix-page { padding-left: 12px; padding-right: 12px; }
      .bar-cell { display: none; }            /* hide progress bar column */
      .ctrl-cell { width: 100px; padding-right: 6px; }
      .ctrl-btns { gap: 3px; }
      .sm-btn { width: 27px; height: 27px; border-radius: 6px; }
      .sm-btn.sm-plus-btn, .sm-btn.sm-minus-btn { font-size: 18px; }
      .val-cell { width: 80px; }
      .val-pct  { font-size: 12px; }
      .val-aed  { font-size: 11px; }
      .tbl td { padding-left: 6px; padding-right: 6px; }
      .sm-ico-cell { padding-left: 6px; }
    }

    /* ── Icon-only collapse for narrow screens ──────────────────────────────
       Adjustments: Default button  |  Offers nav: Recalculate  |  Filters btn
       Threshold 430px covers iPhone SE (375), 12 mini (360), and similar.
       Each button keeps its icon; the .btn-label text node is hidden and
       padding tightened so the button becomes a compact square/pill. ── */
    @media (max-width: 430px) {
      /* Adjustments — Default (base height is 48px) */
      .asmp-reset-btn .btn-label { display: none; }
      .asmp-reset-btn { padding: 0; width: 48px; min-width: 48px; justify-content: center; }

      /* Offers nav — Recalculate (base padding 10px top/bottom → ~40px tall) */
      .nav-recalc-btn .btn-label { display: none; }
      .nav-recalc-btn { padding: 0; width: 40px; min-width: 40px; height: 40px; justify-content: center; }

      /* Offers toolbar — Filters (base padding 7px top/bottom → ~36px tall) */
      .offers-btn .btn-label { display: none; }
      .offers-btn { padding: 0; width: 36px; min-width: 36px; height: 36px; justify-content: center; }
    }

    /* Footer */
    .sm-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-top: 1.5px solid var(--border); background: var(--gray-l); }
    .sm-total { font-size: 13px; font-weight: 700; }
    .sm-total em { color: var(--green); font-style: normal; }
    .sm-total.error em { color: var(--red); }
    /* Period pill toggle */
    .sm-period-toggle { display:inline-flex; border:1.5px solid var(--border); border-radius:20px; overflow:hidden; background:var(--gray-l); }
    .sm-period-seg { padding:3px 8px; font-size:11px; font-weight:700; letter-spacing:.03em; cursor:pointer; color:#9CA3AF; border-radius:18px; transition:all .15s; user-select:none; white-space:nowrap; }
    .sm-period-seg.active { background:var(--white); color:var(--dark); box-shadow:0 1px 3px rgba(0,0,0,.1); }

    /* Actions */
    .sm-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
    .sm-back-btn { height: 48px; padding: 0 18px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--white); font-family: inherit; font-size: 14px; font-weight: 600; color: var(--gray); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s; flex-shrink: 0; }
    .sm-back-btn:hover { border-color: #9CA3AF; color: var(--dark); }
    .sm-reset-btn { height: 48px; padding: 0 18px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--white); font-family: inherit; font-size: 14px; font-weight: 600; color: var(--gray); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s; flex-shrink: 0; }
    .sm-reset-btn:hover { border-color: #9CA3AF; color: var(--dark); }
    .sm-confirm-btn { flex: 1; height: 48px; border: none; border-radius: 12px; background: var(--green); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 4px 16px rgba(5,150,105,.25); transition: all .15s; }
    .sm-confirm-btn:hover { background: #047857; transform: translateY(-1px); }

    /* ══════════ PRODUCT TILES ══════════ */
    .offers-list { font-family: 'Outfit', system-ui, sans-serif; }
    .tile {
      background: #fff; border-radius: 16px;
      border-left: 5px solid var(--c);
      padding: 14px 16px 13px 14px;
      cursor: pointer; position: relative;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 1px 4px rgba(0,0,0,.07);
    }
    .tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
    /* peek tile — 11th card fades out */
    .tile-peek-wrap { position: relative; pointer-events: none; user-select: none; overflow: hidden; border-radius: 16px; }
    .tile-peek-wrap .tile { transform: none !important; box-shadow: 0 1px 4px rgba(0,0,0,.07) !important; opacity: .85; cursor: default; }
    .tile-peek-wrap::after {
      content: ''; position: absolute; inset: 0; z-index: 3;
      background: linear-gradient(to bottom, rgba(248,250,252,0) 5%, rgba(248,250,252,0.92) 22%, #F8FAFC 35%);
      border-radius: 16px;
    }
    .t-arrow { position: absolute; right: 13px; top: 14px; color: #D1D5DB; font-size: 14px; font-weight: 600; }
    .t-row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-right: 18px; }
    .t-bank-name { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--c); margin-bottom: 2px; }
    .t-product { font-size: 14.5px; font-weight: 700; color: #0E1629; line-height: 1.2; }
    .t-result { text-align: right; flex-shrink: 0; }
    .t-aed { font-size: 11px; font-weight: 600; vertical-align: top; line-height: 1.6; }
    .t-amt { font-size: 22px; font-weight: 900; line-height: 1; }
    .t-aed, .t-amt { color: #059669; }
    .t-aed.neg, .t-amt.neg { color: #EF4444; }
    .t-lbl { font-size: 9px; color: #9CA3AF; font-weight: 500; margin-top: 2px; }
    .t-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
    .t-cat {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 10.5px; font-weight: 600;
      background: #F1F5F9; color: #374151;
      padding: 4px 9px 4px 6px; border-radius: 100px;
    }
    .t-cat svg { opacity: .8; flex-shrink: 0; }
    .t-cat em { font-style: normal; color: #111827; font-weight: 700; margin-left: 1px; }
    .t-mech { display: flex; align-items: center; gap: 6px; padding: 6px 0 0; font-size: 10.5px; font-weight: 500; color: #9CA3AF; }
    .t-mech-sub { padding: 3px 0 0 18px; font-size: 10px; font-weight: 500; color: #9CA3AF; }
    .t-hr { border: none; border-top: 1px solid #F3F4F6; margin: 11px 0; }
    .t-brow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
    .t-prem {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 10.5px; font-weight: 700;
      background: #FEF3C7; color: #92400E;
      border: 1px solid #FDE68A;
      padding: 4px 10px 4px 7px; border-radius: 100px;
    }
    .t-prem svg { flex-shrink: 0; }
    .t-req { font-size: 9.5px; color: #9CA3AF; line-height: 1.5; text-align: right; flex-shrink: 0; }

  /* ═══════════════════════════════════════════════════
     DETAIL MODAL — Variant A (full-screen slide-up)
  ═══════════════════════════════════════════════════ */
  /* ── Modal: slide-up shell ── */
  #detailBackdrop {
    display: none; position: fixed; inset: 0; z-index: 199;
    background: rgba(0,0,0,.35); cursor: pointer;
  }
  #detailBackdrop.open { display: block; }
  #detailModal {
    position: fixed; inset: 0; background: #fff;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.32,.72,0,1), visibility 0s .35s;
    visibility: hidden;
    pointer-events: none;
    z-index: 200; display: flex; flex-direction: column;
    max-width: 420px; left: 50%; translate: -50% 0; width: 100%;
    box-shadow: -4px 0 40px rgba(0,0,0,.18);
    overflow: hidden;
  }
  #detailModal.open { transform: translateY(0); pointer-events: all; visibility: visible; transition: transform .35s cubic-bezier(.32,.72,0,1), visibility 0s 0s; }

  /* ── Card detail v2 — scoped to #detailModal ── */
  #detailModal .phone-scroll {
    flex: 1; overflow-y: auto; background: #F2F3F5;
    scrollbar-width: none;
  }
  #detailModal .phone-scroll::-webkit-scrollbar { display: none; }
  #detailModal .sticky-cta {
    flex-shrink: 0; padding: 12px 16px 20px; background: #fff;
    border-top: 1px solid #E5E7EB; box-shadow: 0 -4px 16px rgba(0,0,0,.06);
    display: flex; flex-direction: row; align-items: center; gap: 8px;
  }
  #detailModal .hdr {
    padding: 16px 14px 14px; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  }
  #detailModal .hdr-close {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; border: none; font-family: inherit; cursor: pointer; flex-shrink: 0;
  }
  #detailModal .hdr-bank { font-size: 9.5px; font-weight: 700; letter-spacing:.08em; text-transform:uppercase; opacity:.7; }
  #detailModal .hdr-prod { font-size: 15px; font-weight: 800; line-height: 1.2; }
  #detailModal .fin-summary {
    display: grid; grid-template-columns: 1fr 12px 1fr 12px 1fr 12px 1fr;
    align-items: center; background: #fff; border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.06);
  }
  #detailModal .fin-cell { padding: 12px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: background .25s ease; cursor: pointer; user-select: none; }
  #detailModal .fin-cell[data-fin-idx]:hover { background: #F9FAFB; }
  #detailModal .fin-cell.fin-active:hover { background: #E8FDF5; }
  #detailModal .fin-cell[data-fin-idx="3"] { cursor: default; }
  #detailModal .fin-cell[data-fin-idx="3"]:hover { background: transparent; }
  #detailModal .fin-cell.fin-active { background: #F0FDF4; }
  #detailModal .fin-op { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #C4C9D4; line-height: 1; }
  #detailModal .fin-cell-lbl { font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: #9CA3AF; }
  #detailModal .fin-cell-amt { font-size: 15px; font-weight: 700; color: #374151; line-height: 1; }
  #detailModal .fin-cell-sub { font-size: 9px; color: #C4C9D4; }
  #detailModal .fin-cell.fin-active .fin-cell-lbl { color: #059669; }
  #detailModal .personalization-bar {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 16px 10px; background: #F0FDF4; border-bottom: 1px solid #D1FAE5;
    font-size: 12px; font-weight: 600; color: #065F46; letter-spacing: -.01em;
  }
  #detailModal .personalization-bar svg { flex-shrink: 0; }
  #detailModal .fee-status {
    display: flex; align-items: center; gap: 8px;
    background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px;
    padding: 9px 12px; font-size: 11px; font-weight: 600; color: #059669;
    margin-top: 10px; line-height: 1.4;
  }
  #detailModal .fee-status-ico {
    width: 18px; height: 18px; border-radius: 50%; background: #059669; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0;
  }
  #detailModal .sections-wrap { padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 8px; }
  #detailModal .section {
    padding: 0; max-width: none; margin: 0; /* reset landing .section */
    border-radius: 12px; border: 1px solid #E5E7EB; background: #fff; overflow: hidden;
    transition: border-left-color .25s ease, opacity .25s ease;
  }
  #detailModal .section.sec-active   { border-left: 3px solid var(--brand, #059669); }
  #detailModal .section.sec-inactive { opacity: 0.45; }
  #detailModal .sec-hdr { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 0; }
  #detailModal .sec-hdr-left { display: flex; flex-direction: column; }
  #detailModal .sec-hdr-right { position: relative; flex-shrink: 0; margin-left: 8px; }
  #detailModal .sec-title { font-size: 12px; font-weight: 800; color: #374151; text-transform: uppercase; letter-spacing: .09em; }
  #detailModal .sec-tt-btn { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #D1D5DB; background: #F9FAFB; color: #6B7280; font-size: 10px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: inherit; transition: background .15s, border-color .15s; line-height: 1; }
  #detailModal .sec-tt-btn:hover { background: #F3F4F6; border-color: #9CA3AF; }
  #detailModal .sec-tt-pop { display: none; position: absolute; top: calc(100% + 6px); right: 0; background: #0E1629; color: #fff; font-size: 11.5px; font-weight: 400; line-height: 1.5; padding: 10px 12px; border-radius: 10px; width: 230px; white-space: normal; z-index: 200; box-shadow: 0 4px 16px rgba(0,0,0,.22); }
  #detailModal .sec-tt-pop.open { display: block; }
  #detailModal .sec-tt-pop::before { content: ''; position: absolute; bottom: 100%; right: 6px; border: 5px solid transparent; border-bottom-color: #0E1629; }
  #detailModal .sec-body { padding: 0 14px 14px; }
  /* Service footer */
  #detailModal .service-footer { background: transparent; margin-top: 2px; }
  #detailModal .sf-trust { padding: 10px 16px 13px; border-bottom: 1px solid #E2E4E7; }
  #detailModal .sf-trust-title { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: #9CA3AF; margin-bottom: 6px; }
  #detailModal .sf-trust-text { font-size: 11px; color: #6B7280; line-height: 1.6; }
  #detailModal .sf-links-label { padding: 11px 16px 2px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9CA3AF; }
  #detailModal .doc-links { padding: 2px 0 2px; }
  #detailModal .doc-link { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px; cursor: pointer; text-decoration: none; color: inherit; }
  #detailModal a.doc-link { color: inherit; text-decoration: none; }
  #detailModal a.doc-link:hover .doc-link-name { text-decoration: underline; }
  #detailModal .doc-link-left { display: flex; align-items: center; gap: 10px; }
  #detailModal .doc-link-left svg { flex-shrink: 0; display: block; }
  #detailModal .doc-link-name { font-size: 11.5px; font-weight: 500; color: #374151; }
  #detailModal .doc-link-arrow { font-size: 12px; color: #C4C9D4; }
  #detailModal .doc-sep { height: 1px; background: #E5E7EB; margin: 0 16px; }
  #detailModal .sf-timestamp { padding: 10px 16px 16px; font-size: 10px; color: #9CA3AF; border-top: 1px solid #E5E7EB; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  #detailModal .sf-feedback-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: #9CA3AF; text-decoration: none; background: none; border: none; font-family: inherit; cursor: pointer; padding: 0; transition: color .15s; flex-shrink: 0; }
  #detailModal .sf-feedback-link:hover { color: #374151; }
  /* Cashback table */
  /* ── New widget-style Cashback Breakdown (for dcats products) ── */
    /* sec-body has padding: 0 14px 14px — we compensate with negative margins
       so gray backgrounds span edge-to-edge within the section card (like product_card_widgets) */
    #detailModal .cb-table { margin: 8px -14px 0; }
    #detailModal .cb-col-hdr {
      display: grid; grid-template-columns: 22px 1fr 64px 72px 60px; gap: 0 6px;
      padding: 7px 18px; border-bottom: 1px solid #E5E7EB; font-size: 10px; font-weight: 700;
      text-transform: uppercase; letter-spacing: .06em; color: #9CA3AF; line-height: 1.3;
    }
    #detailModal .cb-col-hdr .r { text-align: right; }
    #detailModal .cb-col-hdr .r:nth-child(4) { padding-right: 14px; }
    #detailModal .cb-row {
      display: grid; grid-template-columns: 22px 1fr 64px 72px 60px; gap: 0 6px;
      align-items: center; padding: 9px 18px; border-bottom: 1px solid #F9FAFB;
    }
    #detailModal .cb-row:last-child { border-bottom: none; }
    #detailModal .cb-row .ico { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    #detailModal .cb-row .ico svg { width: 18px; height: 18px; }
    #detailModal .cb-row .cat-name { font-size: 11.5px; font-weight: 400; color: #0E1629; line-height: 1.3; padding-right: 4px; }
    #detailModal .cb-row .cat-sub { font-size: 9px; color: #9CA3AF; margin-top: 1px; }
    #detailModal .cb-row .rate {
      font-size: 11.5px; font-weight: 700; color: #059669; text-align: right; white-space: nowrap;
    }
    #detailModal .cb-row .rate.zero { color: #0E1629; }
    #detailModal .cb-row .spend  { font-size: 11px; color: #D1D5DB; text-align: right; padding-right: 14px; }
    #detailModal .cb-row .cb-val { font-size: 11px; color: #D1D5DB; text-align: right; }
    #detailModal .total-row {
      display: grid; grid-template-columns: 22px 1fr 64px 72px 60px; gap: 0 6px;
      align-items: center; padding: 9px 18px; border-top: 1px solid #E5E7EB;
    }
    #detailModal .total-lbl { font-size: 13px; font-weight: 700; color: #0E1629; grid-column: 1 / 3; }
    #detailModal .total-spend { font-size: 13px; font-weight: 700; color: #D1D5DB; text-align: right; padding-right: 14px; }
    #detailModal .total-cb { font-size: 13px; font-weight: 800; color: #D1D5DB; text-align: right; }
    /* eff-band: edge-to-edge with top border (like product_card_widgets) */
    #detailModal .eff-band {
      background: linear-gradient(135deg,#ECFDF5 0%,#F0FFF4 100%);
      border-top: 1px solid #D1FAE5; padding: 12px 18px;
      margin: 0 -14px; display: flex; align-items: center; justify-content: space-between;
    }
    #detailModal .eff-band-left { display: flex; flex-direction: column; gap: 2px; }
    #detailModal .eff-band-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #6EE7B7; }
    #detailModal .eff-band-desc { font-size: 9.5px; color: #065F46; opacity: .7; }
    #detailModal .eff-band-right { text-align: right; }
    #detailModal .eff-band-val { font-size: 22px; font-weight: 800; color: #D1FAE5; line-height: 1; }
    #detailModal .eff-band-unit { font-size: 9px; font-weight: 600; color: #6EE7B7; margin-top: 2px; }
    #detailModal .eff-band-unit.pending { color: #374151; }
    /* note-row: edge-to-edge */
    #detailModal .note-row {
      font-size: 9.5px; color: #6B7280; font-style: italic; line-height: 1.5;
      padding: 7px 18px; border-top: 1px solid #F3F4F6; margin: 0 -14px;
    }
    /* calc-wrap: inside sec-body (14px horizontal padding already provided) */
    #detailModal .calc-wrap { padding: 0 0 4px; }

    /* ── Threshold spend-requirement widget ── */
    #detailModal .thresh-switcher { display:flex; border-bottom:1px solid #F3F4F6; }
    #detailModal .sw-btn { flex:1; padding:8px 4px; font-size:8px; font-weight:700; text-align:center; cursor:pointer; color:#C4C9D4; border:none; background:none; border-bottom:2px solid transparent; letter-spacing:.04em; text-transform:uppercase; transition:all .15s; }
    #detailModal .sw-btn.active { color:#059669; border-bottom-color:#059669; }
    #detailModal .thresh-block { border-bottom:1px solid #F3F4F6; }
    #detailModal .thresh-row { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid #F3F4F6; min-height:42px; }
    #detailModal .thresh-row:last-child { border-bottom:none; }
    #detailModal .thresh-lbl { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:#374151; }
    #detailModal .thresh-val { font-size:11px; font-weight:700; color:#374151; }
    #detailModal .thresh-val span { font-size:8.5px; font-weight:500; color:#9CA3AF; margin-left:2px; }
    #detailModal .counter-val { font-size:12.5px; font-weight:900; white-space:nowrap; flex-shrink:0; }
    #detailModal .counter-val.green { color:#10B981; }
    #detailModal .counter-val.amber { color:#F59E0B; }
    #detailModal .counter-val.red   { color:#EF4444; }
    #detailModal .counter-val .denom { font-size:9px; font-weight:600; color:#9CA3AF; }
    #detailModal .status-pill { display:flex; align-items:center; gap:8px; margin:10px 14px 12px; padding:8px 10px; border-radius:10px; font-size:11px; font-weight:500; line-height:1.4; }
    #detailModal .status-pill.green { background:#ECFDF5; border:1px solid #A7F3D0; color:#065F46; }
    #detailModal .status-pill.amber { background:#FFFBEB; border:1px solid #FDE68A; color:#78350F; }
    #detailModal .status-pill.red   { background:#FEF2F2; border:1px solid #FECACA; color:#7F1D1D; }
    #detailModal .pill-ico { width:20px; height:20px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:900; line-height:1; }
    #detailModal .status-pill.green .pill-ico { background:#D1FAE5; color:#059669; }
    #detailModal .status-pill.amber .pill-ico { background:#FEF3C7; color:#D97706; }
    #detailModal .status-pill.red   .pill-ico { background:#FEE2E2; color:#DC2626; }
    #detailModal .eff-band.amber-band { background:linear-gradient(135deg,#FFFBEB,#FEF3C7); border-top-color:#FDE68A; }
    #detailModal .eff-band.red-band   { background:#FEF2F2; border-top-color:#FECACA; }
    #detailModal .eff-band-lbl.amber  { color:#FCD34D; }
    #detailModal .eff-band-desc.amber { color:#92400E; opacity:1; }
    #detailModal .eff-band-unit.amber { color:#FCD34D; }
    #detailModal .eff-band-lbl.red    { color:#FECACA; }
    #detailModal .eff-band-desc.red   { color:#9CA3AF; opacity:1; }
    #detailModal .eff-band-unit.red   { color:#9CA3AF; }
    #detailModal .eff-band-val.amber  { color:#F59E0B; }
    #detailModal .eff-band-val.red    { color:#EF4444; }
    #detailModal .calc-note { font-size:11px; color:#374151; background:#fff8e1; border-left:3px solid #ffc107; padding:8px 12px; margin-bottom:10px; line-height:1.5; }

    /* ── Category segment block ── */
    #detailModal .csb-list { margin: 8px -14px 0; }
    #detailModal .csb-row {
      display: grid; grid-template-columns: 20px 1fr auto;
      align-items: center; gap: 0 10px;
      padding: 9px 18px; border-bottom: 1px solid #F9FAFB;
    }
    #detailModal .csb-row:last-child { border-bottom: none; }
    #detailModal .csb-ico { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #6B7280; }
    #detailModal .csb-ico svg { width: 18px; height: 18px; }
    #detailModal .csb-label { font-size: 11.5px; font-weight: 500; color: #0E1629; line-height: 1.3; }
    #detailModal .csb-rate { font-size: 12px; font-weight: 700; color: #059669; white-space: nowrap; }
    #detailModal .csb-rate.zero { color: #9CA3AF; }
    #detailModal .csb-rate.range { color: #059669; }

    /* ── Legacy Cashback Breakdown (for non-dcats products) ── */
    #detailModal .cb-table-legacy { margin-top: 11px; }
    #detailModal .cb-col-hdr-legacy {
      display: grid; grid-template-columns: 20px 1fr 34px 66px 64px; gap: 0 6px;
      padding: 7px 8px; background: #F5F5F4; border-radius: 6px 6px 0 0; border-bottom: 1px solid #EBEBEA;
    }
    #detailModal .col-h { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9CA3AF; line-height: 1.3; }
    #detailModal .col-h.r { text-align: right; }
    #detailModal .cb-row-legacy {
      display: grid; grid-template-columns: 20px 1fr 34px 66px 64px; gap: 0 6px;
      align-items: center; padding: 9px 8px; border-bottom: 1px solid #F3F4F6;
    }
    #detailModal .cb-row-legacy:last-child { border-bottom: none; }
    #detailModal .cb-icon-cell { display: flex; align-items: center; }
    #detailModal .cb-cat-name { font-size: 12px; font-weight: 400; color: #0E1629; line-height: 1.3; }
    #detailModal .cb-rate-cell {
      display: inline-flex; align-items: center; justify-content: center;
      justify-self: start; align-self: center;
      font-size: 11px; font-weight: 700; color: #059669;
      background: #F0FDF4; border-radius: 5px; padding: 3px 6px; white-space: nowrap;
    }
    #detailModal .cb-spend-cell { font-size: 12px; font-weight: 500; color: #374151; text-align: right; padding-right: 14px; }
    #detailModal .cb-cb-cell { font-size: 13px; font-weight: 700; color: #0E1629; text-align: right; }
    #detailModal .cb-cb-nil { font-size: 12px; color: #CBD5E1; text-align: right; }
    #detailModal .cb-total-row {
      display: grid; grid-template-columns: 22px 1fr 64px 72px 60px; gap: 0 6px;
      align-items: baseline; padding: 9px 18px; background: #F9FAFB;
      border-top: 2px solid #E5E7EB;
    }
    #detailModal .cb-total-row-legacy {
      display: grid; grid-template-columns: 20px 1fr 34px 66px 64px; gap: 0 6px;
      align-items: baseline; padding: 8px; background: #F5F5F4;
      border-radius: 0 0 6px 6px; border-top: 1px solid #EBEBEA;
    }
    #detailModal .cb-total-lbl { font-size: 13px; font-weight: 700; color: #0E1629; grid-column: 1 / 4; }
    #detailModal .cb-total-spend { font-size: 13px; font-weight: 700; color: #374151; text-align: right; padding-right: 14px; }
    #detailModal .cb-total-cb { font-size: 13px; font-weight: 800; color: #0E1629; text-align: right; }
    #detailModal .cb-eff-band { background: linear-gradient(135deg,#ECFDF5 0%,#F0FFF4 100%); border: 1px solid #D1FAE5; border-radius: 8px; padding: 11px 12px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; }
    #detailModal .cb-eff-left { display: flex; flex-direction: column; gap: 2px; }
    #detailModal .cb-eff-lbl { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #6EE7B7; }
    #detailModal .cb-eff-desc { font-size: 9px; color: #065F46; opacity: .7; }
    #detailModal .cb-eff-right { text-align: right; }
    #detailModal .cb-eff-val { font-size: 20px; font-weight: 800; color: #D1FAE5; line-height: 1; }
    #detailModal .cb-eff-unit { font-size: 8.5px; font-weight: 600; color: #6EE7B7; margin-top: 1px; }
    #detailModal .cb-note { font-size: 9.5px; color: #6B7280; font-style: italic; line-height: 1.45; padding: 6px 0 2px; border-top: 1px solid #F3F4F6; margin-top: 6px; }
    #detailModal .threshold-note {
      display: flex; align-items: flex-start; gap: 7px;
      background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; padding: 9px 11px; margin-top: 10px;
    }
    #detailModal .threshold-icon { font-size: 12px; flex-shrink: 0; margin-top: 1px; }
  #detailModal .threshold-txt { font-size: 10.5px; color: #92400E; line-height: 1.5; }
  /* MCC */
  #detailModal .mcc-toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 0; cursor: pointer; user-select: none; }
  #detailModal .mcc-toggle-label { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #9CA3AF; }
  #detailModal .mcc-toggle-ico { width: 16px; height: 16px; border-radius: 4px; background: #F3F4F6; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  #detailModal .mcc-toggle-ico svg { display: block; }
  #detailModal .mcc-chevron { font-size: 11px; color: #CBD5E1; transition: transform .2s; margin-top:-1px; }
  #detailModal .mcc-chevron.open { transform: rotate(180deg); }
  #detailModal .mcc-body { display: none; padding-top: 10px; }
  #detailModal .mcc-body.open { display: block; }
  /* How cashback is calculated toggle */
  #detailModal .calc-toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 0; cursor: pointer; user-select: none; border-top: 1px solid #F3F4F6; margin-top: 8px; }
  #detailModal .calc-toggle-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #6B7280; }
  #detailModal .calc-chevron { font-size: 13px; color: #6B7280; transition: transform .2s; }
  #detailModal .calc-chevron.open { transform: rotate(180deg); }
  #detailModal .calc-body { display: none; padding-top: 6px; }
  #detailModal .calc-body.open { display: block; }
  #detailModal .calc-list { margin: 4px 0 0; padding-left: 18px; font-size: 11px; line-height: 1.55; color: #374151; }
  .calc-body ol { margin: 4px 0 0; padding-left: 18px; font-size: 11px; line-height: 1.55; color: #374151; }
  #detailModal .calc-list li { padding: 3px 0; border-bottom: 1px solid #F9FAFB; }
  #detailModal .calc-list li:last-child { border-bottom: none; }
  #detailModal .calc-list strong { color: #111827; }
  #detailModal .calc-list code { background: #EFF6FF; color: #1D4ED8; padding: 1px 4px; border-radius: 3px; font-size: 10px; font-family: 'SF Mono', Consolas, monospace; }
  #detailModal .calc-list .mcc-name { color: #9CA3AF; font-size: 10px; }
  #detailModal .calc-list p { margin: 2px 0; line-height: 1.6; font-size: 11px; }
  #detailModal .calc-body > p { font-size: 11px; line-height: 1.6; margin: 3px 0; color: #374151; }
  #detailModal .calc-note { font-size:11px; color:#374151; background:#fff8e1; border-left:3px solid #ffc107; padding:8px 12px; margin-bottom:10px; line-height:1.5; }
  #detailModal .mcc-group { margin-bottom: 12px; }
  #detailModal .mcc-group:last-child { margin-bottom: 0; }
  #detailModal .mcc-group-hdr { display: flex; align-items: center; gap: 7px; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid #F3F4F6; }
  #detailModal .mcc-group-name { font-size: 10.5px; font-weight: 700; color: #374151; flex: 1; }
  #detailModal .mcc-group-rate { font-size: 10px; font-weight: 700; color: #059669; background: #F0FDF4; border-radius: 4px; padding: 2px 6px; flex-shrink: 0; }
  #detailModal .mcc-group-rate.zero { color: #9CA3AF; background: #F9FAFB; }
  #detailModal .mcc-row { display: grid; grid-template-columns: 38px 1fr; gap: 0 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid #F9FAFB; }
  #detailModal .mcc-row:last-child { border-bottom: none; }
  #detailModal .mcc-code { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: #9CA3AF; letter-spacing: .02em; }
  #detailModal .mcc-desc { font-size: 11px; color: #374151; line-height: 1.4; }
  /* Annual fee */
  #detailModal .fee-table { margin-top: 10px; }
  #detailModal .fee-trow { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #F3F4F6; }
  #detailModal .fee-trow:last-child { border-bottom: none; padding-bottom: 0; }
  #detailModal .fee-yr { font-size: 13px; font-weight: 400; color: #374151; }
  #detailModal .fee-right { display: flex; align-items: center; gap: 6px; }
  #detailModal .fee-waived-tag    { font-size: 10.5px; font-weight: 600; color: #059669; }
  #detailModal .fee-waivable-tag  { font-size: 10.5px; font-weight: 600; color: #F59E0B; }
  #detailModal .fee-free-tag      { font-size: 10.5px; font-weight: 600; color: #059669; }
  #detailModal .fee-status.status-green { background: #F0FDF4; border: 1px solid #BBF7D0; color: #059669; align-items: flex-start; }
  #detailModal .fee-status.status-green .fee-status-ico { background: #059669; }
  #detailModal .fee-status.status-amber { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; align-items: flex-start; }
  #detailModal .fee-status.status-amber .fee-status-ico { background: #F59E0B; font-size: 11px; }
  #detailModal .fee-amt { font-size: 13px; font-weight: 400; color: #374151; }
  #detailModal .fee-amt.dim { color: #C4C9D4; text-decoration: line-through; }
  #detailModal .fee-trow.total .fee-yr  { font-weight: 700; color: #0E1629; font-size: 13.5px; }
  #detailModal .fee-trow.total .fee-amt { font-weight: 700; color: #0E1629; font-size: 14px; }
  /* FX rate bar */
  #detailModal .rb-track-row { position: relative; margin: 0 22px; }
  #detailModal .rb-label-space { height: 40px; position: relative; }
  #detailModal .rb-dot-label { position: absolute; bottom: 6px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; pointer-events: none; }
  #detailModal .rb-dl-rate { font-size: 14px; font-weight: 800; color: #1E293B; line-height: 1; }
  #detailModal .rb-dl-name { font-size: 10px; font-weight: 600; color: #9CA3AF; text-transform: uppercase; letter-spacing: .05em; }
  #detailModal .rb-track { position: relative; height: 4px; background: #E5E7EB; border-radius: 99px; }
  #detailModal .rb-tick { position: absolute; top: -5px; width: 1.5px; height: 14px; background: #CBD5E1; border-radius: 1px; transform: translateX(-50%); }
  #detailModal .rb-tick.avg { background: #94A3B8; }
  #detailModal .rb-dot { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 14px; height: 14px; border-radius: 50%; background: #1E293B; border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.22); z-index: 1; }
  #detailModal .rb-scale { position: relative; height: 32px; margin-top: 8px; }
  #detailModal .rb-lbl { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; }
  #detailModal .rb-lbl-pct { font-size: 11px; font-weight: 700; color: #374151; }
  #detailModal .rb-lbl-name { font-size: 10px; font-weight: 600; color: #9CA3AF; text-transform: uppercase; letter-spacing: .04em; }
  #detailModal .rb-lbl.avg .rb-lbl-pct { color: #6B7280; }
  #detailModal .rb-badge { display:inline-flex; align-items:center; gap:5px; padding:3px 9px 3px 6px; border-radius:99px; font-size:11px; font-weight:700; letter-spacing:.02em; margin-bottom:10px; white-space:nowrap; }
  #detailModal .rb-badge .bdot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
  #detailModal .rb-badge.below { background:#F0FDF4; color:#15803D; }
  #detailModal .rb-badge.below .bdot { background:#22C55E; }
  #detailModal .rb-badge.on    { background:#F8FAFC; color:#64748B; }
  #detailModal .rb-badge.on .bdot    { background:#94A3B8; }
  #detailModal .rb-badge.above   { background:#FEF2F2; color:#DC2626; }
  #detailModal .rb-badge.above .bdot   { background:#EF4444; }
  #detailModal .rb-badge.lowest  { background:#F0FDF4; color:#15803D; }
  #detailModal .rb-badge.lowest .bdot  { background:#22C55E; }
  #detailModal .rb-badge.highest { background:#FEF2F2; color:#B91C1C; font-weight:800; }
  #detailModal .rb-badge.highest .bdot { background:#DC2626; }
  #detailModal .fx-aed-row { display:flex; justify-content:space-between; align-items:center; margin-top:8px; padding:9px 0 2px; border-top:1px solid #F3F4F6; }
  #detailModal .fx-aed-lbl { font-size:11px; font-weight:600; color:#9CA3AF; text-transform:uppercase; letter-spacing:.04em; }
  #detailModal .fx-aed-sub { font-size:9px; font-weight:600; color:#C4C9D4; text-transform:uppercase; letter-spacing:.04em; margin-top:2px; }
  #detailModal .fx-aed-val { font-size:14px; font-weight:700; color:#1E293B; }
  /* Buttons */
  #detailModal .btn-apply { width: 100%; padding: 15px; background: #059669; color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; letter-spacing: -.01em; transition: background .15s; }
  #detailModal .btn-apply:active { background: #047857; }
  
/* ── Tiered widget styles (scoped) ── */

#detailModal .tiered-widget .prog-rule { margin: 12px 14px 12px; padding: 8px 10px; background: #F9FAFB; border-left: 3px solid #6EE7B7; border-radius: 0 6px 6px 0; }

#detailModal .tiered-widget .prog-rule-title { font-size: 12px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }

#detailModal .tiered-widget .prog-rule-item { display: flex; align-items: baseline; gap: 5px; font-size: 11px; color: #374151; line-height: 1.85; }

#detailModal .tiered-widget .pri-rate { font-size: 11px; font-weight: 800; min-width: 30px; width: auto; flex-shrink: 0; white-space: nowrap; }

#detailModal .tiered-widget .pri-rate.zero { color: #D1D5DB; }

#detailModal .tiered-widget .pri-rate.earn { color: #059669; }

#detailModal .tiered-widget .pri-rate.adv { color: #0E1629; }

#detailModal .tiered-widget .prog-rule-note { font-size: 10px; color: #9CA3AF; margin-top: 5px; padding-top: 5px; border-top: 1px solid #F3F4F6; line-height: 1.55; }

#detailModal .tiered-widget .dist-block { border-bottom: 1px solid #F3F4F6; padding: 6px 14px 8px; }

#detailModal .tiered-widget .dist-subtitle { font-size: 13px; color: #9CA3AF; line-height: 1.45; margin-bottom: 4px; }

#detailModal .tiered-widget .stacked-cb-row { display: none; }

#detailModal .tiered-widget .stacked-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; background: #F3F4F6; }

#detailModal .tiered-widget .sb-seg { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; transition: width .5s ease; overflow: hidden; white-space: nowrap; border-right: 2px solid rgba(255,255,255,.55); flex-shrink: 0; padding: 0 4px; }

#detailModal .tiered-widget .sb-seg:last-child { border-right: none; }

#detailModal .tiered-widget .sb-seg.c0 { background: #D1D5DB; color: #6B7280; }

#detailModal .tiered-widget .sb-seg.c3 { background: #A7F3D0; color: #059669; }

#detailModal .tiered-widget .sb-seg.c5 { background: #34D399; color: #065F46; }

#detailModal .tiered-widget .sb-seg.c10 { background: #059669; color: #fff; }

#detailModal .tiered-widget .stacked-footer { display: flex; justify-content: space-between; margin-top: 5px; }

#detailModal .tiered-widget .sf-label { font-size: 9px; color: #D1D5DB; font-weight: 600; }

#detailModal .tiered-widget .sec-hdr { padding: 10px 14px 6px; }

#detailModal .tiered-widget .sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #0E1629; }

#detailModal .tiered-widget .sec-period { font-size: 8.5px; color: #C4C9D4; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }

#detailModal .tiered-widget .sec-body { padding: 0 14px 12px; }

#detailModal .tiered-widget .cb-table { margin: 7px -14px 0; }

#detailModal .tiered-widget .v1-col-hdr { display: flex; padding: 5px 16px; border-bottom: 1px solid #E5E7EB; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9CA3AF; }

#detailModal .tiered-widget .v1-col-hdr .c-name { flex: 1; }

#detailModal .tiered-widget .v1-col-hdr .c-rate { width: 64px; flex-shrink: 0; text-align: left; white-space: nowrap; }

#detailModal .tiered-widget .v1-col-hdr .c-spend { width: 72px; flex-shrink: 0; text-align: right; padding-right: 10px; }

#detailModal .tiered-widget .v1-col-hdr .c-cb { width: 60px; flex-shrink: 0; text-align: right; }

#detailModal .tiered-widget .v1-grp { display: flex; align-items: center; padding: 8px 16px; border-top: 1px solid #E5E7EB; border-bottom: 1px solid #E5E7EB; cursor: pointer; user-select: none; }

#detailModal .tiered-widget .v1-grp:first-of-type { border-top: none; }

#detailModal .tiered-widget .v1-grp:hover { background: #FAFAFA; }

#detailModal .tiered-widget .v1-grp-chevron { font-size: 9px; color: #C4C9D4; flex-shrink: 0; width: 10px; text-align: center; margin-right: 4px; }

#detailModal .tiered-widget .v1-grp-range { font-size: 11.5px; font-weight: 700; color: #0E1629; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#detailModal .tiered-widget .v1-grp-rate { font-size: 11.5px; font-weight: 800; width: 64px; text-align: left; flex-shrink: 0; white-space: nowrap; }

#detailModal .tiered-widget .v1-grp-rate.zero { color: #059669; }

#detailModal .tiered-widget .v1-grp-rate.earn { color: #059669; }

#detailModal .tiered-widget .v1-grp-spend { font-size: 11.5px; font-weight: 400; color: #0E1629; width: 72px; text-align: right; white-space: nowrap; flex-shrink: 0; padding-right: 10px; }

#detailModal .tiered-widget .v1-grp-cb { font-size: 11.5px; font-weight: 400; color: #0E1629; width: 60px; text-align: right; white-space: nowrap; flex-shrink: 0; }

#detailModal .tiered-widget .v1-grp-cb.zero { color: #0E1629; }

#detailModal .tiered-widget .v1-grp-cb.earn { color: #0E1629; }

#detailModal .tiered-widget .v1-cat-group { display: none; }

#detailModal .tiered-widget .v1-cat-group.open { display: block; }

#detailModal .tiered-widget .v1-cat { display: flex; align-items: center; padding: 7px 16px 7px 30px; border-bottom: 1px solid #F9FAFB; }
#detailModal .tiered-widget .cb-table > .v1-cat { padding-left: 16px; }

#detailModal .tiered-widget .v1-cat:last-child { border-bottom: none; }

#detailModal .tiered-widget .v1-cat-name { flex: 1; font-size: 11.5px; font-weight: 400; color: #0E1629; display: flex; align-items: center; gap: 5px; }

#detailModal .tiered-widget .cat-icon { width: 14px; height: 14px; flex-shrink: 0; }

#detailModal .tiered-widget .v1-cat-rate { font-size: 11.5px; font-weight: 700; width: 64px; flex-shrink: 0; text-align: left; white-space: nowrap; }

#detailModal .tiered-widget .v1-cat-rate.zero { color: #059669; }

#detailModal .tiered-widget .v1-cat-rate.earn { color: #059669; }

#detailModal .tiered-widget .v1-cat-spend { font-size: 11.5px; color: #0E1629; width: 72px; flex-shrink: 0; text-align: right; padding-right: 10px; }

#detailModal .tiered-widget .v1-cat-cb { font-size: 11.5px; color: #0E1629; width: 60px; flex-shrink: 0; text-align: right; }

#detailModal .tiered-widget .v1-cat-cb.zero { color: #0E1629; }

#detailModal .tiered-widget .v1-cat-cb.earn { color: #0E1629; font-weight: 400; }

#detailModal .tiered-widget .rbadge { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; white-space: nowrap; }

#detailModal .tiered-widget .rbadge.bnq { background: #F3F4F6; color: #C4C9D4; }

#detailModal .tiered-widget .rbadge.b0 { background: #F3F4F6; color: #9CA3AF; }

#detailModal .tiered-widget .v1-nq-grp { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-top: 1px solid #E5E7EB; }

#detailModal .tiered-widget .v1-nq-label { flex: 1; font-size: 9.5px; font-weight: 600; color: #C4C9D4; }

#detailModal .tiered-widget .v1-nq-spend { font-size: 10px; font-weight: 600; color: #D1D5DB; width: 60px; text-align: right; flex-shrink: 0; }

#detailModal .tiered-widget .v1-nq-cb { font-size: 10px; font-weight: 700; color: #D1D5DB; width: 60px; text-align: right; flex-shrink: 0; }

/* ── Tier sub-rows (inside collapsible category groups in agg mode) ── */
#detailModal .tiered-widget .v1-tier { display: flex; align-items: center; padding: 5px 16px 5px 40px; border-bottom: 1px solid #F9FAFB; }
#detailModal .tiered-widget .v1-cat-group .v1-tier:last-child { border-bottom: none; }
#detailModal .tiered-widget .v1-tier-range { flex: 1; font-size: 10.5px; font-weight: 500; color: #6B7280; }
#detailModal .tiered-widget .v1-tier-rate { font-size: 11px; font-weight: 700; color: #059669; width: 64px; text-align: left; flex-shrink: 0; white-space: nowrap; }
#detailModal .tiered-widget .v1-tier-spend { font-size: 11px; color: #374151; width: 72px; text-align: right; flex-shrink: 0; padding-right: 10px; }
#detailModal .tiered-widget .v1-tier-cb { font-size: 11px; color: #374151; width: 60px; text-align: right; flex-shrink: 0; }

#detailModal .tiered-widget .total-row { display: flex; align-items: center; padding: 9px 16px; border-top: 2px solid #E5E7EB; }

#detailModal .tiered-widget .total-lbl { flex: 1; font-size: 13px; font-weight: 700; color: #0E1629; }

#detailModal .tiered-widget .total-rate-spc { width: 64px; flex-shrink: 0; }

#detailModal .tiered-widget .total-spend { font-size: 13px; color: #0E1629; font-weight: 700; width: 72px; flex-shrink: 0; text-align: right; white-space: nowrap; padding-right: 10px; }

#detailModal .tiered-widget .total-cb { font-size: 13px; font-weight: 800; color: #0E1629; width: 60px; flex-shrink: 0; text-align: right; white-space: nowrap; }

#detailModal .tiered-widget .eff-band { background: #F9FAFB; border-top: 1px solid #E5E7EB; padding: 10px 16px; margin: 0 -14px; display: flex; align-items: center; justify-content: space-between; }

#detailModal .tiered-widget .eff-band-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #6B7280; }

#detailModal .tiered-widget .eff-band-desc { font-size: 10px; color: #9CA3AF; }

#detailModal .tiered-widget .eff-band-val { font-size: 22px; font-weight: 800; color: #0E1629; text-align: right; line-height: 1; }

#detailModal .tiered-widget .eff-band-unit { font-size: 10px; text-align: right; margin-top: 2px; color: #9CA3AF; }

#detailModal .tiered-widget .eff-band-unit.pending { color: #D1D5DB; }

#detailModal .tiered-widget .warning-note { font-size: 10px; color: #6B7280; border-top: 1px solid #F3F4F6; padding: 8px 14px; line-height: 1.6; margin: 0 -14px; font-style: italic; }

#detailModal .tiered-widget .prog-rule-cats { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; align-items: center; }

#detailModal .tiered-widget .prc-label { font-size: 9px; font-weight: 600; color: #6B7280; text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; flex-shrink: 0; }

#detailModal .tiered-widget .prc-cat { font-size: 9px; font-weight: 600; background: #F3F4F6; color: #6B7280; border: 1px solid #E5E7EB; padding: 1.5px 5px; border-radius: 8px; white-space: nowrap; }

#detailModal .tiered-widget .prog-rule-cats-active { margin-top: 4px; }
#detailModal .tiered-widget .prc-cat-active { background: #ECFDF5; color: #059669; border-color: #D1FAE5; }

#detailModal .tiered-widget .prog-rule-sep { border: none; border-top: 1px dashed #E5E7EB; margin: 7px 0; }

#detailModal .tiered-widget .prog-rule-sub { font-size: 10.5px; font-weight: 700; color: #9CA3AF; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }

#detailModal .tiered-widget .calc-list { margin: 4px 0 0; padding-left: 16px; font-size: 11px; line-height: 1.55; color: #374151; }

#detailModal .tiered-widget .calc-list li { padding: 3px 0; border-bottom: 1px solid #F9FAFB; }

#detailModal .tiered-widget .calc-list li:last-child { border-bottom: none; }

#detailModal .tiered-widget .calc-list strong { color: #111827; }

#detailModal .tiered-widget .calc-note { font-size:11px; color:#374151; background:#fff8e1; border-left:3px solid #ffc107; padding:8px 12px; margin-bottom:10px; line-height:1.5; }

#detailModal .tiered-widget .calc-wrap { padding: 0 0 2px; }

#detailModal .tiered-widget .calc-toggle { display: flex; align-items: center; justify-content: space-between; padding: 9px 0 0; cursor: pointer; user-select: none; border-top: 1px solid #F3F4F6; margin-top: 7px; }

#detailModal .tiered-widget .calc-toggle-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #6B7280; }

#detailModal .tiered-widget .calc-chevron { font-size: 13px; color: #6B7280; transition: transform .2s; }

#detailModal .tiered-widget .calc-chevron.open { transform: rotate(180deg); }

#detailModal .tiered-widget .calc-body { display: none; padding-top: 5px; }

#detailModal .tiered-widget .calc-body.open { display: block; }

#detailModal .tiered-widget .calc-placeholder { font-size: 9.5px; color: #C4C9D4; font-style: italic; padding: 3px 0 4px; }



    /* ── Recalculate button in nav — style shared with .nav-cta (see top) ── */

    /* ── Recalc confirmation modal ── */
    #recalcModal {
      position: fixed; inset: 0; z-index: 450;
      display: flex; align-items: flex-end; justify-content: center;
      background: rgba(14,22,41,.5); backdrop-filter: blur(4px);
      opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    #recalcModal.open { opacity: 1; pointer-events: all; }
    .recalc-sheet {
      width: 100%; max-width: 480px;
      background: #fff; border-radius: 22px 22px 0 0;
      padding: 10px 22px 32px;
      transform: translateY(24px); transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    #recalcModal.open .recalc-sheet { transform: translateY(0); }
    .recalc-handle { width: 36px; height: 4px; background: #E5E7EB; border-radius: 2px; margin: 0 auto 20px; }
    .recalc-icon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
    .recalc-icon-box {
      width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
      background: #FEF3C7; display: flex; align-items: center; justify-content: center;
    }
    .recalc-title { font-size: 17px; font-weight: 800; color: #0E1629; }
    .recalc-body { font-size: 14px; color: #6B7280; line-height: 1.6; margin-bottom: 16px; }
    .recalc-counter {
      display: flex; align-items: center; gap: 9px;
      background: #F8FAFC; border: 1px solid #E5E7EB; border-radius: 10px;
      padding: 10px 14px; margin-bottom: 22px;
    }
    .recalc-counter-dot { width: 8px; height: 8px; border-radius: 50%; background: #059669; flex-shrink: 0; }
    .recalc-counter-text { font-size: 12.5px; font-weight: 600; color: #374151; }
    .recalc-counter-text em { font-style: normal; color: #059669; }
    .recalc-btn-confirm {
      width: 100%; padding: 15px; background: #0E1629; color: #fff;
      border: none; border-radius: 12px; font-size: 15px; font-weight: 700;
      font-family: inherit; cursor: pointer; transition: background .15s; margin-bottom: 10px;
    }
    .recalc-btn-confirm:hover { background: #1E2D45; }
    .recalc-btn-cancel {
      width: 100%; padding: 12px; background: none; border: none;
      font-size: 14px; font-weight: 600; color: #6B7280;
      font-family: inherit; cursor: pointer; transition: color .15s;
    }
    .recalc-btn-cancel:hover { color: #374151; }

    /* ── Calibration modal ── */
    /* ── Apply flow modals ── */
    #applyEmailModal, #applyRedirectModal {
      position: fixed; inset: 0; z-index: 400;
      display: flex; align-items: flex-end; justify-content: center;
      background: rgba(14,22,41,.5); backdrop-filter: blur(4px);
      opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    #applyEmailModal.open, #applyRedirectModal.open { opacity: 1; pointer-events: all; }
    /* pointer-events does NOT inherit — force all modal children to inherit so that
       closed modals (pointer-events:none) can't intercept clicks on underlying pages */
    #applyEmailModal *, #applyRedirectModal *,
    #calibModal *, #recalcModal *, #loginModal * { pointer-events: inherit; }

    /* ══════════ NAV PROFILE BUTTON ══════════ */
    .nav-right { display: flex; align-items: center; gap: 8px; }
    .nav-profile-btn {
      font-family: inherit; font-size: 14px; font-weight: 600;
      color: var(--dark); background: #fff;
      border: 1.5px solid #E5E7EB; border-radius: 10px;
      padding: 7px 14px; cursor: pointer; transition: all .15s;
      display: flex; align-items: center; gap: 7px; max-width: 200px;
    }
    .nav-profile-btn:hover { background: #F9FAFB; border-color: #D1D5DB; }
    #navProfileAnon, #navProfileAuth { display: flex; align-items: center; gap: 7px; }
    .nav-profile-avatar {
      width: 22px; height: 22px; border-radius: 50%;
      background: var(--green); color: #fff;
      font-size: 11px; font-weight: 800; letter-spacing: 0;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .nav-profile-email-label {
      font-size: 13px; color: var(--dark); max-width: 120px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    /* ══════════ PROFILE MODAL ══════════ */
    #profileModal {
      position: fixed; inset: 0; z-index: 450;
      display: flex; align-items: flex-end; justify-content: center;
      background: rgba(14,22,41,.5); backdrop-filter: blur(4px);
      opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    #profileModal.open { opacity: 1; pointer-events: all; }
    #profileModal * { pointer-events: inherit; }
    .profile-sheet {
      width: 100%; max-width: 480px;
      background: #fff; border-radius: 22px 22px 0 0;
      padding: 10px 22px 48px;
      transform: translateY(24px); transition: transform .3s cubic-bezier(.4,0,.2,1);
      max-height: 92vh; overflow-y: auto;
    }
    #profileModal.open .profile-sheet { transform: translateY(0); }
    .profile-handle { width: 36px; height: 4px; background: #E5E7EB; border-radius: 2px; margin: 0 auto 0; }
    .profile-close-btn { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: #F3F4F6; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
    .profile-close-btn:hover { background: #E5E7EB; }
    .profile-trash-btn { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid #EF4444; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s; }
    .profile-trash-btn:hover { background: #FEE2E2; }
    .profile-trash-btn:disabled { border-color: #D1D5DB; cursor: default; opacity: .35; pointer-events: none; }
    .profile-trash-btn:disabled svg { stroke: #9CA3AF; }

    /* Last-calc accent card */
    .profile-last-calc-card {
      background: #ECFDF5; border: 1.5px solid #6EE7B7;
      border-radius: 16px; padding: 16px 18px 18px; margin-bottom: 22px;
    }
    .plc-text { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
    .plc-label { font-size: 14px; font-weight: 700; color: #065F46; line-height: 1.3; }
    .plc-sub   { font-size: 12px; color: #059669; margin-top: 3px; line-height: 1.4; }
    .plc-btn-link {
      width: 100%; margin-top: 8px; padding: 10px; background: transparent;
      color: #059669; border: 1.5px solid #6EE7B7; border-radius: 10px;
      font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
      display: flex; align-items: center; justify-content: center; gap: 7px;
      transition: background .15s;
    }
    .plc-btn-link:hover { background: #D1FAE5; }
    .plc-btn-link:disabled { opacity: .5; cursor: default; }
    .plc-btn {
      width: 100%; padding: 12px; background: #059669; color: #fff;
      border: none; border-radius: 11px; font-size: 14px; font-weight: 700;
      font-family: inherit; cursor: pointer; transition: background .15s;
    }
    .plc-btn:hover { background: #047857; }

    /* Section header */
    .profile-section-hdr {
      font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
      color: #9CA3AF; margin: 0 0 10px; padding-top: 2px;
    }

    /* Profile rows */
    .profile-row {
      display: flex; align-items: center; gap: 9px;
      padding: 10px 12px; border-radius: 12px;
      background: #F9FAFB; margin-bottom: 8px;
    }
    .profile-row-val {
      flex: 1; font-size: 14px; color: #374151; font-weight: 500;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .profile-btn-sm {
      font-family: inherit; font-size: 12px; font-weight: 600;
      color: #6B7280; background: #E5E7EB; border: none;
      border-radius: 7px; padding: 5px 10px; cursor: pointer;
      transition: all .15s; flex-shrink: 0;
    }
    .profile-btn-sm:hover { background: #D1D5DB; color: #374151; }
    .profile-btn-danger { color: #EF4444 !important; background: #FEE2E2 !important; }
    .profile-btn-danger:hover { background: #FECACA !important; }

    /* Inline email edit */
    .profile-edit-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
    .profile-edit-input {
      width: 100%; padding: 11px 14px; border: 1.5px solid #059669; border-radius: 11px;
      font-size: 14px; font-family: inherit; color: #0E1629; outline: none; background: #fff;
    }
    .profile-edit-actions { display: flex; gap: 8px; }
    .profile-btn-save {
      font-family: inherit; font-size: 13px; font-weight: 700;
      background: #059669; color: #fff; border: none; border-radius: 9px;
      padding: 9px 18px; cursor: pointer; transition: background .15s;
    }
    .profile-btn-save:hover { background: #047857; }

    /* Resend button */
    .profile-resend-btn {
      width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
      padding: 11px; background: transparent; color: #374151;
      border: 1.5px solid #E5E7EB; border-radius: 12px;
      font-size: 13px; font-weight: 600; font-family: inherit;
      cursor: pointer; transition: all .15s; margin-bottom: 20px;
    }
    .profile-resend-btn:hover { background: #F9FAFB; border-color: #D1D5DB; }
    .profile-resend-btn:disabled { opacity: .5; cursor: default; }

    /* Preference rows */
    .profile-row-pref {
      cursor: pointer; justify-content: space-between;
      transition: background .15s;
    }
    .profile-row-pref:hover { background: #F3F4F6; }
    .profile-row-pref-text { flex: 1; }
    .profile-pref-name { font-size: 14px; font-weight: 600; color: #374151; }
    .profile-pref-sub  { font-size: 12px; color: #9CA3AF; margin-top: 2px; }

    /* Toggle switch */
    .profile-toggle {
      width: 44px; height: 24px; border-radius: 12px;
      background: #E5E7EB; position: relative;
      transition: background .2s; flex-shrink: 0;
    }
    .profile-toggle::after {
      content: ''; position: absolute;
      width: 20px; height: 20px; border-radius: 50%;
      background: #fff; top: 2px; left: 2px;
      transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.15);
    }
    .profile-toggle.on { background: #059669; }
    .profile-toggle.on::after { transform: translateX(20px); }

    /* Sign out */
    .profile-delete-btn {
      width: 100%; padding: 11px; background: transparent; color: #EF4444;
      border: 1.5px solid #FECACA; border-radius: 12px; font-size: 13px;
      font-weight: 600; font-family: inherit; cursor: pointer;
      display: flex; align-items: center; justify-content: center; gap: 7px;
      transition: all .15s; margin-top: 16px;
    }
    .profile-delete-btn:hover { background: #FEF2F2; border-color: #FCA5A5; }
    .profile-signout-btn {
      width: 100%; padding: 13px; background: transparent; color: #9CA3AF;
      border: 1.5px solid #E5E7EB; border-radius: 12px; font-size: 14px;
      font-weight: 600; font-family: inherit; cursor: pointer;
      transition: all .15s; margin-top: 16px;
    }
    .profile-signout-btn:hover { color: #EF4444; border-color: #FECACA; background: #FFF5F5; }

    /* ══════════ LOGIN MODAL ══════════ */
    #loginModal {
      position: fixed; inset: 0; z-index: 500;
      display: flex; align-items: flex-end; justify-content: center;
      background: rgba(14,22,41,.5); backdrop-filter: blur(4px);
      opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    #loginModal.open { opacity: 1; pointer-events: all; }
    .login-sheet {
      width: 100%; max-width: 480px;
      background: #fff; border-radius: 22px 22px 0 0;
      padding: 10px 24px 40px;
      transform: translateY(24px); transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    #loginModal.open .login-sheet { transform: translateY(0); }
    .login-handle { width: 36px; height: 4px; background: #E5E7EB; border-radius: 2px; margin: 0 auto 22px; }
    .login-icon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
    .login-icon-box {
      width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
      background: var(--green); display: flex; align-items: center; justify-content: center;
    }
    .login-title { font-size: 17px; font-weight: 800; color: var(--dark); }
    .login-sub { font-size: 13px; color: var(--gray); margin-bottom: 20px; line-height: 1.55; }
    .login-label { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
    .login-input {
      width: 100%; box-sizing: border-box;
      border: 1.5px solid var(--border); border-radius: 12px;
      padding: 13px 14px; font: inherit; font-size: 15px;
      color: var(--dark); outline: none; transition: border-color .15s;
    }
    .login-input:focus { border-color: var(--green); }
    .login-input.error { border-color: #EF4444; }
    .login-error-msg { font-size: 12px; color: #EF4444; margin-top: 6px; min-height: 17px; }
    .login-btn-primary {
      width: 100%; margin-top: 16px; padding: 14px;
      border-radius: 12px; background: var(--green); color: #fff;
      font: inherit; font-size: 15px; font-weight: 700; border: none;
      cursor: pointer; transition: background .15s;
    }
    .login-btn-primary:hover { background: #047857; }
    .login-btn-primary:disabled { background: #D1D5DB; cursor: default; }
    .login-btn-secondary {
      width: 100%; margin-top: 10px; padding: 12px;
      border-radius: 12px; background: transparent; color: var(--gray);
      font: inherit; font-size: 14px; font-weight: 600;
      border: 1.5px solid var(--border); cursor: pointer; transition: all .15s;
    }
    .login-btn-secondary:hover { border-color: #9CA3AF; color: var(--dark); background: var(--gray-l); }
    .otp-row { display: flex; gap: 10px; justify-content: center; margin: 18px 0 6px; }
    .otp-box {
      width: 58px; height: 64px; border: 2px solid var(--border); border-radius: 14px;
      font: inherit; font-size: 28px; font-weight: 800; color: var(--dark);
      text-align: center; outline: none; transition: border-color .15s, box-shadow .15s;
      background: #fff;
    }
    .otp-box:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(5,150,105,.12); }
    .otp-box.error { border-color: #EF4444; background: #FEF2F2; }
    .otp-box.filled { border-color: var(--green); background: #F0FDF4; }
    .login-resend { text-align: center; font-size: 13px; color: var(--gray); margin-top: 14px; line-height: 1.8; }
    .login-timer { font-weight: 700; color: var(--dark); }
    .login-resend-btn {
      background: none; border: none; font: inherit; font-size: 13px;
      color: var(--green); font-weight: 700; cursor: pointer; padding: 0;
      text-decoration: underline; display: none;
    }
    .login-resend-btn.show { display: inline; }
    .login-nf-icon {
      width: 52px; height: 52px; border-radius: 16px; background: #FEF3C7;
      display: flex; align-items: center; justify-content: center; margin: 8px auto 18px;
    }
    .login-nf-title { font-size: 17px; font-weight: 800; color: var(--dark); text-align: center; margin-bottom: 8px; }
    .login-nf-body { font-size: 13px; color: var(--gray); text-align: center; line-height: 1.6; margin-bottom: 24px; }


    /* ── Feedback form modal (Google Form bottom-sheet) ─────── */
    /* ── Feedback bottom-sheet ───────────────────────────────── */
    #feedbackOverlay {
      display: none; position: fixed; inset: 0; z-index: 600;
      background: rgba(14,22,41,.5); backdrop-filter: blur(3px);
    }
    #feedbackOverlay.open { display: block; }
    #feedbackSheet {
      position: fixed; bottom: 0; left: 50%; translate: -50% 100%;
      width: 100%; max-width: 420px; z-index: 601;
      background: #fff; border-radius: 18px 18px 0 0;
      box-shadow: 0 -8px 40px rgba(0,0,0,.18);
      visibility: hidden;
      transition: translate .32s cubic-bezier(.32,.72,0,1), visibility 0s .32s;
      display: flex; flex-direction: column;
      max-height: 92dvh; overflow: hidden;
    }
    #feedbackSheet.open { translate: -50% 0; visibility: visible; transition: translate .32s cubic-bezier(.32,.72,0,1), visibility 0s 0s; }

    /* header */
    .fsh-hdr {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 16px 14px; border-bottom: 1px solid #F3F4F6; flex-shrink: 0;
    }
    .fsh-hdr-left { display: flex; align-items: center; gap: 9px; }
    .fsh-icon {
      width: 32px; height: 32px; border-radius: 9px;
      background: #FEF3C7; display: flex; align-items: center; justify-content: center;
    }
    .fsh-title { font-size: 14px; font-weight: 700; color: #0E1629; }
    .fsh-close {
      width: 28px; height: 28px; border-radius: 50%;
      background: #F3F4F6; border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 15px; color: #6B7280; line-height: 1;
      transition: background .15s; font-family: inherit; flex-shrink: 0;
    }
    .fsh-close:hover { background: #E5E7EB; color: #111827; }

    /* form body */
    .fsh-body { padding: 16px; overflow-y: auto; flex: 1; }
    .fsh-card-pill {
      display: inline-flex; align-items: center; gap: 6px;
      background: #F3F4F6; border-radius: 8px; padding: 6px 10px;
      font-size: 12px; color: #374151; font-weight: 600; margin-bottom: 16px;
    }
    .fsh-card-pill span { color: #9CA3AF; font-weight: 400; }
    .fsh-field { margin-bottom: 14px; }
    .fsh-label {
      display: block; font-size: 11px; font-weight: 700;
      text-transform: uppercase; letter-spacing: .06em;
      color: #6B7280; margin-bottom: 6px;
    }
    .fsh-select, .fsh-textarea, .fsh-input {
      width: 100%; border: 1.5px solid #E5E7EB; border-radius: 10px;
      padding: 10px 12px; font: inherit; font-size: 13px; color: #111827;
      background: #fff; outline: none; transition: border-color .15s;
      box-sizing: border-box;
    }
    .fsh-select:focus, .fsh-textarea:focus, .fsh-input:focus {
      border-color: #0E1629;
    }
    .fsh-textarea { resize: none; height: 90px; line-height: 1.5; }
    .fsh-hint { font-size: 11px; color: #9CA3AF; margin-top: 4px; }
    .fsh-submit {
      width: 100%; padding: 13px; background: #0E1629; color: #fff;
      border: none; border-radius: 12px; font: inherit; font-size: 14px;
      font-weight: 700; cursor: pointer; transition: background .15s;
      margin-top: 4px;
    }
    .fsh-submit:hover { background: #1e2d4a; }
    .fsh-submit:disabled { background: #D1D5DB; cursor: default; }

    /* feedback form subtitle */
    .fsh-subtitle {
      font-size: 13px; color: #6B7280; margin-bottom: 18px; line-height: 1.45;
    }
    /* radio group */
    .fsh-radio-group { display: flex; flex-direction: column; gap: 9px; }
    .fsh-radio-option { display: flex; align-items: center; gap: 9px; cursor: pointer; }
    .fsh-radio-option input[type="radio"] {
      width: 16px; height: 16px; accent-color: #0E1629; cursor: pointer; flex-shrink: 0;
    }
    .fsh-radio-label { font-size: 13px; color: #111827; }
    .fsh-other-input {
      margin-top: 7px; margin-left: 25px;
      border: 1.5px solid #E5E7EB; border-radius: 8px;
      padding: 8px 10px; font: inherit; font-size: 13px; color: #111827;
      background: #fff; outline: none; transition: border-color .15s;
      width: calc(100% - 25px); box-sizing: border-box; display: none;
    }
    .fsh-other-input:focus { border-color: #0E1629; }

    /* feedback consent block (new-user only) */
    #fbConsentBlock { margin-top: 10px; }
    .fsh-consent-row {
      display: flex; align-items: flex-start; gap: 9px;
      font-size: 12px; color: #6B7280; line-height: 1.5;
      cursor: pointer; margin-bottom: 8px; user-select: none;
    }
    .fsh-consent-row:last-child { margin-bottom: 0; }
    .fsh-consent-row input[type="checkbox"] {
      margin-top: 2px; flex-shrink: 0;
      accent-color: #0E1629; width: 15px; height: 15px; cursor: pointer;
    }
    .fsh-consent-row a { color: #059669; text-decoration: none; }
    .fsh-consent-row a:hover { text-decoration: underline; }

    /* want-response checkbox row */
    .fsh-checkbox-row {
      display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none;
    }
    .fsh-checkbox-row input[type="checkbox"] {
      width: 16px; height: 16px; accent-color: #0E1629; cursor: pointer; flex-shrink: 0;
    }
    .fsh-checkbox-label { font-size: 13px; color: #111827; }
    #fbEmail { transition: opacity .15s; }

    /* success screen */
    #fbSuccess {
      display: none; flex-direction: column; align-items: center;
      justify-content: center; gap: 12px; padding: 40px 24px;
      text-align: center; flex: 1;
    }
    .fbs-icon {
      width: 52px; height: 52px; border-radius: 50%;
      background: #ECFDF5; display: flex; align-items: center; justify-content: center;
    }
    .fbs-title { font-size: 16px; font-weight: 800; color: #0E1629; }
    .fbs-sub { font-size: 13px; color: #6B7280; line-height: 1.5; max-width: 240px; }
    .fbs-close {
      margin-top: 8px; padding: 10px 24px;
      border: 1.5px solid #E5E7EB; border-radius: 10px;
      background: #fff; font: inherit; font-size: 13px; font-weight: 600;
      color: #374151; cursor: pointer; transition: all .15s;
    }
    .fbs-close:hover { background: #F3F4F6; }

    /* ── Welcome back toast ──────────────────────────────────── */
    #welcomeToast {
      position: fixed; top: 50%; left: 50%;
      transform: translate(-50%, -50%) scale(0.92);
      background: #0F172A; color: #fff;
      border-radius: 16px; padding: 18px 28px;
      display: flex; align-items: center; gap: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,.28);
      z-index: 9000; opacity: 0; pointer-events: none;
      transition: opacity .22s ease, transform .22s ease;
      white-space: nowrap;
    }
    #welcomeToast.show {
      opacity: 1; transform: translate(-50%, -50%) scale(1);
    }
    .wt-icon {
      width: 36px; height: 36px; border-radius: 50%;
      background: var(--green); display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .wt-text { display: flex; flex-direction: column; gap: 2px; }
    .wt-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
    .wt-sub { font-size: 12px; color: rgba(255,255,255,.6); }

    .apply-sheet {
      width: 100%; max-width: 480px;
      background: #fff; border-radius: 22px 22px 0 0;
      padding: 10px 22px 32px;
      transform: translateY(24px); transition: transform .3s cubic-bezier(.4,0,.2,1);
    }
    #applyEmailModal.open .apply-sheet,
    #applyRedirectModal.open .apply-sheet { transform: translateY(0); }
    .apply-sheet-handle {
      width: 36px; height: 4px; background: #E5E7EB; border-radius: 2px;
      margin: 0 auto 20px;
    }
    .apply-sheet-icon {
      width: 48px; height: 48px; border-radius: 14px; background: #ECFDF5;
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 14px;
    }
    .apply-sheet-title {
      font-size: 17px; font-weight: 800; color: #0E1629;
      margin-bottom: 6px; line-height: 1.3;
    }
    .apply-sheet-sub {
      font-size: 13px; color: #6B7280; line-height: 1.55; margin-bottom: 18px;
    }
    .apply-sheet-input {
      width: 100%; box-sizing: border-box;
      padding: 12px 14px; border: 1.5px solid #E5E7EB; border-radius: 11px;
      font-size: 14px; font-family: inherit; color: #0E1629; outline: none;
      background: #F9FAFB; margin-bottom: 12px;
      transition: border-color .15s, background .15s;
    }
    .apply-sheet-input:focus { border-color: #059669; background: #fff; }
    .apply-sheet-consent {
      display: flex; align-items: flex-start; gap: 9px;
      font-size: 12px; color: #6B7280; line-height: 1.5; cursor: pointer;
      margin-bottom: 16px; user-select: none;
    }
    .apply-sheet-consent input[type=checkbox] {
      margin-top: 2px; flex-shrink: 0; accent-color: #059669;
      width: 16px; height: 16px; cursor: pointer;
    }
    .apply-sheet-consent a { color: #059669; text-decoration: none; }
    .apply-sheet-submit {
      width: 100%; padding: 14px; background: #059669; color: #fff;
      border: none; border-radius: 12px; font-size: 15px; font-weight: 700;
      font-family: inherit; cursor: pointer; opacity: .4; pointer-events: none;
      transition: background .15s, opacity .2s; margin-bottom: 10px;
    }
    .apply-sheet-submit.active { opacity: 1; pointer-events: auto; }
    .apply-sheet-submit.active:active { background: #047857; }
    .apply-sheet-submit.always-active { opacity: 1; pointer-events: auto; }
    .apply-sheet-skip {
      width: 100%; padding: 11px; background: none; border: none;
      font-size: 13px; font-weight: 600; color: #9CA3AF; font-family: inherit;
      cursor: pointer; transition: color .15s;
    }
    .apply-sheet-skip:hover { color: #6B7280; }
    .apply-redirect-notice {
      display: flex; align-items: flex-start; gap: 8px;
      background: #F8FAFC; border: 1px solid #E5E7EB; border-radius: 10px;
      padding: 12px 13px; margin-bottom: 18px;
      font-size: 12px; color: #6B7280; line-height: 1.6;
    }

    /* Quit-profiling warning modal */
    #quitProfilingModal {
      position: fixed; inset: 0; z-index: 400;
      display: flex; align-items: flex-end; justify-content: center;
      background: rgba(14,22,41,.5); backdrop-filter: blur(3px);
      opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    #quitProfilingModal.open { opacity: 1; pointer-events: all; }
    #quitProfilingModal .quit-sheet {
      background: #fff; border-radius: 24px 24px 0 0;
      padding: 28px 24px 40px; width: 100%; max-width: 420px;
      transform: translateY(100%); transition: transform .3s cubic-bezier(.32,.72,0,1);
    }
    #quitProfilingModal.open .quit-sheet { transform: translateY(0); }
    .quit-icon-wrap {
      width: 52px; height: 52px; border-radius: 16px;
      background: #FEF2F2; display: flex; align-items: center; justify-content: center;
      margin: 0 auto 18px;
    }
    .quit-title { font-size: 17px; font-weight: 800; color: #0E1629; text-align: center; margin-bottom: 8px; line-height: 1.3; }
    .quit-sub   { font-size: 13.5px; color: #6B7280; text-align: center; line-height: 1.55; margin-bottom: 28px; }
    .quit-btns  { display: flex; flex-direction: column; gap: 10px; }
    .quit-btn-danger { background: #EF4444; color: #fff; border: none; border-radius: 12px; padding: 14px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
    .quit-btn-cancel { background: transparent; color: #374151; border: 1.5px solid #E5E7EB; border-radius: 12px; padding: 13px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
    .nav-logo-btn { background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; }
    #calibModal {
      position: fixed; inset: 0; z-index: 300;
      display: flex; align-items: flex-end; justify-content: center;
      background: rgba(14,22,41,.45); backdrop-filter: blur(3px);
      opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    #calibModal.open { opacity: 1; pointer-events: all; }
    .calib-sheet {
      background: #fff; border-radius: 24px 24px 0 0;
      padding: 28px 24px 36px; width: 100%; max-width: 420px;
      transform: translateY(100%); transition: transform .3s cubic-bezier(.32,.72,0,1);
    }
    #calibModal.open .calib-sheet { transform: translateY(0); }
    .calib-icon {
      width: 48px; height: 48px; border-radius: 14px;
      background: #F0FDF8; display: flex; align-items: center; justify-content: center;
      margin: 0 auto 16px;
    }
    .calib-title { font-size: 17px; font-weight: 800; color: #0E1629; text-align: center; margin-bottom: 8px; line-height: 1.3; }
    .calib-sub   { font-size: 13px; color: #6B7280; text-align: center; line-height: 1.55; margin-bottom: 24px; }
    .calib-options { display: flex; flex-direction: column; gap: 10px; }
    .calib-opt {
      width: 100%; padding: 16px 18px; border-radius: 14px;
      border: 1.5px solid #E5E7EB; background: #fff;
      font-family: inherit; font-size: 14px; font-weight: 600; color: #0E1629;
      cursor: pointer; text-align: left; line-height: 1.4;
      display: flex; align-items: flex-start; gap: 12px;
      transition: border-color .15s, background .15s;
    }
    .calib-opt:hover { border-color: var(--green); background: #F0FDF8; }
    .calib-opt .calib-opt-ico {
      width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
    }
    .calib-opt.manual .calib-opt-ico   { background: #F3F4F6; }
    .calib-opt.auto   .calib-opt-ico   { background: #F0FDF8; }
    .calib-opt.auto   { border-color: #059669; }
    .calib-opt-label { font-size: 16px; font-weight: 700; color: #0E1629; margin-bottom: 3px; }
    .calib-opt-desc  { font-size: 13px; font-weight: 400; color: #6B7280; line-height: 1.5; }
    /* ── Onboarding intro modal + progress modals ── */
    /* display:none by default — JS sets display:flex before adding .open, and
       restores display:none after the close transition. This prevents the ghost
       fixed-flex layer that corrupts iOS touch coordinates after modal dismissal. */
    #progressModal1, #progressModal2 { position:fixed; inset:0; z-index:400; display:none; align-items:flex-end; justify-content:center; background:rgba(0,0,0,.45); opacity:0; pointer-events:none; transition:opacity .22s; }
    #progressModal1.open, #progressModal2.open { opacity:1; pointer-events:all; }
    /* Onboard modal: centered so CTA button clears the iOS browser bar */
    #onboardModal { position:fixed; inset:0; z-index:400; display:none; align-items:center; justify-content:center; padding: 0 16px; background:rgba(0,0,0,.45); opacity:0; pointer-events:none; transition:opacity .22s; }
    #onboardModal.open { opacity:1; pointer-events:all; }
    #onboardModal.pre-open:not(.open) { opacity:1; pointer-events:none; }
    #onboardModal .obm-sheet { border-radius:24px; transform:translateY(16px); transition:transform .32s cubic-bezier(.32,.72,0,1); will-change:transform; }
    #onboardModal.open .obm-sheet { transform:translateY(0); }
    /* will-change:transform tells iOS to composite the sheet on the GPU so that
       touch hit-testing follows the animated (visual) position, not the
       pre-animation layout position — fixes intermittent X-button miss. */
    .obm-sheet { background:#fff; border-radius:24px 24px 0 0; padding:28px 24px 36px; width:100%; max-width:420px; transform:translateY(100%); transition:transform .32s cubic-bezier(.32,.72,0,1); position:relative; will-change:transform; }
    #progressModal1.open .obm-sheet, #progressModal2.open .obm-sheet { transform:translateY(0); }
    /* 44×44 tap target (Apple/Google HIG minimum) + touch-action:manipulation
       prevents the 300ms tap delay on iOS and eliminates double-tap zoom. */
    .obm-close { position:absolute; top:12px; right:12px; width:44px; height:44px; border-radius:50%; border:none; background:#F3F4F6; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#6B7280; transition:background .15s; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
    .obm-close svg { pointer-events:none; }
    .obm-close:hover { background:#E5E7EB; color:#374151; }
    .obm-title { font-size:18px; font-weight:800; color:#0E1629; margin-bottom:24px; padding-right:36px; line-height:1.3; }
    .obm-steps { display:flex; flex-direction:column; gap:18px; margin-bottom:28px; }
    .obm-step { display:flex; gap:14px; align-items:flex-start; }
    .obm-num { flex-shrink:0; width:30px; height:30px; border-radius:50%; background:var(--green); color:#fff; font-size:13px; font-weight:800; display:flex; align-items:center; justify-content:center; margin-top:1px; }
    .obm-step-body {}
    .obm-step-name { font-size:14px; font-weight:700; color:#0E1629; margin-bottom:3px; }
    .obm-step-desc { font-size:13px; color:#6B7280; line-height:1.5; }
    .obm-start-btn { width:100%; padding:15px; border-radius:14px; background:var(--green); color:#fff; border:none; font-family:inherit; font-size:16px; font-weight:700; cursor:pointer; box-shadow:0 4px 16px rgba(5,150,105,.25); transition:opacity .15s; }
    .obm-start-btn:hover { opacity:.9; }
    /* ── Progress step state modifiers ── */
    .obm-num--done { background:#D1FAE5; color:#059669; position:relative; }
    .obm-num--done::after { content:'✓'; font-size:14px; font-weight:900; }
    .obm-num--done .obm-num-txt { display:none; }
    .obm-num--active { background:var(--green); color:#fff; box-shadow:0 2px 10px rgba(5,150,105,.4); }
    .obm-num--pending { background:#E5E7EB; color:#9CA3AF; }
    /* Done / pending — strongly faded */
    .obm-step--done { opacity:.22; }
    .obm-step--done .obm-step-name { color:#6B7280; }
    .obm-step--done .obm-step-desc { color:#9CA3AF; }
    .obm-step--pending { opacity:.18; }
    .obm-step--pending .obm-step-name { color:#9CA3AF; }
    .obm-step--pending .obm-step-desc { color:#D1D5DB; }
    /* Active step — green card highlight */
    .obm-step--active { background:#F0FDF8; border-radius:12px; padding:10px 12px; margin:0 -12px; }
    .obm-step--active .obm-step-name { color:#059669; font-size:14px; font-weight:800; }
    .obm-step--active .obm-step-desc { color:#374151; font-size:13px; line-height:1.45; }
    /* ── Forecast quality warning modal ── */
    #forecastWarnModal { position:fixed; inset:0; z-index:400; display:flex; align-items:flex-end; justify-content:center; background:rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:opacity .2s; }
    #forecastWarnModal.open { opacity:1; pointer-events:all; }
    .fwm-sheet { background:#fff; border-radius:24px 24px 0 0; padding:28px 24px 36px; width:100%; max-width:420px; transform:translateY(100%); transition:transform .3s cubic-bezier(.32,.72,0,1); }
    #forecastWarnModal.open .fwm-sheet { transform:translateY(0); }
    .fwm-icon { width:48px; height:48px; border-radius:14px; background:#FEF2F2; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }
    .fwm-title { font-size:17px; font-weight:800; color:#0E1629; text-align:center; margin-bottom:8px; line-height:1.3; }
    .fwm-sub { font-size:13px; color:#6B7280; text-align:center; line-height:1.55; margin-bottom:24px; }
    .fwm-btn-primary { width:100%; padding:14px; border-radius:12px; background:var(--dark); color:#fff; border:none; font-family:inherit; font-size:15px; font-weight:700; cursor:pointer; margin-bottom:10px; }
    .fwm-btn-primary:hover { background:#1E2D45; }
    .fwm-btn-secondary { width:100%; padding:12px; border-radius:12px; background:transparent; color:#6B7280; border:1.5px solid #E5E7EB; font-family:inherit; font-size:14px; font-weight:600; cursor:pointer; }
    .fwm-btn-secondary:hover { border-color:#9CA3AF; color:#374151; }

    /* ── Continue session bottom-sheet ──────────────────────────── */
    #continueOverlay {
      display:none; position:fixed; inset:0; z-index:600;
      background:rgba(14,22,41,.45); backdrop-filter:blur(3px);
    }
    #continueOverlay.open { display:block; }
    #continueSheet {
      position:fixed; bottom:0; left:50%; translate:-50% 100%;
      width:100%; max-width:420px; z-index:601;
      background:#fff; border-radius:18px 18px 0 0;
      box-shadow:0 -8px 40px rgba(0,0,0,.18);
      visibility:hidden;
      transition:translate .32s cubic-bezier(.32,.72,0,1), visibility 0s .32s;
      padding:24px 20px 32px;
    }
    #continueSheet.open { translate:-50% 0; visibility:visible; transition:translate .32s cubic-bezier(.32,.72,0,1), visibility 0s 0s; }
    .csh-icon { width:44px; height:44px; border-radius:14px; background:#EFF6FF; display:flex; align-items:center; justify-content:center; margin-bottom:14px; }
    .csh-title { font-size:17px; font-weight:700; color:#0E1629; margin-bottom:6px; }
    .csh-sub { font-size:13px; color:#6B7280; margin-bottom:20px; line-height:1.5; }
    .csh-btn-primary { width:100%; padding:13px; border-radius:12px; background:#0E1629; color:#fff; border:none; font-family:inherit; font-size:14px; font-weight:700; cursor:pointer; margin-bottom:10px; }
    .csh-btn-primary:hover { background:#1E2D45; }
    .csh-btn-ghost { width:100%; padding:12px; border-radius:12px; background:transparent; color:#6B7280; border:1.5px solid #E5E7EB; font-family:inherit; font-size:14px; font-weight:600; cursor:pointer; }
    .csh-btn-ghost:hover { border-color:#9CA3AF; color:#374151; }

    /* ── Calculation limit modal ─────────────────────────────────── */
    #limitModal {
      display:none; position:fixed; inset:0; z-index:700;
      background:rgba(14,22,41,.5); backdrop-filter:blur(4px);
      align-items:center; justify-content:center;
    }
    #limitModal.open { display:flex; }
    #limitBox {
      background:#fff; border-radius:20px; padding:28px 24px;
      max-width:360px; width:calc(100% - 40px);
      box-shadow:0 20px 60px rgba(0,0,0,.22);
      text-align:center;
    }
    .lm-icon { font-size:36px; margin-bottom:12px; }
    .lm-title { font-size:17px; font-weight:700; color:#0E1629; margin-bottom:8px; }
    .lm-body { font-size:13px; color:#6B7280; line-height:1.55; margin-bottom:20px; }
    .lm-reset { font-weight:700; color:#0E1629; }
    .lm-btn { width:100%; padding:13px; border-radius:12px; background:#0E1629; color:#fff; border:none; font-family:inherit; font-size:14px; font-weight:700; cursor:pointer; }
    .lm-btn:hover { background:#1E2D45; }

    /* ── Confirm / duplicate-email micro-modals ─────────── */
    #deleteEmailModal, #dupEmailModal {
      display:none; position:fixed; inset:0; z-index:800;
      background:rgba(14,22,41,.52); backdrop-filter:blur(4px);
      align-items:center; justify-content:center;
    }
    #deleteEmailModal.open, #dupEmailModal.open { display:flex; }
    .cem-box {
      background:#fff; border-radius:20px; padding:28px 24px;
      max-width:348px; width:calc(100% - 40px);
      box-shadow:0 20px 60px rgba(0,0,0,.22);
      text-align:center; animation:lmPop .18s ease;
    }
    .cem-icon { margin-bottom:14px; }
    .cem-title { font-size:16px; font-weight:700; color:#0E1629; margin-bottom:8px; }
    .cem-body  { font-size:13px; color:#6B7280; line-height:1.55; margin-bottom:22px; }
    .cem-email { font-weight:700; color:#0E1629; word-break:break-all; }
    .cem-btn-danger {
      width:100%; padding:13px; border-radius:12px;
      background:#EF4444; color:#fff; border:none;
      font-family:inherit; font-size:14px; font-weight:700; cursor:pointer;
      margin-bottom:10px;
    }
    .cem-btn-danger:hover { background:#DC2626; }
    .cem-btn-secondary {
      width:100%; padding:12px; border-radius:12px;
      background:#F3F4F6; color:#374151; border:none;
      font-family:inherit; font-size:14px; font-weight:600; cursor:pointer;
    }
    .cem-btn-secondary:hover { background:#E5E7EB; }
    .cem-btn-primary {
      width:100%; padding:13px; border-radius:12px;
      background:#0E1629; color:#fff; border:none;
      font-family:inherit; font-size:14px; font-weight:700; cursor:pointer;
      margin-bottom:10px;
    }
    .cem-btn-primary:hover { background:#1E2D45; }
    .cem-otp-input {
      width:100%; padding:12px 14px; border-radius:12px;
      border:1.5px solid #D1D5DB; font-size:18px; letter-spacing:4px;
      text-align:center; font-family:inherit; box-sizing:border-box;
      margin-bottom:8px; outline:none;
    }
    .cem-otp-input:focus { border-color:#0E1629; }
    .cem-error { font-size:12px; color:#EF4444; margin-bottom:12px; min-height:16px; }

    /* Offers-page email pill removed — profile icon in nav used instead */


/* ── Cashback rank badge inside accuracy block ── */
#accStatusBadge{display:inline-flex;align-items:center;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;padding:3px 9px;border-radius:20px;margin-bottom:6px}
#accStatusBadge.red   {background:#FEE2E2;color:#DC2626}
#accStatusBadge.yellow{background:#FEF3C7;color:#D97706}
#accStatusBadge.green {background:#D1FAE5;color:#059669}

/* ── Zone Transition Popup ── */
#zonePopupOv{position:fixed;inset:0;z-index:9000;background:rgba(15,20,35,.62);display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .22s;cursor:pointer}
#zonePopupOv.show{opacity:1;pointer-events:all}
#zonePopup{width:min(320px,88vw);border-radius:24px;overflow:hidden;transform:scale(.82) translateY(32px);transition:transform .32s cubic-bezier(.34,1.5,.64,1);cursor:default;position:relative}
#zonePopupOv.show #zonePopup{transform:scale(1) translateY(0)}
#zpTop{padding:32px 24px 20px;text-align:center;position:relative}
#zpTop.yellow{background:linear-gradient(160deg,#FEF3C7 0%,#FDE68A 100%)}
#zpTop.green{background:linear-gradient(160deg,#D1FAE5 0%,#A7F3D0 100%)}
#zpTop.boss{background:linear-gradient(160deg,#0E1629 0%,#1E2D45 100%)}
#zpIconCircle{width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 14px;border:3px solid rgba(255,255,255,.7)}
#zpIconCircle.yellow{background:#F59E0B;box-shadow:0 4px 20px rgba(245,158,11,.35)}
#zpIconCircle.green{background:#059669;box-shadow:0 4px 20px rgba(5,150,105,.35)}
#zpIconCircle.boss{background:#F59E0B;box-shadow:0 4px 28px rgba(245,158,11,.55)}
#zpIconCircle svg{width:36px;height:36px}
#zpCloseX{position:absolute;top:12px;right:14px;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-size:15px;line-height:1;font-family:inherit}
#zpCloseX.yellow{background:rgba(180,120,0,.12);color:#92400e}
#zpCloseX.green{background:rgba(5,150,105,.12);color:#065f46}
#zpCloseX.boss{background:rgba(255,255,255,.1);color:rgba(255,255,255,.6)}
#zpTitle{font-size:17px;font-weight:800;line-height:1.25;margin-bottom:5px}
#zpTitle.yellow{color:#78350f}
#zpTitle.green{color:#064e3b}
#zpTitle.boss{color:#fff}
#zpAccuracy{font-size:12px;font-weight:500;opacity:.75}
#zpAccuracy.yellow{color:#92400e}
#zpAccuracy.green{color:#065f46}
#zpAccuracy.boss{color:rgba(255,255,255,.65)}
#zpBody{background:#fff;padding:18px 22px 22px;text-align:center}
#zpDesc{font-size:13px;color:#4b5563;line-height:1.6;margin-bottom:18px}
#zpCta{display:block;width:100%;padding:13px;border-radius:12px;font-size:14px;font-weight:700;border:none;cursor:pointer;letter-spacing:.01em;font-family:inherit;transition:filter .15s,transform .1s;color:#fff}
#zpCta.yellow{background:#F59E0B;box-shadow:0 4px 16px rgba(245,158,11,.4)}
#zpCta.green{background:#059669;box-shadow:0 4px 16px rgba(5,150,105,.4)}
#zpCta.boss{background:#F59E0B;box-shadow:0 4px 16px rgba(245,158,11,.45)}
#zpCta:active{transform:scale(.98)}
#zpCta:hover{filter:brightness(.92)}
#zpKeep{display:block;width:100%;margin-top:18px;font-size:12px;color:#9ca3af;cursor:pointer;text-decoration:underline;text-underline-offset:3px;background:none;border:none;font-family:inherit;text-align:center}
#zpKeep:hover{color:#6b7280}
#zpConfettiCanvas{position:fixed;inset:0;pointer-events:none;z-index:9001;display:none}

/* ── Admin password modal ────────────────────────────── */
#adminModal{display:none;position:fixed;inset:0;z-index:9200;background:rgba(0,0,0,.55);align-items:center;justify-content:center}
#adminModal.open{display:flex}
.adm-box{background:#fff;border-radius:16px;padding:28px 24px 22px;width:310px;max-width:90vw;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.adm-box h3{margin:0 0 14px;font-size:15px;color:#0E1629;font-weight:700}
.adm-inp{width:100%;padding:10px 12px;border:1.5px solid #D1D5DB;border-radius:8px;font-size:15px;box-sizing:border-box;outline:none;font-family:inherit}
.adm-inp:focus{border-color:#059669}
.adm-err{color:#EF4444;font-size:12px;margin:5px 0 0;display:none}
.adm-btns{display:flex;gap:8px;margin-top:14px}
.adm-btn{flex:1;padding:10px;border-radius:8px;border:none;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit}
.adm-btn.cancel{background:#F1F5F9;color:#64748B}
.adm-btn.ok{background:#0E1629;color:#fff}
/* ── Floating debug button ───────────────────────────── */
#dbgFloatBtn{display:none;position:fixed;bottom:22px;right:22px;z-index:8500;background:#0E1629;color:#fff;border:none;border-radius:50px;padding:9px 16px;font-size:12px;font-weight:700;cursor:pointer;box-shadow:0 4px 18px rgba(0,0,0,.28);align-items:center;gap:5px;letter-spacing:.02em}
#dbgFloatBtn.vis{display:flex}
#dbgFloatBtn:hover{background:#1e2d4a}
/* ── Debug overlay panel ─────────────────────────────── */
#dbgPanel{display:none;position:fixed;inset:0;z-index:9300;background:#07111e;color:#c9d5e0;font-family:'SF Mono','Fira Code','Consolas',monospace;font-size:12px;line-height:1.55;overflow-y:auto;padding:20px 24px 40px;box-sizing:border-box}
#dbgPanel.open{display:block}
#dbgCloseBtn{position:sticky;top:0;float:right;background:#EF4444;color:#fff;border:none;border-radius:6px;padding:5px 12px;font-size:12px;font-weight:700;cursor:pointer;z-index:1;margin-bottom:8px}
.dbg-h1{font-size:17px;font-weight:700;color:#fff;margin:0 0 18px;font-family:inherit;clear:both}
.dbg-sec{margin-bottom:22px}
.dbg-stitle{font-size:10px;font-weight:700;color:#10b981;letter-spacing:.1em;text-transform:uppercase;margin-bottom:7px;border-bottom:1px solid #142436;padding-bottom:4px}
.dbg-kv{display:flex;gap:10px;margin:2px 0}
.dbg-k{color:#6b8aab;min-width:200px;flex-shrink:0}
.dbg-v{color:#e2eaf2;word-break:break-all}
.dbg-v.hi{color:#34d399;font-weight:700}
.dbg-tbl{width:100%;border-collapse:collapse;margin-top:6px;font-size:11px}
.dbg-tbl th{text-align:left;color:#4a6a8a;padding:4px 7px;border-bottom:1px solid #142436;white-space:nowrap;font-weight:600}
.dbg-tbl td{padding:3px 7px;border-bottom:1px solid #0c1e2e;white-space:nowrap}
.dbg-tbl tr:hover td{background:#0f1f30}
.dbg-tbl td.r{text-align:right;font-variant-numeric:tabular-nums}
.dbg-tbl td.hi{color:#34d399}
.dbg-tbl td.dim{color:#4a6a8a}
.dbg-spin{color:#6b8aab;padding:16px 0}

