/* =============================================================================
   Checkout layer: purchase, access-token, success, terms and proxy-details
   modals (index.html) and the /payment/success page. Loaded after site.css and
   the page's inline styles, so it wins on equal specificity.
   ============================================================================= */

:root {
    --co-bg: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(255,251,238,0.97) 100%);
    --co-edge: rgba(230,160,0,0.26);
    --co-shadow: 0 40px 120px rgba(16,17,20,0.22), 0 0 70px rgba(255,190,0,0.14);
    --co-overlay: rgba(16,17,20,0.46);
    --co-card: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
    --co-line: rgba(16,17,20,0.11);
    --co-hover: rgba(230,160,0,0.60);
    --co-on: radial-gradient(130% 90% at 50% 0%, rgba(255,200,0,0.30), rgba(255,200,0,0.07) 62%, transparent), #fffcf2;
    --co-on-best: radial-gradient(130% 90% at 50% 0%, rgba(255,59,46,0.16), rgba(255,200,0,0.06) 62%, transparent), #fffaf5;
    --co-field: #ffffff;
    --co-tile: #f3f4f7;
    --co-sum: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,249,230,0.92));
    --co-bar: rgba(255,255,255,0.90);
    --co-bar-solid: #fffdf7;
    --co-bg-solid: linear-gradient(180deg, #ffffff 0%, #fffbee 100%);
    --co-overlay-solid: rgba(16,17,20,0.58);
    --co-aura-a: rgba(255,200,0,0.18);
    --co-aura-b: rgba(255,150,0,0.10);
    --co-aura-c: rgba(255,226,120,0.20);
    --co-grid: transparent;
    --co-star: rgba(214,140,0,0.70);
    --co-was: #8d92a0;
}
:root[data-theme="dark"] {
    --co-bg: radial-gradient(90% 60% at 20% -10%, rgba(255,180,0,0.07), transparent 60%), linear-gradient(180deg, #111114 0%, #0c0c0f 100%);
    --co-edge: rgba(255,255,255,0.10);
    --co-shadow: 0 50px 140px -20px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.6), 0 0 90px -20px rgba(255,170,0,0.16);
    --co-overlay: rgba(3,3,5,0.72);
    --co-card: linear-gradient(180deg, #16161a 0%, #131316 100%);
    --co-line: rgba(255,255,255,0.09);
    --co-hover: rgba(255,200,0,0.50);
    --co-on: radial-gradient(130% 90% at 50% 0%, rgba(255,200,0,0.20), rgba(255,200,0,0.05) 62%, transparent), #141312;
    --co-on-best: radial-gradient(130% 90% at 50% 0%, rgba(255,70,46,0.20), rgba(255,120,0,0.05) 62%, transparent), #141212;
    --co-field: #0a0a0d;
    --co-tile: #18181c;
    --co-sum: radial-gradient(120% 60% at 50% 0%, rgba(255,200,0,0.07), transparent 60%), linear-gradient(180deg, #16161a, #111114);
    --co-bar: rgba(10,10,13,0.94);
    --co-bar-solid: #0b0b0e;
    --co-bg-solid: var(--co-bg);
    --co-overlay-solid: rgba(3,3,5,0.80);
    --co-aura-a: rgba(255,170,0,0.10);
    --co-aura-b: rgba(255,100,0,0.08);
    --co-aura-c: rgba(255,200,60,0.05);
    --co-grid: transparent;
    --co-star: rgba(255,222,130,0.95);
    --co-was: #71717a;
}

@property --co-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes coRing { to { --co-ang: 360deg; } }
@keyframes coDrift1 { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(22%,18%,0) scale(1.18); } }
@keyframes coDrift2 { 0% { transform: translate3d(0,0,0) scale(1.1); } 100% { transform: translate3d(-24%,-14%,0) scale(0.92); } }
@keyframes coDrift3 { 0% { transform: translate3d(0,0,0); opacity: .55; } 100% { transform: translate3d(-30%,24%,0); opacity: 1; } }
@keyframes coTwinkle { 0%, 100% { opacity: .15; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }
@keyframes coRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes coPick { 0% { transform: scale(.96); } 55% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes coBump { 0% { transform: scale(1); } 35% { transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes coShine { to { background-position: -200% 0; } }
@keyframes coSweep { 0%, 58% { transform: translateX(0) skewX(-20deg); } 100% { transform: translateX(var(--co-sw, 488%)) skewX(-20deg); } }
@keyframes coGlow { 0%, 100% { box-shadow: 0 12px 34px rgba(255,176,0,0.38), inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -2px 0 rgba(150,80,0,0.22); } 50% { box-shadow: 0 16px 48px rgba(255,176,0,0.62), inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -2px 0 rgba(150,80,0,0.22); } }
@keyframes coBar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@keyframes coDraw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@keyframes coPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------------------------------------------------------------------------
   Shared modal chrome
   --------------------------------------------------------------------------- */
.modal-overlay { background: var(--co-overlay); backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%); }
.modal { background: var(--co-bg); border: 1px solid var(--co-edge); box-shadow: var(--co-shadow), inset 0 1px 0 rgba(255,255,255,0.07); border-radius: 22px; backdrop-filter: blur(22px) !important; -webkit-backdrop-filter: blur(22px) !important; color: var(--ink); }
.modal h2 { color: var(--ink); }
.modal-close { width: 40px; height: 40px; border-radius: 12px; background: var(--btn-2-fill) padding-box, var(--btn-2-ring) border-box; border: 1px solid transparent; box-shadow: var(--hi); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: color .2s ease, border-color .2s ease, transform .25s ease; }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.modal-close:hover { color: var(--ink); background: var(--btn-2-fill-hover) padding-box, var(--btn-2-ring-hot) border-box; transform: rotate(90deg); }

/* .co modals: the box stays put, .co-scroll scrolls, .co-fx moves behind it. */
.modal.co { padding: 0 !important; overflow: hidden !important; display: flex; flex-direction: column; max-height: min(92vh, 980px); }
.co-scroll { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,200,0,0.35) transparent; }
.co-scroll::-webkit-scrollbar { width: 8px; }
.co-scroll::-webkit-scrollbar-thumb { background: rgba(255,200,0,0.30); border-radius: 8px; }
.modal-overlay .modal.co { opacity: 0; transform: translateY(22px) scale(.97); transition: transform .5s cubic-bezier(.2,.9,.25,1.08), opacity .3s ease; }
.modal-overlay.active .modal.co { opacity: 1; transform: none; }

.co-fx { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.co-fx i { position: absolute; border-radius: 50%; filter: blur(64px); will-change: transform; }
.co-fx i:nth-child(1) { width: 62%; height: 78%; left: -18%; top: -44%; background: var(--co-aura-a); animation: coDrift1 17s ease-in-out infinite alternate; }
.co-fx i:nth-child(2) { width: 52%; height: 70%; right: -20%; bottom: -40%; background: var(--co-aura-b); animation: coDrift2 21s ease-in-out infinite alternate; }
.co-fx i:nth-child(3) { width: 34%; height: 46%; right: 8%; top: -18%; background: var(--co-aura-c); animation: coDrift3 13s ease-in-out infinite alternate; }
.co-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--co-grid) 1px, transparent 1px), linear-gradient(90deg, var(--co-grid) 1px, transparent 1px); background-size: 34px 34px; -webkit-mask-image: radial-gradient(ellipse 75% 60% at 30% 0%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 75% 60% at 30% 0%, #000 10%, transparent 70%); }
.co-stars { position: absolute; inset: 0; }
.co-stars b { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: var(--co-star); box-shadow: 0 0 6px var(--co-star); opacity: .2; animation: coTwinkle var(--d, 4s) ease-in-out var(--dl, 0s) infinite; }
.co-stars b.big { width: 3px; height: 3px; box-shadow: 0 0 10px 1px var(--co-star); }

/* Glow icon tile next to a modal title. */
.co-head { display: flex; align-items: center; gap: 14px; margin: 0 52px 24px 0; }
.co-head h2 { margin: 0; font: 800 28px/1.1 'Manrope', sans-serif; letter-spacing: -0.035em; }
.co-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--art-bg); border: 1px solid rgba(255,179,0,0.38); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 28px rgba(255,170,0,0.20); }
.co-ic .gi-sm { width: 24px; height: 24px; }
.co-in > * { animation: coRise .55s cubic-bezier(.2,.8,.2,1) both; }
.co-in > *:nth-child(2) { animation-delay: .05s; }
.co-in > *:nth-child(3) { animation-delay: .10s; }
.co-in > *:nth-child(4) { animation-delay: .15s; }
.co-in > *:nth-child(5) { animation-delay: .20s; }
.co-in > *:nth-child(n+6) { animation-delay: .25s; }

/* Buttons inside the modals */
.modal .btn-primary { color: #101114; }
.modal .btn-lg { padding: 17px 28px; font-size: 16px; border-radius: 13px; }

/* Inputs */
.modal .form-group label { display: block; font: 800 11px/1 'Manrope', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin-bottom: 10px; }
.modal .form-group input { height: 54px; padding: 0 16px; background: var(--co-field); border: 1px solid var(--co-line); border-radius: 13px; color: var(--ink); font: 500 15px/1 'IBM Plex Mono', monospace; transition: border-color .2s ease, box-shadow .2s ease; }
:root[data-theme="dark"] .modal .form-group input, :root[data-theme="dark"] .purchase-modal .purchase-input, :root[data-theme="dark"] .co-tabs, :root[data-theme="dark"] .co-token-box .token-value, :root[data-theme="dark"] .co-found-v { box-shadow: var(--well-in); }
.modal .form-group input::placeholder { color: var(--mute); }
.modal .form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.modal .form-error { font: 600 13px/1.4 'Manrope', sans-serif; color: var(--error); margin: 0 0 14px; }

/* Loading overlay */
#loadingOverlay .loading-spinner { width: 56px; height: 56px; border: 3px solid rgba(255,200,0,0.16); border-top-color: #FFC800; border-right-color: #F29B00; box-shadow: 0 0 40px rgba(255,190,0,0.35); }

/* ---------------------------------------------------------------------------
   Purchase modal
   --------------------------------------------------------------------------- */
.modal.purchase-modal.co { max-width: 1080px !important; width: 100%; border-radius: 26px; }
.co-handle { display: none; }
.purchase-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 30px 30px 2px 36px; }
.purchase-top .co-head { margin: 0; }
.purchase-top h2 { font: 800 30px/1.1 'Manrope', sans-serif; letter-spacing: -0.035em; margin: 0; }
.purchase-top .modal-close { position: static; flex: none; }
.purchase-modal-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); min-height: 0; }
.purchase-left { padding: 24px 26px 32px 36px; border: none; }
.purchase-right { display: flex; flex-direction: column; padding: 24px 36px 30px 8px; background: none; }
.purchase-section { margin-bottom: 26px; }
.purchase-section:last-child { margin-bottom: 0; }
.purchase-section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 800 12px/1 'Manrope', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.purchase-section-label .mode-hint { margin: 0; font: 600 12px/1 'Manrope', sans-serif; letter-spacing: 0; text-transform: none; color: var(--mute); }
.co-step { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--g-cta); color: #101114; font: 800 12px/1 'Manrope', sans-serif; letter-spacing: 0; box-shadow: 0 4px 14px rgba(255,180,0,0.40); }

/* Option cards (speed + duration) */
.purchase-modal .speed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.purchase-modal .duration-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.purchase-modal .opt-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--co-card); border: 1px solid var(--co-line); border-radius: 16px; color: var(--ink); font-family: 'Manrope', sans-serif; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .2s ease, box-shadow .28s ease, background .25s ease; -webkit-tap-highlight-color: transparent; }
:root[data-theme="dark"] .purchase-modal .opt-card:not(.active):not(:hover) { box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 1px 2px rgba(0,0,0,0.4); }
.purchase-modal .opt-card:hover { transform: translateY(-3px); border-color: var(--co-hover); box-shadow: 0 12px 30px rgba(255,170,0,0.14); background: var(--co-card); }
.purchase-modal .opt-card.active { background: var(--co-on); border-color: rgba(255,200,0,0.30); box-shadow: 0 16px 44px rgba(255,170,0,0.26), inset 0 1px 0 rgba(255,255,255,0.10); animation: coPick .5s cubic-bezier(.2,.9,.3,1.3); }
.purchase-modal .opt-card.best.active { background: var(--co-on-best); box-shadow: 0 16px 44px rgba(255,90,40,0.24), inset 0 1px 0 rgba(255,255,255,0.10); }
.purchase-modal .opt-card.active::after { content: none; }
/* Rotating light around the picked card. */
.purchase-modal .opt-card::before, .co-ring::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .3s ease; background: conic-gradient(from var(--co-ang), rgba(255,200,0,0.35) 0deg, #FFD84D 60deg, #F29B00 120deg, rgba(255,200,0,0.35) 180deg, #FFC800 250deg, rgba(255,200,0,0.35) 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: coRing 4s linear infinite; }
.purchase-modal .opt-card.active::before, .co-ring::before { opacity: 1; }
.purchase-modal .opt-card.best.active::before { background: conic-gradient(from var(--co-ang), rgba(255,59,46,0.45) 0deg, #ff6a3d 60deg, #FFC800 130deg, rgba(255,59,46,0.45) 190deg, #ff3b2e 260deg, rgba(255,59,46,0.45) 360deg); }
.purchase-modal .opt-card-title { font-family: 'Manrope', sans-serif; color: var(--ink); line-height: 1.1; }
.purchase-modal .opt-card-note { font: 600 12.5px/1.2 'Manrope', sans-serif; color: var(--mute); }

/* Speed cards: signal-bar tile + number */
.purchase-modal .speed-opt { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; min-height: 86px; padding: 16px 18px; text-align: left; }
.co-sp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.purchase-modal .opt-num { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.purchase-modal .opt-unit { font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.purchase-modal .speed-opt.active .opt-card-note { color: var(--accent-ink); }
.co-bars { flex: none; width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 12px 0; background: var(--co-tile); border: 1px solid var(--co-line); transition: background .3s ease, border-color .3s ease, box-shadow .3s ease; }
.co-bars i { width: 5px; border-radius: 2px; background: var(--line-2); transform-origin: bottom; }
.co-bars i:nth-child(1) { height: 32%; } .co-bars i:nth-child(2) { height: 55%; } .co-bars i:nth-child(3) { height: 78%; } .co-bars i:nth-child(4) { height: 100%; }
.co-bars.l1 i:nth-child(-n+1), .co-bars.l2 i:nth-child(-n+2), .co-bars.l3 i:nth-child(-n+3), .co-bars.l4 i { background: var(--ink-2); }
.speed-opt.active .co-bars { background: var(--art-bg); border-color: rgba(255,179,0,0.45); box-shadow: 0 8px 24px rgba(255,170,0,0.28); }
.speed-opt.active .co-bars.l1 i:nth-child(-n+1), .speed-opt.active .co-bars.l2 i:nth-child(-n+2), .speed-opt.active .co-bars.l3 i:nth-child(-n+3), .speed-opt.active .co-bars.l4 i { background: linear-gradient(180deg, #FFE066, #F29B00); box-shadow: 0 0 10px rgba(255,190,0,0.7); animation: coBar .5s cubic-bezier(.2,.9,.3,1.2) both; }
.speed-opt.active .co-bars i:nth-child(2) { animation-delay: .06s; } .speed-opt.active .co-bars i:nth-child(3) { animation-delay: .12s; } .speed-opt.active .co-bars i:nth-child(4) { animation-delay: .18s; }
.purchase-modal .speed-opt .opt-tag { position: absolute; top: -10px; right: 14px; font: 800 9.5px/1 'Manrope', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; background: var(--g-cta); color: #101114; padding: 5px 8px; border-radius: 6px; box-shadow: 0 6px 16px rgba(255,180,0,0.40); }

/* Duration cards */
.purchase-modal .duration-grid .opt-card { overflow: visible; align-items: center; justify-content: flex-start; text-align: center; gap: 7px; min-height: 132px; padding: 24px 4px 12px; }
.purchase-modal .duration-grid .opt-card-title { font-size: 15px; font-weight: 800; white-space: nowrap; }
.purchase-modal .opt-card-day { font: 800 17px/1 'Manrope', sans-serif; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.purchase-modal .opt-card-day small { font: 600 11px/1 'Manrope', sans-serif; color: var(--ink-2); letter-spacing: 0; }
.purchase-modal .opt-card.pop .opt-card-day, .purchase-modal .opt-card.active .opt-card-day { padding: 0.1em 0 0.14em; margin: -0.1em 0 -0.14em; background: var(--g-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.purchase-modal .opt-card.best .opt-card-day, .purchase-modal .opt-card.best.active .opt-card-day { background: none; color: var(--red); -webkit-text-fill-color: var(--red); }
.purchase-modal .opt-card-day small { -webkit-text-fill-color: var(--ink-2); }
.purchase-modal .duration-grid .opt-card-note { font-size: 11.5px; }
.purchase-modal .duration-grid .opt-card.active .opt-card-note { color: var(--ink-2); }
.purchase-modal .duration-grid .opt-card.pop { border-color: rgba(255,179,0,0.55); }
.purchase-modal .duration-grid .opt-card.best { border-color: rgba(255,59,46,0.50); }
.purchase-modal .opt-card-bonus { margin-top: auto; font: 800 12.5px/1 'Manrope', sans-serif; color: var(--green); background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 42%, transparent); border-radius: 8px; padding: 6px 9px; white-space: nowrap; }
.purchase-modal .opt-card-bonus:empty { display: none; }
.purchase-modal .opt-flag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); overflow: hidden; font: 800 9.5px/1 'Manrope', sans-serif; letter-spacing: 0.07em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; white-space: nowrap; background: var(--g-cta); color: #101114; box-shadow: 0 6px 16px rgba(255,180,0,0.42); z-index: 2; }
.purchase-modal .opt-card.best .opt-flag { background: linear-gradient(120deg, #ff5a3d, #ff3b2e 50%, #d61f14); color: #fff; box-shadow: 0 6px 18px rgba(255,59,46,0.45); }
.purchase-modal .opt-flag::after { --co-sw: 433%; content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.75), transparent); transform: skewX(-20deg); animation: coSweep 3.6s ease-in-out infinite; }
.purchase-modal .opt-card.best .opt-flag::after { animation-delay: 1.8s; }

/* Discount code */
.co-code { position: relative; }
.co-code > svg { position: absolute; left: 17px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: var(--mute); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .2s ease; }
.purchase-modal .purchase-input { width: 100%; height: 56px; padding: 0 96px 0 48px; background: var(--co-field); border: 1px solid var(--co-line); border-radius: 14px; color: var(--ink); font: 800 15px/1 'Manrope', sans-serif; letter-spacing: 0.08em; transition: border-color .2s ease, box-shadow .2s ease; }
.purchase-modal .purchase-input::placeholder { font: 600 15px/1 'Manrope', sans-serif; letter-spacing: 0; text-transform: none; color: var(--mute); }
.purchase-modal .purchase-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.purchase-modal .purchase-input:focus + svg, .co-code:focus-within > svg { stroke: var(--accent-ink); }
.co-code-chip { position: absolute; right: 10px; top: 50%; transform: translateY(-50%) scale(.6); opacity: 0; padding: 8px 11px; border-radius: 9px; background: var(--green); color: #fff; font: 800 13px/1 'Manrope', sans-serif; pointer-events: none; transition: transform .35s cubic-bezier(.2,.9,.3,1.4), opacity .2s ease; }
:root[data-theme="dark"] .co-code-chip { color: #07170f; }
.co-code.ok .purchase-input { border-color: color-mix(in srgb, var(--green) 60%, transparent); box-shadow: 0 0 0 4px var(--green-soft); }
.co-code.ok > svg { stroke: var(--green); }
.co-code.ok .co-code-chip { opacity: 1; transform: translateY(-50%) scale(1); }

/* Summary */
.purchase-right .purchase-summary { position: relative; margin: 0 0 18px; padding: 24px 24px 20px; background: var(--co-sum); border: 1px solid var(--co-line); border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.06); overflow: visible; }
.purchase-right .purchase-summary::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: linear-gradient(90deg, #FFD84D, #FFC800 40%, #F29B00) top / 100% 4px no-repeat; -webkit-mask: linear-gradient(#000 0 0); }
.co-ring::before { padding: 1px; animation-duration: 7s; background: conic-gradient(from var(--co-ang), transparent 0deg, transparent 40deg, #FFC800 100deg, #F29B00 140deg, transparent 200deg, transparent 360deg); }
.purchase-summary-head { font: 800 11.5px/1 'Manrope', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); margin: 4px 0 12px; }
.purchase-right .purchase-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font: 600 15px/1.2 'Manrope', sans-serif; }
.purchase-right .purchase-row .label { color: var(--ink-2); }
.purchase-right .purchase-row .value { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.purchase-right .purchase-row .value s, .co-was { color: var(--co-was); font-weight: 600; text-decoration-thickness: 1.5px; }
.purchase-row .value .bonus { display: inline-block; font: 800 10.5px/1 'Manrope', sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green); background: var(--green-soft); border-radius: 6px; padding: 5px 7px; }
.purchase-row .value .bonus:empty, .co-was:empty, .co-off:empty { display: none; }
.co-off { font: 800 10.5px/1 'Manrope', sans-serif; letter-spacing: 0.04em; color: #fff; background: var(--red); border-radius: 6px; padding: 5px 7px; box-shadow: 0 4px 12px rgba(255,59,46,0.30); }
.co-off.wk { background: var(--green); box-shadow: 0 4px 12px rgba(22,163,95,0.3); }
.co-off.mo { background: linear-gradient(180deg, #FFA51F, #FF8200); box-shadow: 0 4px 12px rgba(255,130,0,0.35); }
:root[data-theme="dark"] .co-off.wk { color: #07170f; }
.purchase-right .purchase-row.total { align-items: flex-end; margin-top: 8px; padding: 18px 0 2px; border-top: 1px dashed var(--line-2); }
.purchase-row.total .label { display: flex; flex-direction: column; gap: 6px; font: 700 16px/1 'Manrope', sans-serif; color: var(--ink); }
.purchase-row.total .label .co-was { font-size: 14px; text-decoration: line-through; }
.co-code-tag { align-self: flex-start; font: 800 10.5px/1 'Manrope', sans-serif; letter-spacing: 0.04em; color: var(--green); background: var(--green-soft); border-radius: 6px; padding: 5px 7px; }
.co-code-tag:empty { display: none; }
.purchase-right .purchase-row.total .value, .co-money { display: inline-block; padding: 0.1em 0.08em 0.14em; margin: -0.1em -0.08em -0.14em; font: 800 46px/1 'Manrope', sans-serif; letter-spacing: -0.045em; background: var(--g-shine); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: coShine 5s linear infinite; transform-origin: right bottom; }
.co-bump { animation: coShine 5s linear infinite, coBump .5s cubic-bezier(.2,.9,.3,1.3) !important; }
.co-bump-s { animation: coBump .45s cubic-bezier(.2,.9,.3,1.3); }

@media (min-width: 861px) {
    .purchase-right .purchase-summary { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; }
}

/* "You save $X" / the 30-day nudge */
.purchase-save { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 13px 16px; border-radius: 14px; background: linear-gradient(120deg, color-mix(in srgb, var(--green) 20%, transparent), color-mix(in srgb, var(--green) 7%, transparent)); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); font: 700 15px/1.2 'Manrope', sans-serif; }
.purchase-save:empty { display: none; }
.purchase-save::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent); transform: skewX(-20deg); animation: coSweep 4.2s ease-in-out infinite; pointer-events: none; }
.purchase-save svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.purchase-save b { font: 800 22px/1 'Manrope', sans-serif; letter-spacing: -0.03em; }
.purchase-save .co-save-b { display: inline-block; margin-left: 5px; }
.purchase-save.nudge { padding: 0; background: none; border: none; }
.co-nudge { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px dashed rgba(255,179,0,0.70); color: var(--accent-ink); font: 700 15px/1.2 'Manrope', sans-serif; text-align: left; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.co-nudge:hover { background: color-mix(in srgb, var(--accent) 26%, transparent); transform: translateY(-1px); }
.co-nudge b { font: 800 15px/1.2 'Manrope', sans-serif; letter-spacing: 0; color: var(--ink); }
.co-nudge .co-go { margin-left: auto; flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--g-cta); color: #101114; animation: coPulse 1.8s ease-in-out infinite; }
.co-nudge .co-go svg { width: 16px; height: 16px; stroke-width: 2.6; }

/* Terms checkbox */
.purchase-modal .tos-checkbox { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; font: 500 13px/1.5 'Manrope', sans-serif; color: var(--ink-2); cursor: pointer; }
.purchase-modal .tos-checkbox input { -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--co-field) center / 14px no-repeat; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.purchase-modal .tos-checkbox input:hover { border-color: var(--accent); }
.purchase-modal .tos-checkbox input:checked { border-color: #F5A300; background-color: #FFC800; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101114' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); box-shadow: 0 4px 14px rgba(255,180,0,0.45); animation: coPick .35s ease; }
.purchase-modal .tos-checkbox input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.purchase-modal .tos-link { color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
#tosError { margin: -4px 0 12px; font: 700 13px/1.4 'Manrope', sans-serif; color: var(--error); }

/* Pay button */
.co-paybar { position: relative; }
.co-paybar-total { display: none; }
.purchase-modal .pay-btn { position: relative; width: 100%; height: 64px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 0 24px; border: none; border-radius: 15px; background: linear-gradient(180deg, #FFDD55 0%, #FFC800 46%, #F5A000 100%); color: #101114; font: 800 18.5px/1 'Manrope', sans-serif; letter-spacing: -0.01em; animation: coGlow 2.8s ease-in-out infinite; }
.purchase-modal .pay-btn:hover { background: linear-gradient(180deg, #FFE36E 0%, #FFCC14 46%, #F7A800 100%); transform: translateY(-2px); filter: none; }
.purchase-modal .pay-btn:active { transform: translateY(0) scale(.985); }
.purchase-modal .pay-btn::after { left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.75), transparent); animation: coSweep 3.2s ease-in-out infinite; transition: none; }
.purchase-modal .pay-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

/* Trust row + trial link */
.co-trust { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; }
.co-trust li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-width: 0; padding: 14px 6px 13px; border-radius: 14px; background: var(--co-card); border: 1px solid var(--co-line); text-align: center; font: 700 13px/1.2 'Manrope', sans-serif; color: var(--ink-2); text-wrap: balance; }
.co-trust .gi-sm { flex: none; width: 22px; height: 22px; }
.co-trial { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 12px; border-radius: 12px; font: 600 13.5px/1.3 'Manrope', sans-serif; color: var(--ink-2); text-decoration: none; transition: background .2s ease, color .2s ease; }
.co-trial b { font-weight: 800; color: var(--accent-ink); }
.co-trial svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.co-trial:hover { background: var(--co-tile); color: var(--ink); }

/* Content rises in each time the modal opens. */
.modal-overlay.active .purchase-top, .modal-overlay.active .purchase-left > *, .modal-overlay.active .purchase-right > * { animation: coRise .6s cubic-bezier(.2,.8,.2,1) both; }
.modal-overlay.active .purchase-left > :nth-child(2) { animation-delay: .07s; }
.modal-overlay.active .purchase-left > :nth-child(3) { animation-delay: .14s; }
.modal-overlay.active .purchase-right > :nth-child(1) { animation-delay: .10s; }
.modal-overlay.active .purchase-right > :nth-child(n+2) { animation-delay: .18s; }
html.co-lock, html.co-lock body { overflow: hidden; }
html.co-lock .sky *, html.co-lock .promo-bar, html.co-lock .promo-bar *, html.co-lock .promo-bar::before, html.co-lock .promo-bar *::before, html.co-lock header *, html.co-lock main *, html.co-lock main *::before, html.co-lock main *::after { animation-play-state: paused !important; }
/* Closed modals stay in the page (hidden): nothing inside them animates or holds a layer. */
.modal-overlay:not(.active) *, .modal-overlay:not(.active) *::before, .modal-overlay:not(.active) *::after { animation-play-state: paused !important; }
.modal-overlay:not(.active) .co-fx i { will-change: auto; }

/* ---------------------------------------------------------------------------
   Access token modal
   --------------------------------------------------------------------------- */
.modal.co-token { max-width: 480px; }
.co-token .co-scroll, .co-tos .co-scroll, .co-success .co-scroll { padding: 34px 34px 32px; }
.co-scroll > .modal-close { position: absolute; top: 18px; right: 18px; }
.co-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 22px; background: var(--co-field); border: 1px solid var(--co-line); border-radius: 13px; }
.co-tabs .token-tab { height: 42px; border: none; border-radius: 10px; background: transparent; color: var(--ink-2); font: 700 14px/1 'Manrope', sans-serif; cursor: pointer; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.co-tabs .token-tab:hover { color: var(--ink); }
.co-tabs .token-tab.active { background: var(--g-cta); color: #101114; box-shadow: 0 6px 18px rgba(255,180,0,0.35); }
.co-found { margin-bottom: 16px; padding: 16px; border-radius: 14px; background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); }
.co-found-t { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 800 14px/1 'Manrope', sans-serif; color: var(--green); }
.co-found-t svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.co-found-v { padding: 12px 14px; border-radius: 10px; background: var(--co-field); border: 1px solid var(--co-line); font: 500 13.5px/1.5 'IBM Plex Mono', monospace; color: var(--ink); word-break: break-all; }
.co-found .btn { margin-top: 12px; }
.co-note { margin: 16px 0 0; text-align: center; font: 500 13px/1.5 'Manrope', sans-serif; color: var(--mute); }
.co-token .btn-lg { width: 100%; }

/* ---------------------------------------------------------------------------
   Success modal (index.html) and success page
   --------------------------------------------------------------------------- */
.modal.co-success { max-width: 780px; }
.co-hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin: 4px 0 24px; }
.co-hero h2, .co-hero h1 { margin: 18px 0 0; font: 800 32px/1.08 'Manrope', sans-serif; letter-spacing: -0.04em; color: var(--ink); }
.co-check { position: relative; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--art-bg); border: 1px solid rgba(255,179,0,0.42); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 14px 40px rgba(255,170,0,0.30); }
.co-check::before { content: ""; position: absolute; inset: -14px; border-radius: 30px; background: radial-gradient(circle, rgba(255,200,0,0.30), transparent 70%); animation: coPulse 2.6s ease-in-out infinite; z-index: -1; }
.co-check .gi { width: 40px; height: 40px; stroke-width: 3.2; }
.co-check .gi path { stroke-dasharray: 30; animation: coDraw .7s cubic-bezier(.3,.8,.3,1) .25s both; }
.co-check.pending .gi path, .co-check.err .gi path { animation: none; stroke-dasharray: none; }
.co-check.err { background: radial-gradient(ellipse 70% 90% at 50% 100%, rgba(255,59,46,0.26), transparent 70%), var(--co-tile); border-color: rgba(255,59,46,0.45); box-shadow: 0 14px 40px rgba(255,59,46,0.22); }
.co-check.err::before { background: radial-gradient(circle, rgba(255,59,46,0.22), transparent 70%); }
.co-check.err .gi { filter: drop-shadow(0 0 12px rgba(255,59,46,0.5)); }
.co-check.err .gi * { stroke: var(--red); }
.co-token-box { position: relative; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,200,0,0.16), rgba(255,200,0,0.04) 60%), var(--co-tile); border: 1px solid rgba(255,190,0,0.35); box-shadow: 0 16px 44px rgba(255,170,0,0.14); }
.co-token-box h4 { margin: 0 0 12px; font: 800 11.5px/1 'Manrope', sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.co-token-box .token-display { display: flex; gap: 10px; align-items: stretch; }
.co-token-box .token-value { flex: 1; min-width: 0; margin: 0; padding: 15px 16px; border-radius: 12px; background: var(--co-field); border: 1px solid var(--co-line); color: var(--ink); font: 600 15px/1.4 'IBM Plex Mono', monospace; word-break: break-all; }
.co-token-box .btn { flex: none; padding: 0 22px; border-radius: 12px; }
.co-token-warn { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font: 700 13px/1.4 'Manrope', sans-serif; color: var(--error); }
.co-token-warn svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.co-success .proxy-output { margin-top: 16px; background: none; border: none; }
.co-success .dash-card { background: var(--co-card); border-color: var(--co-line); }
.co-success .proxy-output-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 4px; padding: 16px 18px 0; background: var(--co-card); border: 1px solid var(--co-line); border-bottom: none; border-radius: 14px 14px 0 0; }
.co-success .proxy-output-label { font: 800 14px/1.2 'Manrope', sans-serif; letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
.co-success .proxy-format-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: none; padding-bottom: 0; }
.co-success .proxy-output { overflow: visible; }
.co-success .proxy-output-body { position: relative; padding: 14px 18px 18px; background: var(--co-card); border: 1px solid var(--co-line); border-top: none; border-radius: 0 0 14px 14px; }
.co-success .proxy-output-code { margin: 0; padding: 14px 92px 14px 16px; background: var(--co-field); border: 1px solid var(--co-line); color: var(--ink); font: 500 13.5px/1.6 'IBM Plex Mono', monospace; }
.co-success .proxy-copy-btn { position: absolute; top: 22px; right: 26px; }
.co-actions { display: flex; gap: 12px; margin-top: 20px; }
.co-actions .btn { flex: 1; }

/* ---------------------------------------------------------------------------
   Terms modal
   --------------------------------------------------------------------------- */
.modal.co-tos { max-width: 700px; }
.co-tos .tos-content { max-height: 56vh; overflow-y: auto; padding: 4px 12px 24px 0; -webkit-mask-image: linear-gradient(180deg, #000 88%, transparent); mask-image: linear-gradient(180deg, #000 88%, transparent); scrollbar-width: thin; scrollbar-color: rgba(255,200,0,0.35) transparent; }
.co-tos .tos-content h3 { margin: 24px 0 8px; font: 800 16px/1.3 'Manrope', sans-serif; letter-spacing: -0.01em; color: var(--ink); }
.co-tos .tos-content h3:first-child { margin-top: 0; }
.co-tos .tos-content p, .co-tos .tos-content li { font: 500 14.5px/1.65 'Manrope', sans-serif; color: var(--ink-2); }
.co-tos .tos-content strong { color: var(--ink); }
.co-tos .tos-content a { color: var(--accent-ink); font-weight: 700; }
.co-tos .btn-lg { width: 100%; margin-top: 18px; }

/* ---------------------------------------------------------------------------
   Proxy details modal (the Access Token view)
   --------------------------------------------------------------------------- */
.details-modal { padding: 34px 34px 30px; }
.details-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 48px 22px 0; }
.details-head h2 { margin: 0; font: 800 28px/1.1 'Manrope', sans-serif; letter-spacing: -0.03em; }
.details-tiles { grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.details-modal .dashboard-card .value { font-size: 16.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.renew-box { background: var(--co-card); border: 1px solid var(--co-line); border-radius: 14px; padding: 16px 18px 18px; margin-bottom: 12px; }
.renew-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.renew-head h4 { font: 800 14px/1 'Manrope', sans-serif; color: var(--ink); margin: 0; }
.renew-speed { font: 700 12.5px/1 'Manrope', sans-serif; color: var(--mute); }
.renew-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.renew-box .renew-grid .opt-card { position: relative; min-height: 0; padding: 10px 8px; gap: 4px; border-radius: 10px; justify-content: center; align-items: center; text-align: center; background: var(--co-field); border: 1px solid var(--co-line); }
.renew-box .renew-grid .opt-card:hover { border-color: var(--co-hover); }
.renew-box .renew-grid .opt-card.active { background: var(--co-on); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(255,170,0,0.2); }
.renew-box .renew-grid .opt-card.active::after { content: none; }
.renew-box .renew-grid .opt-card-title { font-size: 12.5px; font-weight: 800; }
.renew-box .renew-grid .opt-card-day { font: 800 14px/1 'Manrope', sans-serif; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.renew-box .renew-grid .opt-card.active .opt-card-day { color: var(--accent-ink); }
.renew-box .renew-grid .opt-card-bonus { font: 800 10px/1 'Manrope', sans-serif; color: var(--green); background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); padding: 3px 5px; border-radius: 6px; white-space: nowrap; }
.renew-box .renew-grid .opt-card-bonus:empty { display: none; }
.renew-code { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.renew-code .ctrl-input { flex: 0 1 190px; padding: 9px 12px; font: 600 13px/1 'Manrope', sans-serif; }
.renew-code .btn-sm { padding: 9px 16px; font-size: 13px; }
.renew-code-note { font: 700 12.5px/1 'Manrope', sans-serif; color: var(--green); }
.renew-code-note.bad { color: var(--error); }
.renew-foot .btn { padding: 11px 20px; font-size: 14.5px; }
.renew-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.renew-end { font: 600 13px/1.4 'Manrope', sans-serif; color: var(--ink-2); }
#renewError { margin: 10px 0 0; }
.dashboard-card { background: var(--co-card); border: 1px solid var(--co-line); border-radius: 14px; padding: 16px 18px; }
.dashboard-card h3 { font: 800 10.5px/1 'Manrope', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin-bottom: 10px; }
.dashboard-card .value { font: 800 20px/1.15 'Manrope', sans-serif; letter-spacing: -0.02em; color: var(--ink); }
.dashboard-card .value.accent { color: var(--accent-ink); }
.live-stats-box { background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--co-card); border: 1px solid rgba(255,179,0,0.4); border-radius: 16px; padding: 18px 20px; margin-bottom: 12px; }
.live-stats-header { margin-bottom: 14px; }
.live-stats-header h4 { display: inline-flex; align-items: center; gap: 9px; font: 800 14px/1 'Manrope', sans-serif; letter-spacing: normal; text-transform: none; color: var(--ink); margin: 0; }
.live-stat { background: var(--co-field); border: 1px solid var(--co-line); border-radius: 12px; padding: 16px 12px; }
.live-stat-value { font: 800 30px/1 'Manrope', sans-serif; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
#statThroughput { color: var(--accent-text); }
.live-stat-label { font: 800 10.5px/1 'Manrope', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin-top: 8px; }
.details-modal .dash-card, .details-modal .dash-out { background: var(--co-card); border-color: var(--co-line); }
.details-modal .proxy-output { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.details-modal .proxy-mode-controls { padding: 16px 20px; }
.details-modal .proxy-output-head { padding: 16px 20px 0; }
.details-modal .proxy-output-label { font: 800 11px/1 'Manrope', sans-serif; letter-spacing: 0.1em; color: var(--accent-ink); }
.details-modal .proxy-output-body { padding: 14px 20px 18px; }
.details-conn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: transparent; border: none; padding: 0; }
.details-conn .connection-row { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.details-conn .connection-label { color: var(--ink-2); }
.details-conn .connection-value.highlight { color: var(--accent-ink); }

/* ---------------------------------------------------------------------------
   Phones: the purchase modal becomes a bottom sheet with a sticky pay bar.
   --------------------------------------------------------------------------- */
/* Short laptop screens: tighten the vertical rhythm so Pay stays in view. */
@media (min-width: 861px) and (max-height: 860px) {
    .purchase-top { padding-top: 22px; }
    .purchase-top .co-ic { width: 42px; height: 42px; }
    .purchase-top h2 { font-size: 26px; }
    .purchase-left { padding-top: 16px; padding-bottom: 24px; }
    .purchase-right { padding-top: 16px; padding-bottom: 24px; }
    .purchase-section { margin-bottom: 18px; }
    .purchase-section-label { margin-bottom: 12px; }
    .purchase-modal .speed-opt { min-height: 72px; padding-top: 12px; padding-bottom: 12px; }
    .co-bars { width: 42px; height: 42px; padding: 10px 0; }
    .purchase-modal .duration-grid .opt-card { min-height: 116px; padding-top: 20px; }
    .purchase-modal .purchase-input { height: 50px; }
    .co-trust li { gap: 7px; padding: 10px 6px 9px; }
    .co-trust .gi-sm { width: 18px; height: 18px; }
    .purchase-right .purchase-summary { padding: 18px 22px 16px; }
    .purchase-right .purchase-row { padding: 8px 0; }
    .purchase-modal .pay-btn { height: 58px; }
    .co-trial { margin-top: 8px; }
}
@media (max-width: 860px) {
    .purchase-modal-grid { grid-template-columns: minmax(0, 1fr); }
    .purchase-left { padding: 20px 24px 8px; }
    .purchase-right { padding: 18px 24px 26px; }
}
@media (max-width: 720px) {
    .modal-overlay { padding: 10px; }
    .modal { margin: 0; max-width: 100% !important; border-radius: 20px; }
    .modal.co { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
    .co-token .co-scroll, .co-tos .co-scroll, .co-success .co-scroll { padding: 24px 18px 22px; }
    .co-scroll > .modal-close { top: 14px; right: 14px; }
    .co-head { gap: 12px; margin-bottom: 20px; }
    .co-head h2 { font-size: 23px; }
    .co-ic { width: 42px; height: 42px; border-radius: 12px; }
    .co-ic .gi-sm { width: 21px; height: 21px; }
    .co-hero h2, .co-hero h1 { font-size: 27px; }
    .co-check { width: 64px; height: 64px; border-radius: 19px; }
    .co-check .gi { width: 34px; height: 34px; }
    .co-token-box { padding: 16px; }
    .co-token-box .token-display { flex-direction: column; }
    .co-token-box .btn { height: 46px; }
    .co-success .proxy-output-head { padding: 14px 14px 0; }
    .co-success .proxy-output-body { padding: 12px 14px 14px; }
    .co-success .proxy-copy-btn { position: static; width: 100%; margin-top: 10px; }
    .co-success .proxy-output-code { padding: 12px 14px; }
    .co-actions { flex-direction: column; }
    .co-tos .tos-content { max-height: 58vh; }

    #purchaseModal { align-items: flex-end; padding: 0; }
    .modal.purchase-modal.co { max-width: 100% !important; width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 26px 26px 0 0; border-bottom: none; }
    #purchaseModal .modal.co { transform: translateY(60%); }
    #purchaseModal.active .modal.co { transform: none; }
    .co-handle { display: block; position: relative; z-index: 2; flex: none; width: 44px; height: 5px; margin: 9px auto 0; border-radius: 99px; background: var(--line-2); }
    .purchase-top { padding: 10px 12px 0 18px; }
    .purchase-top h2 { font-size: 23px; }
    .purchase-top .co-ic { width: 40px; height: 40px; }
    .purchase-modal-grid { display: flex; flex-direction: column; }
    .purchase-left { padding: 18px 16px 18px; }
    .purchase-section { margin-bottom: 24px; }
    .purchase-right { display: contents; }
    .purchase-right > * { margin-left: 16px !important; margin-right: 16px !important; }
    .purchase-right .purchase-summary { margin-top: 4px; padding: 20px 18px 16px; }
    .purchase-modal .speed-grid { gap: 10px; }
    .purchase-modal .speed-opt { gap: 11px; min-height: 76px; padding: 14px 12px; }
    .co-bars { width: 40px; height: 40px; border-radius: 12px; padding: 10px 0; }
    .purchase-modal .opt-num { font-size: 22px; }
    .purchase-modal .opt-unit { font-size: 12px; }
    .purchase-modal .speed-opt .opt-card-note { font-size: 12px; }
    .purchase-modal .duration-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 8px; }
    .purchase-modal .duration-grid .opt-card { grid-column: span 2; min-width: 0; min-height: 118px; padding: 22px 4px 11px; }
    .purchase-modal .duration-grid .opt-card:nth-child(n+4) { grid-column: span 3; min-height: 112px; }
    .purchase-modal .opt-flag { font-size: 8.5px; padding: 5px 7px; letter-spacing: 0.05em; }
    .purchase-modal .opt-card-day { font-size: 16px; }
    .purchase-row.total .value, .purchase-right .purchase-row.total .value { font-size: 40px; }
    .purchase-modal .tos-checkbox { font-size: 13px; }
    .co-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .co-trust li { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 12px; font-size: 13px; }
    .co-trust .gi-sm { width: 19px; height: 19px; }
    .co-trial { margin-top: 12px; margin-bottom: 18px; }
    /* Sticky pay bar: total + button stay under the thumb while choosing. */
    .co-paybar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; margin: 0 !important; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--co-bar); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); box-shadow: 0 -18px 40px rgba(0,0,0,0.20); }
    .co-paybar-total { display: flex; flex-direction: column; gap: 5px; flex: none; min-width: 84px; }
    .co-paybar-total span { font: 800 10.5px/1 'Manrope', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
    .co-paybar-total b { font-size: 25px; letter-spacing: -0.04em; animation: coShine 5s linear infinite; }
    .purchase-modal .pay-btn { flex: 1; min-width: 0; height: 56px; font-size: 17px; padding: 0 14px; }
    .details-tiles, .details-conn { grid-template-columns: 1fr; }
    .renew-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .renew-foot .btn { width: 100%; text-align: center; }
    .details-modal { padding: 22px 18px; }
    .details-modal { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); overflow-y: auto; }
}
/* Phones and tablets: no live blur (backdrop-filter re-rendered the page behind on every scroll
   frame), a static aura instead of drifting blurred blobs, no twinkling stars. */
@media (max-width: 860px), (hover: none) and (pointer: coarse) {
    .modal-overlay { background: var(--co-overlay-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
    .modal { background: var(--co-bg-solid); backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .co-fx i { filter: none; will-change: auto; animation: none !important; }
    .co-fx i:nth-child(1) { background: radial-gradient(closest-side, var(--co-aura-a), transparent); }
    .co-fx i:nth-child(2) { background: radial-gradient(closest-side, var(--co-aura-b), transparent); }
    .co-fx i:nth-child(3) { background: radial-gradient(closest-side, var(--co-aura-c), transparent); }
    .co-stars { display: none; }
    .co-paybar { background: var(--co-bar-solid) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .co-fx i, .co-stars b, .purchase-modal .opt-card::before, .co-ring::before, .purchase-modal .opt-flag::after, .purchase-save::after, .purchase-modal .pay-btn, .purchase-modal .pay-btn::after, .co-nudge .co-go, .co-check::before, .purchase-row.total .value, .co-money, .co-paybar-total b { animation: none !important; }
    .co-in > *, .modal-overlay.active .purchase-top, .modal-overlay.active .purchase-left > *, .modal-overlay.active .purchase-right > * { animation: none !important; }
}

/* ---------------------------------------------------------------------------
   Glass dark (html.glass): the modal on black glass, orange instead of gold, no
   auras or stars behind it.
   --------------------------------------------------------------------------- */
:root.glass[data-theme="dark"] {
    --co-bg: linear-gradient(180deg, #111113 0%, #0a0a0b 100%);
    --co-edge: rgba(255,255,255,0.1);
    --co-shadow: 0 50px 140px -20px rgba(0,0,0,0.95), 0 0 0 1px rgba(0,0,0,0.6);
    --co-overlay: rgba(0,0,0,0.78);
    --co-card: linear-gradient(180deg, #141416 0%, #111113 100%);
    --co-hover: rgba(255,255,255,0.42);
    --co-on: radial-gradient(130% 90% at 50% 0%, rgba(255,140,0,0.14), rgba(255,140,0,0.03) 62%, transparent), #141416;
    --co-on-best: radial-gradient(130% 90% at 50% 0%, rgba(255,70,46,0.16), rgba(255,120,0,0.03) 62%, transparent), #141416;
    --co-sum: linear-gradient(180deg, #141416, #0e0e10);
    --co-aura-a: transparent;
    --co-aura-b: transparent;
    --co-aura-c: transparent;
    --co-star: transparent;
}
:root.glass[data-theme="light"] {
    --co-bg: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
    --co-edge: rgba(16,17,20,0.08);
    --co-shadow: 0 50px 120px -30px rgba(16,17,20,0.3);
    --co-overlay: rgba(16,17,20,0.4);
    --co-hover: rgba(16,17,20,0.3);
    --co-on: radial-gradient(130% 90% at 50% 0%, rgba(255,140,0,0.12), rgba(255,140,0,0.03) 62%, transparent), #ffffff;
    --co-on-best: radial-gradient(130% 90% at 50% 0%, rgba(255,59,46,0.1), rgba(255,140,0,0.03) 62%, transparent), #ffffff;
    --co-sum: linear-gradient(180deg, #ffffff, #fafafb);
    --co-aura-a: transparent;
    --co-aura-b: transparent;
    --co-aura-c: transparent;
    --co-star: transparent;
}
:root.glass[data-theme] .co-fx, :root.glass[data-theme] .co-stars { display: none; }
:root.glass[data-theme] .modal .btn-primary, :root.glass[data-theme] .co-step, :root.glass[data-theme] .co-nudge .co-go, :root.glass[data-theme] .co-tabs .token-tab.active, :root.glass[data-theme] .purchase-modal .speed-opt .opt-tag, :root.glass[data-theme] .purchase-modal .opt-flag { color: #1A0E00; }
:root.glass[data-theme] .co-scroll { scrollbar-color: rgba(255,150,10,0.35) transparent; }
:root.glass[data-theme] .co-scroll::-webkit-scrollbar-thumb { background: rgba(255,150,10,0.3); }
:root.glass[data-theme] .co-ic { border-color: var(--line); }
:root.glass[data-theme] #loadingOverlay .loading-spinner { border-color: rgba(255,150,10,0.16); border-top-color: #FF9F0A; border-right-color: #F27A00; box-shadow: 0 0 40px rgba(255,130,0,0.3); }
:root.glass[data-theme] .purchase-modal .opt-card:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
:root.glass[data-theme] .purchase-modal .opt-card.active { border-color: rgba(255,150,10,0.3); box-shadow: 0 16px 44px rgba(255,130,0,0.2), inset 0 1px 0 rgba(255,255,255,0.08); }
:root.glass[data-theme] .purchase-modal .opt-card::before { background: conic-gradient(from var(--co-ang), rgba(255,150,10,0.35) 0deg, #FFB547 60deg, #F27A00 120deg, rgba(255,150,10,0.35) 180deg, #FF9F0A 250deg, rgba(255,150,10,0.35) 360deg); }
:root.glass[data-theme] .purchase-modal .opt-card.best.active::before { background: conic-gradient(from var(--co-ang), rgba(255,59,46,0.45) 0deg, #ff6a3d 60deg, #FF9F0A 130deg, rgba(255,59,46,0.45) 190deg, #ff3b2e 260deg, rgba(255,59,46,0.45) 360deg); }
:root.glass[data-theme] .co-ring::before { background: conic-gradient(from var(--co-ang), transparent 0deg, transparent 40deg, #FFB547 100deg, #F27A00 140deg, transparent 200deg, transparent 360deg); }
:root.glass[data-theme] .speed-opt.active .co-bars { border-color: rgba(255,150,10,0.45); box-shadow: 0 8px 24px rgba(255,130,0,0.25); }
:root.glass[data-theme] .speed-opt.active .co-bars.l1 i:nth-child(-n+1), :root.glass[data-theme] .speed-opt.active .co-bars.l2 i:nth-child(-n+2), :root.glass[data-theme] .speed-opt.active .co-bars.l3 i:nth-child(-n+3), :root.glass[data-theme] .speed-opt.active .co-bars.l4 i { background: linear-gradient(180deg, #FFB547, #F27A00); box-shadow: 0 0 10px rgba(255,140,0,0.6); }
:root.glass[data-theme] .purchase-modal .speed-opt .opt-tag, :root.glass[data-theme] .purchase-modal .opt-flag { box-shadow: 0 6px 16px rgba(255,130,0,0.35); }
:root.glass[data-theme] .purchase-modal .duration-grid .opt-card.pop { border-color: rgba(255,150,10,0.5); }
:root.glass[data-theme] .purchase-right .purchase-summary::after { display: none; }
:root.glass[data-theme] .co-nudge { border-color: rgba(255,150,10,0.45); }
:root.glass[data-theme] .purchase-modal .tos-checkbox input:checked { border-color: #F27A00; background-color: #FF9F0A; }
:root.glass[data-theme] .purchase-modal .pay-btn { background: linear-gradient(180deg, #FFB547 0%, #FF9A0A 52%, #F27A00 100%); color: #1A0E00; }
:root.glass[data-theme] .co-check { border-color: rgba(255,150,10,0.42); }
:root.glass[data-theme] .co-check::before { background: radial-gradient(circle, rgba(255,140,0,0.25), transparent 70%); }
:root.glass[data-theme] .co-token-box { background: linear-gradient(135deg, rgba(255,140,0,0.12), rgba(255,140,0,0.03) 60%), var(--co-tile); border-color: rgba(255,150,10,0.35); }
:root.glass[data-theme] .renew-box .renew-grid .opt-card.active { box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(255,130,0,0.2); }
:root.glass[data-theme] .live-stats-box { border-color: rgba(255,150,10,0.35); }

/* The nudge lifts 1 px on hover: its box must not be clipped, or the dashed top line disappears. */
.purchase-save.nudge { overflow: visible; }
.purchase-save.nudge::after { display: none; }
/* Struck values in the summary: a drawn line through the middle (the font's own line-through sits high),
   the same place as the pricing chips (css/pricing.css .lp-col-chip.free s). */
:root.glass[data-theme] .purchase-right .purchase-row .value s, :root.glass[data-theme] .co-was { position: relative; text-decoration: none; }
:root.glass[data-theme] .purchase-right .purchase-row .value s::after, :root.glass[data-theme] .co-was::after { content: ""; position: absolute; left: -1px; right: -1px; top: calc(52% - 1px); height: 1.5px; border-radius: 1px; background: currentColor; }
/* The header icon: an outline, no glow under it. */
:root.glass[data-theme] .co-ic { background: transparent; border-color: var(--gl-line); box-shadow: none; }
