*, *::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; }
}

