/* ===================================================================
   Nazwix – design system & layout
   Dark-ish, professional, responsive.
   Display: Bricolage Grotesque · Body: Schibsted Grotesk (Bunny Fonts)
   =================================================================== */

/* --- Custom properties -------------------------------------------- */
:root {
  /* Palette */
  --bg:          #0f1117;
  --surface:     #171b26;
  --surface-2:   #1e2333;
  --border:      #2a2f42;
  --border-soft: #232840;

  /* Text */
  --text-primary:   #e8eaf0;
  --text-secondary: #8b92a8;
  --text-muted:     #555e79;
  --text-link:      #6db3f2;

  /* Accent / brand */
  --accent:       #5e8bff;
  --accent-hover: #7aa3ff;
  --accent-dim:   rgba(94, 139, 255, 0.15);

  /* Status colours */
  --green:      #2ecc71;
  --green-dim:  rgba(46, 204, 113, 0.12);
  --red:        #e74c3c;
  --red-dim:    rgba(231, 76, 60, 0.12);
  --yellow:     #f39c12;
  --yellow-dim: rgba(243, 156, 18, 0.12);
  --grey:       #555e79;
  --grey-dim:   rgba(85, 94, 121, 0.15);

  /* Score bar colours */
  --score-fill: #5e8bff;

  /* Typography — uncommon neo-grotesks with Latin Extended (PL) */
  --font-body:    'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Schibsted Grotesk', system-ui, sans-serif;
  --font:         var(--font-body);
  --mono:         'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', monospace;

  /* Spacing */
  --radius:   10px;
  --radius-sm: 6px;
  --radius-xs: 4px;

  /* Transitions */
  --transition: 150ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15.5px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

/* --- Utility ------------------------------------------------------- */
.hidden { display: none !important; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ================================================================
   SITE HEADER — Floating three-zone layout
   Logo left · Pill nav center · Actions right
   ================================================================ */

.site-header {
  position: fixed;
  top: 1.1rem;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  pointer-events: none; /* let scroll through empty zones */
}

/* Every direct child becomes pointer-events-aware */
.site-header > * { pointer-events: auto; }

/* ----------------------------------------------------------------
   Logo (left zone)
   ---------------------------------------------------------------- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }

.nav-logo .logo-mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.nav-logo .logo-text {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

/* ----------------------------------------------------------------
   Pill nav (center zone)
   ---------------------------------------------------------------- */
.nav-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: rgba(14, 16, 22, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  /* Top glow indicator (like reference screenshot) */
  isolation: isolate;
}

/* Soft top-center glow */
.nav-pill::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 0 4px 4px;
  filter: blur(2px);
  pointer-events: none;
}

.nav-pill__item {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.nav-pill__item:hover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}

.nav-pill__item--active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 600;
}

.nav-pill__item--active:hover {
  background: rgba(255, 255, 255, 0.13);
}

/* Mobile: hide center labels beyond 3 items */
@media (max-width: 680px) {
  .nav-pill { gap: 0; padding: 4px; }
  .nav-pill__item { padding: 0.38rem 0.65rem; font-size: 0.78rem; }
}

/* ----------------------------------------------------------------
   Right actions zone
   ---------------------------------------------------------------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Nav buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease,
              border-color 180ms ease, transform 120ms ease;
}

.nav-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
}
.nav-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.nav-btn--primary {
  background: #ffffff;
  border: 1px solid transparent;
  color: #0a0c14;
}
.nav-btn--primary:hover {
  background: #e8eaff;
  transform: scale(0.98);
  text-decoration: none;
}

/* ================================================================
   LANGUAGE PICKER — custom dropdown
   ================================================================ */

.lang-picker {
  position: relative;
}

/* Trigger button */
.lang-picker__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem 0.4rem 0.65rem;
  background: rgba(14, 16, 22, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  font-family: var(--font);
}

.lang-picker__trigger:hover,
.lang-picker__trigger[aria-expanded="true"] {
  background: rgba(22, 25, 36, 0.95);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.lang-trigger__flag {
  font-size: 1.05em;
  line-height: 1;
}

.lang-trigger__name {
  font-size: 0.82rem;
}

.lang-trigger__chevron {
  opacity: 0.5;
  transition: transform 200ms ease, opacity 200ms ease;
  flex-shrink: 0;
}

.lang-picker__trigger[aria-expanded="true"] .lang-trigger__chevron {
  transform: rotate(180deg);
  opacity: 0.9;
}

/* Dropdown menu */
.lang-picker__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: rgba(12, 14, 20, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  z-index: 300;

  /* Animate in */
  transform-origin: top right;
  animation: lang-menu-in 160ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lang-menu-in {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.lang-picker__menu.hidden {
  display: none;
}

/* Each language option */
.lang-menu__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  transition: background 100ms ease, color 100ms ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lang-menu__item:last-child { border-bottom: none; }

.lang-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.lang-menu__item--active {
  color: #ffffff;
  font-weight: 500;
}

.lang-menu__flag {
  font-size: 1.1em;
  line-height: 1;
  flex-shrink: 0;
}

.lang-menu__name {
  flex: 1;
}

/* Checkmark — hidden by default, shown only on active item */
.lang-menu__check {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 150ms ease;
}

.lang-menu__item--active .lang-menu__check {
  opacity: 1;
}

/* Backward compat — hide old select-based lang selector */
.lang-selector-select { display: none !important; }


.nav-capsule {
  pointer-events: auto;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  max-width: min(100%, calc(100vw - 1.5rem));
  min-height: 2.5rem;
  margin-inline: auto;
  padding: 0.3rem 0.35rem 0.3rem 0.65rem;
  background: rgba(15, 17, 23, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  /* Clip gooey particles; keep capsule compact */
  overflow: hidden;
  box-sizing: border-box;
}

/* Beat later .logo { align-items: baseline } so mark + wordmark stay centered */
.nav-capsule__brand.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.nav-capsule__brand.logo:hover {
  text-decoration: none;
}

.nav-capsule__brand .logo-mark {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.8rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.nav-capsule__brand .logo-text {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

/* --- Gooey nav (contained soft pill; no contrast-filter blowout) --- */
.gooey-nav {
  --gooey-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gooey-blob: rgba(232, 234, 240, 0.88);
  --gooey-text-active: #0f1117;
  position: relative;
  flex-shrink: 1;
  min-width: 0;
}

.gooey-nav__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 3;
}

.gooey-nav__item {
  position: relative;
  border-radius: 999px;
  flex-shrink: 0;
}

.gooey-nav__item.is-active .nav-link,
.gooey-nav__item:focus-within .nav-link {
  color: var(--gooey-text-active);
  text-shadow: none;
}

.nav-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  transition: color 220ms var(--gooey-ease);
  letter-spacing: 0.01em;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.nav-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.gooey-nav__item.is-active .nav-link:hover {
  color: var(--gooey-text-active);
}

.gooey-nav__effect {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  display: block;
  z-index: 1;
  border-radius: 999px;
  transition:
    left 380ms var(--gooey-ease),
    top 380ms var(--gooey-ease),
    width 380ms var(--gooey-ease),
    height 380ms var(--gooey-ease),
    opacity 220ms ease;
}

.gooey-nav__effect.is-visible {
  opacity: 1;
}

.gooey-nav__effect--text {
  /* Label ghost kept transparent — real link text handles contrast */
  z-index: 2;
  color: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
}

/* Soft morphing pill — no blur/contrast filter (that needed a -36px black
   backdrop and blew the floating capsule apart over the hero). */
.gooey-nav__effect--filter {
  background: var(--gooey-blob);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: scale(0.94);
  transform-origin: center;
  transition:
    left 380ms var(--gooey-ease),
    top 380ms var(--gooey-ease),
    width 380ms var(--gooey-ease),
    height 380ms var(--gooey-ease),
    opacity 220ms ease,
    transform 360ms var(--gooey-ease);
}

.gooey-nav__effect--filter.is-visible,
.gooey-nav__effect--filter.is-active {
  transform: scale(1);
}

.gooey-nav__particle,
.gooey-nav__point {
  display: block;
  opacity: 0;
  width: 8px;
  height: 8px;
  border-radius: 100%;
  transform-origin: center;
  pointer-events: none;
}

.gooey-nav__particle {
  --time: 620ms;
  position: absolute;
  top: calc(50% - 4px);
  left: calc(50% - 4px);
  animation: gooey-particle var(--time) ease 1 -180ms;
}

.gooey-nav__point {
  background: var(--color, var(--gooey-blob));
  opacity: 1;
  animation: gooey-point var(--time) ease 1 -180ms;
}

@keyframes gooey-particle {
  0% {
    transform: rotate(0deg) translate(var(--start-x), var(--start-y));
    opacity: 0.7;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  70% {
    transform: rotate(calc(var(--rotate) * 0.4))
      translate(calc(var(--end-x) * 0.95), calc(var(--end-y) * 0.95));
    opacity: 0.55;
    animation-timing-function: ease;
  }
  100% {
    transform: rotate(calc(var(--rotate) * 0.75))
      translate(calc(var(--end-x) * 0.35), calc(var(--end-y) * 0.35));
    opacity: 0;
  }
}

@keyframes gooey-point {
  0% {
    transform: scale(0);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  35% {
    transform: scale(calc(var(--scale) * 0.5));
    opacity: 0.65;
  }
  70% {
    transform: scale(var(--scale));
    opacity: 0.45;
    animation-timing-function: ease;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gooey-nav__effect,
  .gooey-nav__effect--text,
  .gooey-nav__effect--filter {
    transition: none;
  }

  .gooey-nav__effect--filter.is-visible,
  .gooey-nav__effect--filter.is-active {
    transform: scale(1);
  }

  .gooey-nav__particle,
  .gooey-nav__point {
    animation: none !important;
    display: none;
  }
}

.header-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.1rem;
  flex-shrink: 0;
}

.nav-capsule .lang-selector-select {
  background: transparent;
  border-color: transparent;
  padding: 0.3rem 0.35rem;
  font-size: 0.75rem;
  border-radius: 999px;
  flex-shrink: 0;
  max-width: 5.5rem;
}

.nav-capsule .lang-selector-select:hover,
.nav-capsule .lang-selector-select:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
}

.btn--login {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.38rem 0.95rem;
  background: #ffffff;
  color: #0a0c12;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 99px;
  text-decoration: none;
  transition: background 200ms ease, transform 150ms ease;
  white-space: nowrap;
}

.btn--login:hover {
  background: #e8eaf0;
  text-decoration: none;
  transform: scale(0.98);
}

.btn--account {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.38rem 0.85rem;
  background: transparent;
  color: var(--text-primary, #f8fafc);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 99px;
  border: 1px solid var(--border, #2a3144);
  cursor: pointer;
  white-space: nowrap;
  transition: background 200ms ease, border-color 200ms ease;
}

.btn--account:hover {
  background: var(--surface-2, #181c27);
  border-color: #5e8bff;
}

.account-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(420px, calc(100vw - 2rem));
}

.account-dialog::backdrop {
  background: rgba(8, 10, 16, 0.72);
}

.account-dialog__card {
  background: var(--surface, #181c27);
  border: 1px solid var(--border, #2a3144);
  border-radius: 14px;
  padding: 1.25rem 1.35rem 1.4rem;
  color: var(--text-primary, #f8fafc);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.account-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.account-dialog__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.account-dialog__close {
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.account-dialog__hint {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}

.account-form .field {
  margin-bottom: 0.75rem;
}

.account-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-secondary, #cbd5e1);
}

.account-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, #2a3144);
  background: var(--bg, #0f1117);
  color: inherit;
  font-size: 0.9rem;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.account-github {
  margin-top: 0.75rem;
}

.account-error {
  font-size: 0.82rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid #ef4444;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.85rem;
}

.account-user__email {
  font-size: 0.92rem;
  margin: 0 0 0.85rem;
  word-break: break-all;
}

@media (max-width: 720px) {
  .btn--account {
    padding: 0.28rem 0.55rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 720px) {
  /* Drop Opinie earlier so capsule stays one row on phones */
  .gooey-nav__item:has([href="#testimonials-section"]) {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    top: 0.65rem;
    padding: 0 0.5rem;
  }

  .nav-capsule {
    gap: 0.28rem;
    padding: 0.24rem 0.26rem 0.24rem 0.4rem;
    min-height: 2.2rem;
    max-width: calc(100vw - 1rem);
  }

  .nav-capsule__brand .logo-text {
    display: none;
  }

  .nav-link,
  .gooey-nav__effect--text {
    font-size: 0.7rem;
  }

  .nav-link {
    padding: 0.26rem 0.38rem;
  }

  .header-actions {
    gap: 0.12rem;
  }

  .nav-capsule .lang-selector-select {
    padding: 0.22rem 0.15rem;
    font-size: 0.68rem;
    max-width: 4.2rem;
  }

  .btn--login {
    padding: 0.28rem 0.58rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 380px) {
  .nav-capsule {
    gap: 0.18rem;
    padding: 0.22rem 0.22rem 0.22rem 0.34rem;
  }

  .nav-link {
    padding: 0.24rem 0.32rem;
  }

  .btn--login {
    padding: 0.26rem 0.5rem;
  }
}

.lang-selector-select {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.lang-selector-select:hover, .lang-selector-select:focus {
  border-color: var(--accent);
}

.gate-lang-wrapper {
  margin-top: 1.25rem;
}

/* Full-screen Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--bg);
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  /* Dark gradient stronger on right/top, transparent near bottom-left for readability */
  background:
    linear-gradient(to right, rgba(10,12,18,0.72) 0%, rgba(10,12,18,0.1) 60%, rgba(10,12,18,0.55) 100%),
    linear-gradient(to top, rgba(10,12,18,0.85) 0%, rgba(10,12,18,0.2) 50%, rgba(10,12,18,0.6) 100%);
}

.hero-content {
  position: absolute;
  bottom: 3.5rem;
  left: 3.5rem;
  z-index: 3;
  text-align: left;
  max-width: 580px;
}

/* Make room for fixed header */
.main {
  padding-top: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-badge::before {
  content: "+";
  font-size: 0.9rem;
  color: #818cf8;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.typewriter-dynamic {
  background: linear-gradient(135deg, #a855f7 0%, #818cf8 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  display: inline-block;
  min-height: 1.2em;
}

.typewriter-cursor {
  display: inline-block;
  color: #818cf8;
  font-weight: 300;
  margin-left: 2px;
  animation: typewriter-blink 0.9s infinite;
}

@keyframes typewriter-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: 0.975rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn--ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.35rem;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease;
}

.btn--ghost:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
  text-decoration: none;
}

.hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
  text-align: center;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.2;
  font-family: var(--mono);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Feature Showcase Grid */
.features-section, .how-section {
  margin-bottom: 2.5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.text-center { text-align: center; }

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition), box-shadow 200ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
}

/* Bento card visual diversity — taste-skill fc-- variants */
.fc--accent {
  background: linear-gradient(135deg, #1a1f35 0%, #1e2333 100%);
  border-color: rgba(99, 102, 241, 0.25);
}
.fc--accent .feature-icon { color: #818cf8; }

.fc--domain {
  background: linear-gradient(135deg, #0f2233 0%, #1e2333 100%);
  border-color: rgba(56, 189, 248, 0.2);
}
.fc--domain .feature-icon { color: #38bdf8; }

.fc--legal {
  background: linear-gradient(135deg, #1a2a1a 0%, #1e2333 100%);
  border-color: rgba(46, 204, 113, 0.2);
}
.fc--legal .feature-icon { color: #2ecc71; }

.fc--tm {
  background: linear-gradient(135deg, #2a1a2a 0%, #1e2333 100%);
  border-color: rgba(168, 85, 247, 0.2);
}
.fc--tm .feature-icon { color: #a855f7; }

.fc--dev {
  background: linear-gradient(135deg, #2a1f0f 0%, #1e2333 100%);
  border-color: rgba(243, 156, 18, 0.2);
}
.fc--dev .feature-icon { color: #f39c12; }

.fc--score {
  background: linear-gradient(135deg, #1f2a0f 0%, #1e2333 100%);
  border-color: rgba(46, 204, 113, 0.2);
}
.fc--score .feature-icon { color: #2ecc71; }

.feature-icon {
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 7px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* How It Works Grid */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.how-step {
  position: relative;
  padding-top: 2rem;
}

.step-num {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.how-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.how-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.logo-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* --- Main layout --------------------------------------------------- */
.main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- Section titles ------------------------------------------------ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.features-section .section-title,
.how-section .section-title {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  justify-content: center;
}

/* --- Form ---------------------------------------------------------- */
.form-section { }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.field--full { grid-column: 1 / -1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.req { color: var(--accent); }

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="number"],
textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
  resize: vertical;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

input[type="text"]::placeholder,
textarea::placeholder { color: var(--text-muted); }

/* Field groups (chars / syllables) */
.field-group {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: var(--surface-2);
}

.field-group legend {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0 0.3rem;
  letter-spacing: 0.02em;
}

.triple-input {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

/* Form footer */
.form-footer {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.progress-status {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-height: 1.2em;
}

/* --- Button -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.6rem 1.4rem;
  transition: background var(--transition), opacity var(--transition), transform 80ms ease;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn--secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--border-soft);
  border-color: var(--accent);
}

.btn--sm {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Spinner inside button */
.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .btn-label::after { content: "…"; }
.btn.loading .btn-spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Error banner -------------------------------------------------- */
.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
}

.error-icon { font-size: 1.1rem; line-height: 1.4; flex-shrink: 0; }

.error-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  margin-left: auto;
  padding: 0 0.2rem;
}
.error-close:hover { color: var(--text-primary); }

/* --- Candidates grid ----------------------------------------------- */
.candidates-section { }

.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* Count badge */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
}

.count-badge--muted {
  background: var(--grey-dim);
  color: var(--text-muted);
}

/* --- Candidate card ------------------------------------------------ */
.candidate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: fadeSlideIn 0.25s ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.candidate-card:hover { border-color: var(--border-soft); }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.candidate-name {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.2;
}

.strategy-chip {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.candidate-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.candidate-rationale {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Badge groups */
.badge-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.badge-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Individual badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-xs);
  padding: 0.18rem 0.5rem;
  line-height: 1.4;
  white-space: nowrap;
  cursor: default;
}

.badge a {
  color: inherit;
  text-decoration: none;
}
.badge a:hover { text-decoration: underline; }

.badge--green  { background: var(--green-dim);  color: var(--green); }
.badge--red    { background: var(--red-dim);    color: var(--red); }
.badge--yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge--grey   { background: var(--grey-dim);   color: var(--grey); }
.badge--accent { background: var(--accent-dim); color: var(--accent); }

/* Loading shimmer badge */
.badge--loading {
  background: var(--surface-2);
  color: var(--text-muted);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Trademark disclaimer inline */
.tm-disclaimer {
  font-size: 0.73rem;
  color: var(--yellow);
  background: var(--yellow-dim);
  border-radius: var(--radius-xs);
  padding: 0.3rem 0.5rem;
  line-height: 1.4;
}

/* Web search expandable */
.web-hits-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.72rem;
  padding: 0;
  color: inherit;
}

.web-hits-list {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.web-hit-item a {
  color: var(--text-link);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.web-hit-snippet {
  color: var(--text-muted);
  font-size: 0.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Social low-confidence note */
.social-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Shortlist ----------------------------------------------------- */
.shortlist-section {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  animation: fadeSlideIn 0.3s ease both;
}

.shortlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.shortlist-header .section-title {
  margin-bottom: 0;
}

.shortlist-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.shortlist-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Shortlist row */
.shortlist-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: start;
  gap: 0.75rem;
  animation: fadeSlideIn 0.2s ease both;
}

.rank-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  padding-top: 0.1rem;
}

.rank-1 .rank-number { color: #f1c40f; }
.rank-2 .rank-number { color: #bdc3c7; }
.rank-3 .rank-number { color: #e59866; }

.shortlist-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.shortlist-strategy {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

/* Score bars */
.score-bars {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 7rem 1fr 2.5rem;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
}

.score-bar-label { color: var(--text-muted); }

.score-bar-track {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--score-fill);
  border-radius: 99px;
  transition: width 0.5s ease;
}

.score-bar-value {
  color: var(--text-secondary);
  text-align: right;
}

/* Composite score pill */
.composite-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.score-big {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.score-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stage-chip {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 99px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}

.collision-score {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* --- Filtered section ---------------------------------------------- */
.filtered-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

.filtered-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
}

.filtered-summary:hover { color: var(--text-primary); }

.summary-chevron {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

details[open] .summary-chevron { transform: rotate(180deg); }

.filtered-list {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
}

.filtered-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.55rem;
}

.filtered-item-name {
  color: var(--text-secondary);
  font-weight: 500;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.filtered-reason {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* --- Done summary -------------------------------------------------- */
.done-summary {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* --- Footer -------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.1rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.site-footer strong { color: var(--text-secondary); }

/* --- Responsive ---------------------------------------------------- */
@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field--full { grid-column: auto; }

  .candidates-grid {
    grid-template-columns: 1fr;
  }

  .shortlist-row {
    grid-template-columns: 2rem 1fr;
  }

  .composite-score {
    grid-column: 2 / 3;
    align-items: flex-start;
  }

  .score-bar-row {
    grid-template-columns: 6rem 1fr 2rem;
  }

  .triple-input {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .main { padding: 1rem 1rem 2rem; }
  .card { padding: 1rem; }
}

/* --- Alpha Gatekeeper Overlay ------------------------------------- */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease both;
}

.gate-card {
  max-width: 440px;
  width: 100%;
  padding: 2.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.15);
  text-align: center;
}

.gate-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gate-badge {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  letter-spacing: 0.05em;
}

.gate-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.gate-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.gate-error {
  font-size: 0.82rem;
  color: var(--red);
  background: var(--red-dim);
  border: 1px solid var(--red);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.btn--full {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

/* --- Specular unlock button (React Bits–inspired, CSS + pointer) --- */
@property --sb-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 140deg;
}

@property --sb-intensity {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.32;
}

.specular-btn {
  --sb-radius: 10px;
  --sb-angle: 140deg;
  --sb-intensity: 0.32;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: visible;
  border: none;
  margin: 0;
  padding: 0.8rem 1.25rem;
  border-radius: var(--sb-radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  background:
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.07) 0%,
      rgba(255, 255, 255, 0.02) 42%,
      rgba(0, 0, 0, 0.18) 100%
    ),
    color-mix(in srgb, var(--surface-2) 86%, var(--accent) 14%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity var(--transition);
}

.specular-btn.btn--full {
  width: 100%;
}

.specular-btn:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 10px 26px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(94, 139, 255, 0.14);
}

.specular-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.specular-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
}

.specular-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.specular-btn:disabled:active {
  transform: none;
}

/* Soft outer bleed of the specular streak */
.specular-btn__glow {
  position: absolute;
  inset: -14px;
  border-radius: calc(var(--sb-radius) + 14px);
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(
    from var(--sb-angle),
    transparent 0deg,
    transparent 88deg,
    rgba(94, 139, 255, 0.22) 112deg,
    rgba(255, 255, 255, 0.28) 124deg,
    rgba(94, 139, 255, 0.16) 138deg,
    transparent 168deg,
    transparent 360deg
  );
  opacity: calc(var(--sb-intensity) * 0.55);
  filter: blur(11px);
}

/* Rim stack: quiet base stroke + moving specular highlight */
.specular-btn__fx {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.specular-btn__fx::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: rgba(130, 140, 165, 0.38);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.75;
}

.specular-btn__fx::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.25px;
  background: conic-gradient(
    from var(--sb-angle),
    transparent 0deg,
    transparent 70deg,
    rgba(94, 139, 255, 0.18) 98deg,
    rgba(255, 255, 255, 0.78) 118deg,
    rgba(185, 210, 255, 0.5) 128deg,
    rgba(94, 139, 255, 0.22) 148deg,
    transparent 178deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: var(--sb-intensity);
  filter: blur(0.45px);
}

.specular-btn__label {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .specular-btn__glow {
    opacity: 0.18;
    filter: blur(8px);
  }

  .specular-btn__fx::after {
    opacity: 0.4;
  }
}

/* === Taste-Skill: Scroll-Entry Animations === */
/* Base hidden state — applied before IntersectionObserver fires */
.scroll-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.scroll-reveal-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.in-view .scroll-reveal-item,
.scroll-reveal-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .scroll-reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ======================================================
   Testimonials — vertical infinite marquee
   ====================================================== */

.testimonials-section {
  margin: 0.5rem 0 1.5rem;
  padding: 2.5rem 0 1rem;
}

.testimonials-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.testimonials-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1.1rem;
  letter-spacing: 0.01em;
}

.testimonials-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 0.75rem;
}

.testimonials-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.testimonials-marquee {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  height: min(640px, 72vh);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
}

.testimonials-col {
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.testimonials-track {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  will-change: transform;
  animation: testimonials-marquee-up linear infinite;
}

.testimonials-col--a .testimonials-track {
  animation-duration: 42s;
}

.testimonials-col--b .testimonials-track {
  animation-name: testimonials-marquee-down;
  animation-duration: 58s;
}

.testimonials-col--c .testimonials-track {
  animation-duration: 48s;
}

@keyframes testimonials-marquee-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

@keyframes testimonials-marquee-down {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0); }
}

.testimonials-marquee:hover .testimonials-track,
.testimonials-marquee:focus-within .testimonials-track {
  animation-play-state: paused;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-shrink: 0;
}

.testimonial-quote {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-primary);
  font-weight: 400;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.testimonial-avatar {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: hsl(var(--avatar-hue, 210) 42% 38%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.testimonial-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

@media (max-width: 900px) {
  .testimonials-marquee {
    grid-template-columns: repeat(2, 1fr);
    height: min(560px, 70vh);
  }

  .testimonials-col--c {
    display: none;
  }
}

@media (max-width: 600px) {
  .testimonials-section {
    padding: 1.5rem 0 0.5rem;
  }

  .testimonials-marquee {
    grid-template-columns: 1fr;
    height: min(480px, 65vh);
    gap: 0;
  }

  .testimonials-col--b {
    display: none;
  }

  .testimonials-col--c {
    display: none;
  }

  .testimonial-card {
    padding: 1.2rem 1.15rem 1.1rem;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonials-track {
    animation: none !important;
    transform: none !important;
  }

  .testimonial-card[aria-hidden="true"] {
    display: none;
  }

  .testimonials-marquee {
    height: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .testimonials-col--b,
  .testimonials-col--c {
    display: block;
  }

  @media (max-width: 900px) {
    .testimonials-marquee {
      grid-template-columns: 1fr;
    }

    .testimonials-col--b,
    .testimonials-col--c {
      display: block;
    }
  }
}

/* ======================================================
   Pricing — Free / Pro two-tier
   ====================================================== */

.pricing-section {
  margin: 0.5rem 0 0.25rem;
  padding: 2.75rem 0 1.5rem;
}

.pricing-header {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 2.25rem;
}

.pricing-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 0.75rem;
}

.pricing-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr);
  gap: 1.15rem;
  align-items: stretch;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.65rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pricing-card--pro {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(94, 139, 255, 0.12);
}

.pricing-card__body {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 1.75rem 2rem;
  align-items: start;
  height: 100%;
}

.pricing-card__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.pricing-plan {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.pricing-price {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
}

.pricing-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}

.pricing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 220px;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.pricing-cta:hover {
  text-decoration: none;
}

.pricing-cta--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.pricing-cta--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.38);
}

.pricing-cta--solid {
  background: #e8eaf0;
  color: #0f1117;
  border: 1px solid #e8eaf0;
}

.pricing-cta--solid:hover {
  background: #fff;
  border-color: #fff;
}

.pricing-card__features {
  min-width: 0;
}

.pricing-plus {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.pricing-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.12rem;
  color: var(--text-primary);
}

.pricing-note {
  text-align: center;
  margin-top: 1.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 860px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card__body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pricing-cta {
    max-width: none;
  }
}

@media (max-width: 600px) {
  .pricing-section {
    padding: 2rem 0 1rem;
  }

  .pricing-card {
    padding: 1.4rem 1.25rem 1.3rem;
    border-radius: 14px;
  }

  .pricing-price {
    font-size: 2rem;
  }
}

/* Polar / billing return banner */
.billing-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #0f1117;
  background: #e8eefc;
  border: 1px solid #b7c7ef;
  box-shadow: 0 10px 30px rgba(15, 17, 23, 0.18);
}

.billing-banner--success {
  background: #e7f6ec;
  border-color: #9fd4b0;
}

.billing-banner--info {
  background: #e8eefc;
  border-color: #b7c7ef;
}

.billing-banner[hidden] {
  display: none !important;
}

/* ======================================================
   FAQ Section — Signal-style accordion
   ====================================================== */

.faq-section {
  margin-bottom: 0;
  padding: 1rem 0 0.5rem;
}

/* Header: two-column layout */
.faq-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.25rem;
}

.faq-header__left {
  flex: 1;
  max-width: 600px;
}

.faq-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.faq-headline {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.faq-lead {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 420px;
}

/* Status pill (top-right of header) */
.faq-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  margin-top: 0.25rem;
}

.faq-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: dot-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Accordion list */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Each FAQ card */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 200ms ease;
}

.faq-item:hover {
  border-color: rgba(255,255,255,0.12);
}

/* Trigger button */
.faq-trigger {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  transition: background 150ms ease;
}

.faq-trigger:hover {
  background: rgba(255,255,255,0.03);
}

/* Icon circle (+ / ×) */
.faq-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: border-color 200ms ease, color 200ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-trigger[aria-expanded="true"] .faq-icon {
  border-color: rgba(255,255,255,0.35);
  color: var(--text-primary);
  transform: rotate(45deg);
}

/* Question text */
.faq-question {
  flex: 1;
  color: var(--text-primary);
}

/* Category tag */
.faq-tag {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Answer panel */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-answer > p {
  overflow: hidden;
  padding: 0 1.4rem 0 3.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  transition: padding 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Open state */
.faq-item--open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-item--open .faq-answer > p {
  padding-bottom: 1.25rem;
}

/* Responsive */
@media (max-width: 640px) {
  .faq-header {
    flex-direction: column;
    gap: 1rem;
  }
  .faq-tag {
    display: none;
  }
  .faq-headline {
    font-size: 1.4rem;
  }
}

/* ======================================================
   Chat Overlay — Animated AI Chat (vanilla port)
   ====================================================== */

/* When overlay is open — fade out page header + main */
body.chat-mode .site-header,
body.chat-mode .hero-section,
body.chat-mode .main {
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overlay container */
.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 10, 16, 0.0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(0.4, 0, 0.2, 1),
              background 420ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.chat-overlay--visible {
  opacity: 1;
  pointer-events: all;
  background: rgba(8, 10, 16, 0.97);
}

/* Ambient gradient blobs */
.chat-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.chat-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0;
  transition: opacity 600ms ease;
}

.chat-overlay--visible .chat-blob { opacity: 1; }

.chat-blob--1 {
  width: 600px; height: 600px;
  background: rgba(109, 40, 217, 0.12);
  top: -100px; left: 10%;
  animation: blob-drift-1 12s ease-in-out infinite alternate;
}
.chat-blob--2 {
  width: 500px; height: 500px;
  background: rgba(79, 70, 229, 0.1);
  bottom: -80px; right: 15%;
  animation: blob-drift-2 15s ease-in-out infinite alternate;
}
.chat-blob--3 {
  width: 360px; height: 360px;
  background: rgba(168, 85, 247, 0.08);
  top: 30%; right: 20%;
  animation: blob-drift-3 10s ease-in-out infinite alternate;
}

@keyframes blob-drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 60px) scale(1.1); }
}
@keyframes blob-drift-2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-50px, -30px) scale(1.08); }
}
@keyframes blob-drift-3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -40px) scale(0.95); }
}

/* Close button */
.chat-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
  z-index: 10;
}
.chat-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
}

/* Center content */
.chat-center {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  /* Enter animation */
  transform: translateY(28px);
  opacity: 0;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 500ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 80ms;
}

.chat-overlay--visible .chat-center {
  transform: translateY(0);
  opacity: 1;
}

/* Heading */
.chat-heading {
  text-align: center;
}

.chat-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.38) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.2rem;
}

.chat-title-underline {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.18), transparent);
  margin: 0.3rem auto 0;
  width: 100%;

  /* Animate width in */
  transform: scaleX(0);
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 350ms;
}
.chat-overlay--visible .chat-title-underline { transform: scaleX(1); }

.chat-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.38);
  margin-top: 0.5rem;
}

/* Main card */
.chat-card {
  background: rgba(255,255,255,0.025);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 24px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  transition: border-color 200ms ease;
}

.chat-card:focus-within {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.12) inset,
    0 0 0 4px rgba(139,92,246,0.06),
    0 24px 80px rgba(0,0,0,0.5);
}

/* Textarea */
.chat-input-wrap {
  padding: 1.1rem 1.25rem 0.6rem;
}

.chat-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: rgba(255,255,255,0.88);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.65;
  min-height: 64px;
  max-height: 240px;
  placeholder: rgba(255,255,255,0.2);
  overflow-y: auto;
  scrollbar-width: none;
}
.chat-textarea::-webkit-scrollbar { display: none; }
.chat-textarea::placeholder { color: rgba(255,255,255,0.2); }

/* Attachments */
.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1.25rem 0.5rem;
}

/* Toolbar */
.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.1rem 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  gap: 0.75rem;
}

.chat-toolbar__left { display: flex; align-items: center; gap: 0.5rem; }
.chat-toolbar__right { display: flex; align-items: center; gap: 0.75rem; }

/* Tool button (vibe) */
.chat-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  position: relative;
}
.chat-tool-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.18);
}

/* Vibe dropdown */
.chat-vibe-wrap { position: relative; }

.chat-vibe-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: rgba(18, 20, 32, 0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  z-index: 50;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.chat-vibe-option {
  display: block;
  width: 100%;
  padding: 0.55rem 0.9rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}
.chat-vibe-option:hover { background: rgba(255,255,255,0.07); color: #fff; }
.chat-vibe-option.active {
  color: #a78bfa;
  background: rgba(139,92,246,0.1);
}

/* Char counter */
.chat-char-count {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Send button */
.chat-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 99px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: not-allowed;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}

.chat-send-btn:not(:disabled) {
  background: #ffffff;
  color: #0a0c14;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,255,255,0.12);
}
.chat-send-btn:not(:disabled):hover {
  background: #f0f0ff;
  transform: scale(1.02);
}
.chat-send-btn:not(:disabled):active { transform: scale(0.98); }

.chat-send-btn--loading {
  background: rgba(139,92,246,0.25) !important;
  color: #a78bfa !important;
  cursor: not-allowed !important;
}

/* Loading spinner */
.chat-send-loading {
  animation: spin 1.2s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Quick-start chips row */
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.chat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.025);
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;

  /* Stagger in */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease, transform 400ms cubic-bezier(0.16,1,0.3,1),
              background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.chat-overlay--visible .chat-chip:nth-child(1) { opacity: 1; transform: none; transition-delay: 180ms; }
.chat-overlay--visible .chat-chip:nth-child(2) { opacity: 1; transform: none; transition-delay: 240ms; }
.chat-overlay--visible .chat-chip:nth-child(3) { opacity: 1; transform: none; transition-delay: 300ms; }
.chat-overlay--visible .chat-chip:nth-child(4) { opacity: 1; transform: none; transition-delay: 360ms; }

.chat-chip:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.15);
}

/* Mobile */
@media (max-width: 600px) {
  .chat-center { gap: 1.1rem; }
  .chat-chips  { gap: 0.4rem; }
  .chat-chip   { font-size: 0.75rem; padding: 0.4rem 0.7rem; }
  .chat-title  { font-size: 1.4rem; }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .chat-overlay, .chat-center, .chat-chip,
  .chat-title-underline, .chat-blob {
    transition: none !important;
    animation: none !important;
  }
  .chat-overlay--visible .chat-center { opacity: 1; transform: none; }
  .chat-overlay--visible .chat-chip   { opacity: 1; transform: none; }
}

/* ===================================================================
   Agent canvas — assistant-ui–inspired thread + proposals panel
   =================================================================== */
.chat-overlay--canvas {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.chat-overlay--canvas .chat-close {
  top: 0.85rem;
  right: auto;
  left: 0.85rem;
}

.chat-overlay--canvas .agent-main__header {
  padding-left: 3.25rem;
}

.agent-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.agent-canvas__shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.agent-canvas__body {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.agent-mobile-tabs {
  display: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(12, 14, 22, 0.9);
  padding: 0.35rem 0.75rem 0;
  gap: 0.25rem;
}

.agent-mobile-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.65rem 0.5rem 0.7rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.agent-mobile-tab--active {
  color: rgba(255,255,255,0.92);
  border-bottom-color: var(--accent);
}

.agent-mobile-tab__count {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
}

.agent-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(10, 12, 18, 0.55);
  border-right: 1px solid rgba(255,255,255,0.04);
}

.agent-main__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.015);
}

.agent-main__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.agent-main__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 139, 255, 0.15);
}

.agent-main__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.88);
}

.agent-main__status {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.38);
  font-variant-numeric: tabular-nums;
}

.agent-main__status--live {
  color: #a8b8ff;
}

.agent-main__status--live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  animation: agent-pulse 1.2s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes agent-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.agent-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-behavior: smooth;
}

.agent-msg {
  display: flex;
  gap: 0.7rem;
  max-width: min(720px, 100%);
  animation: agent-msg-in 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes agent-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.agent-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.agent-msg--assistant {
  align-self: flex-start;
}

.agent-msg__avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(94, 139, 255, 0.16);
  color: #c4d2ff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.agent-msg__bubble {
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-msg--user .agent-msg__bubble {
  background: rgba(94, 139, 255, 0.18);
  border: 1px solid rgba(94, 139, 255, 0.22);
  color: rgba(255,255,255,0.92);
  border-bottom-right-radius: 5px;
}

.agent-msg--assistant .agent-msg__bubble {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.72);
  border-bottom-left-radius: 5px;
}

.agent-msg--streaming .agent-msg__bubble::after {
  content: "▍
  display: inline-block;
  width: 0.45em;
  margin-left: 0.15em;
  animation: agent-caret 1s steps(1) infinite;
  color: var(--accent);
}

@keyframes agent-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.agent-inline-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  letter-spacing: -0.02em;
}

.agent-focus-meta {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  vertical-align: middle;
}

.agent-focus-rationale {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

.agent-composer-bar {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0.85rem 1.1rem 1.1rem;
  background: rgba(8, 10, 16, 0.65);
}

.agent-composer-bar__inner {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: 780px;
  margin: 0 auto;
  padding: 0.55rem 0.65rem 0.55rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  transition: border-color 150ms ease;
}

.agent-composer-bar__inner:focus-within {
  border-color: rgba(94, 139, 255, 0.35);
}

.agent-followup {
  flex: 1;
  min-height: 24px;
  max-height: 120px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: rgba(255,255,255,0.88);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.25rem 0;
}

.agent-followup::placeholder { color: rgba(255,255,255,0.28); }

.agent-followup-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.3);
  cursor: not-allowed;
  flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease, transform 120ms ease;
}

.agent-followup-btn:not(:disabled) {
  background: #fff;
  color: #0a0c14;
  cursor: pointer;
}

.agent-followup-btn:not(:disabled):hover { transform: scale(1.04); }

.agent-splitter {
  width: 5px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  touch-action: none;
}

.agent-splitter::after {
  content: "";
  position: absolute;
  inset: 0 1px;
  background: rgba(255,255,255,0.04);
  transition: background 120ms ease;
}

.agent-splitter:hover::after,
body.agent-resizing .agent-splitter::after {
  background: rgba(94, 139, 255, 0.35);
}

body.agent-resizing { cursor: col-resize; user-select: none; }

.agent-panel {
  width: 340px;
  flex: 0 0 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(14, 16, 24, 0.92);
  border-left: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.agent-panel--collapsed {
  display: none;
}

.agent-panel__header {
  padding: 0.95rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}

.agent-panel__title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding-right: 1.75rem;
}

.agent-panel__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.88);
}

.agent-panel__count {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 99px;
  background: rgba(94, 139, 255, 0.14);
  color: #b7c6ff;
}

.agent-panel__filters {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.agent-filter {
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.28rem 0.55rem;
  border-radius: 99px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.agent-filter:hover {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.14);
}

.agent-filter--active {
  background: rgba(94, 139, 255, 0.14);
  border-color: rgba(94, 139, 255, 0.28);
  color: #c8d4ff;
}

.agent-panel__collapse {
  position: absolute;
  top: 0.85rem;
  right: 0.7rem;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.agent-panel__collapse:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.agent-panel-expand {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  z-index: 5;
  writing-mode: vertical-rl;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(20, 24, 36, 0.95);
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 0.4rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-body);
}

.agent-panel-expand:hover {
  color: #fff;
  border-color: rgba(94, 139, 255, 0.35);
}

.agent-proposals {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.agent-proposals__empty {
  margin: 1.5rem 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.32);
}

.agent-proposal {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  color: inherit;
  font-family: var(--font-body);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.agent-proposal:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.agent-proposal--focused {
  border-color: rgba(94, 139, 255, 0.45);
  background: rgba(94, 139, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(94, 139, 255, 0.12);
}

.agent-proposal--filtered {
  opacity: 0.72;
}

.agent-proposal__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.agent-proposal__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.94);
}

.agent-proposal__badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.18rem 0.4rem;
  border-radius: 99px;
  background: var(--green-dim);
  color: var(--green);
}

.agent-proposal--filtered .agent-proposal__badge {
  background: var(--grey-dim);
  color: var(--text-secondary);
}

.agent-proposal__meta {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  font-variant-numeric: tabular-nums;
}

.agent-proposal__rationale {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.52);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agent-proposal__actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.4rem;
}

.claim-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.55rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.claim-btn:hover:not(:disabled) {
  background: rgba(94, 139, 255, 0.16);
  border-color: rgba(94, 139, 255, 0.35);
  color: #fff;
}

.claim-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.claim-btn--claimed {
  border-color: rgba(72, 187, 120, 0.35);
  background: rgba(72, 187, 120, 0.12);
  color: rgba(180, 245, 205, 0.95);
  cursor: default;
}

.shortlist-actions {
  margin-top: 0.55rem;
}

.claim-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  background: rgba(18, 22, 32, 0.94);
  color: #f4f6fb;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.claim-toast--success {
  border-color: rgba(72, 187, 120, 0.4);
}

.claim-toast--warn {
  border-color: rgba(237, 181, 76, 0.45);
}

.claim-toast--error {
  border-color: rgba(229, 98, 98, 0.45);
}

.candidate-card--focused {
  outline: 1px solid rgba(94, 139, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 139, 255, 0.12);
}

@media (max-width: 860px) {
  .agent-mobile-tabs { display: flex; }
  .agent-splitter { display: none !important; }
  .agent-panel__collapse,
  .agent-panel-expand { display: none !important; }

  .agent-canvas__body {
    flex-direction: column;
    position: relative;
  }

  .agent-main {
    border-right: none;
    flex: 1;
    min-height: 0;
  }

  .agent-main--mobile-hidden {
    display: none;
  }

  .agent-panel {
    display: none;
    width: 100% !important;
    flex: 1 !important;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    /* bottom-sheet feel */
    background: linear-gradient(180deg, rgba(18, 20, 30, 0.98), rgba(12, 14, 22, 0.99));
  }

  .agent-panel--mobile-visible {
    display: flex;
  }

  .agent-thread {
    padding: 1rem;
  }

  .agent-msg { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .agent-msg,
  .agent-main__status--live::before,
  .agent-msg--streaming .agent-msg__bubble::after {
    animation: none !important;
  }
}

/* ===================================================================
   Names counter — hero corner (number + delicate label, no chrome)
   =================================================================== */
.names-counter {
  position: absolute;
  right: 3.5rem;
  bottom: 3.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
  user-select: none;
}

.names-counter__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(232, 234, 240, 0.42);
  line-height: 1.2;
  text-align: right;
}

.names-counter__roll {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: var(--rb-gap, 3px);
  overflow: hidden;
  line-height: 1;
  font-family: var(--font-display);
  font-size: var(--rb-font-size, 36px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(248, 250, 252, 0.88);
  padding: 0;
  letter-spacing: -0.02em;
}

.names-counter__digit {
  position: relative;
  width: 0.62em;
  height: 1em;
  overflow: hidden;
  flex-shrink: 0;
}

.names-counter__num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

/* Soft clip fade — no card background, just digit edges */
.names-counter__grad {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  z-index: 1;
}

.names-counter__grad--top {
  top: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 12, 18, 0.55) 0%,
    transparent 100%
  );
}

.names-counter__grad--bottom {
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(10, 12, 18, 0.55) 0%,
    transparent 100%
  );
}

@media (max-width: 860px) {
  .names-counter {
    right: 1.5rem;
    bottom: 1.5rem;
  }

  .names-counter__roll {
    font-size: 28px;
  }

  .names-counter__label {
    font-size: 0.65rem;
  }
}

@media (max-width: 600px) {
  .names-counter {
    right: 1rem;
    bottom: 1.15rem;
  }

  .names-counter__roll {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .names-counter__num {
    transition: none !important;
  }
}
