/* GPT Pay — public pages skin: redeem landing and invoice assistant.
   Loaded after style.css. The tokens below re-theme the base components; the rest
   lays out the landing frame. Redemption and task logic stay in the pages. */

body.recharge-page {
    --primary: #0f766e;
    --primary-hover: #0c635c;
    --primary-soft: #e6f6f1;
    --primary-glow: rgba(15, 118, 110, 0.2);
    --accent: #0f766e;
    --accent-soft: #e6f6f1;
    --accent-glow: rgba(15, 118, 110, 0.12);
    --bg-page: #f4f7f6;
    --surface: #fff;
    --surface-soft: #f3f8f6;
    --surface-hover: #e9f0ed;
    --glass: #fff;
    --glass-border: #dfe7e3;
    --border-strong: #c3d1cc;
    --divider: #e8eeeb;
    --text-main: #0e1a17;
    --text-secondary: #44544e;
    --text-dim: #5f7069;
    --text-muted: #8c9a94;
    --success: #15803d;
    --success-soft: #e8f6ec;
    --error: #dc2626;
    --error-soft: #fdecec;
    --warning: #b45309;
    --warning-soft: #fff5e0;
    --info: #0369a1;
    --info-soft: #e5f3fa;
    --shadow-sm: 0 1px 2px rgba(14, 26, 23, 0.05);
    --shadow: 0 6px 18px rgba(14, 26, 23, 0.07), 0 1px 2px rgba(14, 26, 23, 0.04);
    --shadow-lg: 0 18px 44px rgba(14, 26, 23, 0.1), 0 2px 8px rgba(14, 26, 23, 0.04);
    --shadow-focus: 0 0 0 3px rgba(15, 118, 110, 0.2);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 18px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
    --landing-ease: cubic-bezier(.16, 1, .3, 1);
    display: block;
    min-height: 100vh;
    margin: 0;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html.recharge-document { background: #f4f7f6; scroll-padding-top: 96px; scroll-behavior: smooth; }
.recharge-page ::selection { background: var(--primary); color: #fff; }
.recharge-page ::-webkit-scrollbar-thumb { background: #c3d1cc; border-color: var(--bg-page); }
.recharge-page ::-webkit-scrollbar-thumb:hover { background: var(--primary); }
.recharge-page code, .recharge-page .query-row strong { font-family: var(--font-mono); }
.recharge-page svg.icon { flex-shrink: 0; }

/* ---------- backdrop ---------- */
.recharge-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        radial-gradient(58% 44% at 80% 0%, rgba(15, 118, 110, 0.14) 0%, transparent 70%),
        radial-gradient(40% 32% at 2% 16%, rgba(20, 184, 166, 0.1) 0%, transparent 72%),
        radial-gradient(rgba(14, 26, 23, 0.085) 1px, transparent 1.3px);
    background-size: auto, auto, 22px 22px;
    -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.55) 46%, transparent 82%);
    mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, 0.55) 46%, transparent 82%);
}

/* ---------- header ---------- */
.landing-header {
    position: fixed; inset: 0 0 auto; z-index: 40; height: 68px;
    background: rgba(244, 247, 246, 0.72);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background .3s, border-color .3s, box-shadow .3s;
}
.landing-header.is-scrolled { background: rgba(255, 255, 255, 0.88); border-color: var(--glass-border); box-shadow: 0 8px 24px rgba(14, 26, 23, 0.05); }
.landing-header-inner { display: flex; align-items: center; gap: 36px; width: min(1180px, calc(100% - 64px)); height: 100%; margin: auto; }
.recharge-landing .landing-brand,
.invoice-page .landing-brand {
    display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
    color: var(--text-main); font-size: 18px; font-weight: 700; letter-spacing: -.02em; text-decoration: none;
}
.recharge-landing .landing-brand:hover, .invoice-page .landing-brand:hover { color: var(--text-main); text-decoration: none; }
.landing-brand img { display: block; width: 28px; height: 28px; object-fit: contain; }
.brand-word { white-space: nowrap; }
.brand-word em { font-style: normal; color: var(--primary); font-weight: 800; }
.landing-desktop-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.landing-desktop-nav > a { position: relative; padding: 8px 10px; border-radius: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; transition: color .18s, background .18s; }
.landing-desktop-nav > a:hover { color: var(--text-main); background: rgba(14, 26, 23, 0.05); }
.landing-desktop-nav .invoice-nav-link {
    display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px;
    border: 1px solid #b9e0d6; border-radius: 999px; background: var(--primary-soft); line-height: 1.2; text-align: left;
}
.landing-desktop-nav .invoice-nav-link:hover { background: #d9f1ea; }
.invoice-heartbeat { display: inline-block; animation: invoice-heartbeat 2.8s ease-in-out infinite; }
.landing-desktop-nav .invoice-heartbeat { position: relative; color: var(--primary); font-weight: 700; }
.landing-desktop-nav .invoice-nav-link-typing { color: #3d7d74; font-size: 11px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.landing-desktop-nav .invoice-nav-link::after { display: none; }
.landing-dialog-links .invoice-heartbeat { color: var(--primary); font-weight: 700; }
.recharge-landing .landing-icon-button {
    display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
    background: transparent; color: var(--text-main); border: 1px solid transparent; border-radius: 10px; box-shadow: none;
}
.recharge-landing .landing-icon-button:hover { background: rgba(14, 26, 23, 0.05); box-shadow: none; transform: none; }
.landing-icon-button svg { width: 20px; height: 20px; }
.recharge-landing .landing-menu-toggle { display: none; margin-left: auto; }

/* mobile navigation drawer */
.landing-nav-dialog {
    position: fixed; inset: 0 0 0 auto; width: min(86vw, 380px); max-width: none; max-height: none; height: 100dvh;
    margin: 0; padding: 0; border: 0; border-left: 1px solid var(--glass-border);
    background: #fff; color: var(--text-main); box-shadow: -16px 0 48px rgba(14, 26, 23, 0.12);
}
.landing-nav-dialog[open] { display: flex; flex-direction: column; animation: landing-drawer .22s cubic-bezier(.4, 0, .2, 1) both; }
.landing-nav-dialog::backdrop { background: rgba(14, 26, 23, 0.32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: landing-fade .16s ease-out both; }
.landing-nav-dialog.is-closing { animation: landing-drawer-out .18s cubic-bezier(.4, 0, .2, 1) both; }
.landing-nav-dialog.is-closing::backdrop { animation: landing-backdrop-out .14s ease-out both; }
html.recharge-document:has(.landing-nav-dialog[open]) { overflow: hidden; }
.landing-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 12px 16px 12px 22px; border-bottom: 1px solid var(--divider); font-size: 16px; }
.landing-dialog-links { display: grid; gap: 6px; padding: 18px 14px; }
.landing-dialog-links a {
    display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 12px 14px;
    border-radius: 10px; color: var(--text-main); font-size: 15px; font-weight: 500; text-decoration: none;
}
.landing-dialog-links a:hover { background: var(--surface-soft); color: var(--text-main); }
.landing-dialog-links svg { width: 16px; height: 16px; color: var(--text-dim); }

/* ---------- landing frame ---------- */
.recharge-landing .recharge-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 64px)); padding: 72px 0 0; animation: none; }
.recharge-hero {
    display: grid; grid-template-areas: 'copy card' 'plans card';
    grid-template-columns: minmax(0, 1fr) minmax(0, 464px);
    gap: 28px 72px; align-content: center;
    min-height: calc(100svh - 230px); padding: 44px 0 36px;
}
.recharge-landing .site-hero { grid-area: copy; margin: 0; text-align: left; align-self: end; }
.recharge-landing .hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 5px 12px 5px 10px;
    border: 1px solid var(--glass-border); border-radius: 999px; background: #fff;
    color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .06em;
    box-shadow: var(--shadow-sm); animation: landing-enter .6s var(--landing-ease) both;
}
.recharge-landing .hero-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.recharge-landing .site-hero h1 {
    margin: 0; font-size: clamp(40px, 4.1vw, 58px); line-height: 1.1;
    font-weight: 800; letter-spacing: -.035em; -webkit-text-fill-color: currentColor;
    animation: landing-enter .6s .08s var(--landing-ease) both;
}
.recharge-landing .shine-text {
    display: inline-block; padding-bottom: 5px;
    background: linear-gradient(100deg, #0f766e 15%, #0f766e 38%, #2dd4bf 50%, #0f766e 62%, #0f766e 100%);
    background-size: 220% 100%; background-clip: text; -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: landing-shine 7s linear infinite;
}
.recharge-landing .hero-subtitle {
    max-width: 430px; margin: 20px 0 0; font-size: 16px; line-height: 1.75;
    color: var(--text-secondary); animation: landing-enter .6s .16s var(--landing-ease) both;
}
.trust-points { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 24px 0 0; padding: 0; list-style: none; animation: landing-enter .6s .24s var(--landing-ease) both; }
.trust-points li { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.trust-points svg { width: 18px; height: 18px; color: var(--primary); }

/* redeem card */
.checkout-visual { grid-area: card; position: relative; isolation: isolate; min-width: 0; align-self: center; animation: landing-enter .7s .12s var(--landing-ease) both; }
.checkout-glow { position: absolute; z-index: 0; width: min(300px, 80%); aspect-ratio: 1; border-radius: 50%; filter: blur(64px); pointer-events: none; animation: landing-glow 5s ease-in-out infinite; }
.checkout-glow-purple { top: 2%; right: -4%; background: #8fd9ca; opacity: .5; }
.checkout-glow-blue { bottom: -4%; left: -6%; background: #c9e6f2; opacity: .55; animation-delay: 2.5s; }
.recharge-landing .recharge-card {
    position: relative; z-index: 1; padding: 28px; overflow: hidden;
    border: 1px solid var(--glass-border); border-radius: 18px; background: var(--surface);
    box-shadow: var(--shadow-lg); scroll-margin-top: 100px;
}
.recharge-landing .recharge-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #0f766e, #2dd4bf); }
.recharge-landing .card-head { flex-direction: row; align-items: center; margin-bottom: 20px; }
.recharge-landing .card-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.recharge-landing .card-head p { margin-top: 3px; font-size: 12.5px; }
.flow-badge { padding: 5px 11px; font-size: 12px; }
.recharge-landing .flow-badge.pending { background: var(--surface-soft); color: var(--text-dim); border-color: var(--divider); }
.recharge-landing .flow-badge.cdk_ok { background: var(--info-soft); color: var(--info); border-color: #bfe0f1; }
.recharge-landing .flow-badge.running { background: var(--primary-soft); color: var(--primary); border-color: #b9e0d6; }
.recharge-landing .flow-badge.success { background: var(--success-soft); color: var(--success); border-color: #bfe6cb; }
.recharge-landing .flow-badge.failed, .recharge-landing .flow-badge.manual { background: var(--error-soft); color: var(--error); border-color: #f6c9c9; }
.recharge-landing .stepper { padding: 12px; margin-bottom: 18px; background: var(--surface-soft); border-color: var(--divider); border-radius: 12px; }
.recharge-landing .step-item { gap: 8px; font-size: 12.5px; }
.recharge-landing .step-num { width: 24px; height: 24px; background: #dfe7e3; color: var(--text-secondary); }
.recharge-landing .step-item.active { color: var(--primary); }
.recharge-landing .step-item.active .step-num { background: var(--primary); color: #fff; }
.recharge-landing .step-item.done .step-num { background: var(--primary-soft); color: var(--primary); }
.recharge-landing .step-line { flex: 0 1 28px; width: 28px; margin: 0 8px; background: #d3ddD9; }
.recharge-landing .tab-nav { margin-bottom: 22px; padding: 4px; background: var(--surface-soft); border-color: var(--divider); border-radius: 12px; }
.recharge-landing .tab-btn { border-radius: 9px; font-size: 14px; font-weight: 500; padding: 9px 12px; }
.recharge-landing .tab-btn:hover { background: rgba(14, 26, 23, 0.05); color: var(--text-main); transform: none; }
.recharge-landing .tab-btn.active { background: #fff; color: var(--text-main); box-shadow: 0 0 0 1px var(--divider), var(--shadow-sm); font-weight: 600; }
.recharge-landing .tab-btn:disabled { background: transparent; color: var(--text-muted); }
.recharge-landing .field-label { margin-bottom: 9px; font-size: 13px; }
.recharge-landing .field-hint { margin-top: 12px; font-size: 12px; line-height: 1.6; }
.recharge-landing input, .recharge-landing textarea { padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; box-shadow: none; font-size: 15px; }
.recharge-landing input:hover, .recharge-landing textarea:hover { border-color: #a9bbb5; }
.recharge-landing input:focus, .recharge-landing textarea:focus { border-color: var(--primary); background: #fff; box-shadow: var(--shadow-focus); }
.recharge-landing ::placeholder { color: var(--text-muted); }
.recharge-landing .input-group { gap: 14px; }
.recharge-landing .btn-primary, .recharge-landing .btn-lg {
    min-height: 46px; padding: 12px 20px; border: 1px solid var(--primary); border-radius: 10px;
    background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(14, 26, 23, 0.1);
}
.recharge-landing .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(15, 118, 110, 0.24); }
.recharge-landing .btn-primary:active { transform: scale(.985); }
.recharge-landing button:disabled { background: #b5c3be; border-color: #b5c3be; color: #fff; opacity: 1; transform: none; box-shadow: none; }
.recharge-landing .tab-btn:disabled { background: transparent; border-color: transparent; color: var(--text-muted); }
.recharge-landing .btn-secondary { border-radius: 10px; color: var(--text-secondary); border-color: var(--border-strong); font-size: 14px; }
.recharge-landing .btn-secondary:hover { background: var(--surface-soft); color: var(--text-main); border-color: #a9bbb5; }
.recharge-landing .get-token-btn-floating {
    padding: 7px 12px; border: 1px solid #b9e0d6; border-radius: 8px;
    background: var(--primary-soft); box-shadow: none; color: var(--primary) !important;
    font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.recharge-landing .get-token-btn-floating:hover, .recharge-landing .get-token-btn-floating:active { background: #d6efe7; border-color: #9fd3c6; box-shadow: none; color: var(--primary-hover) !important; transform: none; }
.recharge-landing .cdk-confirmed { border-radius: 10px; border-color: #bfe6cb; background: var(--success-soft); color: #166534; }
.recharge-landing .cdk-confirmed span, .recharge-landing .plan-confirmed span { margin-right: 8px; }
.recharge-landing .cdk-confirmed code { background: #fff; color: #166534; }
.recharge-landing .plan-confirmed { border-radius: 10px; border-color: #b9e0d6; background: var(--primary-soft); color: #0b5952; }
.recharge-landing code { background: var(--primary-soft); color: var(--primary); border-radius: 5px; }
.recharge-landing .task-progress { padding: 14px 16px; border-radius: 12px; background: var(--surface-soft); border-color: var(--divider); box-shadow: none; }
.recharge-landing .task-progress-header b { color: var(--primary); }
.recharge-landing .task-progress-track { height: 6px; background: #dfe7e3; }
.recharge-landing .task-progress-bar { background: linear-gradient(90deg, #0f766e, #2dd4bf); }
.recharge-landing .task-progress-bar.error { background: var(--error); }
.recharge-landing .task-progress-text { font-size: 12.5px; }
.recharge-landing .status-message { padding: 12px 14px; border-radius: 10px; text-align: left; font-size: 13.5px; font-weight: 500; }
.recharge-landing .status-success { background: var(--success-soft); color: #166534; border-color: #bfe6cb; }
.recharge-landing .status-error { background: var(--error-soft); color: #b91c1c; border-color: #f6c9c9; }
.recharge-landing .query-result-card { border-radius: 10px; background: var(--surface-soft); border-color: var(--divider); padding: 2px 14px; }
.recharge-landing .query-row { padding: 11px 0; }
.recharge-landing .query-row strong { font-family: var(--font-sans); overflow-wrap: anywhere; }
.floating-note {
    position: absolute; z-index: 2; top: -22px; right: 22px; display: flex; align-items: center; gap: 10px;
    padding: 9px 14px 9px 10px; border: 1px solid var(--glass-border); border-radius: 12px; background: #fff;
    box-shadow: var(--shadow); pointer-events: none; animation: landing-float 6s ease-in-out infinite;
}
.floating-note-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.floating-note-icon svg { width: 17px; height: 17px; }
.floating-note small { display: block; margin-bottom: 2px; font-size: 11px; color: var(--text-dim); }
.floating-note strong { display: block; font-size: 12px; color: var(--text-main); font-weight: 600; }

/* plan disclosure */
.recharge-landing .plan-disclosure {
    grid-area: plans; min-width: 0; margin: 0; align-self: start;
    background: rgba(255, 255, 255, 0.78); border: 1px solid var(--glass-border); border-radius: 14px;
    box-shadow: var(--shadow-sm); scroll-margin-top: 100px; animation: landing-enter .6s .3s var(--landing-ease) both;
}
.recharge-landing .plan-summary { min-height: 56px; padding: 13px 16px; gap: 12px; border-radius: 14px; }
.recharge-landing .plan-summary:hover { background: var(--surface-soft); }
.recharge-landing .plan-summary-copy { gap: 10px; }
.recharge-landing .plan-summary-label { padding: 2px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.recharge-landing .plan-summary-names { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.recharge-landing .plan-toggle { color: var(--primary); font-size: 12.5px; }
.recharge-landing .plan-summary:hover .plan-toggle { text-decoration: none; }
.recharge-landing .plan-disclosure[open] .plan-showcase { animation: none; }
.recharge-landing .plan-disclosure .plan-showcase { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; padding: 2px 14px 14px; }
.recharge-landing .plan-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 10px 12px; border-color: var(--divider); border-radius: 10px; background: #fff; box-shadow: none; }
.recharge-landing .plan-card p { display: none; }
.recharge-landing .plan-card.highlight { background: linear-gradient(180deg, #e9f8f3 0%, #fff 100%); border-color: #9fd6c9; }
.recharge-landing .plan-card h3 { font-size: 13.5px; font-weight: 700; }
.recharge-landing .plan-tag { padding: 2px 8px; background: var(--surface-soft); color: var(--text-secondary); font-size: 11px; }
.recharge-landing .plan-tag.pro { background: var(--primary-soft); color: var(--primary); }
.recharge-landing .plan-note { grid-column: 1 / -1; margin: 4px 2px 2px; font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.recharge-landing .plan-disclosure[open] .plan-card { animation: landing-plan .45s var(--landing-ease) both; }
.recharge-landing .plan-card:nth-child(3) { animation-delay: .05s; }
.recharge-landing .plan-card:nth-child(4) { animation-delay: .1s; }
.recharge-landing .plan-card:nth-child(5) { animation-delay: .15s; }
.recharge-landing .plan-card:nth-child(6) { animation-delay: .2s; }

/* faq + footer */
.faq-panel { margin: 0; padding: 4px 20px; border: 1px solid var(--glass-border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); scroll-margin-top: 90px; }
.faq-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; font-size: 14px; font-weight: 600; list-style: none; }
.faq-panel summary::-webkit-details-marker { display: none; }
.faq-panel summary::after { content: '+'; flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-soft); color: var(--text-secondary); font-size: 18px; font-weight: 400; line-height: 1; }
.faq-panel[open] summary::after { content: '−'; background: var(--primary-soft); color: var(--primary); }
.faq-panel ul { margin: 0; padding: 0 0 16px 18px; font-size: 13px; line-height: 1.75; color: var(--text-secondary); }
.landing-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; padding: 22px 0 26px; color: var(--text-dim); font-size: 12px; }
.footer-dot { margin: 0 8px; color: #a9b8b2; }
.recharge-landing :is(a, button, summary, input, textarea):focus-visible,
.invoice-page :is(a, button, summary, input, textarea):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* reveal below the fold */
[data-reveal].reveal-pending { opacity: 0; transform: translateY(16px); }
[data-reveal] { transition: opacity .6s var(--landing-ease), transform .6s var(--landing-ease); }

@keyframes landing-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes landing-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes landing-shine { to { background-position: -220% 0; } }
@keyframes landing-glow { 0%, 100% { opacity: .5; } 50% { opacity: .26; } }
@keyframes landing-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes landing-plan { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes landing-drawer { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: translateX(0); } }
@keyframes landing-drawer-out { to { opacity: 0; transform: translateX(32px); } }
@keyframes landing-backdrop-out { to { opacity: 0; } }
@keyframes invoice-heartbeat { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

@supports (interpolate-size: allow-keywords) {
    .recharge-landing .plan-disclosure { interpolate-size: allow-keywords; }
    .recharge-landing .plan-disclosure::details-content { block-size: 0; opacity: 0; overflow: clip; transition: block-size .25s var(--landing-ease), opacity .25s, content-visibility .25s; transition-behavior: allow-discrete; }
    .recharge-landing .plan-disclosure[open]::details-content { block-size: auto; opacity: 1; }
}

@media (max-width: 1279px) {
    .recharge-hero { grid-template-areas: 'copy' 'card' 'plans'; grid-template-columns: minmax(0, 1fr); gap: 30px; max-width: 560px; min-height: 0; margin: auto; padding: 36px 0; }
    .recharge-landing .site-hero { text-align: left; }
    .recharge-landing .hero-subtitle { max-width: 520px; }
    .recharge-landing .faq-panel { max-width: 560px; margin-inline: auto; }
    .floating-note { top: -20px; right: 18px; }
}
@media (max-width: 767px) {
    html.recharge-document { scroll-padding-top: 80px; }
    .landing-header { height: 62px; }
    .landing-header-inner { width: calc(100% - 32px); gap: 16px; }
    .recharge-landing .landing-brand, .invoice-page .landing-brand { font-size: 16.5px; gap: 8px; }
    .landing-brand img { width: 25px; height: 25px; }
    .landing-desktop-nav { display: none; }
    .recharge-landing .landing-menu-toggle { display: inline-grid; }
    .recharge-landing .recharge-shell { width: calc(100% - 32px); padding-top: 60px; }
    .recharge-hero { gap: 24px; padding: 26px 0; }
    .recharge-landing .hero-eyebrow { margin-bottom: 14px; font-size: 11.5px; }
    .recharge-landing .site-hero h1 { font-size: clamp(32px, 8.6vw, 40px); line-height: 1.14; letter-spacing: -.02em; }
    .recharge-landing .hero-subtitle { margin-top: 13px; font-size: 14px; line-height: 1.7; }
    .trust-points { gap: 8px 16px; margin-top: 16px; }
    .trust-points li { font-size: 12.5px; gap: 6px; }
    .trust-points svg { width: 16px; height: 16px; }
    .floating-note { display: none; }
    .checkout-glow { filter: blur(44px); }
    .recharge-landing .recharge-card { padding: 24px 18px 20px; border-radius: 16px; }
    .recharge-landing .card-head { margin-bottom: 18px; gap: 8px; }
    .recharge-landing .card-head h2 { font-size: 19px; }
    .recharge-landing .card-head p { font-size: 12px; }
    .recharge-landing .flow-badge { padding: 4px 9px; font-size: 11px; }
    .recharge-landing .stepper { padding: 10px; }
    .recharge-landing .step-line { flex-basis: 14px; margin: 0 5px; }
    .recharge-landing .plan-summary-copy { flex-direction: column; align-items: flex-start; gap: 6px; }
    .recharge-landing .plan-summary-names { font-size: 12.5px; }
    .faq-panel { padding: 2px 16px; }
    .landing-footer { justify-content: center; font-size: 12px; }
}

/* ---------- invoice assistant: same frame, its own query flow ---------- */
.invoice-page .recharge-shell { width: min(760px, calc(100% - 64px)); padding: 112px 0 40px; animation: none; opacity: 1; }
.invoice-page .site-hero { margin: 0 0 24px; text-align: left; }
.invoice-page .back-home-link { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 18px; padding: 6px 10px 6px 8px; border-radius: 8px; color: var(--text-secondary); font-size: 13px; font-weight: 500; text-decoration: none; transition: background .18s, color .18s; }
.invoice-page .back-home-link:hover { color: var(--text-main); background: rgba(14, 26, 23, 0.05); }
.invoice-page .back-home-link svg { width: 16px; height: 16px; }
.invoice-page .site-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 46px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; -webkit-text-fill-color: currentColor; }
.invoice-page .hero-subtitle { max-width: 580px; margin: 14px 0 0; font-size: 15px; line-height: 1.75; color: var(--text-secondary); }
.invoice-page .recharge-card {
    position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--glass-border); border-radius: 18px;
    background: #fff; box-shadow: var(--shadow-lg);
}
.invoice-page .recharge-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #0f766e, #2dd4bf); }
.invoice-page .notice-banner { gap: 10px; margin-bottom: 22px; padding: 12px 14px; border: 1px solid #f1dcae; border-radius: 10px; background: #fffaf0; }
.invoice-page .notice-banner svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; color: var(--warning); }
.invoice-page .notice-banner p, .invoice-page .field-hint, .invoice-page .faq-panel li { margin: 0; font-size: 13px; line-height: 1.7; }
.invoice-page .notice-banner p { color: #7a5a12; }
.invoice-page .field-label { display: block; margin-bottom: 9px; color: var(--text-main); font-size: 13.5px; font-weight: 600; }
.invoice-page textarea, .invoice-page input { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text-main); font: inherit; font-size: 14px; box-shadow: none; }
.invoice-page textarea { min-height: 136px; padding-bottom: 48px; resize: vertical; }
.invoice-page textarea:hover, .invoice-page input:hover { border-color: #a9bbb5; }
.invoice-page textarea:focus, .invoice-page input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: var(--shadow-focus); }
.invoice-page .textarea-wrapper { position: relative; }
.invoice-page .get-token-btn-floating {
    position: absolute; top: auto; bottom: 10px; right: 10px; display: inline-flex; width: auto; height: auto;
    padding: 7px 12px; border: 1px solid #b9e0d6; border-radius: 8px; background: var(--primary-soft);
    color: var(--primary) !important; font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: 0; text-decoration: none; box-shadow: none;
}
.invoice-page .get-token-btn-floating:hover, .invoice-page .get-token-btn-floating:active { background: #d6efe7; border-color: #9fd3c6; color: var(--primary-hover) !important; transform: none; box-shadow: none; }
.invoice-page .field-hint { margin-top: 10px; color: var(--text-dim); }
.invoice-page .subscription-query-actions, .invoice-page .subscription-billing-actions { margin-top: 16px; }
.invoice-page .btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; padding: 12px 20px;
    border: 1px solid var(--primary); border-radius: 10px; background: var(--primary); color: #fff;
    font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(14, 26, 23, 0.1);
}
.invoice-page .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(15, 118, 110, 0.24); }
.invoice-page .btn-primary:active { transform: scale(.985); }
.invoice-page .btn-primary:disabled { background: #b5c3be; border-color: #b5c3be; cursor: default; transform: none; box-shadow: none; }
.invoice-page .btn-primary svg { width: 16px; height: 16px; }
.invoice-page .loader { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: invoice-spin .7s linear infinite; }
.invoice-page .btn-primary.is-loading .loader { display: block; }
.invoice-page .status-message { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--divider); border-radius: 10px; background: var(--surface-soft); color: var(--text-secondary); font-size: 13.5px; font-weight: 500; text-align: left; }
.invoice-page .status-message:empty, .invoice-page .status-message[style*="display: none"] { display: none; }
.invoice-page .status-success { background: var(--success-soft); color: #166534; border-color: #bfe6cb; }
.invoice-page .status-error { background: var(--error-soft); color: #b91c1c; border-color: #f6c9c9; }
.invoice-page .subscription-result { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--divider); }
.invoice-page .subscription-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.invoice-page .subscription-result-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.invoice-page .flow-badge { padding: 4px 10px; border: 1px solid #b9e0d6; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; }
.invoice-page .flow-badge.pending { background: var(--surface-soft); border-color: var(--divider); color: var(--text-dim); }
.invoice-page .query-result-card { display: grid; gap: 2px; padding: 4px 16px; border: 1px solid var(--divider); border-radius: 10px; background: var(--surface-soft); }
.invoice-page .result-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 13.5px; }
.invoice-page .result-row:last-child { border-bottom: 0; }
.invoice-page .result-row span { color: var(--text-dim); }
.invoice-page .result-row b { color: var(--text-main); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.invoice-page details { margin-top: 16px; border: 1px solid var(--glass-border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.invoice-page summary { padding: 15px 18px; color: var(--text-main); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.invoice-page summary::-webkit-details-marker { display: none; }
.invoice-page .guide-steps, .invoice-page .faq-panel ul { display: grid; gap: 14px; margin: 0; padding: 0 18px 18px; }
.invoice-page .guide-step { display: flex; gap: 12px; }
.invoice-page .guide-step-num { display: inline-grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.invoice-page .guide-step h3 { margin: 3px 0 4px; font-size: 14px; font-weight: 600; }
.invoice-page .guide-step p, .invoice-page .faq-panel li { color: var(--text-secondary); line-height: 1.7; }
.invoice-page .faq-panel { margin-top: 0; padding: 2px 18px; }
.invoice-page .faq-panel ul { list-style: disc; padding-left: 38px; }
.invoice-page a { color: var(--primary); }
@keyframes invoice-spin { to { transform: rotate(360deg); } }

@media (max-width: 767px) {
    .invoice-page .recharge-shell { width: calc(100% - 32px); padding-top: 96px; }
    .invoice-page .site-hero h1 { font-size: clamp(30px, 8vw, 38px); }
    .invoice-page .recharge-card { padding: 22px 18px 20px; border-radius: 16px; }
    .invoice-page .result-row { align-items: flex-start; flex-direction: column; gap: 3px; }
    .invoice-page .result-row b { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    html.recharge-document { scroll-behavior: auto; }
    body.recharge-page *, body.recharge-page *::before, body.recharge-page *::after, .landing-nav-dialog::backdrop { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .recharge-landing .shine-text { background: none; color: var(--primary); -webkit-text-fill-color: currentColor; }
    [data-reveal].reveal-pending { opacity: 1; transform: none; }
}
