*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #090D14;
  color: #d9d9d9;
  height: 100vh;
  overflow: hidden;
}

/* ── Header ── */

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #090D14;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;                    /* keep the logo intact */
  margin-right: 40px;            /* guaranteed min gap so it never collides with Pricing */
}

/* Header layout: logo on the left; Pricing + auth widget grouped on the right.
   .guide-auth (auth.css) carries its own margin-left:auto. We want ONE auto-margin
   gap for the whole right group, not two — two autos split the free space evenly
   and strand Pricing in the middle. So the single auto lives on .header-right and
   we cancel .guide-auth's auto here (higher specificity → wins regardless of the
   stylesheet inject order). */
.header-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex: none;                    /* Pricing stays put; the auth widget is the shrink sink */
}
.app-header .guide-auth {
  margin-left: 20px;
}

.logo {
  width: 32px;
  height: 32px;
}

.title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #d9d9d9;
  letter-spacing: 0.04em;
}

.login-button {
  background: transparent;
  border: 1px solid #333333;
  border-radius: 8px;
  color: #d9d9d9;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 20px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0.03em;
}

.login-button:hover {
  background: #1a1a1a;
  border-color: #555;
}

main {
  margin-top: 50px;
}

/* ── Hero ── */

.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 50px);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9, 13, 20, 0.3) 0%,
    rgba(9, 13, 20, 0.0) 30%,
    rgba(9, 13, 20, 0.5) 65%,
    rgba(9, 13, 20, 0.85) 100%
  );
  pointer-events: none;
}

.hero-spacer {
  flex: 1;
}

.hero-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 40px;
  gap: 20px;
}

/* ── Page intro ── */

.page-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-transform: uppercase;
}

.page-tagline {
  font-size: 0.78rem;
  font-weight: 500;
  color: #d9d9d9;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Section cards ── */

.sections {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0 24px;
  flex-wrap: wrap;
}

.section-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 280px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-decoration: none;
  color: #d9d9d9;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.section-card:hover {
  border-color: rgba(0, 136, 241, 0.7);
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 136, 241, 0.15);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
}

.card-icon img,
.card-icon svg {
  width: 28px;
  height: 28px;
  opacity: 0.85;
}

.card-icon svg {
  stroke: #d9d9d9;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.card-description {
  font-size: 0.85rem;
  font-weight: 400;
  color: #aaa;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.card-open {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0088f1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.section-card:hover .card-open {
  gap: 10px;
}

.section-card--disabled {
  cursor: default;
  opacity: 0.5;
}

.section-card--disabled:hover {
  border-color: #2a2a2a;
  transform: none;
  background: rgba(0, 0, 0, 0.5);
}

.section-card--disabled .card-open {
  color: #555;
}

.card-coming-soon {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
  margin-left: 8px;
}

@media (max-width: 768px) {
  body {
    height: auto;
    overflow: auto;
  }

  .hero {
    height: auto;
    min-height: 100svh;
    padding-bottom: 32px;
  }

  .hero-bg {
    content: url(cc7a6e921cc6b5ad36df.png);
    inset: 0;
    width: 100%;
    height: 115%;
    top: -25%;
    left: 0;
    object-fit: cover;
    object-position: center top;
  }

  .hero-spacer {
    min-height: 30svh;
  }

  .hero-bottom {
    width: 100%;
    background: linear-gradient(to bottom, transparent, rgba(9,13,20,0.95) 20%);
    padding-top: 48px;
  }
}

/* Auth widget — shared by home (home.css) and platform (style.css).
   Tokens mirror the existing .login-button in home.css so it looks native on both,
   including the platform where .login-button isn't otherwise defined. */

.guide-auth {
  margin-left: auto;            /* push to the right of the flex header on both pages */
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;                 /* allow the group (and the name inside) to shrink */
  position: relative;           /* anchor for the signed-in dropdown (.gu-menu) */
}

/* Reuse the home.css login button design exactly (kept here so the platform has it too). */
.guide-auth .login-button {
  background: transparent;
  border: 1px solid #333333;
  border-radius: 8px;
  color: #d9d9d9;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 20px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0.03em;
}

.guide-auth .login-button:hover {
  background: #1a1a1a;
  border-color: #555;
}

/* Signed-in trigger: avatar + first name + caret (opens the dropdown).
   flex:none so the pill sizes to its content and never collapses smaller than the
   avatar. The name shows in full or not at all — auth.js adds .gu-trigger--compact
   (avatar only) when the full name wouldn't fit, rather than truncating it. */
.guide-auth .gu-trigger {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border: 1px solid #333333;
  border-radius: 999px;
  background: transparent;
  color: #d9d9d9;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.guide-auth .gu-trigger:hover { background: #1a1a1a; border-color: #555; }

/* Compact: avatar only. Symmetric padding keeps a round pill that always fits the icon. */
.guide-auth .gu-trigger--compact { padding: 4px; gap: 0; }
.guide-auth .gu-trigger--compact .gu-name,
.guide-auth .gu-trigger--compact .gu-caret { display: none; }

.guide-auth .gu-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #333333;
  flex: none;                   /* never shrink the avatar */
}
.guide-auth .gu-avatar--fallback { background: #2a3646; border-color: #3a4658; }

.guide-auth .gu-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #d9d9d9;
  letter-spacing: 0.03em;
  white-space: nowrap;          /* shown in full; collapsed to avatar-only when it won't fit */
}

.guide-auth .gu-caret { width: 14px; height: 14px; flex: none; color: #8a8f98; }

/* Dropdown menu anchored under the trigger */
.guide-auth .gu-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 264px;
  max-width: calc(100vw - 24px);
  background: #0f141d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 300;
  font-family: 'Montserrat', sans-serif;
}
.guide-auth .gu-menu.hidden { display: none; }

.guide-auth .gu-menu-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.guide-auth .gu-menu-header .gu-avatar { width: 40px; height: 40px; }
.guide-auth .gu-menu-id { display: flex; flex-direction: column; min-width: 0; }
.guide-auth .gu-menu-name {
  font-size: 0.9rem; font-weight: 600; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.guide-auth .gu-menu-email {
  font-size: 0.78rem; color: #8a8f98;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.guide-auth .gu-menu-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.guide-auth .gu-menu-plan-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.guide-auth .gu-menu-plan-label {
  font-size: 0.7rem; color: #8a8f98; text-transform: uppercase; letter-spacing: 0.5px;
}
.guide-auth .gu-menu-plan-name { font-size: 0.9rem; font-weight: 600; color: #fff; }
.guide-auth .gu-menu-upgrade {
  flex: none;
  white-space: nowrap;
  background: #0088f1; color: #fff; text-decoration: none;
  padding: 7px 14px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
  transition: background 0.2s ease;
}
.guide-auth .gu-menu-upgrade:hover { background: #0072cc; }

.guide-auth .gu-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: #d9d9d9;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}
.guide-auth .gu-menu-item:hover { background: rgba(255, 255, 255, 0.05); }
.guide-auth .gu-menu-icon { width: 18px; height: 18px; flex: none; color: #9aa0a6; }

.guide-auth .gu-loading {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  color: #555;
  letter-spacing: 0.03em;
}

/* NOTE: profile-button / profile-menu styles live in style.css (loaded synchronously
   via <link>), NOT here. The profile button is static markup in index.html, so its
   styles must apply at first paint — auth.css is injected by JS (style-loader) and
   would cause a flash of an unsized (huge) avatar before it loads. */

/* ── Login overlay (split card: providers left, brand gradient right) ────────
   Injected by auth.js (openLoginModal). Literal colors (not :root tokens) so it
   renders identically on home.html and the platform. */
.gu-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 4, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: gu-login-fade 0.18s ease;
}
.gu-login-overlay.hidden { display: none; }

@keyframes gu-login-fade { from { opacity: 0; } to { opacity: 1; } }

.gu-login-card {
  position: relative;
  display: flex;
  width: 70vw;                 /* ~15% inset each side */
  max-width: 960px;
  min-height: 480px;
  max-height: 86vh;
  border-radius: 16px;
  overflow: hidden;
  background: #101012;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  font-family: 'Montserrat', sans-serif;
}

.gu-login-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #d9d9d9;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.gu-login-close:hover { background: rgba(255, 255, 255, 0.14); }

/* Left: branding + providers */
.gu-login-left {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 48px 44px;
}
.gu-login-logo { height: 34px; width: auto; align-self: flex-start; margin-bottom: 6px; }
.gu-login-title { margin: 0; font-size: 1.6rem; font-weight: 700; color: #f2f2f2; letter-spacing: 0.01em; }
.gu-login-sub { margin: 0 0 10px; font-size: 0.9rem; color: #9aa0a6; line-height: 1.5; }

.gu-login-providers { display: flex; flex-direction: column; gap: 10px; }

.gu-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #f2f2f2;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.gu-provider-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); }
.gu-provider-btn.is-loading { opacity: 0.6; pointer-events: none; }
.gu-provider-icon { width: 18px; height: 18px; flex: none; }

.gu-login-legal { margin: 8px 0 0; font-size: 0.75rem; color: #767c83; line-height: 1.5; }
.gu-login-legal a { color: #0088f1; text-decoration: none; }
.gu-login-legal a:hover { text-decoration: underline; }

/* Right: brand gradient placeholder (swap for real art later) */
.gu-login-right {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 75% 20%, rgba(26, 151, 255, 0.55) 0%, rgba(0, 136, 241, 0) 55%),
    linear-gradient(150deg, #0088f1 0%, #0a4a85 45%, #08111c 100%);
}
.gu-login-watermark { width: 58%; max-width: 320px; opacity: 0.16; filter: brightness(0) invert(1); }

/* Stack to a single column on narrow screens — a 70vw split breaks on phones. */
@media (max-width: 760px) {
  .gu-login-card { width: 92vw; min-height: 0; }
  .gu-login-right { display: none; }
  .gu-login-left { padding: 44px 28px; }
}

/* Manage-account modal. Uses the app design tokens (style.css :root). */
.gu-acct-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.gu-acct-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--ink-black, #090d14);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-lg, 16px);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color: var(--text, #f2f2f2);
}

.gu-acct-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted, #9aa0a6);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.gu-acct-close:hover { color: var(--text, #f2f2f2); }

.gu-acct-title {
  margin: 0 0 20px;
  font-size: 1.2rem;
  font-weight: 700;
}

.gu-acct-section {
  padding: 16px 0;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.gu-acct-plan-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.gu-acct-plan-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #9aa0a6);
}
.gu-acct-plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent, #0088f1);
}

.gu-acct-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  overflow: hidden;
}
.gu-acct-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.gu-acct-bar-fill--ok { background: var(--success, #0bcf25); }
.gu-acct-bar-fill--warn { background: var(--warning, #d6b25a); }
.gu-acct-bar-fill--urgent { background: var(--danger, #ff6b6b); }

.gu-acct-usage-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary, #c4c4c4);
}
.gu-acct-usage-pct { font-weight: 600; }
.gu-acct-usage-pct--warn { color: var(--warning, #d6b25a); }
.gu-acct-usage-pct--urgent { color: var(--danger, #ff6b6b); }

.gu-acct-warn {
  margin: 10px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
}
.gu-acct-warn--warn { color: var(--warning, #d6b25a); }
.gu-acct-warn--urgent { color: var(--danger, #ff6b6b); }

.gu-acct-upgrade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gu-acct-up-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gu-acct-up-title { font-size: 0.92rem; font-weight: 600; }
.gu-acct-up-feature { font-size: 0.8rem; color: var(--text-muted, #9aa0a6); }
.gu-acct-up-btn {
  flex: none;
  background: var(--accent, #0088f1);
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-sm, 8px);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.gu-acct-up-btn:hover { background: var(--accent-hover, #1a97ff); }

.gu-acct-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.gu-acct-cancel {
  width: 100%;
  background: none;
  border: 1px solid var(--danger-border, rgba(255, 107, 107, 0.4));
  color: var(--danger, #ff6b6b);
  padding: 10px;
  border-radius: var(--r-sm, 8px);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.gu-acct-cancel:hover { background: var(--danger-soft, rgba(255, 107, 107, 0.14)); }

.gu-acct-confirm-body {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--text-secondary, #c4c4c4);
  line-height: 1.5;
}
.gu-acct-confirm-actions { display: flex; gap: 10px; }
.gu-acct-keep,
.gu-acct-cancel-yes {
  flex: 1;
  padding: 10px;
  border-radius: var(--r-sm, 8px);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.gu-acct-keep {
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text, #f2f2f2);
}
.gu-acct-keep:hover { background: var(--surface-3, rgba(255, 255, 255, 0.09)); }
.gu-acct-cancel-yes {
  background: var(--danger, #ff6b6b);
  border: 1px solid var(--danger, #ff6b6b);
  color: #fff;
}
.gu-acct-cancel-yes:disabled { opacity: 0.6; cursor: default; }

.gu-acct-canceled {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #9aa0a6);
  text-align: center;
}

/* Cancellation retention flow. */
.cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(2px);
}
.cf-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--ink-black, #090d14);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-lg, 16px);
  padding: 26px 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color: var(--text, #f2f2f2);
}
.cf-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-muted, #9aa0a6);
  font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px;
}
.cf-close:hover { color: var(--text, #f2f2f2); }

.cf-title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.cf-sub { margin: 0 0 18px; font-size: 0.88rem; color: var(--text-muted, #9aa0a6); }

.cf-reasons { display: flex; flex-direction: column; gap: 2px; }
.cf-reason {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-sm, 8px);
  cursor: pointer;
  transition: background 0.12s ease;
}
.cf-reason:hover { background: var(--surface-1, rgba(255, 255, 255, 0.035)); }
.cf-reason input { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-radio {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong, rgba(255, 255, 255, 0.16));
  transition: border-color 0.12s ease;
}
.cf-reason input:checked + .cf-radio {
  border-color: var(--accent, #0088f1);
  box-shadow: inset 0 0 0 4px var(--accent, #0088f1);
}
.cf-reason input:focus-visible + .cf-radio { outline: 2px solid var(--accent, #0088f1); outline-offset: 2px; }
.cf-reason-label { font-size: 0.92rem; }

.cf-detail {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface-1, rgba(255, 255, 255, 0.035));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-sm, 8px);
  color: var(--text, #f2f2f2);
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.cf-detail:focus { outline: none; border-color: var(--accent, #0088f1); }

/* Save offer (cost → cheaper plan; problems → support) */
.cf-offer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--accent-soft, rgba(0, 136, 241, 0.12));
  border: 1px solid var(--accent-border, rgba(0, 136, 241, 0.35));
  border-radius: var(--r-md, 12px);
}
.cf-offer-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cf-offer-title { font-size: 0.9rem; font-weight: 700; }
.cf-offer-sub { font-size: 0.78rem; color: var(--text-secondary, #c4c4c4); }
.cf-offer-btn {
  flex: none;
  margin-left: auto;
  padding: 9px 15px;
  border: none;
  border-radius: var(--r-sm, 8px);
  background: var(--accent, #0088f1);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.cf-offer-btn:hover { background: var(--accent-hover, #1a97ff); }

.cf-actions { display: flex; gap: 10px; margin-top: 22px; }
/* Keep is the encouraged choice (filled); Continue stays clearly available (never hidden). */
.cf-keep {
  flex: 1;
  padding: 11px 14px;
  border: none;
  border-radius: var(--r-sm, 8px);
  background: var(--accent, #0088f1);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.cf-keep:hover { background: var(--accent-hover, #1a97ff); }
.cf-continue {
  flex: none;
  padding: 11px 16px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.16));
  border-radius: var(--r-sm, 8px);
  background: none;
  color: var(--text-muted, #9aa0a6);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.cf-continue:hover:not(:disabled) { color: var(--danger, #ff6b6b); border-color: var(--danger-border, rgba(255, 107, 107, 0.4)); }
.cf-continue:disabled { opacity: 0.45; cursor: default; }

/* Styled confirm dialog + toast (dialog.js). Uses the app design tokens. */
.gu-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  animation: gu-dialog-fade 0.15s ease;
}
@keyframes gu-dialog-fade { from { opacity: 0; } }

.gu-dialog {
  width: 100%;
  max-width: 400px;
  background: var(--ink-black, #090d14);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-lg, 16px);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color: var(--text, #f2f2f2);
  animation: gu-dialog-rise 0.18s ease;
}
@keyframes gu-dialog-rise { from { transform: translateY(8px); opacity: 0; } }

.gu-dialog-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.gu-dialog-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary, #c4c4c4);
}
.gu-dialog-body b { color: var(--text, #f2f2f2); font-weight: 700; }

.gu-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.gu-dialog-btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: var(--r-sm, 8px);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.gu-dialog-btn--ghost {
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  border-color: var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text, #f2f2f2);
}
.gu-dialog-btn--ghost:hover { background: var(--surface-3, rgba(255, 255, 255, 0.09)); }
.gu-dialog-btn--primary {
  background: var(--accent, #0088f1);
  color: #fff;
}
.gu-dialog-btn--primary:hover { background: var(--accent-hover, #1a97ff); }
.gu-dialog-btn--danger {
  background: var(--danger, #ff6b6b);
  color: #fff;
}
.gu-dialog-btn--danger:hover { filter: brightness(1.05); }
.gu-dialog-btn:focus-visible { outline: 2px solid var(--accent, #0088f1); outline-offset: 2px; }

/* Toast */
.gu-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1200;
  transform: translate(-50%, 16px);
  opacity: 0;
  max-width: min(90vw, 440px);
  padding: 12px 18px;
  border-radius: var(--r-sm, 8px);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text, #f2f2f2);
  background: var(--ink-black, #090d14);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.16));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.gu-toast--in { transform: translate(-50%, 0); opacity: 1; }
.gu-toast--success { border-color: var(--success-border, rgba(11, 207, 37, 0.3)); }
.gu-toast--success::before { content: "✓ "; color: var(--success, #0bcf25); }
.gu-toast--error { border-color: var(--danger-border, rgba(255, 107, 107, 0.4)); }

@media (prefers-reduced-motion: reduce) {
  .gu-dialog-overlay, .gu-dialog, .gu-toast { animation: none; transition: none; }
  .gu-toast { opacity: 1; transform: translate(-50%, 0); }
}

/* Two-column celebration/farewell dialog. Left: copy. Right: tier-themed cosmic panel. */
.pc-overlay {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
  animation: pc-fade 0.18s ease;
}
@keyframes pc-fade { from { opacity: 0; } }

.pc-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  width: 100%;
  max-width: 760px;
  min-height: 420px;
  background: var(--ink-black, #090d14);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  color: var(--text, #f2f2f2);
  animation: pc-rise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes pc-rise { from { transform: translateY(12px) scale(0.99); opacity: 0; } }

.pc-close {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 2;
  background: none; border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 4px;
}
.pc-close:hover { color: #fff; }

.pc-text {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.pc-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent, #0088f1);
}
.pc-title {
  margin: 12px 0 14px;
  font-size: 1.7rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pc-lead { margin: 0 0 10px; font-size: 1rem; color: var(--text, #f2f2f2); font-weight: 600; }
.pc-body { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--text-secondary, #c4c4c4); }
.pc-body b, .pc-lead b { color: var(--text, #f2f2f2); font-weight: 700; }

.pc-perks { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-perks li {
  position: relative;
  padding-left: 24px;
  font-size: 0.86rem;
  color: var(--text-secondary, #c4c4c4);
}
.pc-perks li::before {
  content: "";
  position: absolute; left: 0; top: 6px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--success, #0bcf25);
  border-bottom: 2px solid var(--success, #0bcf25);
  transform: rotate(-45deg);
}

.pc-cta {
  margin-top: 26px;
  padding: 12px 26px;
  border: none;
  border-radius: var(--r-sm, 8px);
  background: var(--accent, #0088f1);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.pc-cta:hover { background: var(--accent-hover, #1a97ff); }
.pc-cta:active { transform: translateY(1px); }
.pc-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Cosmic hero (right) ── */
.pc-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 28px;
}
.pc-hero-label {
  position: relative;
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}
/* starfield: layered pin-point radial gradients */
.pc-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 65% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 30% 85%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 88% 38%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1px 1px at 12% 62%, rgba(255,255,255,0.6), transparent);
}
/* glowing celestial body, sized/coloured per tier */
.pc-orb {
  position: absolute;
  top: 46%; left: 50%;
  width: 130px; height: 130px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

/* Planet — steady blue world */
.pc-hero--planet { background: radial-gradient(120% 100% at 70% 20%, #0a2a4a 0%, #071626 55%, #050b14 100%); }
.pc-hero--planet .pc-orb {
  background: radial-gradient(circle at 35% 30%, #4db4ff, #0088f1 45%, #054a80 100%);
  box-shadow: 0 0 60px rgba(0, 136, 241, 0.55);
}
/* Galaxy — violet swirl */
.pc-hero--galaxy { background: radial-gradient(120% 100% at 65% 25%, #3a1160 0%, #1a0b34 55%, #0a0618 100%); }
.pc-hero--galaxy .pc-orb {
  width: 160px; height: 160px;
  background: radial-gradient(circle at 40% 35%, #d08bff, #8a2be2 40%, #3a0e6b 75%, transparent 78%);
  box-shadow: 0 0 70px rgba(138, 43, 226, 0.5);
}
/* Universe — bright multi-hue */
.pc-hero--universe { background: radial-gradient(120% 100% at 60% 20%, #052a44 0%, #10123a 45%, #0a0618 100%); }
.pc-hero--universe .pc-orb {
  width: 150px; height: 150px;
  background: radial-gradient(circle at 38% 32%, #7ff0e0, #00c6ff 38%, #6a3cff 78%, #2a1466 100%);
  box-shadow: 0 0 80px rgba(0, 198, 255, 0.5);
}
/* Moon — muted farewell */
.pc-hero--moon { background: radial-gradient(120% 100% at 65% 25%, #26303f 0%, #141a24 55%, #0a0e14 100%); }
.pc-hero--moon .pc-orb {
  background: radial-gradient(circle at 36% 30%, #e8ecf2, #aab4c2 45%, #5b6472 100%);
  box-shadow: 0 0 40px rgba(200, 210, 225, 0.3);
}

/* Mobile: stack, hero becomes a short banner on top */
@media (max-width: 640px) {
  .pc-card { grid-template-columns: 1fr; max-width: 420px; min-height: 0; }
  .pc-hero { grid-row: 1; min-height: 150px; align-items: center; padding: 20px 0; }
  .pc-hero .pc-orb { position: relative; top: 0; left: 0; transform: none; width: 84px; height: 84px; }
  .pc-hero--galaxy .pc-orb, .pc-hero--universe .pc-orb { width: 92px; height: 92px; }
  .pc-hero-label { position: absolute; bottom: 10px; }
  .pc-text { padding: 28px 24px; }
  .pc-title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-overlay, .pc-card { animation: none; }
}

