/* Uses the existing site tokens from index.html; no separate offer palette.
   The Collarts welcome uses these same card/type tokens inside the room. */
:root {
  --offer-card-width: 448px;
  --offer-card-padding: 28px;
  --offer-card-radius: 20px;
  --offer-title-size: 29px;
  --offer-title-line: 1.12;
  --offer-title-tracking: -.8px;
  --offer-body-size: 14px;
  --offer-body-line: 1.5;
}
@media (max-width: 480px) {
  :root {
    --offer-card-padding: 23px 20px 18px;
    --offer-card-radius: 17px;
    --offer-title-size: 25px;
    --offer-title-line: 1.15;
    --offer-title-tracking: -.55px;
    --offer-body-size: 13px;
    --offer-body-line: 1.45;
  }
}
#upgradeModal:where(:not(#stemRoom,#stemRoom *)) { padding: 24px 16px; background: rgba(10, 10, 10, .82); backdrop-filter: blur(9px); }
#upgradeModal .upgrade-card:where(:not(#stemRoom,#stemRoom *)) { box-sizing: border-box; width: 100%; max-width: var(--offer-card-width); padding: var(--offer-card-padding); border: 1px solid color-mix(in srgb, var(--teal) 45%, transparent); border-radius: var(--offer-card-radius); background: var(--bg-dark); box-shadow: 0 24px 90px #0008; outline: none; }
#upgradeModal .upgrade-close:where(:not(#stemRoom,#stemRoom *)) { top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; color: var(--text-secondary); font-size: 24px; }
#upgradeModal .upgrade-close:hover:where(:not(#stemRoom,#stemRoom *)) { background: #ffffff09; color: #fff; }
#upgradeModal .upgrade-eyebrow:where(:not(#stemRoom,#stemRoom *)) { max-width: calc(100% - 24px); margin: 0 0 12px; color: var(--gold-bright); font-size: 10px; letter-spacing: 1.25px; line-height: 1.4; }
#upgradeModal .upgrade-title:where(:not(#stemRoom,#stemRoom *)) { margin: 0 0 10px; font: 600 var(--offer-title-size)/var(--offer-title-line) Archivo, system-ui, sans-serif; letter-spacing: var(--offer-title-tracking); color: var(--text-primary); }
#upgradeModal .upgrade-sub:where(:not(#stemRoom,#stemRoom *)) { margin: 0 0 18px; color: var(--text-secondary); font: 400 var(--offer-body-size)/var(--offer-body-line) Archivo, system-ui, sans-serif; }
.offer-illustration:where(:not(#stemRoom,#stemRoom *)) { border: 1px solid var(--gold-border); border-radius: 12px; background: var(--gold-glow); padding: 12px 16px; }
.offer-visual-label:where(:not(#stemRoom,#stemRoom *)) { display: block; font: 10px/1.2 'Space Mono', monospace; letter-spacing: 1.2px; color: var(--text-secondary); }
.offer-visual-values:where(:not(#stemRoom,#stemRoom *)) { display: flex; align-items: center; gap: 16px; margin: 6px 0; color: var(--gold-bright); }
.offer-visual-values b:where(:not(#stemRoom,#stemRoom *)) { font: 500 23px/1.2 Archivo, system-ui, sans-serif; letter-spacing: -.4px; }
.offer-visual-values b:first-child:where(:not(#stemRoom,#stemRoom *)) { color: var(--text-secondary); }
.offer-visual-arrow:where(:not(#stemRoom,#stemRoom *)) { color: var(--gold); font-size: 18px; }
.offer-visual-caption:where(:not(#stemRoom,#stemRoom *)) { display: block; font: 12px/1.3 Archivo, system-ui, sans-serif; color: var(--text-secondary); }
.offer-benefits:where(:not(#stemRoom,#stemRoom *)) { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; gap: 8px; color: var(--text-primary); font: 13px/1.4 Archivo, system-ui, sans-serif; }
.offer-benefits li:where(:not(#stemRoom,#stemRoom *)) { display: flex; align-items: baseline; gap: 9px; }
.offer-benefits li > span:where(:not(#stemRoom,#stemRoom *)) { color: var(--gold); font-size: 11px; }
#upgradeModal .offer-rows:where(:not(#stemRoom,#stemRoom *)) { gap: 7px; margin: 0 0 12px; }
#upgradeModal .offer-row:where(:not(#stemRoom,#stemRoom *)) { padding: 12px; border: 1px solid var(--border-light); background: var(--bg-card); border-radius: 11px; gap: 10px; }
#upgradeModal .offer-row:has(input:checked):where(:not(#stemRoom,#stemRoom *)) { border-color: var(--gold); background: var(--gold-glow); }
#upgradeModal .offer-name:where(:not(#stemRoom,#stemRoom *)) { font: 600 14px/1.2 Archivo, system-ui, sans-serif; }
#upgradeModal .offer-note:where(:not(#stemRoom,#stemRoom *)) { font-size: 11px; color: var(--text-secondary); }
#upgradeModal .offer-price:where(:not(#stemRoom,#stemRoom *)) { font: 600 19px/1 Archivo, system-ui, sans-serif; color: var(--text-primary); }
#upgradeModal .offer-price small:where(:not(#stemRoom,#stemRoom *)) { display: inline-block; font-size: 11px; margin-left: 3px; color: var(--text-secondary); }
#upgradeModal .offer-cta:where(:not(#stemRoom,#stemRoom *)) { min-height: 48px; padding: 13px 12px; border-radius: 10px; background: var(--gold); color: var(--bg-black); font: 600 15px/1.35 Archivo, system-ui, sans-serif; }
#upgradeModal .offer-dot:where(:not(#stemRoom,#stemRoom *)) { width: 17px; height: 17px; }
#upgradeModal .offer-dot:where(:not(#stemRoom,#stemRoom *))::after { left: 5px; top: 2px; }
#upgradeModal .offer-row:has(input:checked) .offer-dot:where(:not(#stemRoom,#stemRoom *)) { background: var(--gold); border-color: var(--gold); }
#upgradeModal .offer-terms:where(:not(#stemRoom,#stemRoom *)) { margin: 9px 4px 0; font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; }
#upgradeModal .upgrade-skip-trial:where(:not(#stemRoom,#stemRoom *)) { font-size: 11px; margin-top: 5px; min-height: 30px; }
#upgradeModal .upgrade-payg:where(:not(#stemRoom,#stemRoom *)) { margin: 16px 0 0; padding-top: 13px; color: var(--text-secondary); font-size: 12px; }
.offer-single-price:where(:not(#stemRoom,#stemRoom *)) { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.offer-single-price strong:where(:not(#stemRoom,#stemRoom *)) { font: 600 34px/1 Archivo, system-ui, sans-serif; letter-spacing: -1px; color: var(--text-primary); }
.offer-single-price span:where(:not(#stemRoom,#stemRoom *)) { font: 12px/1.4 Archivo, system-ui, sans-serif; color: var(--text-secondary); }
#upgradeModal .upgrade-social:where(:not(#stemRoom,#stemRoom *)) { margin: 14px 0 0; color: var(--text-secondary); font-size: 11px; }
#upgradeModal .upgrade-later:where(:not(#stemRoom,#stemRoom *)) { min-height: 36px; margin: 4px auto -8px; color: var(--text-secondary); font-size: 12px; }
#upgradeModal .upgrade-auth:where(:not(#stemRoom,#stemRoom *)) { gap: 14px; }
#upgradeModal .upgrade-auth-head:where(:not(#stemRoom,#stemRoom *)) { font: 400 14px/1.5 Archivo, system-ui, sans-serif; text-align: left; }
#upgradeModal button:focus-visible:where(:not(#stemRoom,#stemRoom *)), #upgradeModal summary:focus-visible:where(:not(#stemRoom,#stemRoom *)) { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (max-width: 480px) {
  #upgradeModal:where(:not(#stemRoom,#stemRoom *)) { padding: 14px 12px; }
  #upgradeModal .upgrade-close:where(:not(#stemRoom,#stemRoom *)) { width: 44px; height: 44px; top: 10px; right: 10px; }
  #upgradeModal .upgrade-card:where(:not(#stemRoom,#stemRoom *)) { padding: var(--offer-card-padding); border-radius: var(--offer-card-radius); }
  #upgradeModal .upgrade-title:where(:not(#stemRoom,#stemRoom *)) { font: 600 var(--offer-title-size)/var(--offer-title-line) Archivo, system-ui, sans-serif; letter-spacing: var(--offer-title-tracking); }
  #upgradeModal .upgrade-sub:where(:not(#stemRoom,#stemRoom *)) { font: 400 var(--offer-body-size)/var(--offer-body-line) Archivo, system-ui, sans-serif; margin-bottom: 14px; }
  #upgradeModal .upgrade-eyebrow:where(:not(#stemRoom,#stemRoom *)) { margin-bottom: 10px; font-size: 9px; }
  .offer-illustration:where(:not(#stemRoom,#stemRoom *)) { padding: 10px 13px; }
  .offer-visual-values b:where(:not(#stemRoom,#stemRoom *)) { font-size: 21px; }
  .offer-benefits:where(:not(#stemRoom,#stemRoom *)) { gap: 6px; margin: 12px 0 16px; font-size: 12px; }
  #upgradeModal .offer-row:where(:not(#stemRoom,#stemRoom *)) { padding: 11px; }
  #upgradeModal .offer-name:where(:not(#stemRoom,#stemRoom *)) { font-size: 13px; }
  #upgradeModal .offer-note:where(:not(#stemRoom,#stemRoom *)) { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  #upgradeModal *:where(:not(#stemRoom,#stemRoom *)), .pro-offer *:where(:not(#stemRoom,#stemRoom *)) { transition: none !important; }
}

body.gold-room-visible .contextual-nudge:where(:not(#stemRoom,#stemRoom *)){bottom:calc(112px + env(safe-area-inset-bottom));max-width:min(520px,calc(100vw - 28px));box-sizing:border-box;background:var(--bg-dark);border-color:var(--gold-border);border-radius:13px;gap:12px;padding:15px 16px;font-family:Archivo,system-ui,sans-serif}
.contextual-nudge .export-nudge-text:where(:not(#stemRoom,#stemRoom *)){font-size:12px;line-height:1.45;color:var(--text-secondary)}
.contextual-nudge .export-nudge-text strong:where(:not(#stemRoom,#stemRoom *)){display:block;margin-bottom:4px;color:var(--gold-bright);font-size:14px;font-weight:600;line-height:1.3}
.contextual-nudge .export-nudge-cta:where(:not(#stemRoom,#stemRoom *)){background:var(--gold);color:var(--bg-black);min-height:40px;border-radius:8px;font-size:12px}
@media(max-width:520px){body.gold-room-visible .contextual-nudge:where(:not(#stemRoom,#stemRoom *)){bottom:calc(108px + env(safe-area-inset-bottom))}.contextual-nudge .export-nudge-text:where(:not(#stemRoom,#stemRoom *)){flex-basis:calc(100% - 25px)}.contextual-nudge .export-nudge-x:where(:not(#stemRoom,#stemRoom *)){position:absolute;right:9px;top:9px}.contextual-nudge .export-nudge-cta:where(:not(#stemRoom,#stemRoom *)){width:100%}}

#upgradeModal .upgrade-card:has(.upgrade-auth) .offer-illustration:where(:not(#stemRoom,#stemRoom *)),#upgradeModal .upgrade-card:has(.upgrade-auth) .offer-benefits:where(:not(#stemRoom,#stemRoom *)){display:none}

/* Keep inherited legacy modal colours on the same site palette too. */
#upgradeModal .offer-name:where(:not(#stemRoom,#stemRoom *)) { color: var(--text-primary); }
#upgradeModal .offer-dot:where(:not(#stemRoom,#stemRoom *)) { border-color: var(--border-light); }
#upgradeModal .offer-row:has(input:checked) .offer-dot:where(:not(#stemRoom,#stemRoom *))::after { border-color: var(--bg-black); }
#upgradeModal .upgrade-auth-head:where(:not(#stemRoom,#stemRoom *)), #upgradeModal .upgrade-skip-trial:where(:not(#stemRoom,#stemRoom *)) { color: var(--text-secondary); }
#upgradeModal .payg-link:where(:not(#stemRoom,#stemRoom *)) { color: var(--gold-bright); }
#upgradeModal .offer-cta:hover:where(:not(#stemRoom,#stemRoom *)), .contextual-nudge .export-nudge-cta:hover:where(:not(#stemRoom,#stemRoom *)) { background: var(--gold-bright); }
