:root {
  --bg: #0a0a0c;
  --bg-elev: #111114;
  --bg-card: #0f0f12;
  --line: #1f1f25;
  --line-strong: #2a2a33;
  --text: #ececf1;
  --text-dim: #9a9aa5;
  --text-faint: #5a5a66;
  --accent: #d6c28b;        /* warm brass */
  --accent-dim: #8a7a52;
  --good: #9fd8a4;
  --warn: #e7b26a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0,0,0,0.45), 0 2px 0 rgba(255,255,255,0.02) inset;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: radial-gradient(1200px 700px at 50% -10%, #16161c 0%, var(--bg) 60%);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

.hidden { display: none !important; }

/* --- Top bar --- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark { color: var(--accent); font-size: 14px; }
.brand-name { font-weight: 700; letter-spacing: 0.2em; }
.brand-meta { display: flex; gap: 10px; }
.dot { color: var(--text-faint); }

/* --- Main layout --- */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* --- Intro --- */
.intro h1,
.intro .hero-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(40px, 7.2vw, 72px);
  line-height: 1.02;
  margin: 0 0 14px;
  letter-spacing: -0.028em;
}
.intro h1 em,
.intro .hero-title em {
  font-style: italic;
  color: var(--accent);
}
.intro h1 .red,
.intro .hero-title .red {
  color: #e5826a;
  font-style: italic;
  font-weight: 700;
}
.intro .sub,
.intro .hero-sub {
  color: var(--text-dim);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.5;
  max-width: 640px;
  margin: 0 0 32px;
  font-weight: 500;
}
.intro .hero-sub strong {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.005em;
}
.intro .finepr {
  margin-top: 32px;
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  line-height: 1.55;
}
.faint { color: var(--text-faint); }

/* --- Tier dictionary --- */
.tiers {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.tiers-head { margin-bottom: 22px; }
.tiers-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 32px);
  letter-spacing: -0.01em;
  margin: 2px 0 10px;
}
.tiers-sub {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
  max-width: 620px;
}
.tier-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.tier-grid--alt {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 820px) {
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .tier-grid--alt { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .tier-grid { grid-template-columns: 1fr; }
  .tier-grid--alt { grid-template-columns: 1fr; }
}

.tiers-head--sub { margin-top: 36px; margin-bottom: 4px; }
.tiers-head--sub .eyebrow { margin-bottom: 8px; }
.tiers-head--sub .tiers-sub { margin-top: 0; }

.tier {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  transition: transform .15s, border-color .2s;
}
.tier:hover { transform: translateY(-2px); border-color: var(--accent-dim); }
.tier header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.tier h3 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.22em;
  color: var(--text);
}
.tier-rank {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.tier p {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.55;
}
.tier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tier-tags span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.015);
}

/* Tier-specific color accents (PSL scale) */
.tier--truecel  { --tier-color: #e5826a; }
.tier--normie   { --tier-color: #b89a5d; }
.tier--htn      { --tier-color: #d6c28b; }
.tier--chadlite { --tier-color: #e7d09a; }
.tier--chad     { --tier-color: #9fd8a4; }
.tier--gigachad { --tier-color: #d4e6a8; }

.tier--truecel, .tier--normie, .tier--htn,
.tier--chadlite, .tier--chad, .tier--gigachad {
  border-left: 3px solid var(--tier-color);
}
.tier--truecel h3, .tier--truecel .tier-rank { color: var(--tier-color); }
.tier--normie h3, .tier--normie .tier-rank { color: var(--tier-color); }
.tier--htn h3, .tier--htn .tier-rank { color: var(--tier-color); }
.tier--chadlite h3, .tier--chadlite .tier-rank { color: var(--tier-color); }
.tier--chad h3, .tier--chad .tier-rank { color: var(--tier-color); }
.tier--gigachad h3, .tier--gigachad .tier-rank { color: var(--tier-color); }

.tier--chad, .tier--gigachad {
  background: linear-gradient(180deg, color-mix(in srgb, var(--tier-color) 10%, transparent), transparent 70%);
}

.tier.alt {
  border-style: dashed;
  border-color: var(--line);
  border-left-style: dashed;
  border-left-width: 1px;
  --alt-accent: #cfb4e5;     /* default lavender for any .alt without a sub-variant */
}
.tier.alt h3 { color: var(--alt-accent); }
.tier.alt .tier-rank { color: var(--alt-accent); letter-spacing: 0.14em; font-size: 10px; }

/* Low-score parallel aesthetics — warm coral, signals "brutal read" */
.tier.alt.alt-low  { --alt-accent: #e5826a; }
/* Mid-score — muted amber/brass, signals "middle read" */
.tier.alt.alt-mid  { --alt-accent: #c9b77c; }
/* High-score — lavender, signals "aesthetic read" */
.tier.alt.alt-high { --alt-accent: #cfb4e5; }

/* --- Hero comparison (Incel vs Chad tiles) --- */
.hero-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
  margin: 32px 0 28px;
}
@media (max-width: 620px) {
  .hero-compare {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .hero-divider { display: none; }
}

.hero-tile {
  --tile-accent: var(--accent);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 14px;
  padding: 8px 8px 12px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--tile-accent) 8%, transparent),
    transparent 60%
  );
  border: 1px solid color-mix(in srgb, var(--tile-accent) 22%, var(--line));
  transition: transform .2s ease, border-color .2s ease;
}
.hero-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tile-accent) 45%, var(--line-strong)); }
.hero-tile--low  { --tile-accent: #e5826a; }   /* coral — matches INCEL tier color */
.hero-tile--high { --tile-accent: #9fd8a4; }   /* sage — matches CHAD tier color */

.hero-tile-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid color-mix(in srgb, var(--tile-accent) 30%, var(--line-strong));
}
.hero-tile-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-tile--low .hero-tile-photo img {
  filter: saturate(0.82) brightness(0.92);
}
.hero-tile--high .hero-tile-photo img {
  filter: saturate(1.05) contrast(1.02);
}
.hero-tile-shade {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 55%,
    color-mix(in srgb, var(--tile-accent) 14%, rgba(0,0,0,0.55)) 100%
  );
}
.hero-tile-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 6px 11px;
  background: rgba(10,10,12,0.78);
  border: 1px solid color-mix(in srgb, var(--tile-accent) 45%, var(--line-strong));
  border-radius: 8px;
  font-family: var(--serif);
  font-weight: 800;
  color: var(--tile-accent);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: baseline;
  text-shadow: 0 0 14px color-mix(in srgb, var(--tile-accent) 45%, transparent);
}
.hero-psl-sep {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  margin-left: 3px;
  letter-spacing: 0.04em;
}

.hero-tile figcaption {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 6px;
}
.hero-tier-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-tier {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--tile-accent);
  text-transform: uppercase;
}
.hero-tier-mod {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.hero-tile-tags span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.015);
}

/* Divider between the two tiles (desktop only) */
.hero-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  color: var(--text-faint);
}
.hero-divider-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
  min-height: 40px;
}
.hero-divider-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* --- Hero v2: transition arrow with PSL delta between tiles --- */
.hero-transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 6px;
  min-width: 80px;
}
.hero-transition-arrow {
  font-size: 32px;
  line-height: 1;
  color: #9fd8a4;
  font-weight: 400;
  filter: drop-shadow(0 0 10px rgba(159, 216, 164, 0.45));
  animation: hero-arrow-slide 2.8s ease-in-out infinite;
}
@keyframes hero-arrow-slide {
  0%, 100% { transform: translateX(0); opacity: 0.85; }
  50%      { transform: translateX(4px); opacity: 1; }
}
.hero-transition-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #9fd8a4;
  text-transform: uppercase;
}
@media (max-width: 620px) {
  .hero-transition {
    min-width: 0;
    flex-direction: row;
    grid-column: 1 / -1;
    padding: 8px 0;
  }
  .hero-transition-arrow {
    transform: rotate(90deg);
    font-size: 26px;
  }
  @keyframes hero-arrow-slide {
    0%, 100% { transform: rotate(90deg) translateX(0); opacity: 0.85; }
    50%      { transform: rotate(90deg) translateX(4px); opacity: 1; }
  }
}

/* --- Hero v2: simpler tile captions (just tier label, no tags/mod) --- */
.hero-tile-caption {
  padding: 2px 6px;
  text-align: center;
}
.hero-tile-caption .hero-tier {
  font-size: 12px;
}
.hero-compare--v2 {
  margin-top: 12px;
  margin-bottom: 26px;
}

/* --- Hero v3: compact example comparison --- */
/* Smaller tiles that act as visual reference, not the main content. */
.hero-compare--v3 {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  gap: 14px;
  max-width: 520px;
  margin: 8px 0 28px;
}
.hero-compare--v3 .hero-tile {
  flex: 1 1 0;
  max-width: 240px;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--tile-accent) 6%, transparent),
    transparent 50%
  );
}
.hero-compare--v3 .hero-tile-photo {
  aspect-ratio: 4/5;
  border-radius: 9px;
}
.hero-compare--v3 .hero-tile-badge {
  bottom: 8px;
  left: 8px;
  padding: 4px 9px;
  font-size: 20px;
  border-radius: 7px;
}
.hero-compare--v3 .hero-psl-sep { font-size: 9.5px; }
.hero-compare--v3 .hero-tile-caption {
  padding: 4px 4px 2px;
  text-align: center;
}
.hero-compare--v3 .hero-tier {
  font-size: 10.5px;
  letter-spacing: 0.2em;
}

/* Radial vignette — darkens the cluttered edges so the face pops.
   Keeps things cleaner for the busy-bedroom photo on the incel side. */
.hero-tile-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 85% 70% at 50% 42%,
      transparent 40%,
      rgba(0, 0, 0, 0.28) 76%,
      rgba(0, 0, 0, 0.58) 100%
    );
  border-radius: inherit;
}
.hero-compare--v3 .hero-tile--low  .hero-tile-vignette {
  background:
    radial-gradient(
      ellipse 85% 70% at 50% 42%,
      transparent 38%,
      rgba(20, 8, 4, 0.32) 76%,
      rgba(0, 0, 0, 0.62) 100%
    );
}
.hero-compare--v3 .hero-tile--high .hero-tile-vignette {
  background:
    radial-gradient(
      ellipse 85% 70% at 50% 42%,
      transparent 42%,
      rgba(0, 0, 0, 0.22) 78%,
      rgba(0, 0, 0, 0.50) 100%
    );
}

@media (max-width: 520px) {
  .hero-compare--v3 {
    max-width: 100%;
    gap: 10px;
  }
  .hero-compare--v3 .hero-tile { padding: 4px; }
  .hero-compare--v3 .hero-tile-badge {
    font-size: 18px;
    padding: 3px 8px;
  }
  .hero-compare--v3 .hero-tier { font-size: 10px; }
}

/* --- Reassurance callout: "You aren't cooked." --- */
.hero-reassurance {
  margin: 10px 0 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 9%, transparent),
    color-mix(in srgb, var(--accent) 2%, transparent) 60%,
    transparent
  );
}
.hero-reassurance-mark {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  margin-top: 4px;
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 55%, transparent);
}
.hero-reassurance-body { flex: 1; }
.hero-reassurance-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 24px);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--text);
}
.hero-reassurance-text {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
}

/* --- Hero v2: single dominant CTA + quiet secondary link --- */
.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.cta-primary {
  /* Extra-large, unmistakable primary action */
  padding: 20px 28px;
  font-size: 14px;
  letter-spacing: 0.18em;
  font-weight: 700;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  justify-content: space-between;
  cursor: pointer;
  box-shadow:
    0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent),
    0 8px 28px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: cta-pulse 2.6s ease-in-out infinite;
  transition: transform .12s ease, box-shadow .2s ease;
}
.cta-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent),
    0 10px 32px color-mix(in srgb, var(--accent) 28%, transparent);
}
.cta-primary:active { transform: translateY(0); }
.cta-primary .btn-icon {
  font-size: 20px;
  color: inherit;
  line-height: 1;
}
.cta-primary-label { flex: 1; text-align: left; }
.cta-primary-arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform .2s ease;
}
.cta-primary:hover .cta-primary-arrow { transform: translateX(3px); }

@keyframes cta-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent),
      0 8px 28px color-mix(in srgb, var(--accent) 18%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent),
      0 8px 28px color-mix(in srgb, var(--accent) 18%, transparent);
  }
}

.cta-benefit {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 380px;
  font-weight: 500;
  letter-spacing: -0.002em;
  padding-left: 2px;
}
.cta-benefit strong {
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 520px) {
  .cta-benefit { font-size: 13px; max-width: 100%; }
}

.cta-secondary {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: color .2s ease;
  margin-left: 4px;
}
.cta-secondary:hover { color: var(--text); }
.cta-secondary-link {
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 3px;
  color: var(--text-dim);
}
.cta-secondary:hover .cta-secondary-link {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Compact inline reassurance pill — small, trustworthy, not screaming */
.hero-reassurance-pill {
  margin-top: 14px;
  margin-bottom: 36px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(214, 194, 139, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  line-height: 1.55;
  max-width: 640px;
}
.hero-reassurance-pill .hero-reassurance-mark {
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent);
  flex-shrink: 0;
}
.hero-reassurance-pill strong {
  color: var(--text);
  font-weight: 700;
}
@media (max-width: 520px) {
  .cta-primary {
    min-width: 0;
    width: 100%;
    font-size: 13px;
    padding: 18px 20px;
    letter-spacing: 0.14em;
  }
  .cta-secondary { width: 100%; justify-content: center; }
  .hero-reassurance-pill {
    border-radius: 10px;
    font-size: 11px;
    align-items: flex-start;
  }
  .hero-reassurance-pill .hero-reassurance-mark { margin-top: 2px; }
}

/* --- Legacy CTA row (still used in non-hero contexts) --- */
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.btn.big {
  padding: 18px 24px;
  font-size: 13px;
  letter-spacing: 0.16em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.btn-icon {
  font-size: 18px;
  line-height: 1;
  color: inherit;
  margin: 0;
}
.btn.big .btn-icon { color: currentColor; }
.cta-hint {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 560px;
}
.drop.btn { position: relative; }
.drop.dragover { border-color: var(--accent); background: rgba(214,194,139,0.07); }

/* --- Camera modal --- */
.camera {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 20px) 16px env(safe-area-inset-bottom, 20px);
}
.camera-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 20px) + 8px);
  right: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-strong);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  z-index: 2;
  transition: background .2s;
}
.camera-close:hover { background: rgba(255,255,255,0.15); }

.camera-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 44px;
}
.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: #000;
  transform: scaleX(-1);          /* mirror for natural feel */
}
.camera-video.no-mirror { transform: none; }
.camera-guide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.camera-instruction {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(10,10,12,0.7);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.camera-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #e5826a;
  box-shadow: 0 0 8px #e5826a;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.camera-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 480px;
  padding: 14px 0 6px;
}
.camera-shutter {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s, border-color .2s;
  flex-shrink: 0;
}
.camera-shutter:hover { transform: scale(1.05); border-color: #e4d3a2; }
.camera-shutter:active { transform: scale(0.95); }
.camera-shutter-inner {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  transition: background .15s;
}
.camera-shutter:active .camera-shutter-inner { background: #e4d3a2; }

.camera-error {
  color: #e5826a;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 10px 0 0;
  max-width: 480px;
  line-height: 1.5;
}

/* --- Loading — Blueprint Scanner --- */
.loading {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding-top: 12px;
}
.scanner {
  position: relative;
  width: min(400px, 86vw);
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-strong);
}
.scanner img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.55;
  filter: contrast(1.08) saturate(0.6) brightness(0.85);
}
.bp-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(214,194,139,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214,194,139,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
  animation: grid-drift 14s linear infinite;
}
@keyframes grid-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 24px 24px, 24px 24px; }
}
.scanline {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  top: 0;
  animation: scan 2.4s cubic-bezier(.4,.0,.2,1) infinite;
  box-shadow: 0 0 18px var(--accent);
}
@keyframes scan {
  0% { top: 4%; opacity: 0.9; }
  50% { top: 94%; opacity: 0.9; }
  51% { opacity: 0; }
  99% { opacity: 0; }
  100% { top: 4%; opacity: 0.9; }
}
.bp-landmarks {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.bp-line {
  stroke: var(--accent);
  stroke-width: 0.8;
  fill: none;
  opacity: 0;
  stroke-dasharray: 3 3;
  animation: bp-line-fade 4s ease-in-out infinite;
}
.bp-midline { animation-delay: 0.2s; }
.bp-third:nth-of-type(2) { animation-delay: 0.4s; }
.bp-third:nth-of-type(3) { animation-delay: 0.5s; }
.bp-third:nth-of-type(4) { animation-delay: 0.6s; }
.bp-eye { animation-delay: 0.8s; stroke-width: 1; }
.bp-jaw { animation-delay: 1.0s; stroke-width: 1; stroke-dasharray: 4 4; }
@keyframes bp-line-fade {
  0%, 10% { opacity: 0; stroke-dashoffset: 20; }
  30%, 70% { opacity: 0.65; stroke-dashoffset: 0; }
  90%, 100% { opacity: 0; stroke-dashoffset: 0; }
}
.bp-dot {
  fill: var(--accent);
  opacity: 0;
  animation: bp-dot-appear 4s ease-in-out infinite;
  filter: drop-shadow(0 0 3px var(--accent));
}
@keyframes bp-dot-appear {
  0%, 15% { opacity: 0; r: 0; }
  30%, 70% { opacity: 1; r: 2.5; }
  85%, 100% { opacity: 0; r: 0; }
}

.crosshair {
  position: absolute; width: 22px; height: 22px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}
.crosshair.tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.crosshair.tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; }
.crosshair.bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; }
.crosshair.br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }

.bp-readout {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(10,10,12,0.55);
  border: 1px solid rgba(214,194,139,0.25);
  padding: 5px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  backdrop-filter: blur(3px);
}
.bp-readout-label {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}
.bp-readout-value {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.bp-readout--tl { top: 38px; left: 38px; }
.bp-readout--tr { top: 38px; right: 38px; text-align: right; }
.bp-readout--bl { bottom: 38px; left: 38px; }
.bp-readout--br { bottom: 38px; right: 38px; text-align: right; }
@media (max-width: 420px) {
  .bp-readout { padding: 3px 6px; }
  .bp-readout-label { font-size: 7px; }
  .bp-readout-value { font-size: 10px; }
}

.loading-text {
  font-family: var(--mono);
  color: var(--text-dim);
  letter-spacing: 0.06em;
  font-size: 13px;
}
.blink {
  color: var(--accent);
  animation: blink 1s steps(2, start) infinite;
  margin-right: 6px;
}
@keyframes blink { to { visibility: hidden; } }

/* --- Results card --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.card-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.card-meta { display: flex; gap: 8px; }

.card-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 26px 22px 6px;
}
@media (max-width: 640px) {
  .card-body { grid-template-columns: 1fr; }
}

/* The photo frame is its own 3:4 box so the SVG overlay is always exactly
   the same rectangle as the img. Without align-self: start, the grid cell
   stretches to match the taller .card-info column on desktop and the SVG
   ends up with a different aspect than the img -> overlay misalignment. */
.card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  align-self: start;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
}
.card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* these are now on the parent .card-photo */
  aspect-ratio: auto;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* Face landmark overlay drawn on top of result photo.
   Inherits .card-photo's exact bounds (3:4, matching img). */
.face-overlay {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.face-overlay.empty { display: none; }
.face-overlay .fo-line {
  stroke-width: 0.35;
  fill: none;
  opacity: 0;
  animation: fo-draw .5s ease-out forwards;
  filter: drop-shadow(0 0 0.6px currentColor);
}
.face-overlay .fo-dot {
  opacity: 0;
  animation: fo-dot .4s ease-out forwards;
}
.face-overlay .fo-label {
  font-family: var(--mono);
  font-size: 2.4px;
  letter-spacing: 0.1em;
  fill: currentColor;
  opacity: 0;
  animation: fo-label .4s ease-out forwards;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(0,0,0,0.6);
  stroke-width: 0.6;
}
@keyframes fo-draw {
  0% { stroke-dashoffset: 100; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0.85; }
}
@keyframes fo-dot { to { opacity: 0.9; } }
@keyframes fo-label { to { opacity: 0.75; } }
.vibe-tag {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(10,10,12,0.78);
  border: 1px solid var(--line-strong);
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  backdrop-filter: blur(4px);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

/* --- PSL score block (shown at top of results) --- */
.psl-block {
  /* --psl-hue is set inline by JS based on the score (1.0 → hue 0, 10.0 → hue 120) */
  --psl-color: hsl(var(--psl-hue, 60) 62% 66%);
  --psl-color-dim: hsl(var(--psl-hue, 60) 55% 48%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--psl-color);
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--psl-color) 12%, transparent),
    color-mix(in srgb, var(--psl-color) 3%, transparent)
  );
  margin-bottom: 18px;
}
.psl-score {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--psl-color);
  display: flex;
  align-items: baseline;
  text-shadow: 0 0 20px color-mix(in srgb, var(--psl-color) 35%, transparent);
}
.psl-suffix {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-faint);
  margin-left: 4px;
}
.psl-tier {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.psl-tier-name {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--psl-color);
  text-transform: uppercase;
}
.psl-tier-modifier {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.psl-tier-modifier:empty { display: none; }

@media (max-width: 480px) {
  .psl-score { font-size: 44px; }
  .psl-tier-name { font-size: 12px; }
}
.title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.blurb {
  color: var(--text-dim);
  line-height: 1.62;
  font-size: 15.5px;
  margin: 0;
  white-space: pre-wrap;
}

/* --- Scores --- */
.card-section {
  padding: 22px 22px;
  border-top: 1px solid var(--line);
}
.scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}
@media (max-width: 560px) { .scores { grid-template-columns: 1fr; } }

.score {
  /* --score-hue is set inline: 0 (red) for value 0, 120 (green) for value 100 */
  --score-color: hsl(var(--score-hue, 60) 62% 62%);
  --score-color-dim: hsl(var(--score-hue, 60) 55% 42%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: baseline;
}
.score .label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.score .value {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--score-color);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.score .bar {
  grid-column: 1 / -1;
  height: 5px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}
.score .bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--score-color-dim), var(--score-color));
  border-radius: 99px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--score-color) 30%, transparent);
}
.score .note {
  grid-column: 1 / -1;
  color: var(--text-faint);
  font-size: 12.5px;
  font-family: var(--mono);
  letter-spacing: 0.01em;
  margin-top: 4px;
}

/* --- Terms --- */
.terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 640px) { .terms { grid-template-columns: 1fr; } }
.term {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
}
.term h4 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.005em;
}
.term .def {
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 8px;
}
.term .obs {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin: 0;
}
.term .obs::before {
  content: "› ";
  color: var(--accent-dim);
}

/* --- Card footer --- */
.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --- THE MOVE callout (highest-leverage looksmax action) --- */
.next-move {
  margin-top: 18px;
  padding: 12px 14px 13px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid #9fd8a4; /* sage green — "prescription" signal */
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #9fd8a4 10%, transparent),
    color-mix(in srgb, #9fd8a4 2%, transparent) 65%,
    transparent
  );
}
.move-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: #9fd8a4;
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.move-sub {
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  font-size: 9.5px;
}
.move-text {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

/* --- Prominent Share CTA row (sits after the card-body, before Index) --- */
.card-share-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 9%, transparent),
    transparent 55%
  );
  flex-wrap: wrap;
}
.share-cta {
  padding: 11px 18px;
  font-size: 12px;
  flex-shrink: 0;
}
.share-cta-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .card-share-row { padding: 14px 18px; }
  .share-cta-hint { font-size: 10.5px; }
}

/* --- Shared-view loading override ---
   When someone lands on /r/{id}, there's no actual analysis happening —
   the report is already done. Strip the blueprint scanner animation and
   show a minimal spinner + "Loading shared chadtest..." message. */
body.is-shared .scanner { display: none; }
body.is-shared .loading {
  min-height: 40vh;
  justify-content: center;
  padding-top: 48px;
}
body.is-shared .loading::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(214, 194, 139, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: bp-spin 0.9s linear infinite;
}
body.is-shared .loading-text .blink { display: none; }
body.is-shared .loading-text {
  font-size: 13px;
  color: var(--text-dim);
}
@keyframes bp-spin {
  to { transform: rotate(360deg); }
}

/* --- Shared-view banner (compact top strip) --- */
.shared-banner {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(214,194,139,0.05);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.shared-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shared-banner-link {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line-strong));
  border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.shared-banner-link:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: var(--accent);
  color: #f0e1b8;
}
.shared-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .shared-banner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; }
  .shared-banner-link { align-self: stretch; text-align: center; }
}

/* --- Thin viral CTA (shared views only, sits at the TOP above the card) --- */
.shared-viral-cta--thin {
  margin-top: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line-strong));
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), color-mix(in srgb, var(--accent) 3%, transparent) 55%, transparent),
    var(--bg-card);
  box-shadow: 0 6px 22px rgba(0,0,0,0.28);
  position: relative;
}
.shared-viral-cta--thin::before {
  /* subtle top highlight line */
  content: '';
  position: absolute;
  top: 0; left: 6%; right: 6%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.45;
}
.shared-viral-cta-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.shared-viral-cta-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
.shared-viral-cta-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(19px, 3.2vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--text);
}
.shared-viral-cta-title em {
  color: var(--accent);
  font-style: italic;
}
.shared-viral-cta-btn {
  padding: 12px 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  min-width: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .shared-viral-cta--thin {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 14px;
  }
  .shared-viral-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
  }
}

/* --- Action buttons --- */
.actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn .btn-label { display: inline-block; }
.btn[disabled] { opacity: 0.65; cursor: wait; transform: none !important; }
.btn.success { background: var(--good) !important; color: #0a2912 !important; border-color: var(--good) !important; }
.btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .1s, background .2s, border-color .2s, color .2s;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 700;
}
.btn.primary:hover { background: #e4d3a2; }
.btn.ghost:hover { border-color: var(--accent-dim); color: var(--accent); }
.btn span { margin-right: 6px; }

/* --- Error view --- */
.error {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: var(--bg-card);
}
.error h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 10px;
}
.error p {
  color: var(--text-dim);
  margin: 0 0 18px;
  line-height: 1.55;
}

/* --- Page footer --- */
.footer {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
