.purchase-modal[hidden] { display:none; }
.purchase-modal { position:fixed; z-index:9997; inset:0; display:grid; place-items:center; padding:var(--sc-space-6); overflow:hidden; background:var(--sc-color-overlay); overscroll-behavior:contain; }
body.purchase-modal-open { overflow:hidden; }
.purchase-modal__dialog { position:relative; display:flex; flex-direction:column; width:min(80rem,100%); max-height:calc(100dvh - 2 * var(--sc-space-6)); min-height:0; padding:var(--sc-space-8); border:1px solid var(--sc-color-border); border-radius:var(--sc-radius-xl); color:var(--sc-color-ink); background:var(--sc-color-surface); box-shadow:var(--sc-shadow-lg); }
.purchase-modal__header { flex:none; padding-inline:var(--sc-space-12); text-align:center; }
.purchase-modal__title { margin:0; font-size:clamp(1.5rem,3vw,2.5rem); line-height:1.2; letter-spacing:-.035em; }
.purchase-modal__subtitle { margin:var(--sc-space-2) 0 0; color:var(--sc-color-muted); font-size:.9375rem; line-height:1.5; text-align:center; }
.purchase-modal__subtitle--mobile { display:none; }
.purchase-modal__close { position:absolute; z-index:2; top:var(--sc-space-3); inset-inline-end:var(--sc-space-3); width:44px; height:44px; display:grid; place-items:center; padding:0; border:0; border-radius:var(--sc-radius-md); background:transparent; color:var(--sc-color-muted); font:400 1.75rem/1 var(--sc-font-sans); cursor:pointer; }
.purchase-modal__close:hover { color:var(--sc-color-ink); background:var(--sc-color-surface-muted); }
.purchase-modal button:focus-visible,.purchase-modal a:focus-visible { outline:2px solid var(--sc-color-focus); outline-offset:3px; }
.purchase-modal__state { display:flex; flex-direction:column; min-height:0; margin-top:var(--sc-space-5); overflow:hidden; }
.purchase-modal__desktop,.purchase-modal__mobile { display:flex; flex-direction:column; width:100%; min-height:0; }
.purchase-modal__toggle { flex:none; display:flex; align-self:center; margin-bottom:var(--sc-space-6); padding:var(--sc-space-1); border:1px solid transparent; border-radius:var(--sc-radius-pill); background:var(--sc-color-surface-muted); }
.purchase-modal__toggle button { min-height:44px; padding:var(--sc-space-2) var(--sc-space-6); border:0; border-radius:var(--sc-radius-pill); color:var(--sc-color-muted); background:transparent; font:600 .875rem/1.3 var(--sc-font-sans); cursor:pointer; }
.purchase-modal__toggle button[aria-pressed="true"] { color:var(--sc-color-brand-800); background:var(--sc-color-brand-100); }
.purchase-modal__toggle button:disabled { opacity:.45; cursor:not-allowed; }
.purchase-modal__desktop-content { display:flex; flex-direction:column; gap:var(--sc-space-6); min-height:0; overflow:auto; overscroll-behavior:contain; padding:var(--sc-space-1); }
.purchase-modal__summary,.purchase-modal__selection { min-width:0; }
.purchase-modal__balance { margin:0 0 var(--sc-space-4); color:var(--sc-color-muted); font-size:.8125rem; line-height:1.6; }
.purchase-modal__benefits { display:grid; gap:var(--sc-space-3); margin-block:var(--sc-space-4); }
.purchase-modal__note { margin:0; color:var(--sc-color-muted); font-size:.75rem; line-height:1.6; overflow-wrap:anywhere; }
.purchase-modal__desktop-choices,.purchase-modal__mobile-choices { display:grid; gap:var(--sc-space-3); }
.purchase-modal__choice { position:relative; display:flex; justify-content:space-between; align-items:center; gap:var(--sc-space-4); width:100%; min-width:0; padding:var(--sc-space-4); border:1px solid var(--sc-color-border); border-radius:var(--sc-radius-lg); background:var(--sc-color-surface-muted); color:var(--sc-color-ink); text-align:start; font:inherit; }
.purchase-modal__choice--recommended { border-color:var(--sc-color-brand-500); background:var(--sc-color-brand-50); }
.purchase-modal__choice-info { flex:1; display:grid; gap:var(--sc-space-2); min-width:0; }
.purchase-modal__choice-heading { display:flex; flex-wrap:wrap; align-items:center; gap:var(--sc-space-2); }
.purchase-modal__choice-heading > strong { font-size:1rem; font-weight:700; }
.purchase-modal__recommended { position:absolute; inset-inline:var(--sc-space-4); top:-.75rem; width:fit-content; max-width:calc(100% - 2 * var(--sc-space-4)); padding:var(--sc-space-1) var(--sc-space-3); border-radius:var(--sc-radius-sm); color:var(--sc-color-canvas); background:var(--sc-color-brand-500); font-size:.6875rem; line-height:1.4; font-weight:700; overflow-wrap:anywhere; }
.purchase-modal__description { margin:0; color:var(--sc-color-muted); font-size:.8125rem; line-height:1.5; }
.purchase-modal__credits { color:var(--sc-color-brand-800); font-size:1.125rem; font-weight:600; }
.purchase-modal__capacity { display:grid; gap:var(--sc-space-1); color:var(--sc-color-muted); font-size:.75rem; line-height:1.4; }
.purchase-modal__capacity-other { display:grid; gap:var(--sc-space-1); }
.purchase-modal__choice-actions { flex:none; display:grid; justify-items:end; gap:var(--sc-space-3); max-width:45%; }
.purchase-modal__choice-price { display:grid; gap:4px; }
.purchase-modal__price-current { display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:baseline; gap:var(--sc-space-1); }
.purchase-modal__price-current strong { font-size:1.625rem; line-height:1.1; letter-spacing:-.03em; }
.purchase-modal__price-current span { color:var(--sc-color-muted); font-size:.6875rem; }
.purchase-modal__price-saving { display:flex; flex-wrap:nowrap; white-space:nowrap; justify-content:flex-start; align-items:center; gap:8px; color:var(--sc-color-muted); font-size:.6875rem; line-height:1.4; }
.purchase-modal__price-saving span { color:var(--sc-color-brand-700); }
.purchase-modal__choice .purchase-modal__buy { min-height:44px; padding:var(--sc-space-2) var(--sc-space-5); font-size:.8125rem; }
.purchase-modal__buy:active:not(:disabled) { transform:translateY(1px); }
.purchase-modal__buy:disabled { opacity:.5; cursor:wait; }
.purchase-modal__checkout-details { display:grid; gap:var(--sc-space-3); margin-top:var(--sc-space-4); }
.purchase-modal__checkout-details > a { display:inline-flex; align-items:center; min-height:44px; color:var(--sc-color-brand-700); font-size:.8125rem; }
.purchase-modal__alert[hidden] { display:none; }
.purchase-modal__loading { min-height:12rem; display:grid; place-content:center; justify-items:center; gap:var(--sc-space-3); color:var(--sc-color-muted); text-align:center; }
.purchase-modal__skeleton { display:block; min-width:0; width:100%; height:1em; border-radius:var(--sc-radius-sm); }
.purchase-modal__skeleton-toggle { width:min(22rem,100%); min-height:52px; align-items:center; padding:var(--sc-space-2); }
.purchase-modal__skeleton-title { width:65%; height:1.5rem; }
.purchase-modal__skeleton-price { width:6rem; height:2rem; }
.purchase-modal__skeleton-capacity { height:4.2rem; }
.purchase-modal__skeleton-action { height:48px; }
.purchase-modal__skeleton-choice { min-height:17rem; }
.purchase-modal__loading-status { color:var(--sc-color-muted); margin:0; text-align:center; font-size:var(--sc-font-size-sm); }
.purchase-modal__refresh-recovery { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:var(--sc-space-3); padding:var(--sc-space-3); }
.purchase-modal__state[data-loading-state="refreshing"]::before { content:''; display:block; flex:none; height:3px; margin-bottom:var(--sc-space-2); background:var(--sc-color-border); }
.purchase-modal__mobile-choices .purchase-modal__skeleton-choice { min-height:9rem; }
.purchase-modal__mobile-choices .purchase-modal__skeleton-choice .purchase-modal__skeleton-capacity { height:1.4rem; }
.purchase-modal__spinner { width:2rem; height:2rem; border:3px solid var(--sc-color-border); border-top-color:var(--sc-color-brand-500); border-radius:50%; animation:purchase-modal-spin .8s linear infinite; }
.purchase-modal__recovery { display:grid; gap:var(--sc-space-4); min-height:12rem; align-content:center; text-align:center; }
.purchase-modal__recovery p { margin:0; }
@keyframes purchase-modal-spin { to { transform:rotate(360deg); } }
.purchase-modal--mobile { display:block; width:100dvw; padding:0; }
.purchase-modal--mobile .purchase-modal__dialog { width:100%; height:100dvh; max-height:100dvh; padding:0; border:0; border-radius:0; }
.purchase-modal--mobile .purchase-modal__header { padding:calc(env(safe-area-inset-top,0px) + var(--sc-space-5)) min(var(--sc-space-12),48px) var(--sc-space-4); }
.purchase-modal--mobile .purchase-modal__title { font-size:1.375rem; overflow-wrap:anywhere; }
.purchase-modal--mobile .purchase-modal__subtitle { font-size:.8125rem; overflow-wrap:anywhere; }
.purchase-modal--mobile .purchase-modal__subtitle--desktop { display:none; }
.purchase-modal--mobile .purchase-modal__subtitle--mobile { display:block; }
.purchase-modal--mobile .purchase-modal__close { top:calc(env(safe-area-inset-top,0px) + var(--sc-space-2)); inset-inline-end:var(--sc-space-2); }
.purchase-modal--mobile .purchase-modal__state { flex:1; margin:0; }
.purchase-modal__mobile { flex:1; }
.purchase-modal__mobile-scroll > .purchase-modal__toggle { width:min(22rem,100%); max-width:100%; margin:0 auto var(--sc-space-3); }
.purchase-modal__mobile-scroll > .purchase-modal__toggle button { flex:1; min-width:0; padding:min(var(--sc-space-3),8px) min(var(--sc-space-4),16px); overflow-wrap:anywhere; }
.purchase-modal__mobile-scroll { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:var(--sc-space-1) min(var(--sc-space-4),16px) var(--sc-space-4); }
.purchase-modal__mobile-scroll > .purchase-modal__header { margin-inline:calc(-1 * min(var(--sc-space-4),16px)); }
.purchase-modal__mobile-choices .purchase-modal__choice { cursor:pointer; flex-wrap:wrap; padding:var(--sc-space-4) min(var(--sc-space-3),12px); gap:var(--sc-space-2); }
.purchase-modal__mobile-choices { gap:var(--sc-space-5); padding-top:var(--sc-space-3); }
.purchase-modal__mobile-choices .purchase-modal__choice-info { flex-basis:6rem; }
.purchase-modal__mobile-choices .purchase-modal__choice-heading { padding-inline-start:28px; }
.purchase-modal__mobile-choices .purchase-modal__credits { font-size:.875rem; font-weight:500; }
.purchase-modal__mobile-choices .purchase-modal__capacity { flex-basis:100%; gap:var(--sc-space-2); margin-top:var(--sc-space-2); font-size:.8125rem; }
.purchase-modal__mobile-choices .purchase-modal__capacity-other { display:flex; flex-wrap:wrap; gap:var(--sc-space-1) var(--sc-space-2); }
.purchase-modal__mobile-choices .purchase-modal__capacity-other > span + span::before { content:'/ '; }
.purchase-modal__mobile-choices .purchase-modal__choice::before { content:''; position:absolute; inset-inline-start:min(var(--sc-space-3),12px); top:var(--sc-space-4); width:18px; height:18px; border:1px solid var(--sc-color-muted); border-radius:50%; }
.purchase-modal__choice[aria-checked="true"] { border-color:var(--sc-color-brand-500); box-shadow:inset 0 0 0 1px var(--sc-color-brand-500); }
.purchase-modal__choice[aria-checked="true"]::before { border:5px solid var(--sc-color-brand-500); background:var(--sc-color-canvas); }
.purchase-modal__mobile-choices .purchase-modal__choice-heading > strong { font-size:1.125rem; }
.purchase-modal__mobile-choices .purchase-modal__choice-actions { max-width:100%; align-self:start; }
.purchase-modal__mobile-choices .purchase-modal__price-current strong { font-size:1.375rem; }
.purchase-modal__mobile-checkout { flex:none; display:grid; grid-template-columns:minmax(0,1fr); align-items:center; gap:var(--sc-space-2); padding:min(var(--sc-space-3),12px) min(var(--sc-space-4),16px) calc(env(safe-area-inset-bottom,0px) + min(var(--sc-space-3),12px)); border-top:1px solid var(--sc-color-border); background:var(--sc-color-surface); }
.purchase-modal__selected-price { color:var(--sc-color-ink); font-size:.8125rem; font-weight:600; overflow-wrap:anywhere; text-align:center; }
.purchase-modal__mobile-checkout .sc-button { width:100%; min-width:0; min-height:48px; padding:min(var(--sc-space-3),12px) min(var(--sc-space-4),16px); white-space:normal; overflow-wrap:anywhere; }
.purchase-modal--mobile .purchase-modal__loading,.purchase-modal--mobile .purchase-modal__recovery { flex:1; padding:var(--sc-space-4); }
@media(prefers-reduced-motion:reduce) { .purchase-modal__spinner { animation:none; } .purchase-modal__buy:active:not(:disabled) { transform:none; } }

.purchase-modal__desktop-choices { grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--sc-space-4); padding-top:var(--sc-space-3); }
.purchase-modal__desktop-choices .purchase-modal__choice { flex-direction:column; align-items:stretch; justify-content:flex-start; gap:var(--sc-space-4); padding:var(--sc-space-6) var(--sc-space-5) var(--sc-space-5); }
.purchase-modal__desktop-choices .purchase-modal__choice-heading > strong { font-size:1.375rem; }
.purchase-modal__desktop-choices .purchase-modal__recommended { width:auto; font-size:.6875rem; }
.purchase-modal__desktop-choices .purchase-modal__description { margin-top:calc(-1 * var(--sc-space-2)); }
.purchase-modal__desktop-choices .purchase-modal__price-current,.purchase-modal__desktop-choices .purchase-modal__price-saving { justify-content:flex-start; }
.purchase-modal__desktop-choices .purchase-modal__price-current strong { font-size:2rem; }
.purchase-modal__desktop-choices .purchase-modal__buy { width:100%; margin-top:auto; }
.purchase-modal__desktop .purchase-modal__summary { max-width:48rem; margin-inline:auto; text-align:center; }
.purchase-modal__desktop .purchase-modal__benefits { gap:var(--sc-space-1); margin-block:0; }
.purchase-modal__desktop .purchase-modal__checkout-details { gap:var(--sc-space-2); margin-top:var(--sc-space-2); }
.purchase-modal__desktop .purchase-modal__checkout-details > a { justify-content:center; }
.purchase-modal__mobile-scroll > .purchase-modal__benefits { margin:0 0 var(--sc-space-4); gap:var(--sc-space-1); text-align:center; }
@media (min-width:768px) and (max-width:1000px) { .purchase-modal__dialog { padding:var(--sc-space-5); } .purchase-modal__desktop-choices .purchase-modal__choice { padding-inline:var(--sc-space-3); } .purchase-modal__desktop-choices .purchase-modal__price-current strong { font-size:1.75rem; } }

/* v5b / 23: purchase presentation, retaining the shared checkout state machine. */
.purchase-modal { padding:28px; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.purchase-modal .purchase-modal__dialog { width:min(1080px,100%); max-height:calc(100dvh - 56px); padding:0 36px 34px; border-radius:calc(var(--sc-radius-xl) + 2px); background:linear-gradient(180deg,var(--sc-color-surface-muted),var(--sc-color-surface)); box-shadow:var(--sc-shadow-popover); }
.purchase-modal .purchase-modal__header { padding:var(--sc-space-8) 0 var(--sc-space-3); }
.purchase-modal .purchase-modal__title { font:600 clamp(1.5rem,3vw,2rem)/1.2 var(--sc-font-display); letter-spacing:-.03em; }
.purchase-modal .purchase-modal__subtitle { font-size:15px; margin-top:12px; }
.purchase-modal .purchase-modal__state { margin-top:24px; }
.purchase-modal .purchase-modal__toggle { padding:5px; margin-bottom:24px; background:var(--sc-color-well); border:1px solid var(--sc-color-border); }
.purchase-modal .purchase-modal__toggle button { min-height:40px; padding:10px 22px; font-size:14px; }
.purchase-modal .purchase-modal__toggle button[aria-pressed="true"] { background:var(--sc-color-control-hover); color:var(--sc-color-ink); box-shadow:var(--sc-shadow-sm); }
.purchase-modal .purchase-modal__desktop-choices { gap:20px; padding-top:12px; }
.purchase-modal .purchase-modal__desktop-choices .purchase-modal__choice { padding:26px 24px 24px; gap:16px; border-radius:var(--sc-radius-xl); background:var(--sc-color-surface); }
.purchase-modal .purchase-modal__desktop-choices .purchase-modal__choice--recommended { background:linear-gradient(180deg,color-mix(in srgb,var(--sc-color-brand-500) 8%,var(--sc-color-surface)),var(--sc-color-surface)); border-color:color-mix(in srgb,var(--sc-color-brand-500) 45%,transparent); }
.purchase-modal .purchase-modal__desktop-choices .purchase-modal__recommended { top:0; transform:translateY(-50%); inset-inline-end:var(--sc-space-4); inset-inline-start:auto; width:max-content; background:var(--sc-color-surface); }
.purchase-modal .purchase-modal__choice-heading>strong { font:600 22px/1.25 var(--sc-font-display); letter-spacing:-.02em; }
.purchase-modal .purchase-modal__recommended { border-radius:var(--sc-radius-pill); color:var(--sc-color-brand-700); background:var(--sc-color-brand-50); border:1px solid color-mix(in srgb,var(--sc-color-brand-500) 30%,transparent); font:600 var(--sc-font-size-sm)/1.4 var(--sc-font-sans); letter-spacing:.02em; }
.purchase-modal .purchase-modal__desktop-choices .purchase-modal__price-current strong { font:600 36px/1 var(--sc-font-display); letter-spacing:-.045em; }
.purchase-modal .purchase-modal__price-current span { font-size:14px; }
.purchase-modal .purchase-modal__price-saving { font-size:13px; }
.purchase-modal .purchase-modal__credits { padding-top:18px; border-top:1px solid var(--sc-color-border); color:var(--sc-color-ink); font:600 18px/1.4 var(--sc-font-display); }
.purchase-modal .purchase-modal__capacity { gap:11px; color:var(--sc-color-text); font-size:14px; line-height:1.5; }
.purchase-modal .purchase-modal__capacity-other { gap:11px; }
.purchase-modal .purchase-modal__buy { border-radius:var(--sc-radius-pill); min-height:48px; }
.purchase-modal .purchase-modal__note { font-size:12.5px; color:var(--sc-color-subtle); }
.purchase-modal .purchase-modal__subscription-benefit { width:fit-content; max-width:100%; margin-inline:auto; padding:var(--sc-space-3) var(--sc-space-4); border-inline-start:3px solid var(--sc-color-brand-500); border-radius:var(--sc-radius-sm); background:var(--sc-color-brand-50); color:var(--sc-color-ink); font-size:var(--sc-font-size-sm); font-weight:600; text-align:start; }
.purchase-modal--mobile { display:flex; align-items:flex-end; padding:0; }
.purchase-modal--mobile .purchase-modal__dialog { width:100%; height:auto; max-height:94dvh; padding:0; border-radius:26px 26px 0 0; }
.purchase-modal--mobile .purchase-modal__state { margin:0; min-height:0; }
.purchase-modal--mobile .purchase-modal__header { padding:36px 24px 18px; }
.purchase-modal--mobile .purchase-modal__title { font-size:28px; }
.purchase-modal--mobile .purchase-modal__subtitle { font-size:13.5px; margin-top:8px; }
.purchase-modal--mobile .purchase-modal__toggle button { font-size:12.5px; padding:10px 14px; }
.purchase-modal--mobile .purchase-modal__mobile-scroll { padding-inline:14px; }
.purchase-modal--mobile .purchase-modal__mobile-choices { gap:14px; }
.purchase-modal--mobile .purchase-modal__choice { padding:16px 16px 14px 14px; border-radius:18px; }
.purchase-modal--mobile .purchase-modal__recommended { top:0; transform:translateY(-50%); z-index:1; min-height:var(--sc-space-6); padding:var(--sc-space-1) var(--sc-space-3); background:var(--sc-color-surface); font:600 .75rem/1.5 var(--sc-font-sans); }
.purchase-modal--mobile .purchase-modal__credits { border:0; padding-top:0; color:var(--sc-color-brand-700); font:400 13.5px/1.4 var(--sc-font-sans); }
.purchase-modal--mobile .purchase-modal__choice-heading>strong { font-size:18px; }
.purchase-modal--mobile .purchase-modal__price-current strong { font:600 22px/1 var(--sc-font-display); }
.purchase-modal--mobile .purchase-modal__price-current span { font-size:12px; }
.purchase-modal--mobile .purchase-modal__price-saving { font-size:11.5px; }
.purchase-modal--mobile .purchase-modal__capacity { font-size:12.5px; gap:4px; }
.purchase-modal--mobile .purchase-modal__capacity-other { gap:4px 12px; }
.purchase-modal--mobile .purchase-modal__mobile-checkout { padding:12px 14px calc(14px + env(safe-area-inset-bottom)); background:var(--sc-color-surface); }
@media(min-width:768px) and (max-width:1000px) { .purchase-modal .purchase-modal__dialog { padding:28px 20px; } .purchase-modal .purchase-modal__desktop-choices { gap:14px; } .purchase-modal .purchase-modal__desktop-choices .purchase-modal__choice { padding:24px 18px; } .purchase-modal .purchase-modal__desktop-choices .purchase-modal__price-current strong { font-size:40px; } }
@media(min-width:768px) and (max-width:1100px) { .purchase-modal .purchase-modal__desktop-choices { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.purchase-modal__buy[aria-busy="true"]::before { content:''; flex:none; width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:purchase-spin .7s linear infinite; }
@keyframes purchase-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .purchase-modal__buy[aria-busy="true"]::before { animation:none; } }

/* Match the approved wide page layout while keeping the narrow-screen sheet. */
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__dialog { width:min(1280px,100%); padding-inline:var(--sc-space-8); }
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__title { font-size:36px; }
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__subtitle { font-size:18px; line-height:1.7; }
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__choice-heading>strong { font-size:24px; }
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__description,
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__capacity,
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__toggle button,
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__buy { font-size:16px; }
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__desktop-choices .purchase-modal__price-current strong { font-size:40px; }
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__credits { font-size:20px; }
.purchase-modal:not(.purchase-modal--mobile) .purchase-modal__note { font-size:14px; }
.purchase-modal--mobile .purchase-modal__subtitle { font-size:16px; }
.purchase-modal--mobile .purchase-modal__capacity { font-size:14px; }
.purchase-modal--mobile .purchase-modal__credits { font-size:15px; }
