/* ==========================================================================
   Flip Advisor — Design System
   Dark-first, premium fintech/AI SaaS aesthetic.
   No build step (FTP-only deployment) — plain CSS, custom properties.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #05070c;
  --bg-elevated: #0b0f1a;
  --bg-elevated-2: #101627;
  --bg-header: rgba(6, 9, 16, 0.72);
  --card: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #f4f6fa;
  --text-muted: #98a2b3;
  --text-faint: #626b7e;

  /* Brand */
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --red: #f87171;
  --amber: #fbbf24;
  --gradient-brand: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 55%, var(--green) 100%);
  --gradient-text: linear-gradient(135deg, #7db6ff 0%, #6ee7f5 45%, #6ee7a3 100%);

  /* Elevation */
  --shadow-card: 0 10px 34px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 0 1px rgba(59, 130, 246, 0.18), 0 20px 60px -20px rgba(34, 211, 238, 0.25);

  /* Radii */
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* Layout */
  --container: 1180px;
  --header-h: 76px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
}

/* Background: subtle radial texture, fixed so it never repaints on scroll */
body {
  background-image: radial-gradient(60% 45% at 82% -6%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(50% 40% at 12% 8%, rgba(34, 211, 238, 0.08), transparent 60%),
    radial-gradient(55% 45% at 50% 115%, rgba(34, 197, 94, 0.08), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Focus visibility — accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  z-index: 1000;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 32px;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

section {
  position: relative;
  padding-block: clamp(56px, 9vw, 112px);
}

.section-inner > * + * {
  margin-top: clamp(28px, 4vw, 44px);
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-brand);
  flex: none;
}

h1,
.h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h2,
.h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
}

h3,
.h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.3;
  font-weight: 650;
}

.section-head {
  max-width: 640px;
}

.section-head p {
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 560px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  font-weight: 650;
  font-size: 0.96rem;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease);
  border: 1px solid transparent;
  min-height: 46px;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #04070d;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -12px rgba(34, 211, 238, 0.55);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.02rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg-header);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  flex: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 550;
  transition: color 0.15s var(--ease);
}

.nav-desktop a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn-ghost {
  display: none;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  flex: none;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Mobile nav panel */
.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: #05070c;
  border-top: 1px solid var(--border);
  z-index: 210;
  padding: 28px 20px 40px;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-mobile.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile a {
  display: block;
  padding: 14px 6px;
  font-size: 1.08rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.nav-mobile__actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.nav-mobile__actions .btn {
  width: 100%;
  display: inline-flex;
}

@media (min-width: 960px) {
  .nav-desktop {
    display: block;
  }
  .header-actions .btn-ghost {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
  .nav-mobile {
    display: none;
  }
}

/* Narrow phones: the header CTA + hamburger don't both fit — the CTA already
   lives inside the mobile nav panel, so drop the duplicate to avoid overflow. */
@media (max-width: 480px) {
  .header-actions .btn-primary {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(40px, 7vw, 80px);
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1040px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
  }
}

.hero-copy > * + * {
  margin-top: 20px;
}

.hero-copy h1 {
  max-width: 15ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  color: var(--text-faint);
  font-size: 0.86rem;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-trust svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex: none;
}

/* Hero product visualization card */
.deal-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #080b13 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  padding: 22px;
  max-width: 460px;
  margin-inline: auto;
}

.deal-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deal-card__ai {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deal-card__ai-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.deal-card__ai-badge svg {
  width: 18px;
  height: 18px;
  color: #04070d;
}

.deal-card__ai strong {
  display: block;
  font-size: 0.92rem;
}

.deal-card__ai span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--r-pill);
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.deal-card__device {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.deal-card__device-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.deal-card__device-icon svg {
  width: 22px;
  height: 22px;
  color: var(--cyan);
}

.deal-card__device strong {
  display: block;
  font-size: 0.98rem;
}

.deal-card__device span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.deal-card__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.stat-tile {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}

.stat-tile span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.stat-tile strong {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.stat-tile strong.up {
  color: var(--green);
}

.deal-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.score-ring {
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-ring svg {
  width: 52px;
  height: 52px;
}

.score-ring strong {
  display: block;
  font-size: 1.05rem;
}

.score-ring span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-faint);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--r-pill);
}

.badge-buy {
  background: rgba(34, 197, 94, 0.14);
  color: #6ee7a3;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.badge-caution {
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.badge-skip {
  background: rgba(248, 113, 113, 0.14);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

/* ---------- Logo strip / social proof placeholder removed per no-fake-data rule ---------- */

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.step-card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.step-card__num {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step-card h3 {
  margin-top: 10px;
}

.step-card p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 26px;
  height: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card__icon svg {
  width: 21px;
  height: 21px;
  color: var(--cyan);
}

.feature-card h3 {
  margin-top: 16px;
}

.feature-card p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---------- Example analysis ---------- */
.analysis-wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 980px) {
  .analysis-wrap {
    grid-template-columns: 0.85fr 1.15fr;
  }
}

.analysis-card {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #080b13 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.analysis-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.analysis-card__head strong {
  font-size: 1.1rem;
}

.analysis-card__head span {
  display: block;
  color: var(--text-faint);
  font-size: 0.82rem;
  margin-top: 2px;
}

.analysis-rows {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.analysis-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.96rem;
}

.analysis-row:last-of-type {
  border-bottom: none;
}

.analysis-row span:first-child {
  color: var(--text-muted);
}

.analysis-row strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.analysis-row strong.profit {
  color: var(--green);
}

.analysis-card__footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.analysis-highlights {
  display: grid;
  gap: 14px;
}

.highlight-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.highlight-item__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.highlight-item__icon svg {
  width: 19px;
  height: 19px;
  color: var(--cyan);
}

.highlight-item strong {
  display: block;
  font-size: 0.98rem;
}

.highlight-item p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- AI Advisor ---------- */
.ai-panel {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #080b13 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 3vw, 30px);
  max-width: 680px;
  margin-inline: auto;
}

.ai-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.ai-panel__head strong {
  display: block;
  font-size: 0.98rem;
}

.ai-panel__head span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.chat {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.chat-bubble {
  max-width: 88%;
  padding: 13px 16px;
  border-radius: var(--r-md);
  font-size: 0.94rem;
  line-height: 1.5;
}

.chat-bubble.user {
  justify-self: end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
  justify-self: start;
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-bottom-left-radius: 4px;
}

.chat-bubble.ai ul {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.chat-bubble.ai li {
  display: flex;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.chat-bubble.ai li svg {
  width: 15px;
  height: 15px;
  color: var(--green);
  flex: none;
  margin-top: 3px;
}

.chat-bubble.ai .badge {
  margin-top: 12px;
}

/* ---------- Market data ---------- */
.market-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .market-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .market-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
}

.kpi-card__label {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.kpi-card__value {
  margin-top: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.kpi-card__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 650;
}

.kpi-card__delta.up {
  color: var(--green);
}

.kpi-card__delta.down {
  color: var(--red);
}

.kpi-card svg.spark {
  margin-top: 14px;
  width: 100%;
  height: 40px;
  overflow: visible;
}

.data-note {
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ---------- FAQ ---------- */
.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .plus {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.faq-item summary .plus::before,
.faq-item summary .plus::after {
  content: "";
  position: absolute;
  background: var(--text-muted);
  transition: transform 0.2s var(--ease);
}

.faq-item summary .plus::before {
  width: 10px;
  height: 1.5px;
}

.faq-item summary .plus::after {
  width: 1.5px;
  height: 10px;
}

.faq-item[open] summary .plus::after {
  transform: scaleY(0);
}

.faq-item .faq-answer {
  padding: 0 4px 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 68ch;
}

/* ---------- Final CTA ---------- */
.final-cta {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: radial-gradient(90% 140% at 50% 0%, rgba(59, 130, 246, 0.12), transparent 65%);
}

.final-cta__inner {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.final-cta h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.final-cta .lede {
  margin-inline: auto;
}

.final-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 56px 32px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 34ch;
}

.footer-col h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.footer-col ul {
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.94rem;
  transition: color 0.15s var(--ease);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 0.84rem;
}

/* ---------- Cookie consent ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  max-width: 620px;
  margin-inline: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transform: translateY(140%);
  transition: transform 0.32s var(--ease);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cookie-banner a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  flex: 1 1 auto;
}

/* ---------- Legal pages ---------- */
.legal-page {
  padding-top: clamp(48px, 7vw, 80px);
}

.legal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}

.legal-header p {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-top: 10px;
}

.legal-body {
  margin-top: 36px;
  max-width: 74ch;
}

.legal-body h2 {
  font-size: 1.3rem;
  margin-top: 40px;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body li {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-top: 12px;
}

.legal-body ul {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  padding-left: 20px;
  list-style: disc;
}

.legal-body strong {
  color: var(--text);
}

.legal-placeholder {
  color: var(--amber);
  font-style: italic;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: 60px;
}

.notfound__inner {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.notfound__code {
  font-size: clamp(3.2rem, 12vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

/* ---------- Placeholder page (get-started) ---------- */
.placeholder-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: 60px;
}

.placeholder-card {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 44px);
}

.placeholder-card > * + * {
  margin-top: 16px;
}

/* ---------- Misc utility ---------- */
.text-center {
  text-align: center;
  margin-inline: auto;
}

.mt-0 {
  margin-top: 0 !important;
}

/* ==========================================================================
   Auth pages (login, register, forgot/reset password, verify email, account)
   ========================================================================== */

.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: 48px;
}

.auth-card {
  max-width: 440px;
  margin-inline: auto;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #080b13 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 5vw, 38px);
}

.auth-card__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.auth-card__brand img {
  border-radius: 11px;
}

.auth-form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.form-input::placeholder {
  color: var(--text-faint);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.form-input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.05);
}

.form-input:user-invalid {
  border-color: var(--red);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.form-error {
  font-size: 0.82rem;
  color: var(--red);
  font-weight: 550;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--cyan);
  flex: none;
}

.checkbox-field a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alert {
  margin-top: 20px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.auth-forgot {
  text-align: right;
  font-size: 0.86rem;
  margin-top: -6px;
}

.auth-forgot a,
.auth-switch a {
  color: var(--cyan);
}

.auth-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.oauth-divider {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oauth-buttons {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.oauth-btn {
  position: relative;
  gap: 10px;
  opacity: 0.72;
  cursor: not-allowed;
}

.oauth-btn:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.03);
}

.oauth-soon {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

/* Button loading state, toggled by main.js on form submit */
.btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}
