/* tokens.css is loaded separately in the template's <head>.
   Fonts are loaded via Google Fonts <link> in the template so we don't block
   CSS parsing with an @import chain. */
body { min-height: 100vh; background: var(--bg); color: var(--fg); font-family: var(--font-sans); }
.container { max-width: 1120px; margin: 0 auto; padding: 24px; }
.nav { display: flex; align-items: center; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.nav a { color: var(--fg-mute); font-size: 13px; }
.nav a:hover { color: var(--cyan-500); }
.btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--fg); border: 1px solid var(--border); padding: 10px 16px; border-radius: 6px; font: 500 14px/1.2 Inter; cursor: pointer; transition: border-color .12s; }
.btn:hover { border-color: var(--cyan-500); color: var(--cyan-500); }
.btn.primary { background: var(--cyan-500); border-color: var(--cyan-500); color: #071020; font-weight: 600; }
.btn.primary:hover { background: var(--cyan-600); border-color: var(--cyan-600); color: #071020; }
.pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; font: 600 10px/1.4 Inter; text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid var(--border); color: var(--fg-mute); }
.pill.cyan { border-color: var(--cyan-500); color: var(--cyan-500); }
.pill.amber { border-color: var(--amber-500); color: var(--amber-500); }
.pill.violet { border-color: var(--violet-500); color: var(--violet-500); }
.micro { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); font-weight: 600; }
.mono { font-family: var(--font-mono); }

/* ---------- Shared page layout ---------- */
.footer-brand { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 40px; display: flex; align-items: center; gap: 20px; color: var(--fg-dim); font-size: 12px; }
.footer-brand .spacer { flex: 1; }

/* ---------- Landing ---------- */
.hero { position: relative; padding: 80px 0 60px; overflow: hidden; }
.hero__inner { position: relative; max-width: 720px; }
.hero__title { font-size: 56px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; margin: 0; }
.hero__lede { font-size: 18px; color: var(--fg-mute); line-height: 1.6; margin-top: 18px; max-width: 600px; }
.hero__ctas { display: flex; gap: 10px; margin-top: 24px; }
.hero__stack { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); margin-top: 18px; letter-spacing: 0.08em; }
.hero__glow-cyan { position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(124,227,225,0.15), transparent 70%); pointer-events: none; }
.hero__glow-violet { position: absolute; bottom: -50px; left: -100px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(176,137,255,0.12), transparent 70%); pointer-events: none; }
.starfield { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.cosmos-strip { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cosmos-strip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--good); animation: pulse 2s ease-in-out infinite; }
.cosmos-strip .dot-cell { display: flex; align-items: center; gap: 8px; }
.cosmos-strip .sep { color: var(--border); }
.cosmos-strip .fill { flex: 1; min-width: 180px; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.howto { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.howto__line { position: absolute; top: 14px; left: 12.5%; right: 12.5%; height: 1px; background: var(--border); z-index: 0; }
.howto__step { display: flex; flex-direction: column; align-items: flex-start; padding: 0 16px; position: relative; z-index: 1; }
.howto__num { font-family: var(--font-mono); width: 30px; height: 30px; border-radius: 999px; background: var(--bg); border: 1px solid var(--cyan-500); color: var(--cyan-500); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.howto__title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.howto__sub { font-size: 12px; color: var(--fg-mute); line-height: 1.55; }

.value-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.value-card__n { font-family: var(--font-mono); font-size: 12px; color: var(--cyan-500); margin-bottom: 10px; }
.value-card__t { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.value-card__s { font-size: 13px; color: var(--fg-mute); line-height: 1.6; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mode-card { background: var(--bg-card); border-radius: 10px; padding: 24px; border: 1px solid var(--border); }
.mode-card--pure { border-color: var(--cyan-500); }
.mode-card--udsh { border-color: var(--violet-500); }
.mode-card__h { font-size: 20px; font-weight: 600; margin: 12px 0 10px; }
.mode-card__p { font-size: 13px; color: var(--fg-mute); line-height: 1.6; }
.mode-card__footer { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); margin-top: 14px; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quote { padding: 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
.quote__q { font-size: 14px; font-family: var(--font-serif); color: var(--fg); line-height: 1.55; margin-bottom: 10px; font-style: italic; }
.quote__a { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); }

.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faq-item { padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; }
.faq-item__q { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.faq-item__a { font-size: 13px; color: var(--fg-mute); line-height: 1.6; }

/* ---------- Waitlist capture ---------- */
.waitlist-box { background: var(--bg-card); border: 1px solid var(--cyan-500); border-radius: 10px; padding: 20px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.waitlist-box__lede { flex: 1; min-width: 260px; }
.waitlist-box__lede strong { color: var(--cyan-500); }
.waitlist-box__form { display: flex; gap: 8px; flex: 1; min-width: 280px; }
.waitlist-box__form input[type=email] { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--fg); padding: 10px 12px; border-radius: 6px; font: 500 14px/1.2 var(--font-sans); }
.waitlist-box__form input[type=email]:focus { outline: none; border-color: var(--cyan-500); }
.waitlist-box__note { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); margin-top: 10px; }
.waitlist-success { color: var(--good); font-weight: 600; font-size: 13px; }
.waitlist-error { color: var(--bad); font-weight: 600; font-size: 13px; }

/* ---------- Pricing ---------- */
.pricing-head { text-align: center; margin-bottom: 40px; }
.pricing-head h1 { font-size: 42px; letter-spacing: -0.02em; margin: 0; }
.pricing-head p { color: var(--fg-mute); font-size: 16px; margin-top: 12px; }
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1120px; margin: 0 auto; }
.tier { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 22px; position: relative; display: flex; flex-direction: column; }
.tier--hot { border-color: var(--cyan-500); }
.tier__badge { position: absolute; top: -10px; right: 16px; }
.tier__name { font-size: 15px; font-weight: 600; }
.tier__price { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.tier__price .num { font-family: var(--font-mono); font-size: 36px; letter-spacing: -0.02em; font-weight: 600; }
.tier__price .per { color: var(--fg-mute); font-size: 12px; }
.tier__feats { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tier__feats li { font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.tier__feats li .check { color: var(--cyan-500); flex-shrink: 0; }

/* Tier CTA button - overrides .btn's inline-flex for consistent full-width
 * rendering, and guarantees every tier's button sits at the same card-bottom
 * offset regardless of how many feature lines wrapped above. */
.tier__cta {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-top: auto;  /* pushes CTA to card bottom even if .tier__feats didn't stretch */
  box-sizing: border-box;
}

.topup { max-width: 1120px; margin: 20px auto 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--fg-mute); }

.founder { max-width: 1120px; margin: 28px auto 0; background: var(--bg-card); border: 1px solid var(--amber-500); border-radius: 10px; padding: 24px; display: flex; align-items: center; gap: 24px; position: relative; overflow: hidden; }
.founder__glow { position: absolute; inset: 0; background: radial-gradient(ellipse at right, rgba(255,181,71,0.1), transparent 60%); pointer-events: none; }
.founder__body { flex: 1; position: relative; }
.founder__title { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.founder__p { font-size: 13px; color: var(--fg-mute); margin-top: 6px; max-width: 620px; line-height: 1.6; }
.founder__p strong { color: var(--fg); }
.founder__bar-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.founder__bar { flex: 1; max-width: 280px; height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.founder__bar-fill { height: 100%; background: var(--amber-500); }
.founder__seats { font-family: var(--font-mono); font-size: 11px; color: var(--amber-500); }
.founder__price { text-align: right; position: relative; flex-shrink: 0; }
.founder__price .amt { font-family: var(--font-mono); font-size: 42px; color: var(--amber-500); font-weight: 600; letter-spacing: -0.02em; }
.founder__price .unit { font-family: var(--font-mono); font-size: 10px; color: var(--fg-dim); }
.founder__price .btn { border-color: var(--amber-500); color: var(--amber-500); margin-top: 10px; font-weight: 600; }

.billing-faq { max-width: 900px; margin: 48px auto 0; }
.billing-faq h2 { font-size: 22px; margin-bottom: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .howto, .value-cards, .quotes, .tier-grid { grid-template-columns: 1fr 1fr; }
  .modes, .faq-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 40px; }
  .tier-grid { grid-template-columns: 1fr 1fr; }
  .founder { flex-direction: column; align-items: flex-start; }
  .founder__price { text-align: left; }
}
@media (max-width: 640px) {
  .howto, .value-cards, .quotes, .tier-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 32px; }
  .hero { padding: 40px 0 30px; }
}

/* ---------- Auth (Phase E) ---------- */
.auth-shell { padding: 60px 0 40px; display: flex; justify-content: center; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 40px 36px 32px; width: 100%; max-width: 420px; }
.auth-card--wide { max-width: 560px; }
.auth-card__tag { margin-bottom: 12px; }
.auth-card__title { font-size: 26px; font-weight: 600; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.015em; }
.auth-card__lede { font-size: 13px; color: var(--fg-mute); line-height: 1.6; margin: 0 0 24px; }
.auth-card__error { background: rgba(255, 107, 107, 0.08); border: 1px solid rgba(255, 107, 107, 0.3); color: #ff8787; padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.auth-card__flash { padding: 8px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.auth-card__flash--success { background: rgba(124, 227, 225, 0.08); border: 1px solid rgba(124, 227, 225, 0.3); color: var(--cyan-500); }
.auth-card__foot { margin-top: 20px; font-size: 13px; color: var(--fg-mute); }
.auth-card__foot a { color: var(--cyan-500); }
.auth-card__actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.auth-form { display: flex; flex-direction: column; }
.auth-form__label { font-size: 12px; color: var(--fg-mute); margin-bottom: 6px; margin-top: 12px; font-weight: 500; }
.auth-form__label:first-of-type { margin-top: 0; }
.auth-form__input { background: var(--bg); color: var(--fg); border: 1px solid var(--border); padding: 10px 12px; border-radius: 6px; font: 14px/1.4 Inter; transition: border-color .12s; }
.auth-form__input:focus { outline: none; border-color: var(--cyan-500); }
.auth-form__hint { margin-top: 6px; font-size: 11px; color: var(--fg-dim); letter-spacing: 0.04em; }
.auth-form__submit { margin-top: 20px; width: 100%; justify-content: center; }

.auth-stats { display: flex; flex-direction: column; gap: 18px; margin: 24px 0 0; }
.auth-stats__row { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 14px; }
.auth-stats__row:first-child { border-top: none; padding-top: 0; }
.auth-stats__row dt { font-size: 11px; color: var(--fg-mute); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
.auth-stats__row dd { margin: 0; font-size: 14px; color: var(--fg); }
.auth-stats__badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(176, 137, 255, 0.12); color: var(--violet-500); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.auth-stats__bar { position: relative; height: 4px; background: var(--bg); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.auth-stats__bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--cyan-500); transition: width .3s ease-out; }

/* Header session chip: shown in marketing_base nav when logged-in. */
.nav-session { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fg-mute); }
.nav-session a { color: var(--fg); }
.nav-session form { margin: 0; }
.nav-session button { background: transparent; border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; color: var(--fg-mute); font-size: 11px; cursor: pointer; }
.nav-session button:hover { border-color: var(--cyan-500); color: var(--cyan-500); }

@media (max-width: 640px) {
  .auth-card { padding: 28px 22px 24px; }
  .auth-card__title { font-size: 22px; }
}

/* ==========================================================================
   Planet detail page (Notable Individuals -- Day 9)
   ========================================================================== */

.planet-shell { display: flex; flex-direction: column; gap: 36px; padding: 24px 0 60px; }

.planet-header { display: flex; flex-direction: column; gap: 6px; }
.planet-title { font-size: 32px; font-weight: 600; line-height: 1.1; margin: 0; color: var(--fg); }

/* Champion hero block: image left, body right. */
.planet-champion { display: grid; grid-template-columns: 280px 1fr; gap: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.planet-champion__image { aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.planet-champion__image img { width: 100%; height: 100%; object-fit: cover; }
.planet-champion__image .placeholder { font-size: 11px; color: var(--fg-dim); text-align: center; padding: 12px; }
.planet-champion__body { display: flex; flex-direction: column; gap: 8px; }
.planet-champion__tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--cyan-500); text-transform: uppercase; font-weight: 600; }
.planet-champion__body h2 { margin: 0; font-size: 22px; font-weight: 600; color: var(--fg); }
.planet-champion__common { font-size: 13px; color: var(--fg-mute); }
.planet-champion__bio { font-size: 14px; line-height: 1.6; color: var(--fg); margin: 8px 0 0; }
.planet-champion__stats { font-size: 11px; color: var(--fg-dim); margin-top: 8px; }

/* Biome group rows: micro label + species grid. */
.biome-group { display: flex; flex-direction: column; gap: 12px; }
.species-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

/* Species card: small portrait, name, traits, optional notable badge. */
.species-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: border-color .12s; }
.species-card:hover { border-color: var(--cyan-500); }
.species-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; background: var(--bg); }
.species-card__placeholder { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--fg-dim); }
.species-card h3 { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--fg); }
.species-card__common { font-size: 12px; color: var(--fg-mute); }
.species-card__traits { font-size: 11px; color: var(--fg-dim); }
.species-card__notable { font-size: 11px; color: var(--cyan-500); border-top: 1px solid var(--border); padding-top: 6px; margin-top: 4px; }
.species-card__rarity { font-size: 11px; color: var(--fg-dim); margin-top: 4px; }

/* Champion notable-individual block: cyan accent strip inside the hero
 * body so a minted individual surfaces alongside the species portrait
 * instead of being buried in the biome group below. */
.planet-champion__notable { background: var(--bg-soft, rgba(255, 255, 255, 0.04)); border-left: 3px solid var(--cyan-500); padding: 8px 12px; margin: 12px 0; }
.planet-champion__notable-name { font-size: 16px; font-weight: 500; color: var(--fg); }
.planet-champion__notable-meta { font-size: 11px; color: var(--fg-dim); }

/* Day 10 P2-1: entry points to /u/<slug>/individual/<id>. Without these
 * links the individual detail page is unreachable from a normal browse. */
.species-card__notable-link, .planet-champion__notable-link {
  color: var(--cyan-500);
  text-decoration: underline;
  text-decoration-style: dotted;
}
.species-card__notable-link:hover,
.planet-champion__notable-link:hover {
  text-decoration-style: solid;
}

/* UDSH-attuned species: violet treatment (mana-pressure > 0.5 in udsh_extended mode). */
.species-card--udsh-attuned { border-color: var(--violet-500); }
.species-card--udsh-attuned:hover { border-color: var(--violet-500); }
.species-card--udsh-attuned .species-card__notable { color: var(--violet-500); }
.species-card--udsh-attuned h3 { color: var(--violet-500); }

@media (max-width: 640px) {
  .planet-champion { grid-template-columns: 1fr; }
  .planet-champion__image { max-width: 280px; }
  .planet-title { font-size: 24px; }
}

/* ---------- Individual detail (Day 10) ---------- */
.individual-page { padding: 40px 0; max-width: 800px; }
.individual-page__name { font-size: 32px; font-weight: 600; margin: 8px 0 4px; }
.individual-page__species { color: var(--fg-mute); margin-bottom: 24px; }
.individual-page__image {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: 8px; margin-bottom: 24px;
}
.individual-page__image--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--fg-dim); height: 240px;
}
.individual-page__biography {
  font-size: 16px; line-height: 1.6; margin-bottom: 24px;
}
.individual-page__stats { font-size: 12px; color: var(--fg-dim); margin-bottom: 24px; }

.citation-link {
  color: var(--cyan-500); text-decoration: underline;
  text-decoration-style: dotted;
}
.citation-link:hover { text-decoration-style: solid; }
.citation-ref {
  color: var(--fg-mute); font-style: italic;
}

/* ---------- Planet rename form (Day 10) ---------- */
.planet-rename-form {
  display: inline-flex; gap: 8px; margin-top: 12px;
}
.planet-rename-form__input {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 10px; color: var(--fg);
  font-family: inherit; font-size: 14px;
  width: 240px;
}
.btn--small { padding: 6px 12px; font-size: 13px; }
.planet-title--error { color: var(--bad); }

/* ---------- Compendium card (Day 11) ---------- */
.compendium-card { padding: 40px 0; max-width: 800px; }
.compendium-card__title { font-size: 32px; font-weight: 600; margin: 8px 0 4px; }
.compendium-card__common { color: var(--fg-mute); margin-bottom: 24px; font-size: 16px; }
.compendium-card__image {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: 8px; margin-bottom: 24px;
}
.compendium-card__image--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--fg-dim); height: 240px;
}
.compendium-card__biography {
  font-size: 16px; line-height: 1.6; margin-bottom: 24px;
}
.compendium-card__stats { font-size: 12px; color: var(--fg-dim); margin-bottom: 24px; }
.compendium-card__section { font-size: 18px; margin: 32px 0 12px; }
.compendium-card__individuals,
.compendium-card__sightings {
  list-style: none; padding: 0; margin: 0;
}
.compendium-card__individuals li,
.compendium-card__sightings li {
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.compendium-card__individual-link {
  color: var(--cyan-500); text-decoration: underline; text-decoration-style: dotted;
}
.compendium-card__individual-link:hover { text-decoration-style: solid; }
.compendium-card__empty { color: var(--fg-dim); font-style: italic; }

