/* Greenprint – Geist + Geist Mono */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root,
html[data-theme="light"] {
  color-scheme: light;
  --font-sans: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #f8fafc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #475569;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --green: #059669;
  --green-hover: #047857;
  --green-light: #d1fae5;
  --green-bg: #ecfdf5;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --blue-border: #bfdbfe;
  --algo-blue: #2563eb;
  --algo-blue-bg: #eff6ff;
  --algo-blue-border: #bfdbfe;
  --red: #dc2626;
  --red-light: #fee2e2;
  --gold: #d97706;
  --gold-light: #fef3c7;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --header-h: 72px;
  --nav-active-bg: #eef2f6;
  --nav-hover-bg: #f1f5f9;
  --card-foot: #fafbfc;
  --toggle-track: #e2e8f0;
  --toggle-thumb: #ffffff;
  --logo-filter: none;
  --quote-bg: rgba(236, 253, 245, 0.7);
  --problem-section-bg: linear-gradient(180deg, var(--bg) 0%, #fff5f5 100%);
  --problem-card-bg: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
  --problem-card-border: #fecaca;
  --proof-section-bg: linear-gradient(180deg, var(--bg) 0%, #eff6ff 100%);
  --pricing-featured-bg: linear-gradient(180deg, var(--surface) 0%, var(--green-bg) 100%);
  --cta-section-bg: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 40%, #a7f3d0 78%, #6ee7b7 100%);
  --pill-border: #a7f3d0;
  --signature-filter: brightness(0);
  --btn-on-accent: #ffffff;
  --btn-secondary-hover: #e2e8f0;
  --btn-solid-bg: #f1f5f9;
  --btn-solid-color: #334155;
  --btn-solid-border: #e2e8f0;
  --btn-solid-hover: #e2e8f0;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0c;
  --bg-alt: #0c0c0c;
  --surface: #0c0c0c;
  --surface-2: #121212;
  --surface-3: #1a1a1a;
  --text: #ededed;
  --text-muted: #8b8b8b;
  --text-soft: #b4b4b4;
  --border: #2e2e2e;
  --border-strong: #3e3e3e;
  --green: #3ecf8e;
  --green-hover: #34b87c;
  --green-light: #1a3d2e;
  --green-bg: #12241b;
  --blue: #a3a3a3;
  --blue-light: #242424;
  --blue-border: #3e3e3e;
  --algo-blue: #60a5fa;
  --algo-blue-bg: #0f1a2e;
  --algo-blue-border: #1e3a5f;
  --red: #f87171;
  --red-light: #3f1a1a;
  --gold: #fbbf24;
  --gold-light: #3a2a0a;
  --purple: #c4c4c4;
  --purple-light: #242424;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  --nav-active-bg: #1a1a1a;
  --nav-hover-bg: #151515;
  --card-foot: #0c0c0c;
  --toggle-track: #2e2e2e;
  --toggle-thumb: #ededed;
  --logo-filter: brightness(0) invert(1);
  --quote-bg: rgba(18, 36, 27, 0.9);
  --problem-section-bg: var(--bg);
  --problem-card-bg: linear-gradient(180deg, #141414 0%, #1a1212 100%);
  --problem-card-border: #5c3333;
  --proof-section-bg: var(--bg);
  --pricing-featured-bg: linear-gradient(180deg, var(--surface) 0%, var(--green-bg) 100%);
  --cta-section-bg: linear-gradient(145deg, #0a1f18 0%, #0c281f 40%, #0a3326 75%, #07241b 100%);
  --pill-border: #1f4d3a;
  --signature-filter: brightness(0) invert(1);
  --btn-on-accent: #0c0c0c;
  --btn-secondary-hover: #2e2e2e;
  --btn-solid-bg: #242424;
  --btn-solid-color: #e5e5e5;
  --btn-solid-border: #3e3e3e;
  --btn-solid-hover: #2e2e2e;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.logo,
.dashboard-logo img,
.dashboard-logo-mark,
.auth-page-logo img {
  filter: var(--logo-filter);
  transition: filter 0.25s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding-left: 1.1rem; }
p { margin: 0 0 1rem; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.container.narrow { max-width: 960px; }

.section { padding: 4.5rem 0; scroll-margin-top: calc(var(--header-h) + 1rem); }
.section-alt { background: var(--bg-alt); }

main > .section + .section {
  border-top: 1px solid var(--border);
}

.center { text-align: center; }
.center-block { margin-inline: auto; }

#reviews .container.narrow:first-of-type {
  text-align: center;
}

.eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.eyebrow.center { text-align: center; }
.eyebrow-red { color: var(--red); }
.eyebrow-blue { color: var(--blue); }

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

.lead, .subtext {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 42rem;
}

.subtext.center {
  margin-inline: auto;
  text-align: center;
}

.highlight {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highlight-blue { background-image: linear-gradient(135deg, #2563eb, #60a5fa); }
.highlight-green { background-image: linear-gradient(135deg, #059669, #34d399); }
.highlight-red { background-image: linear-gradient(135deg, #dc2626, #f87171); }

/* Header */
.site-shell {
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

html[data-theme="dark"] .site-header {
  background: rgba(12, 12, 12, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.header-theme-menu {
  margin-left: 0.15rem;
}

.nav-theme-menu {
  margin-left: 0.15rem;
}

.nav-theme-menu .theme-menu-panel {
  right: 0;
  left: auto;
}

.logo {
  width: clamp(96px, 18vw, 128px);
  height: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

.nav-duo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-duo-login {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0;
  font-weight: 500;
  white-space: nowrap;
}

.nav-duo-login:hover { color: var(--text); }

.nav-duo-register {
  padding: 0.45rem 0.8rem !important;
  font-size: 0.85rem !important;
}

.site-nav .nav-duo-register:hover { color: var(--green-hover, var(--green)) !important; }

.nav-separator {
  width: 1px;
  height: 1.6rem;
  background: var(--border-strong, var(--border));
  display: inline-block;
  margin: 0 -0.05rem;
}

.nav-cta {
  background: var(--green-bg);
  color: var(--green) !important;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--green) 32%, var(--border));
  font-weight: 500;
  font-size: 0.82rem;
}

.nav-cta:hover {
  background: color-mix(in srgb, var(--green-bg) 70%, var(--green) 12%);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  color: var(--green-hover, var(--green)) !important;
}

/* Buttons — soft platform style */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  line-height: 1.25;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--surface-3, color-mix(in srgb, var(--text) 5%, transparent));
  color: var(--text);
  border-color: var(--border-strong, var(--border));
}

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

.btn-primary {
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green) 32%, var(--border));
  color: var(--green);
  box-shadow: none;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--green-bg) 70%, var(--green) 12%);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  color: var(--green-hover, var(--green));
}

.btn-secondary {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-3, color-mix(in srgb, var(--text) 5%, transparent));
  color: var(--text);
  border-color: var(--border-strong, var(--border));
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted, var(--text-soft));
  border-color: transparent;
  padding-inline: 0.65rem;
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-color: transparent;
  color: var(--text);
}

.btn-block { width: 100%; }
.btn-lg { padding: 0.65rem 1.15rem; font-size: 0.92rem; }

/* Landing page spacing */
.landing .section {
  padding: 6.25rem 0;
}

.landing .hero {
  padding-top: 7rem;
  padding-bottom: 8rem;
}

.landing .hero-stack {
  gap: 2.25rem 3rem;
}

.landing .hero-actions .btn-row {
  margin-top: 1.6rem;
}

.landing .container {
  width: min(100% - 2.75rem, var(--max));
}

/* Full-viewport hero height on tablet/desktop (content stays in container width) */
@media (min-width: 901px) {
  .landing .hero {
    box-sizing: border-box;
    min-height: calc(100svh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .landing .hero-stack {
    /* keep .container max-width — do not stretch edge-to-edge */
    width: min(100% - 2.75rem, var(--max));
    margin-inline: auto;
    align-items: center;
    gap: 2rem 3rem;
  }

  .landing .hero-media {
    align-self: center;
  }
}

@media (max-width: 900px) {
  .landing .hero {
    min-height: 0;
    display: block;
    padding-top: 5rem;
    padding-bottom: 5.75rem;
  }

  .landing .hero-stack {
    gap: 1.85rem;
  }
}

@media (max-width: 768px) {
  .landing .section {
    padding: 4.25rem 0;
  }

  .landing .hero.section {
    min-height: 0;
    display: block;
    padding-top: 5rem;
    padding-bottom: 5.75rem;
  }
}

/* Hero */
.hero {
  padding-top: 5.5rem;
  padding-bottom: 6.5rem;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.hero-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "intro media"
    "actions media";
  gap: 2rem 3rem;
  align-items: start;
}

.hero-intro { grid-area: intro; }
.hero-media { grid-area: media; align-self: center; }
.hero-actions { grid-area: actions; }

.hero-intro h1 {
  margin-bottom: 0;
}

.hero-actions .btn-row {
  margin-top: 1.35rem;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.trust-pills li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--green-bg);
  border: 1px solid var(--pill-border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.trust-badge {
  width: 120px;
  margin-bottom: 1.25rem;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Cards */
.cards {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-problem {
  padding: 1.75rem;
  background: var(--problem-card-bg);
  border-color: var(--problem-card-border);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--red-light);
  color: var(--red);
  margin-bottom: 0.75rem;
}

.card-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.section-problem {
  background: var(--problem-section-bg);
}

.card-problem h3 { color: var(--text); }
.card-problem p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* Product cards */
.card-product {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-banner {
  height: 140px;
  background-size: cover;
  background-position: center;
}

.card-banner-1 { background-image: url("assets/media/solution-signals.svg"); }
.card-banner-2 { background-image: url("assets/media/solution-tradingview.svg"); }
.card-banner-3 { background-image: url("assets/media/solution-bots.svg"); }

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body ul {
  color: var(--text-soft);
  font-size: 0.92rem;
  flex: 1;
}

.card-link {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--green);
  font-size: 0.9rem;
}

.card-link:hover { text-decoration: underline; }

.card-product-featured {
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.badge-product {
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
}

/* Founder (Timeline) */
.founder-timeline {
  max-width: 960px;
  margin-inline: auto;
}

.founder-header {
  max-width: 34rem;
  margin-bottom: 2rem;
}

.founder-header h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.founder-lead {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 1rem;
}

.founder-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.founder-photo {
  margin: 0;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.founder-steps {
  position: relative;
  padding-left: 1.5rem;
}

.founder-steps::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 20%, var(--border)));
  border-radius: 2px;
}

.founder-step {
  position: relative;
  padding-bottom: 1.35rem;
}

.founder-step:last-child {
  padding-bottom: 0;
}

.founder-step::before {
  content: "";
  position: absolute;
  left: -1.28rem;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-bg);
}

.founder-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.founder-step h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.founder-step p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.55;
}

/* Stats (Noah) */
.founder-stats {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.founder-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0.75rem;
  text-align: center;
}

.founder-stat-value {
  font-family: var(--font-mono);
  color: var(--green);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.founder-stat-label {
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.82rem;
}

.signature {
  width: 128px;
  filter: var(--signature-filter);
}

/* Pricing */
.pricing-cards {
  align-items: stretch;
}

.card-pricing {
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-pricing-featured {
  border-color: var(--green);
  box-shadow: var(--shadow);
  background: var(--pricing-featured-bg);
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--green);
  color: var(--btn-on-accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  flex: 1 1 auto;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.price {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 1.35rem 0 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  line-height: 1;
}

.price-muted {
  font-size: 1.35rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

.card-pricing > .btn {
  margin-top: 0;
  width: 100%;
}

.pricing-note {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: -0.25rem 0 0.5rem;
  min-height: 2.7em;
}

/* Testimonials */
.testimonial-marquee {
  margin-top: 2.5rem;
  overflow: hidden;
  padding: 1rem 0 2rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.testimonial-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: scroll 40s linear infinite;
}

.testimonial-marquee:hover .testimonial-track {
  animation-play-state: paused;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.testimonial-card {
  flex: 0 0 min(320px, 85vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.section-proof {
  background: var(--proof-section-bg);
}

.proof-headline-lead,
.proof-headline-rest {
  display: inline;
}

.proof-headline-rest::before {
  content: ' — ';
}

@media (min-width: 901px) {
  .proof-headline-lead,
  .proof-headline-rest {
    display: block;
  }

  .proof-headline-rest::before {
    content: none;
  }
}

.trustpilot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  max-width: 100%;
  margin: 1rem auto 0;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  color: var(--text-soft);
}

.trustpilot-stars {
  color: var(--blue);
  letter-spacing: 1px;
}

.reviews-divider {
  max-width: 960px;
  margin: 2.5rem auto 0;
  border-top: 1px solid var(--border);
}

.stars {
  color: var(--blue);
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.wins-block {
  margin-top: 2.5rem;
}

.testimonial-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.testimonial-card footer strong { display: block; font-size: 0.95rem; }
.testimonial-card footer span { color: var(--text-muted); font-size: 0.85rem; }

/* Wins grid */
.wins-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.win-thumb {
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.win-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.wins-grid img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  aspect-ratio: 3/4;
  object-fit: cover;
  width: 100%;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  border: none;
  cursor: pointer;
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 520px);
  max-height: 90vh;
}

.lightbox-img {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* FAQ */
.faq { margin-top: 2rem; }

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

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 2rem 1.1rem 0;
  font-weight: 500;
  position: relative;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--green);
  font-weight: 400;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  padding: 0 0 1.1rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.step-card h3 { margin-bottom: 0.5rem; }
.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA */
.cta-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--cta-section-bg);
  border-top: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.55;
  pointer-events: none;
}

html[data-theme="dark"] .cta-section::before {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
  opacity: 0.4;
}

.cta-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 20%, color-mix(in srgb, #6ee7b7 35%, transparent), transparent 62%),
    radial-gradient(ellipse 55% 50% at 88% 80%, color-mix(in srgb, #a7f3d0 40%, transparent), transparent 58%);
  pointer-events: none;
}

html[data-theme="dark"] .cta-section::after {
  background:
    radial-gradient(ellipse 70% 55% at 18% 20%, color-mix(in srgb, #047857 28%, transparent), transparent 62%),
    radial-gradient(ellipse 55% 50% at 88% 80%, color-mix(in srgb, #065f46 24%, transparent), transparent 58%);
}

.cta-section > .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 { margin-bottom: 0.75rem; }

.cta-section .subtext {
  color: color-mix(in srgb, var(--text) 78%, var(--text-muted));
}

/* Auth Pages (register/login) */
.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
}

.auth-page-logo {
  display: block;
  margin-bottom: 0.75rem;
}

.auth-page-logo img {
  width: 110px;
  height: auto;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.auth-form-side {
  padding: 1.35rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.auth-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.auth-form-side h1 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.auth-message {
  min-height: 1.1rem;
  margin: -0.35rem 0 0.75rem;
  color: #dc2626;
  font-size: 0.8rem;
}

.auth-message-success {
  color: var(--green);
}

.verify-email-text,
.verify-email-hint {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.verify-email-text strong {
  color: var(--text);
  font-weight: 600;
}

.verify-email-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.verify-email-steps {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.verify-email-steps li {
  margin-bottom: 0.35rem;
}

.verify-email-message {
  margin: 0 0 0.85rem;
}

.verify-email-switch {
  margin-top: 1rem;
}

a.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

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

.form-grid-name {
  margin-bottom: 0;
}

.form-grid-name .form-field {
  margin-bottom: 0.65rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.65rem;
}

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

.form-field label:not(.sr-only) {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.auth-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--green);
}

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

.auth-submit {
  padding: 0.7rem 1rem !important;
  font-size: 0.92rem !important;
  border-radius: 8px !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

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

.auth-social {
  display: flex;
  gap: 0.65rem;
}

.btn-social {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-social:hover {
  background: var(--bg);
  border-color: var(--border-strong);
}

.btn-social-full {
  flex: 1 1 100%;
}

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

.auth-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-link:hover {
  color: #047857;
}

.site-footer-auth {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding: 1.25rem 0 1.5rem;
}

.site-footer-auth .footer-inner {
  font-size: 0.78rem;
}

.site-footer-auth .footer-inner nav {
  gap: 1rem;
}

.site-footer-auth .footer-disclaimer {
  margin-top: 1rem;
  padding-top: 1rem;
}

.site-footer-auth .footer-disclaimer p {
  font-size: 0.72rem;
}

/* Dashboard (Supabase-inspired, light) */
.dashboard-body {
  background: var(--bg);
}

.dashboard-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--dashboard-sidebar-w, 260px) minmax(0, 1fr) var(--gp-rail-col, 44px);
  background: var(--bg);
  transition: grid-template-columns 0.22s ease;
  --gp-rail-w: 44px;
  --gp-assistant-w: 380px;
  --gp-rail-col: var(--gp-rail-w);
  --gp-mobile-dock-height: 62px;
}

.dashboard-app:has(.gp-right-shell[data-open="true"]) {
  --gp-rail-col: calc(var(--gp-assistant-w) + var(--gp-rail-w));
}

@media (max-width: 1100px) {
  /* Soft open must not reserve a desktop-sized right column on mobile. */
  .dashboard-app:has(.gp-right-shell[data-open="true"]) {
    --gp-rail-col: 0px;
  }
}

/* Desktop: lock shell height so only the main column scrolls (sidebar stays put). */
@media (min-width: 1101px) {
  html:has(body.dashboard-body),
  body.dashboard-body {
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
  }

  .dashboard-app {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: minmax(0, 1fr);
  }

  .dashboard-sidebar {
    position: relative;
    top: auto;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .dashboard-nav-wrap {
    overscroll-behavior: contain;
  }

  .dashboard-main-wrap {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }

  .dashboard-main {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .gp-right-shell {
    align-self: stretch;
    height: 100%;
    max-height: 100%;
    position: relative;
    top: auto;
  }
}

.dashboard-backdrop {
  display: none;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.dashboard-logo-block {
  flex-shrink: 0;
  height: 56px;
  padding: 0 1.15rem;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
}

.dashboard-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  min-width: 0;
}

.dashboard-logo-full {
  width: auto;
  height: 26px;
  max-width: 118px;
}

.dashboard-logo-mark {
  display: none;
  width: 28px;
  height: 28px;
  color: var(--text);
}

.dashboard-sidebar-collapse {
  display: none;
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  place-items: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.22s ease;
}

.dashboard-sidebar-collapse:hover {
  background: var(--nav-hover-bg);
  color: var(--text);
  border-color: color-mix(in srgb, var(--border) 70%, var(--text-muted));
}

.dashboard-sidebar-collapse svg {
  width: 1rem;
  height: 1rem;
}

.dashboard-link-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.dashboard-link-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  color: currentColor;
  opacity: 0.82;
}

.dashboard-link.active .dashboard-link-icon {
  opacity: 1;
  color: var(--green);
}

.dashboard-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.dashboard-signout-icon {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.dashboard-signout-label {
  display: none;
}

.dashboard-nav-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dashboard-nav-group[hidden] {
  display: none !important;
}

.dashboard-nav-label {
  margin: 0;
  padding: 0 0.55rem 0.15rem;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.85;
}

.dashboard-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dashboard-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  transition: background 0.15s, color 0.15s;
}

.dashboard-link-label {
  flex: 1;
  min-width: 0;
}

.dashboard-link-label-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.nav-beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #2563eb;
  background: color-mix(in srgb, #2563eb 10%, var(--surface));
  border: 1px solid color-mix(in srgb, #2563eb 26%, var(--border));
}

html[data-theme="dark"] .nav-beta-badge {
  color: #93c5fd;
  background: color-mix(in srgb, #2563eb 16%, var(--surface));
  border-color: color-mix(in srgb, #2563eb 34%, var(--border));
}

.dashboard-link.active .nav-beta-badge {
  color: #1d4ed8;
  background: color-mix(in srgb, #2563eb 14%, var(--surface-2));
}

html[data-theme="dark"] .dashboard-link.active .nav-beta-badge {
  color: #bfdbfe;
}

.nav-soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #a16207;
  background: color-mix(in srgb, #eab308 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #eab308 28%, var(--border));
}

html[data-theme="dark"] .nav-soon-badge {
  color: #fde68a;
  background: color-mix(in srgb, #eab308 14%, var(--surface));
  border-color: color-mix(in srgb, #eab308 32%, var(--border));
}

.dashboard-link.active .nav-soon-badge {
  color: #92400e;
  background: color-mix(in srgb, #eab308 16%, var(--surface-2));
}

html[data-theme="dark"] .dashboard-link.active .nav-soon-badge {
  color: #fef3c7;
}

.nav-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  line-height: 1;
}

.nav-access-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 22%, transparent);
}

.nav-access-lock {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  opacity: 0.72;
}

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

.dashboard-link.is-nav-unlocked .nav-access-badge {
  opacity: 1;
}

.dashboard-link.is-nav-locked .nav-access-badge {
  opacity: 0.9;
}

.dashboard-link:hover {
  background: var(--nav-hover-bg);
  color: var(--text);
}

.dashboard-link.active {
  background: color-mix(in srgb, var(--green-bg) 85%, transparent);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--green);
}

/* Desktop sidebar collapse */
@media (min-width: 1101px) {
  .dashboard-sidebar-collapse {
    display: inline-grid;
  }

  .dashboard-app.sidebar-collapsed {
    --dashboard-sidebar-w: 72px;
  }

  .dashboard-sidebar.is-collapsed .dashboard-logo-block {
    justify-content: center;
    padding: 0.65rem 0.35rem;
  }

  .dashboard-sidebar.is-collapsed .dashboard-logo {
    justify-content: center;
  }

  .dashboard-sidebar.is-collapsed .dashboard-logo-full {
    display: none;
  }

  .dashboard-sidebar.is-collapsed .dashboard-logo-mark {
    display: block;
  }

  .dashboard-sidebar.is-collapsed .dashboard-sidebar-collapse svg {
    transform: rotate(180deg);
  }

  .dashboard-sidebar.is-collapsed .dashboard-nav-wrap {
    padding: 0.55rem 0.35rem 0.75rem;
    gap: 0.45rem;
    overflow-x: hidden;
  }

  .dashboard-sidebar.is-collapsed .dashboard-nav-group {
    gap: 0.15rem;
  }

  .dashboard-sidebar.is-collapsed .dashboard-nav {
    gap: 0.15rem;
  }

  .dashboard-sidebar.is-collapsed .dashboard-nav-label {
    display: none !important;
  }

  .dashboard-sidebar.is-collapsed .dashboard-link {
    justify-content: center;
    padding: 0.55rem 0.25rem;
    gap: 0;
    overflow: hidden;
  }

  .dashboard-sidebar.is-collapsed .dashboard-link-inner {
    justify-content: center;
    flex: 0;
    gap: 0;
    width: 100%;
  }

  .dashboard-sidebar.is-collapsed .dashboard-link-inner > :not(.dashboard-link-icon) {
    display: none !important;
  }

  .dashboard-sidebar.is-collapsed .dashboard-link-label,
  .dashboard-sidebar.is-collapsed .nav-beta-badge,
  .dashboard-sidebar.is-collapsed .nav-soon-badge,
  .dashboard-sidebar.is-collapsed .nav-access-badge {
    display: none !important;
  }

  .dashboard-sidebar.is-collapsed .dashboard-link-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0 auto;
  }

  .dashboard-sidebar.is-collapsed .dashboard-sidebar-footer {
    padding: 0.65rem 0.4rem;
    align-items: center;
  }

  .dashboard-sidebar.is-collapsed .dashboard-sidebar-footer-row {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }

  .dashboard-sidebar.is-collapsed .dashboard-user {
    justify-content: center;
  }

  .dashboard-sidebar.is-collapsed .dashboard-user-meta {
    display: none;
  }

  .dashboard-sidebar.is-collapsed .dashboard-sidebar-collapse {
    width: 1.85rem;
    height: 1.85rem;
  }

  .dashboard-sidebar.is-collapsed .dashboard-signout {
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border-radius: 8px;
  }

  .dashboard-sidebar.is-collapsed .dashboard-signout-icon {
    display: block;
  }

  .dashboard-sidebar.is-collapsed .dashboard-signout-label {
    display: none !important;
  }
}

.dashboard-sidebar-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.55rem 0.65rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.dashboard-sidebar-footer-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.dashboard-user-avatar {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dashboard-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dashboard-user-label {
  display: none;
}

.dashboard-user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.dashboard-signout {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dashboard-signout:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.dashboard-signout-icon {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.dashboard-signout-label {
  display: none;
}

.dashboard-main-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.dashboard-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: 56px;
  min-height: 56px;
  box-sizing: border-box;
  padding: 0 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.dashboard-topbar-spacer {
  flex: 1;
  min-width: 0;
}

.theme-menu,
.lang-menu {
  position: relative;
  flex-shrink: 0;
}

.theme-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 30px;
  padding: 0 0.55rem 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.theme-menu-trigger:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-menu-trigger:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.theme-menu-trigger-icon {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.85;
}

.theme-menu-icon .theme-menu-trigger {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.theme-menu-icon .theme-menu-trigger-icon {
  width: 15px;
  height: 15px;
}

.lang-menu.theme-menu-icon .lang-menu-trigger {
  width: 34px;
  min-width: 34px;
  padding: 0;
  justify-content: center;
}

.lang-menu-globe {
  opacity: 0.85;
}

.lang-menu.is-open .theme-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.theme-menu-caret {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.theme-menu.is-open .theme-menu-caret {
  transform: rotate(180deg);
}

.theme-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  min-width: 132px;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.theme-menu.is-open .theme-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.theme-menu-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.theme-menu-option:hover {
  background: var(--surface-3);
  color: var(--text);
}

.theme-menu-option.is-active {
  color: var(--text);
  background: var(--surface-3);
}

.theme-menu-check {
  width: 12px;
  height: 12px;
  opacity: 0;
  color: var(--green);
}

.theme-menu-option.is-active .theme-menu-check {
  opacity: 1;
}

.auth-theme-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-theme-wrap .theme-menu-panel {
  z-index: 100;
}

.dashboard-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.dashboard-menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.dashboard-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}

.dashboard-breadcrumb-root-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex-shrink: 1;
}

.dashboard-breadcrumb-root {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.dashboard-breadcrumb-version {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0.88;
}

.dashboard-breadcrumb-env {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}

.dashboard-breadcrumb-env.is-staging {
  color: #92400e;
  background: color-mix(in srgb, #f59e0b 14%, var(--surface));
  border: 1px solid color-mix(in srgb, #f59e0b 30%, var(--border));
}

html[data-theme="dark"] .dashboard-breadcrumb-env.is-staging {
  color: #fde68a;
  background: color-mix(in srgb, #f59e0b 16%, var(--surface));
  border-color: color-mix(in srgb, #f59e0b 34%, var(--border));
}

.dashboard-breadcrumb-env.is-dev {
  color: #1d4ed8;
  background: color-mix(in srgb, #3b82f6 10%, var(--surface));
  border: 1px solid color-mix(in srgb, #3b82f6 26%, var(--border));
}

html[data-theme="dark"] .dashboard-breadcrumb-env.is-dev {
  color: #93c5fd;
  background: color-mix(in srgb, #3b82f6 16%, var(--surface));
  border-color: color-mix(in srgb, #3b82f6 34%, var(--border));
}

.gp-staging-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 0.45rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #78350f;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #fbbf24 22%, var(--surface)),
    color-mix(in srgb, #f59e0b 16%, var(--surface))
  );
  border-bottom: 1px solid color-mix(in srgb, #f59e0b 35%, var(--border));
}

html[data-theme="dark"] .gp-staging-banner {
  color: #fde68a;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b45309 28%, var(--surface)),
    color-mix(in srgb, #92400e 22%, var(--surface))
  );
}

.gp-staging-banner p {
  margin: 0;
}

.gp-staging-banner-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gp-staging-banner-link:hover {
  opacity: 0.85;
}

.dashboard-breadcrumb-sep {
  color: var(--border-strong);
  font-weight: 400;
}

.dashboard-breadcrumb-current {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-main {
  flex: 1;
  width: 100%;
  padding: 1.75rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dashboard-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  box-shadow: none;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  text-align: left;
}

.dashboard-panel[hidden],
.signal-feed-panel[hidden],
.profile-panel[hidden],
.admin-panel[hidden],
.broker-panel[hidden],
.welcome-panel[hidden],
.dashboard-panel-placeholder[hidden] {
  display: none !important;
}

.dashboard-panel h1 {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dashboard-page-header {
  margin-bottom: 1rem;
}

.dashboard-content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  max-width: none;
}

.dashboard-placeholder {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Hub pages (News, Prop Firms, Affiliate, Performance) */
.hub-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 920px;
}

.hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hub-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hub-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 36rem;
}

.hub-badge {
  flex-shrink: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
}

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

.hub-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.hub-split {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

@media (max-width: 768px) {
  .hub-split {
    grid-template-columns: 1fr;
  }
}

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.hub-card--accent {
  background: linear-gradient(160deg, var(--surface) 0%, color-mix(in srgb, var(--green-bg) 55%, var(--surface)) 100%);
  border-color: color-mix(in srgb, var(--green) 22%, var(--border));
}

.hub-card-label {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.hub-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hub-card-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.hub-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hub-feed-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.hub-feed-item--muted {
  opacity: 0.72;
}

.hub-feed-date {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hub-feed-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hub-feed-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.hub-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.hub-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 5rem;
}

.hub-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hub-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hub-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.hub-steps li + li {
  margin-top: 0.35rem;
}

.hub-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .hub-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hub-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.hub-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hub-kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hub-kpi-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Signal Feed – loose page layout, individual entry cards */
.signal-feed-panel {
  padding: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-width: 640px;
}

.signal-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0 0;
  border-bottom: 0;
}

.push-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid #f0d9a8;
  border-radius: 12px;
  background: #fff8eb;
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .push-prompt {
  background: #2a2214;
  border-color: #5c4a28;
}

.push-prompt[hidden] {
  display: none;
}

.push-prompt-copy {
  min-width: 0;
}

.push-prompt-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
}

html[data-theme="dark"] .push-prompt-eyebrow {
  color: #fbbf24;
}

.push-prompt-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.push-prompt-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.push-prompt-btn {
  appearance: none;
  border: 1px solid color-mix(in srgb, #b45309 28%, #f0d9a8);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  color: #92400e;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.push-prompt-btn:hover {
  background: color-mix(in srgb, #f59e0b 24%, transparent);
  border-color: color-mix(in srgb, #b45309 40%, #f0d9a8);
  color: #78350f;
}

html[data-theme="dark"] .push-prompt-btn {
  background: color-mix(in srgb, #fbbf24 16%, transparent);
  border-color: color-mix(in srgb, #fbbf24 32%, #5c4a28);
  color: #fbbf24;
}

html[data-theme="dark"] .push-prompt-btn:hover {
  background: color-mix(in srgb, #fbbf24 26%, transparent);
  border-color: color-mix(in srgb, #fbbf24 45%, #5c4a28);
  color: #fde68a;
}

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

.push-prompt-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.push-prompt-dismiss {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.push-prompt-dismiss:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.push-prompt.is-denied .push-prompt-text {
  color: var(--text-soft);
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  .push-prompt {
    flex-direction: column;
    align-items: stretch;
  }

  .push-prompt-actions {
    justify-content: flex-end;
  }
}

.signal-feed-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.signal-feed-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.signal-feed-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.signal-feed-viewers {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}

.signal-feed-viewers-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  opacity: 0.75;
}

.signal-feed-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.signal-feed-status[data-state='connecting'] .signal-feed-status-dot {
  background: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
  animation: signal-pulse 1s ease-in-out infinite;
}

.signal-feed-status[data-state='sync'] .signal-feed-status-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

@keyframes signal-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.signal-feed-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html[data-theme="dark"] .signal-feed-shell {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.signal-feed-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}

.signal-feed-ledger-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.signal-feed-ledger-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.signal-feed-loading,
.signal-feed-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.signal-feed-empty p {
  margin: 0;
}

.signal-feed-empty-hint {
  margin-top: 0.35rem !important;
  font-size: 0.85rem;
}

.signal-feed-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  vertical-align: -0.15em;
  animation: signal-feed-spin 0.7s linear infinite;
}

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

.signal-feed-list {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.signal-feed-item {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 0.95rem;
  border-bottom: 1px solid var(--border);
}

.signal-feed-item:last-child {
  border-bottom: 0;
}

.signal-feed-item-head {
  margin-bottom: 0.55rem;
}

.signal-feed-item-foot {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.signal-feed-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.signal-feed-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border));
  border-radius: 4px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.signal-feed-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.signal-feed-edited {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.signal-feed-item-body {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.015em;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.signal-feed-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.signal-feed-panel.is-content-locked .signal-feed-item-content {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.signal-feed-panel.is-content-locked .signal-feed-item-body,
.signal-feed-panel.is-content-locked .signal-feed-photo,
.signal-feed-panel.is-content-locked .signal-feed-photo-note {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

.signal-feed-panel.is-content-locked .signal-feed-item-content::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--surface) 18%, transparent);
}

.signal-feed-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.signal-feed-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 2.15rem;
  height: 2.15rem;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.signal-feed-reaction:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.signal-feed-reaction:active {
  transform: scale(0.96);
}

.signal-feed-reaction.active {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  background: var(--green-bg);
}

.signal-feed-reaction-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green);
  min-width: 0.5rem;
}

.signal-feed-reaction:has(.signal-feed-reaction-count) {
  width: auto;
  min-width: 2.15rem;
  padding: 0 0.55rem;
  gap: 0.3rem;
}

.signal-feed-reaction-emoji {
  font-size: 0.95rem;
  line-height: 1;
}

.signal-feed-photo {
  display: block;
  max-width: 100%;
  margin-top: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.signal-feed-photo-note {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Profil */
.profile-panel {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.profile-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.profile-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.profile-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.profile-status[data-state='verified'] .profile-status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
  animation: profile-badge-pulse 2.4s ease-in-out infinite;
}

@keyframes profile-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.profile-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.profile-reveal {
  animation: profile-reveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes profile-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-reveal {
    animation: none;
  }
  .profile-status[data-state='verified'] .profile-status-dot {
    animation: none;
  }
}

.profile-score-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 1.25rem 1.2rem 1.15rem;
  --score-accent: 5, 150, 105;
  --score-accent-bright: 62, 207, 142;
  background:
    linear-gradient(135deg, rgba(var(--score-accent), 0.1), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  border: 1px solid color-mix(in srgb, rgb(var(--score-accent)) 22%, var(--border));
  box-shadow: var(--shadow-sm);
  transition: background 0.35s ease, border-color 0.35s ease;
}

html[data-theme="dark"] .profile-score-card {
  background:
    linear-gradient(135deg, rgba(var(--score-accent-bright), 0.18), transparent 48%),
    linear-gradient(180deg, #141414 0%, #1a1a1a 100%);
  color: #f8fafc;
  border-color: color-mix(in srgb, rgb(var(--score-accent-bright)) 28%, var(--border-strong));
  box-shadow: var(--shadow);
}

/* < 0.5 Lots → Rot */
.profile-score-card[data-lots-tier="red"] {
  --score-accent: 220, 20, 20;
  --score-accent-bright: 255, 55, 55;
}

/* 0.5 – 1 Lot → Gelb */
.profile-score-card[data-lots-tier="yellow"] {
  --score-accent: 234, 179, 8;
  --score-accent-bright: 250, 204, 21;
}

/* 1 – 5 Lots → Grün */
.profile-score-card[data-lots-tier="green"] {
  --score-accent: 16, 185, 129;
  --score-accent-bright: 52, 211, 153;
}

/* 5 – 15 Lots → Blau */
.profile-score-card[data-lots-tier="blue"] {
  --score-accent: 37, 99, 235;
  --score-accent-bright: 59, 130, 246;
}

/* 15+ Lots → Violettblau */
.profile-score-card[data-lots-tier="violet"] {
  --score-accent: 124, 58, 237;
  --score-accent-bright: 167, 139, 250;
}

.profile-score-card[data-lots-tier="red"],
.profile-score-card[data-lots-tier="yellow"],
.profile-score-card[data-lots-tier="green"],
.profile-score-card[data-lots-tier="blue"],
.profile-score-card[data-lots-tier="violet"] {
  background:
    linear-gradient(135deg, rgba(var(--score-accent), 0.22), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

html[data-theme="dark"] .profile-score-card[data-lots-tier="red"],
html[data-theme="dark"] .profile-score-card[data-lots-tier="yellow"],
html[data-theme="dark"] .profile-score-card[data-lots-tier="green"],
html[data-theme="dark"] .profile-score-card[data-lots-tier="blue"],
html[data-theme="dark"] .profile-score-card[data-lots-tier="violet"] {
  background:
    linear-gradient(135deg, rgba(var(--score-accent-bright), 0.32), transparent 52%),
    linear-gradient(180deg, #141414 0%, #1a1a1a 100%);
}

.profile-score-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.55;
  pointer-events: none;
}

html[data-theme="dark"] .profile-score-card::before {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  opacity: 0.35;
}

.profile-score-top,
.profile-score-eyebrow,
.profile-score-value,
.profile-score-range,
.profile-score-empty,
.profile-score-chip {
  position: relative;
  z-index: 1;
}

.profile-score-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.profile-score-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

html[data-theme="dark"] .profile-score-eyebrow {
  color: rgba(226, 232, 240, 0.72);
}

.profile-score-chip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  color: var(--text-muted);
  white-space: nowrap;
}

html[data-theme="dark"] .profile-score-chip {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--text) 8%, #1a1a1a);
  color: rgba(226, 232, 240, 0.72);
}

.profile-score-value {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 7vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.profile-score-unit {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

html[data-theme="dark"] .profile-score-unit {
  color: rgba(226, 232, 240, 0.7);
}

.profile-score-range {
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

html[data-theme="dark"] .profile-score-range {
  color: rgba(226, 232, 240, 0.55);
}

.profile-score-empty {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

html[data-theme="dark"] .profile-score-empty {
  color: rgba(226, 232, 240, 0.55);
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.05rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .profile-card {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.profile-card-primary {
  padding: 1.15rem 1.15rem 1.1rem;
}

.profile-card-title {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.profile-row {
  display: grid;
  grid-template-columns: minmax(96px, 32%) 1fr;
  gap: 0.45rem 1rem;
  align-items: center;
  padding: 0.58rem 0;
  border-bottom: 1px solid var(--border);
}

.profile-row:first-child { padding-top: 0; }
.profile-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-row dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.profile-row dd {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  min-width: 0;
  word-break: break-word;
}

.profile-dd-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border));
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.profile-broker-block {
  margin-top: 1.05rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.profile-section-label,
.profile-meta-label {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-meta-label {
  margin-bottom: 0.2rem;
  display: block;
}

.profile-stepper {
  list-style: none;
  margin: 0 0 0.95rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.profile-step {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  min-width: 0;
}

.profile-step-index {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-3);
}

.profile-step-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.profile-step-copy strong {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.profile-step-copy span {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.profile-step.is-current {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  background: var(--green-bg);
}

.profile-step.is-current .profile-step-index,
.profile-step.is-done .profile-step-index {
  background: var(--green);
  color: var(--btn-on-accent);
}

.profile-step.is-done {
  border-color: color-mix(in srgb, var(--green) 28%, var(--border));
}

.profile-broker-uid-form {
  margin: 0;
}

.profile-broker-uid-field {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-broker-uid-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.profile-broker-uid-field input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.52rem 0.75rem;
  color: var(--text);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  box-shadow: none;
}

.profile-broker-uid-field input:focus {
  outline: none;
  box-shadow: none;
}

.profile-broker-uid-field .profile-btn {
  flex-shrink: 0;
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0.85rem;
  font-size: 0.76rem;
}

.profile-broker-uid-field .profile-btn-primary {
  background: transparent;
  color: var(--green);
}

.profile-broker-uid-field .profile-btn-primary:hover {
  background: var(--green-bg);
}

.profile-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.profile-section:first-of-type {
  padding-top: 0;
}

.profile-section-last {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.profile-section-copy {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.profile-form-inline {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.profile-form input {
  flex: 1;
  min-width: 160px;
  width: 100%;
  padding: 0.52rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}

.profile-form input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.profile-password-field {
  position: relative;
}

.profile-password-field input {
  padding-right: 2.55rem;
}

.profile-eye {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.profile-eye svg {
  width: 1.05rem;
  height: 1.05rem;
}

.profile-eye:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.profile-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  width: fit-content;
  line-height: 1.25;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.profile-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-strong);
}

.profile-btn:active {
  transform: scale(0.985);
}

.profile-btn-primary {
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green) 32%, var(--border));
  color: var(--green);
}

.profile-btn-primary:hover {
  background: color-mix(in srgb, var(--green-bg) 70%, var(--green) 12%);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  color: var(--green-hover, var(--green));
}

.profile-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding-inline: 0.45rem;
}

.profile-btn-ghost:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-color: transparent;
  color: var(--text);
}

.profile-card-danger {
  background: color-mix(in srgb, var(--red-light) 70%, var(--surface));
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
}

.profile-card-danger .profile-card-title {
  color: var(--red);
}

.profile-danger-text {
  margin: 0 0 0.75rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.profile-btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 28%, var(--border));
  font-weight: 500;
}

.profile-btn-danger:hover {
  background: color-mix(in srgb, var(--red) 8%, transparent);
  border-color: color-mix(in srgb, var(--red) 42%, var(--border));
}

.gp-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 120;
  max-width: min(92vw, 420px);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gp-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gp-toast.is-ok {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
}

.gp-toast.is-err {
  border-color: color-mix(in srgb, var(--red) 40%, var(--border));
  color: var(--red);
}

.gp-confirm {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.gp-confirm[hidden] {
  display: none;
}

.gp-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .gp-confirm-backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.gp-confirm-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 1.25rem 1.2rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: gp-confirm-in 0.2s ease;
}

html[data-theme="dark"] .gp-confirm-panel {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

@keyframes gp-confirm-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gp-confirm-panel {
    animation: none;
  }
}

.gp-confirm-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.gp-confirm-text {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.gp-confirm-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.gp-confirm-actions .profile-btn {
  min-width: 6.5rem;
}

body.gp-confirm-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .profile-stepper {
    grid-template-columns: 1fr;
  }

  .profile-form-inline {
    flex-direction: column;
  }

  .profile-form-inline .profile-btn {
    width: 100%;
  }

  .profile-broker-uid-field .profile-btn {
    width: auto;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .profile-score-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .signal-feed-header {
    flex-direction: column;
    padding: 0;
  }

  .signal-feed-item {
    padding: 0.9rem 1rem;
  }

  .signal-feed-item-body {
    font-size: 0.88rem;
  }

  .signal-feed-reaction {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
  }
}

@media (max-width: 768px) {
  /* Dashboard nav mobile rules live in html.dashboard-mobile-nav (≤1024px) */

  /* Mobile layout fixes — audit 2026-08-23 */

  /* K1: Algo header stack + subnav full width */
  .algo-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .algo-subnav {
    width: 100%;
  }

  /* K3: Algo detail bars stack, actions left-aligned */
  .algo-detail-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .algo-detail-actions {
    margin-left: 0;
    justify-content: flex-start;
  }

  /* V1: Signal feed header pills left-aligned full row */
  .signal-feed-header-right {
    width: 100%;
    justify-content: flex-start;
  }

  /* V2: breathing room */
  .signal-feed-item,
  .signal-feed-ledger-head {
    padding-inline: 1.05rem;
  }

  /* V5: Billing headers stack */
  .billing-header,
  .billing-premium-top,
  .billing-portal-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

.disclaimer {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin-inline: auto;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner nav {
  display: flex;
  gap: 1.5rem;
}

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

.footer-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.footer-disclaimer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Legal pages */
.legal-header-inner {
  gap: 1rem;
}

.legal-header-inner .legal-topnav {
  margin-left: auto;
}

.legal-topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.legal-topnav a {
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.legal-topnav a:hover,
.legal-topnav a[aria-current="page"] {
  color: var(--text);
}

.legal-page {
  padding: 4.5rem 0 5rem;
  min-height: 60vh;
}

.legal-wrap {
  max-width: 720px;
}

.legal-wrap h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
}

.legal-lead {
  margin: 0 0 1.5rem;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.55;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0 0 2.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.legal-toc a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--green);
}

.legal-section {
  margin: 0 0 2rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.legal-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.legal-section h3 {
  margin: 1.1rem 0 0.45rem;
  font-size: 0.98rem;
}

.legal-section p,
.legal-list,
.legal-ol {
  margin: 0 0 0.75rem;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 0.95rem;
}

.legal-list,
.legal-ol {
  padding-left: 1.2rem;
}

.legal-list li,
.legal-ol li {
  margin-bottom: 0.4rem;
}

.legal-section a {
  color: var(--green);
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-updated {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .site-header:has(.legal-header-inner) {
    height: auto;
  }

  .legal-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo controls"
      "nav nav";
    align-items: center;
    gap: 0.55rem 0.75rem;
    height: auto;
    min-height: var(--header-h);
    padding-block: 0.55rem;
  }

  .legal-header-inner .logo-link {
    grid-area: logo;
  }

  .legal-header-inner .header-controls {
    grid-area: controls;
    margin-left: 0;
  }

  .legal-header-inner .legal-topnav {
    grid-area: nav;
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    font-size: 0.78rem;
    justify-content: flex-start;
    overflow: visible;
    max-width: none;
  }

  .legal-page {
    padding: 3rem 0 4rem;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .hero {
    padding-top: 4rem;
    padding-bottom: 4.75rem;
  }

  .hero-stack {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "media"
      "actions";
    gap: 1.75rem;
  }

  .hero-media { margin-top: 0.15rem; }

  .founder-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .founder-photo {
    max-height: 320px;
    aspect-ratio: 16 / 11;
  }

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

  .founder-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .founder-stat {
    padding: 0.85rem 0.5rem;
  }

  .founder-stat-value {
    font-size: 1.25rem;
  }

  .founder-stat-label {
    font-size: 0.72rem;
  }

  .cards-3,
  .cards-2,
  .steps {
    grid-template-columns: 1fr;
  }

  .wins-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .win-thumb:nth-child(n+5) {
    display: none;
  }
}

@media (min-width: 769px) {
  .site-shell {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: var(--header-h);
    padding-inline: max(1.375rem, calc((100% - var(--max)) / 2 + 1.375rem));
    background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  html[data-theme="dark"] .site-shell {
    background: rgba(12, 12, 12, 0.92);
  }

  /* Only flatten header inside landing shell — legal/auth pages keep normal sticky header */
  .site-shell .site-header {
    display: contents;
  }

  .site-shell .site-header .header-inner {
    display: contents;
  }

  .site-shell .logo-link {
    order: 1;
    flex-shrink: 0;
  }

  .site-shell .site-nav {
    order: 2;
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .site-shell .header-controls {
    order: 3;
    margin-left: 0;
  }

  .site-shell .site-header .nav-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .section { padding: 3rem 0; }
  .hero.section {
    padding-top: 4rem;
    padding-bottom: 4.75rem;
  }

  .nav-toggle { display: flex; }

  .header-inner {
    gap: 0.55rem;
  }

  .header-controls {
    margin-left: auto;
  }

  .header-controls .nav-theme-menu .theme-menu-trigger {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    justify-content: center;
    padding: 0;
  }

  .header-controls .nav-theme-menu .theme-menu-trigger-icon {
    width: 17px;
    height: 17px;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1rem 0;
    gap: 0;
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
    box-shadow: var(--shadow);
    z-index: 99;
  }

  /* Flex spacer — padding-bottom alone gets clipped inside overflow scrollports */
  .site-nav::after {
    content: '';
    display: block;
    flex: 0 0 1.5rem;
    height: 1.5rem;
    min-height: 1.5rem;
  }

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

  .site-nav a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-separator { display: none; }

  .site-nav .nav-duo {
    margin-top: 0.75rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    align-items: stretch;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
  }

  .site-nav .nav-duo .nav-duo-login {
    border: none !important;
    box-shadow: inset 0 0 0 1px var(--border);
    padding: 0.75rem 0.5rem;
    text-align: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav .nav-duo .nav-duo-register {
    border: none !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 32%, var(--border));
    padding: 0.75rem 0.5rem !important;
    text-align: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }

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

  .form-grid-name {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .auth-main {
    padding: 0.5rem 1rem;
    justify-content: center;
  }

  .auth-form-side {
    padding: 1.15rem 1rem 1rem;
  }

  .auth-page-logo img {
    width: 100px;
  }

  .site-footer-auth {
    padding: 1rem 0 1.25rem;
  }

  .site-footer-auth .footer-inner {
    font-size: 0.72rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-inner nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.85rem; }
  .price { font-size: 2rem; }
  .wins-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
}

/* Admin */
.admin-panel {
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

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

.admin-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.admin-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--border);
}

.admin-subnav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.admin-subnav-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}

.admin-subnav-btn.is-active {
  color: var(--text);
  background: var(--green-bg);
  box-shadow: inset 0 -2px 0 var(--green);
}

.admin-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-hub-card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 1rem 1.05rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
}

html[data-theme="dark"] .admin-hub-card {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.admin-hub-card:hover {
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
  transform: translateY(-1px);
}

.admin-hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.admin-hub-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.admin-hub-card-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.admin-hub-card-text.mono,
.mono {
  font-family: var(--font-mono);
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-pill-warn {
  background: #fff8eb;
  border-color: #f0d9a8;
  color: #b45309;
}

html[data-theme="dark"] .admin-pill-warn {
  background: #2a2214;
  border-color: #5c4a28;
  color: #fbbf24;
}

.admin-pill-ok {
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
  color: var(--green);
}

.admin-mock-note,
.admin-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 0.75rem;
}

.admin-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.admin-case-card,
.admin-ticket-card,
.admin-chart-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .admin-case-card,
html[data-theme="dark"] .admin-ticket-card,
html[data-theme="dark"] .admin-chart-card {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.admin-case-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-case-name,
.admin-ticket-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.admin-case-meta {
  margin: 0.25rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
  justify-content: flex-end;
}

.admin-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.admin-btn-success {
  background: var(--green);
  border-color: transparent;
  color: var(--btn-on-accent);
  font-weight: 600;
}

.admin-btn-success:hover {
  background: var(--green-hover);
  color: var(--btn-on-accent);
}

.admin-btn-primary {
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green) 32%, var(--border));
  color: var(--green);
}

.admin-btn-primary:hover {
  background: color-mix(in srgb, var(--green-bg) 70%, var(--green) 12%);
}

.admin-btn-solid {
  background: var(--btn-solid-bg);
  border-color: var(--btn-solid-border);
  color: var(--btn-solid-color);
}

.admin-btn-solid:hover {
  background: var(--btn-solid-hover);
}

.admin-btn-ghost {
  border-color: transparent;
  color: var(--text-muted);
}

.admin-btn-ghost:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text);
}

.admin-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.admin-metrics-row-lg {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-metric-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.75rem 0.8rem;
}

html[data-theme="dark"] .admin-metric-card {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.admin-metric-label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-metric-value {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.admin-metric-sub {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  overflow-x: auto;
}

.admin-pipeline-col {
  min-width: 140px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  max-height: 420px;
}

html[data-theme="dark"] .admin-pipeline-col {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.admin-pipeline-col-head {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-pipeline-col-body {
  padding: 0.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-user-chip {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.admin-user-chip strong {
  font-size: 0.78rem;
  color: var(--text);
}

.admin-user-chip span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.admin-empty,
.admin-empty-mini {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.admin-empty-mini {
  font-size: 0.72rem;
  padding: 0.35rem;
}

.admin-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-dropzone {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 1px dashed color-mix(in srgb, var(--border-strong) 80%, var(--green) 20%);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--green-bg));
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.admin-dropzone:hover {
  border-color: var(--green);
  background: var(--green-bg);
}

.admin-dropzone-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.admin-dropzone-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-dropzone-hint {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

html[data-theme="dark"] .admin-table-wrap {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.admin-ticket-body {
  margin: 0.45rem 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.admin-ticket-reply {
  margin: 0 0 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue-light) 70%, var(--surface));
  border: 1px solid var(--blue-border);
}

.admin-ticket-reply-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-ticket-reply p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
}

.admin-textarea,
.admin-input,
.admin-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.55rem 0.7rem;
}

.admin-textarea {
  margin: 0.35rem 0 0.65rem;
  resize: vertical;
  min-height: 72px;
}

.admin-textarea:focus,
.admin-input:focus,
.admin-select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.admin-search-wrap {
  margin-bottom: 0.75rem;
}

.admin-select {
  width: auto;
  min-width: 7.5rem;
}

.admin-segmented {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.admin-segment {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}

.admin-segment.is-active {
  background: var(--btn-solid-bg);
  color: var(--btn-solid-color);
}

.admin-spark {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 140px;
  padding-top: 0.5rem;
}

.admin-spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 0.35rem;
}

.admin-spark-col span {
  display: block;
  width: 100%;
  max-width: 28px;
  border-radius: 6px 6px 2px 2px;
  background: color-mix(in srgb, var(--green) 75%, #34d399);
}

.admin-spark-col small {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.admin-metric-card-accent {
  background: color-mix(in srgb, var(--green-light) 55%, var(--surface));
  border-color: color-mix(in srgb, var(--green) 25%, var(--border));
}

.admin-chart-card-wide {
  margin-bottom: 0.75rem;
}

.admin-rebate-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  min-height: 200px;
  padding: 0.75rem 0.25rem 0;
  overflow-x: auto;
}

.admin-rebate-col {
  flex: 1 0 52px;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  height: 200px;
}

.admin-rebate-col span {
  display: block;
  width: 100%;
  max-width: 36px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--green) 90%, #fff),
    color-mix(in srgb, var(--green) 55%, var(--blue))
  );
  box-shadow: 0 4px 14px color-mix(in srgb, var(--green) 25%, transparent);
  transition: transform 0.15s ease;
}

.admin-rebate-col:hover span {
  transform: translateY(-2px);
}

.admin-rebate-col small {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.admin-rebate-col em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--green);
}

.admin-import-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-import-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.admin-import-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  justify-content: flex-end;
}

.admin-puprime-match {
  margin-top: 0.35rem !important;
}

.admin-dropzone.is-dragover {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green-light) 40%, var(--surface));
}

.admin-dropzone.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

@media (max-width: 900px) {
  .admin-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metrics-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-pipeline-board {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-hub-grid,
  .admin-upload-grid,
  .admin-metrics-row,
  .admin-metrics-row-lg {
    grid-template-columns: 1fr;
  }

  .admin-case-card {
    flex-direction: column;
  }

  .admin-case-actions {
    width: 100%;
  }

  .admin-case-actions .admin-btn,
  .admin-case-actions .admin-select {
    flex: 1;
  }

  .admin-subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Polymarket copytrading */
.pm-panel {
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.pm-view {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.pm-analyzer-detail {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* author display:flex otherwise wins over the hidden attribute */
.pm-view[hidden],
.pm-analyzer-home[hidden],
.pm-analyzer-detail[hidden] {
  display: none !important;
}

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

.pm-header > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.pm-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.pm-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pm-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.pm-status-text {
  white-space: nowrap;
  line-height: 1;
}

.pm-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.pm-status[data-state="on"] {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
}

.pm-status[data-state="on"] .pm-status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

.pm-gate {
  padding: 1.25rem 1.35rem;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 6%, var(--surface));
}

.pm-gate-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.pm-gate-text,
.pm-gate-note,
.pm-hint,
.pm-card-copy {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.pm-gate-note,
.pm-hint {
  font-size: 0.78rem;
}

.pm-gate-actions,
.pm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.pm-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.pm-kpi {
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  min-height: 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
}

.pm-kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pm-kpi strong {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-word;
}

.pm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.pm-grid-bottom {
  grid-template-columns: 1fr 1fr;
}

.pm-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  min-width: 0;
}

.pm-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.pm-card-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pm-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.pm-form input,
.pm-form-2 input,
.pm-form-add input,
.pm-alloc,
.signal-admin-compose textarea {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  color: var(--text);
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
}

.pm-form input,
.pm-form-add input[type="text"]:first-child {
  flex: 1 1 180px;
}

.pm-form-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
  margin-top: 0.15rem;
}

.pm-form-2 label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
}

.pm-form-2 > div {
  min-width: 0;
}

.pm-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--text);
}

.pm-leaders {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.15rem;
}

.pm-leader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 65%, var(--surface));
}

.pm-leader.is-on {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
}

.pm-leader-main {
  min-width: 0;
  flex: 1;
}

.pm-leader-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.pm-leader-wallet,
.pm-leader-meta {
  margin: 0.28rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pm-leader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.pm-alloc {
  width: 88px;
  min-height: 34px;
  padding: 0.35rem 0.5rem;
}

.pm-empty,
.pm-dim {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pm-term {
  margin-top: 0.15rem;
  max-height: 220px;
  overflow: auto;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  background: color-mix(in srgb, #0b1220 92%, #000);
  color: #cbd5e1;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.72rem;
  line-height: 1.45;
}

[data-theme="light"] .pm-term {
  background: #0f172a;
}

.pm-table-wrap {
  margin-top: 0.15rem;
  overflow: auto;
  max-height: 320px;
}

#pm-leaderboard.pm-table-wrap {
  max-height: none;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.pm-lb-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.pm-lb-table .pm-lb-rank {
  width: 2rem;
  padding-inline: 0.35rem 0.25rem;
}

.pm-lb-table .pm-lb-name-cell {
  width: 38%;
  max-width: 0;
  overflow: hidden;
}

.pm-lb-table .pm-lb-num {
  width: 22%;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-lb-table .pm-lb-vol {
  width: 22%;
}

.pm-lb-table .pm-lb-action {
  width: 4.5rem;
  min-width: 0;
  padding-inline: 0.35rem;
  text-align: right;
}

.pm-lb-table .pm-lb-action .profile-btn {
  min-height: 30px;
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.pm-table-wrap .admin-table {
  width: 100%;
}

.pm-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pm-subnav-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
}

.pm-subnav-btn:hover {
  color: var(--text);
}

.pm-subnav-btn.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}

.pm-subnav-btn.is-locked::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 0.35rem;
  vertical-align: -1px;
  background: currentColor;
  opacity: 0.55;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pm-copy-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.pm-copy-body.is-copy-locked {
  opacity: 0.58;
  pointer-events: none;
  user-select: none;
}

#pm-view-copy.is-copy-locked #pm-copy-gate {
  opacity: 1;
  pointer-events: auto;
}

.pm-card-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.pm-lb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pm-chip {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.pm-chip.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.pm-lb-trader {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.pm-lb-trader-meta {
  min-width: 0;
  overflow: hidden;
}

.pm-lb-trader-name {
  display: block;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-lb-trader-wallet {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.pm-lb-trader img,
.pm-lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pm-lb-table .pm-lb-vol {
    display: none;
  }

  .pm-lb-table th:nth-child(4),
  .pm-lb-table td.pm-lb-vol {
    display: none;
  }

  .pm-lb-table .pm-lb-name-cell {
    width: auto;
  }

  .pm-lb-table .pm-lb-num {
    width: 5.5rem;
    font-size: 0.68rem;
  }

  .pm-lb-table .pm-lb-action {
    width: 4rem;
  }

  .pm-lb-table .pm-lb-action .profile-btn {
    padding: 0.25rem 0.35rem;
    font-size: 0.68rem;
  }
}

.pm-lb-table tbody tr {
  cursor: pointer;
}

.pm-lb-table tbody tr:hover {
  background: color-mix(in srgb, var(--green) 6%, transparent);
}

.pm-detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pm-analyze-status,
.pm-hints {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.pm-kpi-row-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pm-card-chart {
  gap: 0.85rem;
}

.pm-chart-wrap {
  margin-top: 0.1rem;
  min-height: 240px;
}

.pm-chart-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.pm-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
  border: 1px solid var(--border);
}

.pm-chart-grid {
  stroke: color-mix(in srgb, var(--border) 85%, transparent);
  stroke-width: 1;
}

.pm-chart-zero {
  stroke: color-mix(in srgb, var(--text-muted) 45%, transparent);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.pm-chart-ylabel,
.pm-chart-xlabel {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.pm-profit-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
  min-height: 118px;
  margin-top: 0.35rem;
  flex: 1;
}

.pm-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
}

.pm-bar-fill {
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 2px 2px;
  background: #94a3b8;
}

.pm-bar-fill.is-pos {
  background: var(--green);
}

.pm-bar-fill.is-neg {
  background: #ef4444;
}

.pm-bar-val {
  font-size: 0.68rem;
  font-weight: 650;
}

.pm-bar-lab {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pm-style-title {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.mono.is-pos,
.is-pos {
  color: var(--green);
}

.mono.is-neg,
.is-neg {
  color: #ef4444;
}

@media (max-width: 900px) {
  .pm-kpi-row-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .pm-kpi-row,
  .pm-grid,
  .pm-grid-bottom,
  .pm-form-2 {
    grid-template-columns: 1fr;
  }

  .pm-leader {
    flex-direction: column;
  }

  .pm-leader-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .pm-profit-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pm-kpi-row,
  .pm-kpi-row-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.signal-feed-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.signal-admin-compose {
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.signal-admin-compose textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
}

.signal-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.signal-feed-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.signal-feed-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.signal-admin-btn {
  min-height: 30px;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
}

@media (max-width: 800px) {
  .pm-kpi-row,
  .pm-grid,
  .pm-grid-bottom,
  .pm-form-2 {
    grid-template-columns: 1fr;
  }

  .pm-leader {
    flex-direction: column;
  }

  .pm-leader-actions {
    width: 100%;
  }
}

/* Access tags (Admin Rollen) */
.admin-roles-stack {
  gap: 0.85rem;
}

.admin-role-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.admin-role-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-role-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.admin-tag-row {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.admin-tag-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-tag-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.admin-tag-pill:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  color: var(--text);
}

.admin-tag-pill.is-on {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}

.admin-tag-pill:disabled {
  opacity: 0.85;
  cursor: default;
}

/* Promo unlock pages */
.promo-panel {
  max-width: 560px;
  padding: 0.25rem 0 1.5rem;
}

.promo-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.promo-title {
  margin: 0.45rem 0 0;
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.promo-text {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.promo-bullets {
  margin: 1.1rem 0 0;
  padding: 0 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.4;
}

.promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.promo-note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Unified unlock CTAs */
.gp-unlock {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 6%, var(--surface));
}

.gp-unlock-inline {
  margin: 0 0 0.85rem;
}

.gp-unlock-short {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--green) 24%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--green) 6%, var(--surface));
}

.gp-unlock-short-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  flex: 1;
  min-width: min(100%, 11rem);
}

.gp-unlock-short .gp-unlock-actions {
  flex-shrink: 0;
  gap: 0.45rem;
}

.gp-unlock-short .profile-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
}

#signal-feed-unlock:not([hidden]) {
  margin: 0;
}

.tv-username-copy #tv-unlock-host:not([hidden]) {
  margin-top: 0.75rem;
}

.tv-username-bar.is-locked .tv-username-field {
  opacity: 0.55;
}

#pm-copy-gate:not([hidden]) {
  margin: 0;
}

#pm-copy-gate .gp-unlock-short {
  border: none;
  background: transparent;
  padding: 0.15rem 0 0.35rem;
}

#pm-copy-gate .gp-unlock-short-text {
  font-size: 0.86rem;
  color: var(--text-soft);
}

.gp-unlock-compact {
  padding: 0.85rem 1rem;
  gap: 0.75rem 1rem;
}

.gp-unlock-compact .gp-unlock-title {
  font-size: 0.95rem;
}

.gp-unlock-compact .gp-unlock-text {
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.gp-unlock-page {
  display: block;
  max-width: 560px;
  padding: 0.25rem 0 1.5rem;
  border: none;
  background: transparent;
}

.gp-unlock-eyebrow,
.gp-unlock-copy .gp-unlock-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.gp-unlock-title {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.gp-unlock-page-title {
  margin: 0.45rem 0 0;
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.gp-unlock-text {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 36rem;
}

.gp-unlock-bullets {
  margin: 0.65rem 0 0;
  padding: 0 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.4;
}

.gp-unlock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.gp-unlock-actions-page {
  margin-top: 1.1rem;
}

.gp-unlock-note {
  margin: 1.1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

#pm-copy-gate .gp-unlock {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

#pm-copy-gate .gp-unlock-title {
  font-size: 1rem;
}

/* Billing panel */
.billing-panel {
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.billing-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.billing-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.billing-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
}

.billing-status-badge[data-state='ok'] {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 28%, var(--border));
  background: var(--surface);
}

.billing-status-badge[data-state='warn'] {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 35%, var(--border));
  background: color-mix(in srgb, var(--gold) 8%, var(--surface));
}

.billing-status-meta {
  margin: -0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.billing-portal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.billing-portal-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
  min-width: min(100%, 14rem);
}

.billing-premium-wrap {
  min-width: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.billing-premium-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem 1.25rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.billing-premium-card.is-active {
  border-color: color-mix(in srgb, var(--green) 22%, var(--border));
}

.billing-premium-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.billing-premium-copy {
  min-width: 0;
}

.billing-premium-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.billing-premium-title {
  margin: 0.35rem 0 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.billing-premium-text {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 36rem;
}

.billing-premium-status {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--surface-2);
}

.billing-premium-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.billing-premium-features li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-soft);
}

.billing-premium-features li::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.75;
}

.billing-plan-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.billing-plan-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.billing-plan-opt:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.billing-plan-opt.is-active {
  border-color: color-mix(in srgb, var(--green) 55%, var(--border));
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
  box-shadow: none;
}

.billing-plan-label {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
}

.billing-plan-price {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.billing-save-badge {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--border));
}

.billing-premium-checkout {
  width: 100%;
}

.billing-premium-note {
  margin: -0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.billing-section-head {
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.billing-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
}

.billing-section-copy {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.billing-features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.billing-feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}

.billing-feature-card.is-active {
  border-color: color-mix(in srgb, var(--green) 22%, var(--border));
}

.billing-feature-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.billing-feature-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
}

.billing-feature-pill {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.billing-feature-pill.is-ok {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 28%, var(--border));
  background: var(--surface);
}

.billing-feature-hint,
.billing-feature-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.billing-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

@media (max-width: 720px) {
  .billing-plan-toggle {
    grid-template-columns: 1fr;
  }

  .billing-features-grid {
    grid-template-columns: 1fr;
  }

  .gp-unlock {
    flex-direction: column;
  }
}

.auth-forgot-row {
  margin: -0.15rem 0 0.85rem;
  text-align: right;
}

.auth-forgot-row .auth-link {
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-lead {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Support tickets / chat */
.support-panel {
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.support-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.support-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.support-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.support-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.support-active-meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.support-active-meta[data-state="full"] {
  color: #b45309;
  border-color: color-mix(in srgb, #f59e0b 40%, var(--border));
  background: color-mix(in srgb, #f59e0b 10%, var(--surface));
}

.support-new-panel {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.support-new-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 750;
}

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

.support-new-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.support-new-form input,
.support-new-form select,
.support-new-form textarea,
.support-chat-composer textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.support-new-form textarea,
.support-chat-composer textarea {
  min-height: 88px;
  resize: vertical;
}

.support-limit-note,
.support-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 420px;
}

.support-sidebar,
.support-chat {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.support-sidebar-label {
  margin: 0;
  padding: 0.85rem 0.95rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.support-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem 0.75rem;
  overflow: auto;
  max-height: 520px;
}

.support-ticket-item {
  appearance: none;
  text-align: left;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.support-ticket-item:hover {
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
}

.support-ticket-item.is-on {
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.support-ticket-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.support-ticket-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.support-ticket-item-meta,
.support-ticket-item-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.support-chat-empty {
  margin: auto;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.support-chat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.support-chat-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.support-chat-meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.support-chat-thread {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 240px;
  max-height: 420px;
}

.support-bubble {
  max-width: min(92%, 420px);
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
}

.support-bubble.is-mine {
  align-self: flex-end;
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}

.support-bubble.is-theirs {
  align-self: flex-start;
}

.support-bubble-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.support-bubble-text {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.support-bubble-time {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.support-chat-composer {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--border);
}

.support-chat-composer textarea {
  flex: 1;
  min-height: 52px;
  max-height: 140px;
}

.support-panel[hidden],
.support-new-panel[hidden],
.support-chat-head[hidden],
.support-chat-composer[hidden],
.support-chat-empty[hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  .support-layout {
    grid-template-columns: 1fr;
  }

  .support-ticket-list {
    max-height: 220px;
  }

  .support-chat-thread {
    max-height: 360px;
  }
}

.admin-support-stack .admin-ticket-card {
  gap: 0.75rem;
}

.admin-ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 280px;
  overflow: auto;
  padding: 0.35rem 0;
}

.admin-ticket-bubble {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 65%, var(--surface));
  max-width: 95%;
}

.admin-ticket-bubble.is-support {
  align-self: flex-end;
  margin-left: auto;
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}

.admin-ticket-bubble.is-user {
  align-self: flex-start;
}

.admin-ticket-bubble p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.admin-ticket-bubble time {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.support-ticket-code,
.admin-ticket-code {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
}

.support-ticket-item .support-ticket-code {
  margin-top: 0.15rem;
}

.admin-ticket-code {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
}

/* TradingView guides */
.tv-username-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin: 0.15rem 0 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.tv-username-bar.is-locked {
  background: color-mix(in srgb, var(--text-muted) 5%, var(--surface));
}

.tv-username-copy {
  flex: 1;
  min-width: min(100%, 14rem);
}

.tv-username-label {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.tv-username-hint {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.tv-username-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(100%, 22rem);
}

.tv-username-input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font-mono);
  transition: border-color 0.15s, opacity 0.15s, background 0.15s;
}

.tv-username-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent);
}

.tv-username-input:disabled,
.tv-username-input.is-locked {
  cursor: not-allowed;
  opacity: 0.62;
  background: color-mix(in srgb, var(--text-muted) 7%, var(--surface));
  box-shadow: none;
}

.tv-username-save:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tv-panel {
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.tv-panel[hidden],
.tv-guide-list[hidden],
.tv-guide-detail[hidden] {
  display: none !important;
}

.tv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 0.35rem;
}

.tv-header-copy {
  flex: 1;
  min-width: 0;
}

.tv-header-aside {
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.tv-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.tv-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tv-intro {
  margin: 0.85rem 0 0;
  max-width: 38rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.tv-unlock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--green) 40%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tv-unlock-badge.is-locked {
  border-color: color-mix(in srgb, var(--text-muted) 45%, var(--border));
  background: color-mix(in srgb, var(--text-muted) 12%, var(--surface));
  color: var(--text-muted);
}

.tv-unlock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

.tv-unlock-badge.is-locked .tv-unlock-dot,
.tv-unlock-dot.tv-unlock-dot-muted {
  background: var(--text-muted);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-muted) 18%, transparent);
}

.tv-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.tv-card {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tv-card:hover {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  transform: translateY(-1px);
}

.tv-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--green) 22%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 40%, var(--surface)), var(--surface));
  overflow: hidden;
}

.tv-card[data-tone="b"] .tv-card-media,
.tv-article-cover[data-tone="b"] {
  background:
    radial-gradient(120% 80% at 90% 10%, color-mix(in srgb, #0f766e 20%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 35%, var(--surface)), var(--surface));
}

.tv-card[data-tone="c"] .tv-card-media,
.tv-article-cover[data-tone="c"] {
  background:
    radial-gradient(100% 70% at 50% 100%, color-mix(in srgb, #166534 18%, transparent), transparent 50%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 35%, var(--surface)), var(--surface));
}

.tv-card[data-tone="d"] .tv-card-media,
.tv-article-cover[data-tone="d"] {
  background:
    radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, #365314 16%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 35%, var(--surface)), var(--surface));
}

.tv-card-media img,
.tv-article-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.25rem;
  opacity: 0.92;
}

.tv-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 1rem 1.1rem;
}

.tv-card-tag {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.tv-card-title {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tv-card-excerpt {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.tv-card-meta {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tv-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0;
  margin: 0 0 0.75rem;
  cursor: pointer;
}

.tv-back:hover {
  color: var(--text);
}

.tv-article-head {
  margin-bottom: 1rem;
}

.tv-article-title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.tv-article-excerpt {
  margin: 0.65rem 0 0;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.tv-video {
  margin: 0 0 1.1rem;
}

.tv-video-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tv-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b1220;
}

.tv-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tv-video-frame-empty {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 600;
  background:
    linear-gradient(160deg, #0f172a, #111827);
}

.tv-article-cover {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  background: var(--surface);
}

.tv-article-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tv-prose {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.tv-h2 {
  margin: 0.55rem 0 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.tv-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.tv-figure {
  margin: 0.25rem 0;
}

.tv-figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 50%, var(--surface));
  padding: 1rem;
  box-sizing: border-box;
}

.tv-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .tv-guide-grid {
    grid-template-columns: 1fr;
  }

  .tv-header {
    flex-direction: column;
    gap: 0.85rem;
  }

  .tv-header-aside {
    padding-top: 0;
  }
}

/* —— First-visit welcome —— */
.dashboard-main.is-welcome {
  padding: 0;
  align-items: stretch;
}

.welcome-panel {
  max-width: none;
  width: 100%;
  min-height: calc(100dvh - 56px);
  margin: 0;
}

.welcome-panel[hidden] {
  display: none !important;
}

.welcome-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100dvh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(120% 80% at 12% -10%, color-mix(in srgb, var(--green) 18%, transparent), transparent 55%),
    radial-gradient(90% 70% at 100% 20%, color-mix(in srgb, var(--green) 10%, transparent), transparent 50%),
    linear-gradient(165deg, var(--bg-alt) 0%, var(--bg) 48%, color-mix(in srgb, var(--green-bg) 55%, var(--bg)) 100%);
}

.welcome-atmos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.welcome-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: welcome-drift 14s ease-in-out infinite alternate;
}

.welcome-orb-a {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  top: 8%;
  left: -6%;
  background: color-mix(in srgb, var(--green) 35%, transparent);
}

.welcome-orb-b {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  right: -4%;
  bottom: 12%;
  background: color-mix(in srgb, var(--green) 22%, #0ea5e9 18%);
  animation-delay: -4s;
  animation-duration: 18s;
}

.welcome-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 70%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 70%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 75%);
}

.welcome-copy {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  text-align: left;
}

.welcome-mark {
  display: block;
  height: 34px;
  width: auto;
  margin: 0 0 1.75rem;
  opacity: 0;
  transform: translateY(12px);
  animation: welcome-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

[data-theme="dark"] .welcome-mark {
  filter: brightness(1.08);
}

.welcome-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0;
  transform: translateY(12px);
  animation: welcome-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

.welcome-title {
  margin: 0.85rem 0 0;
  font-size: clamp(2.15rem, 5.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--text);
}

.welcome-title-line {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: welcome-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

.welcome-title-accent {
  color: color-mix(in srgb, var(--green) 82%, var(--text));
  animation-delay: 0.34s;
}

.welcome-lead {
  margin: 1.15rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(14px);
  animation: welcome-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.46s forwards;
}

.welcome-cta-row {
  margin-top: 1.85rem;
  opacity: 0;
  transform: translateY(14px);
  animation: welcome-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.58s forwards;
}

.welcome-cta {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1.35rem;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-hover) 100%);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 22%, transparent) inset,
    0 14px 36px color-mix(in srgb, var(--green) 28%, transparent);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.welcome-cta svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.18s ease;
}

.welcome-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 22%, transparent) inset,
    0 18px 40px color-mix(in srgb, var(--green) 34%, transparent);
}

.welcome-cta:hover svg {
  transform: translateX(3px);
}

.welcome-cta:active {
  transform: translateY(0);
}

.welcome-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 2.25rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(10px);
  animation: welcome-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.72s forwards;
}

.welcome-steps-sep {
  width: 18px;
  height: 1px;
  background: var(--border-strong);
}

@keyframes welcome-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes welcome-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, -22px, 0) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-orb,
  .welcome-mark,
  .welcome-eyebrow,
  .welcome-title-line,
  .welcome-lead,
  .welcome-cta-row,
  .welcome-steps {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .welcome-stage {
    align-items: flex-end;
    padding-bottom: 2.5rem;
  }

  .welcome-mark {
    height: 28px;
  }

  .welcome-cta {
    width: 100%;
    justify-content: center;
  }
}

/* —— Broker Anmeldung —— */
.broker-panel {
  max-width: 720px;
}

.broker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.broker-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.broker-subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.broker-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.broker-status-dot,
.broker-pending-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.broker-status[data-state="verified"] {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
  background: color-mix(in srgb, var(--green-bg) 80%, var(--surface));
}

.broker-status[data-state="verified"] .broker-status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

.broker-stack {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.broker-card {
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.broker-step-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--green) 55%, var(--text-muted));
}

.broker-card-lead {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.broker-video {
  margin-top: 1rem;
}

.broker-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.broker-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.broker-field {
  margin-top: 1.05rem;
}

.broker-field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.broker-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.broker-field-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.broker-field-value {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broker-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}

.broker-field-actions .broker-btn {
  flex: 1 1 auto;
}

@media (min-width: 769px) {
  .broker-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .broker-field-actions {
    width: auto;
  }

  .broker-field-actions .broker-btn {
    flex: 0 0 auto;
  }
}

.broker-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-soft);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.broker-btn svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  opacity: 0.75;
}

.broker-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-strong);
}

.broker-btn:active {
  transform: scale(0.985);
}

.broker-btn-primary {
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green) 32%, var(--border));
  color: var(--green);
}

.broker-btn-primary:hover {
  background: color-mix(in srgb, var(--green-bg) 70%, var(--green) 12%);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  color: var(--green-hover, var(--green));
}

.broker-btn-secondary {
  background: transparent;
}

.broker-btn-dark {
  width: 100%;
  margin-top: 1.1rem;
  min-height: 40px;
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green) 32%, var(--border));
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 600;
}

.broker-btn-dark:hover {
  background: color-mix(in srgb, var(--green-bg) 70%, var(--green) 12%);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  color: var(--green-hover, var(--green));
  transform: none;
}

[data-theme="dark"] .broker-btn-dark,
[data-theme="dark"] .broker-btn-dark:hover {
  /* same soft green treatment in dark */
}

.broker-uid-row .broker-btn-primary {
  flex: 0 0 auto;
  min-width: 110px;
}

.broker-uid-verified,
.broker-uid-pending {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
  background: color-mix(in srgb, var(--green-bg) 75%, var(--surface));
}

.broker-uid-verified[hidden],
.broker-uid-pending[hidden],
.broker-uid-form[hidden],
.broker-card-lead[hidden],
.broker-field-label[hidden],
.broker-note[hidden],
#broker-uid-submit[hidden] {
  display: none !important;
}

.broker-uid-field-wrap {
  margin-top: 0.85rem;
}

.broker-uid-field-wrap .broker-field-label {
  margin-bottom: 0.45rem;
}

.broker-uid-field-wrap .profile-broker-uid-field input:read-only {
  color: var(--text);
  cursor: default;
}

.broker-uid-verified .broker-status-dot {
  margin-top: 0.35rem;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent);
}

.broker-uid-pending {
  border-color: color-mix(in srgb, var(--gold) 35%, var(--border));
  background: color-mix(in srgb, var(--gold-light) 55%, var(--surface));
}

.broker-pending-dot {
  margin-top: 0.35rem;
  background: var(--gold);
}

.broker-uid-verified p,
.broker-uid-pending p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.broker-inline-link {
  appearance: none;
  border: 0;
  padding: 0;
  margin-left: 0.2rem;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.broker-note {
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #38bdf8 28%, var(--border));
  background: color-mix(in srgb, #e0f2fe 70%, var(--surface));
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-soft);
}

[data-theme="dark"] .broker-note {
  background: color-mix(in srgb, #0c4a6e 35%, var(--surface));
  border-color: color-mix(in srgb, #38bdf8 25%, var(--border));
}

.broker-note strong {
  color: var(--text);
}

.broker-step-done.is-ready {
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
}

@media (max-width: 768px) {
  .broker-uid-row {
    flex-direction: column;
  }

  .broker-uid-row .broker-btn-primary {
    width: 100%;
  }
}

/* Algo-Trading */
.algo-panel {
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.algo-panel [hidden] {
  display: none !important;
}

#algo-content {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

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

.algo-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.algo-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-intro {
  margin: 0;
  max-width: 40rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.algo-ea-sections {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
  margin-top: 0.85rem;
}

/* Featured EA spotlight */
.algo-featured-wrap {
  margin-bottom: 0.25rem;
}

.algo-featured {
  appearance: none;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border));
  border-radius: var(--radius);
  background:
    radial-gradient(100% 80% at 0% 0%, color-mix(in srgb, var(--green) 14%, transparent), transparent 58%),
    linear-gradient(160deg, color-mix(in srgb, var(--green-bg) 55%, var(--surface)), var(--surface));
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "head action"
    "title title"
    "meta meta"
    "kpis kpis";
  gap: 0.35rem 0.75rem;
  align-items: start;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.algo-featured-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.algo-featured:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.algo-featured-tag {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--border));
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.algo-featured-title {
  grid-area: title;
  display: block;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 0.15rem;
}

.algo-featured-meta {
  grid-area: meta;
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.algo-featured-kpis {
  grid-area: kpis;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--green) 18%, var(--border));
}

.algo-featured-kpi {
  min-width: 4.5rem;
}

.algo-featured-kpi-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.algo-featured-kpi-value-compact {
  display: none;
}

.algo-featured-kpi-label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-featured-action {
  grid-area: action;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--text-muted);
  align-self: center;
  justify-self: end;
}

/* Favorites strip */
.algo-fav-wrap {
  margin: 0.15rem 0;
}

.algo-fav-strip {
  appearance: none;
  width: 100%;
  border: 1px solid color-mix(in srgb, #ca8a04 35%, var(--border));
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, color-mix(in srgb, #ca8a04 8%, var(--surface)), var(--surface));
  padding: 0.85rem 1rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

html[data-theme="dark"] .algo-fav-strip {
  border-color: color-mix(in srgb, #fbbf24 35%, var(--border));
  background: linear-gradient(90deg, color-mix(in srgb, #fbbf24 10%, var(--surface)), var(--surface));
}

.algo-fav-strip:hover {
  border-color: color-mix(in srgb, #ca8a04 55%, var(--border));
}

html[data-theme="dark"] .algo-fav-strip:hover {
  border-color: color-mix(in srgb, #fbbf24 55%, var(--border));
}

.algo-fav-strip.is-empty {
  opacity: 0.88;
  cursor: pointer;
}

.algo-fav-strip-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #ca8a04;
  background: color-mix(in srgb, #ca8a04 14%, var(--surface));
}

html[data-theme="dark"] .algo-fav-strip-icon {
  color: #fbbf24;
  background: color-mix(in srgb, #fbbf24 14%, var(--surface));
}

.algo-fav-strip-copy {
  flex: 1;
  min-width: 0;
}

.algo-fav-strip-copy strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.25;
}

.algo-fav-strip-copy span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.algo-fav-strip-action {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 650;
  color: #ca8a04;
}

html[data-theme="dark"] .algo-fav-strip-action {
  color: #fbbf24;
}

.algo-fav-strip.is-empty .algo-fav-strip-action {
  color: var(--text-muted);
}

.algo-ea-section-title {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.algo-ea-section-fav .algo-ea-section-title {
  color: #ca8a04;
}

html[data-theme="dark"] .algo-ea-section-fav .algo-ea-section-title {
  color: #fbbf24;
}

.algo-ea-section-custom .algo-ea-section-title {
  color: var(--algo-blue);
}

.algo-ea-section-tradelic .algo-ea-section-title {
  color: var(--green);
}

.algo-ea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.65rem;
}

.algo-ea-card {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  display: flex;
  flex-direction: column;
  min-height: 6.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.algo-ea-card-official {
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--green) 16%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 35%, var(--surface)), var(--surface));
}

.algo-ea-card:hover {
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
  transform: translateY(-1px);
}

.algo-ea-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.85rem 0.9rem;
  flex: 1;
  justify-content: center;
}

.algo-ea-card-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-ea-card-title {
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.algo-ea-card-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.algo-ea-card-stat {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
}

.algo-ea-card-stat span {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.15rem;
}

.algo-ea-card-stat.is-muted {
  color: var(--text-muted);
  font-weight: 600;
}

.algo-stats-head {
  margin-bottom: 0.75rem;
}

.algo-stats-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.algo-stats-sub {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.algo-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.algo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.algo-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.algo-th-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  color: var(--text-muted);
}

.algo-th-btn:hover,
.algo-th-btn.is-active {
  color: var(--text);
}

.algo-th-static {
  padding: 0.65rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
}

.algo-th-check,
.algo-td-check {
  width: 2.75rem;
  padding: 0.45rem 0.55rem;
  text-align: center;
  vertical-align: middle;
}

.algo-th-check input,
.algo-td-check input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--algo-blue);
}

.algo-td-ea {
  font-weight: 650;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.algo-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.algo-table tbody tr:last-child td {
  border-bottom: 0;
}

.algo-row-click {
  cursor: pointer;
  transition: background 0.12s;
}

.algo-row-click:hover,
.algo-row-click:focus-visible {
  background: color-mix(in srgb, var(--green) 6%, var(--surface));
  outline: none;
}

.algo-td-money {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.algo-empty {
  margin: 0;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.algo-report-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.algo-report-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-report-title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.algo-report-id {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.algo-report-hero-kpi {
  text-align: right;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.algo-report-hero-kpi.is-pos {
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.algo-report-hero-kpi.is-neg {
  border-color: color-mix(in srgb, var(--red) 30%, var(--border));
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
}

.algo-report-hero-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-report-hero-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.algo-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.algo-report-kpi {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.algo-report-kpi-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-report-kpi-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.92rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.algo-report-charts {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.algo-report-chart {
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.algo-report-chart figcaption {
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-report-chart img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}

html[data-theme="dark"] .algo-report-chart img {
  background: #fafafa;
}

.algo-report-settings {
  margin-top: 0.85rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.algo-report-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.algo-report-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.55rem 1rem;
  margin: 0;
}

.algo-report-dl div {
  min-width: 0;
}

.algo-report-dl dt {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-report-dl dd {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  font-weight: 650;
}

@media (max-width: 720px) {
  .algo-ea-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .algo-featured {
    padding: 0.85rem 0.9rem;
    gap: 0.3rem 0.5rem;
  }

  .algo-featured-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
    margin-top: 0.45rem;
    padding-top: 0.55rem;
  }

  .algo-featured-kpi-value-full {
    display: none;
  }

  .algo-featured-kpi-value-compact {
    display: block;
  }

  .algo-fav-strip {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .algo-fav-strip-copy span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .algo-fav-strip-action {
    margin-left: auto;
  }

  .algo-report-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .algo-report-hero-kpi {
    text-align: left;
  }
}

@media (max-width: 380px) {
  .algo-ea-grid {
    grid-template-columns: 1fr;
  }

  .algo-ea-card {
    min-height: auto;
  }
}

/* Algo — user EAs (blue), upload, favorites, activation */
.algo-subnav {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.algo-subnav-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.38rem 0.75rem;
  cursor: pointer;
}

.algo-subnav-btn.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 25%, var(--border));
  background: var(--surface-2);
}

.algo-subnav-btn.is-locked {
  opacity: 0.72;
}

.algo-premium-gate {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
}

.algo-premium-gate .gp-unlock-short,
.algo-premium-gate .gp-unlock-inline {
  margin: 0;
}

#algo-activate-unlock .gp-unlock-inline {
  margin: 0;
}

.algo-ea-card-user {
  border-color: color-mix(in srgb, var(--algo-blue) 35%, var(--border));
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--algo-blue) 18%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--algo-blue-bg) 45%, var(--surface)), var(--surface));
}

.algo-ea-card-user:hover {
  border-color: color-mix(in srgb, var(--algo-blue) 55%, var(--border));
}

.algo-ea-card-tag-user {
  color: var(--algo-blue);
}

.algo-ea-card-user .algo-ea-card-stat {
  color: var(--algo-blue);
}

.algo-ea-card-add {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--algo-blue) 35%, var(--border));
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--algo-blue) 18%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--algo-blue-bg) 45%, var(--surface)), var(--surface));
}

.algo-ea-card-add.is-dragover,
.algo-ea-card-add:hover {
  border-color: var(--algo-blue);
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--algo-blue) 22%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--algo-blue-bg) 65%, var(--surface)), var(--surface));
}

.algo-ea-card-body-add {
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 0.75rem 0.65rem;
}

.algo-ea-card-add .algo-ea-add-plus {
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  color: var(--algo-blue);
}

.algo-ea-add-label {
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  color: var(--algo-blue);
}

.algo-ea-card-fav {
  border-color: color-mix(in srgb, #eab308 38%, var(--border));
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, #eab308 24%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg) 35%, var(--surface)), var(--surface));
}

.algo-ea-card-fav:hover {
  border-color: color-mix(in srgb, #eab308 58%, var(--border));
}

.algo-ea-card-fav .algo-ea-card-stat {
  color: #ca8a04;
}

html[data-theme="dark"] .algo-ea-card-fav .algo-ea-card-stat {
  color: #fbbf24;
}

.algo-detail-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.algo-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-left: auto;
}

.algo-delete-selected-btn:not([hidden]) {
  border-color: color-mix(in srgb, #dc2626 35%, var(--border)) !important;
  color: #dc2626 !important;
}

.algo-upload-more-btn {
  border-color: color-mix(in srgb, var(--algo-blue) 35%, var(--border)) !important;
  color: var(--algo-blue) !important;
}

.algo-report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.algo-icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
}

.algo-icon-btn:hover {
  border-color: color-mix(in srgb, var(--text) 22%, var(--border));
  color: var(--text);
  background: var(--surface-2);
}

.algo-fav-btn:hover,
.algo-fav-btn.is-active {
  border-color: color-mix(in srgb, #eab308 48%, var(--border));
  color: #ca8a04;
  background: color-mix(in srgb, #eab308 12%, var(--surface));
}

html[data-theme="dark"] .algo-fav-btn:hover,
html[data-theme="dark"] .algo-fav-btn.is-active {
  color: #fbbf24;
}

.algo-delete-btn:hover {
  border-color: color-mix(in srgb, #dc2626 45%, var(--border));
  color: #dc2626;
  background: color-mix(in srgb, #dc2626 8%, var(--surface));
}

.algo-activate-intro {
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.algo-activate-quota {
  margin-top: 0.35rem;
  color: var(--text);
}

.algo-activate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.algo-activate-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.algo-activate-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
}

.algo-activate-meta {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.algo-activation-codes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.algo-activation-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.algo-activation-item.is-muted {
  opacity: 0.55;
}

.algo-activation-code {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.algo-activation-status {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.algo-activation-actions {
  display: flex;
  gap: 0.35rem;
}

.algo-activate-api-hint {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.algo-activate-api-hint code {
  font-size: 0.68rem;
}

/* ============================================================
   Mobile layout fixes — audit 2026-08-23 (Section B)
   Top-level blocks appended after the main ≤768px block so they
   win the cascade against later base rules in this stylesheet.
   ============================================================ */

@media (max-width: 480px) {
  /* V6: Polymarket KPI single column on very small screens */
  .pm-kpi-row,
  .pm-kpi-row-6 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* K4: detail tables — last column wraps instead of clipping */
  .pm-table-wrap:not(#pm-leaderboard) td:last-child {
    white-space: normal;
    min-width: 12rem;
  }

  .pm-header {
    align-items: center;
    gap: 0.55rem;
  }

  .pm-title {
    font-size: 1.35rem;
  }

  .pm-subtitle {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .pm-status {
    padding: 0.32rem 0.52rem;
    font-size: 0.66rem;
    letter-spacing: 0.03em;
  }

  .tv-username-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .tv-username-field {
    width: 100%;
  }

  .support-ticket-list {
    max-height: none;
  }

  .support-chat-composer {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-stepper {
    grid-template-columns: 1fr;
  }

  .admin-pipeline-board {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  .admin-pipeline-col {
    min-width: 0;
  }

  /* Cascade guards: these base rules appear later in this file
     than the consolidated mobile block and would otherwise
     re-impose row layout / auto margins at mobile widths. */
  .algo-header,
  .billing-header,
  .billing-premium-top,
  .billing-portal-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .algo-detail-actions {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .profile-broker-uid-field {
    flex-direction: column;
  }
  .profile-broker-uid-field .profile-btn {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

/* News Feed */
.nf-panel {
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.nf-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.nf-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nf-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.nf-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.nf-status[data-state="live"] {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
}

.nf-status[data-state="live"] .nf-status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

.nf-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nf-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.nf-search-wrap {
  flex: 1 1 220px;
  min-width: 0;
}

.nf-search-wrap input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.nf-saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
}

.nf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nf-filter {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nf-filter select {
  min-width: 7.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  text-transform: none;
  font-weight: 500;
}

.nf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1rem;
  align-items: start;
  min-height: 420px;
}

.nf-list-wrap {
  min-width: 0;
  max-height: calc(100vh - 280px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.nf-list {
  display: flex;
  flex-direction: column;
}

.nf-card {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.nf-card:last-child {
  border-bottom: 0;
}

.nf-card:hover,
.nf-card.is-active {
  background: color-mix(in srgb, var(--green) 5%, var(--surface));
}

.nf-card-main {
  padding: 0.85rem 1rem;
}

.nf-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nf-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nf-importance {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.nf-importance--high {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
  background: color-mix(in srgb, var(--red) 8%, transparent);
}

.nf-importance--medium {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 35%, var(--border));
}

.nf-card-title {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.nf-card-meta {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nf-corr {
  color: var(--green);
  font-weight: 600;
}

.nf-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.nf-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-soft);
}

.nf-dir {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.nf-dir.is-bull,
.is-bull { color: var(--green); }
.nf-dir.is-bear,
.is-bear { color: var(--red); }
.nf-dir.is-neutral,
.is-neutral { color: var(--text-muted); }
.nf-dir.is-uncertain,
.is-uncertain { color: var(--gold); }

.nf-card-actions {
  margin-top: 0.5rem;
}

.nf-save-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.nf-save-btn.is-saved {
  color: var(--gold);
}

.nf-detail-wrap {
  min-width: 0;
  position: sticky;
  top: 1rem;
}

.nf-detail {
  padding: 1rem 1.1rem;
  max-height: calc(100vh - 280px);
  overflow: auto;
}

.nf-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nf-detail-title {
  margin: 0.6rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.nf-summary {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.nf-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.nf-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nf-block--muted p,
.nf-disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.nf-dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.nf-dl dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nf-dl dd {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.nf-est {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--gold-light);
  color: var(--gold);
  vertical-align: middle;
}

.nf-horizons {
  display: grid;
  gap: 0.55rem;
}

.nf-horizon {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.nf-horizon-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nf-horizon strong {
  display: inline-block;
  margin-right: 0.35rem;
}

.nf-horizon-conf {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nf-horizon p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.nf-reaction-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.nf-reaction {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.nf-reaction strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
}

.nf-reaction-pair {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.nf-sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.nf-source-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.nf-source-item a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.nf-source-item a:hover {
  text-decoration: underline;
}

.nf-policy {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-muted);
}

.nf-primary {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
}

.nf-empty {
  padding: 1.25rem;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.nf-card.is-new {
  animation: nf-new-pulse 2s ease-out 1;
  border-left: 3px solid var(--green);
}

@keyframes nf-new-pulse {
  0% { background: color-mix(in srgb, var(--green) 18%, var(--surface)); }
  100% { background: transparent; }
}

.nf-card-instrument {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-soft);
}

.nf-impacts {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.nf-impacts--compact .nf-impact p {
  display: none;
}

.nf-impact {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.nf-impact-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.nf-impact-head strong {
  font-weight: 800;
}

.nf-impact-head span {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.nf-impact p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.nf-impact.is-bull { border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.nf-impact.is-bear { border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }

.nf-horizon-inst {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-soft);
}

.nf-push-prompt {
  margin-bottom: 0.25rem;
}

.nf-card-expand {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px dashed var(--border);
}

.nf-card.is-expanded .nf-card-expand {
  display: block;
}

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

  .nf-detail-wrap {
    display: none;
  }

  .nf-list-wrap {
    max-height: none;
  }

  .nf-reaction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nf-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Local terminal embed (dashboard ?tab=terminal) */
.dashboard-main.is-terminal {
  padding: 0;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  max-width: none;
}

.dashboard-main.is-terminal .terminal-panel {
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.terminal-panel {
  max-width: none;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}

.terminal-panel[hidden] {
  display: none !important;
}

.terminal-panel.is-warm-hidden {
  display: block !important;
  position: fixed !important;
  width: 2px !important;
  height: 2px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -100vw !important;
  top: 0 !important;
  overflow: hidden !important;
  z-index: -1 !important;
}

.terminal-local-banner {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--green) 45%, var(--border));
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.terminal-local-banner-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.terminal-local-banner-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.terminal-local-banner-copy code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.terminal-embed-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  height: calc(100dvh - 56px);
  /* Adjacent chrome already draws the shared edges — avoid double borders. */
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #131722;
  box-shadow: none;
}

.terminal-embed-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #131722;
}

.terminal-embed-fallback[hidden] {
  display: none !important;
}

.terminal-embed-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 92%, #131722);
}

.terminal-embed-fallback p {
  margin: 0;
}

.terminal-embed-fallback code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

/*
  Dashboard nav — CSS is the source of truth (do not gate this on a JS class).
  ≤1100px: hamburger + off-canvas drawer.
  ≥1101px: persistent sidebar, no hamburger.
*/
@media (max-width: 1100px) {
  .dashboard-app {
    grid-template-columns: minmax(0, 1fr) !important;
    --gp-rail-col: 0px;
    /* One clearance token for dock height + Soft sheet bottom — avoids a gap. */
    --gp-mobile-dock-clearance: calc(var(--gp-mobile-dock-height) + env(safe-area-inset-bottom, 0px));
  }

  .dashboard-menu-toggle {
    display: flex !important;
    flex-shrink: 0;
  }

  .dashboard-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 45;
  }

  html[data-theme="dark"] .dashboard-backdrop {
    background: rgba(0, 0, 0, 0.55);
  }

  .dashboard-backdrop[hidden] {
    display: none;
  }

  .dashboard-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(86vw, 300px) !important;
    height: 100dvh !important;
    min-height: 100dvh;
    transform: translateX(-105%) !important;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.24s ease, visibility 0.24s ease;
    box-shadow: var(--shadow-lg);
    z-index: 50;
  }

  .dashboard-sidebar.open {
    transform: translateX(0) !important;
    visibility: visible;
    pointer-events: auto;
  }

  .dashboard-topbar {
    padding: 0 0.85rem;
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .dashboard-breadcrumb {
    flex: 1;
    min-width: 0;
  }

  .dashboard-breadcrumb-root,
  .dashboard-breadcrumb-sep {
    display: none;
  }

  .dashboard-breadcrumb-root-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .dashboard-breadcrumb-version {
    font-size: 0.68rem;
  }

  .dashboard-breadcrumb-current {
    font-size: 0.82rem;
  }

  .dashboard-main-wrap {
    padding-bottom: var(--gp-mobile-dock-clearance);
  }

  .dashboard-main {
    padding: 1rem 1rem 1.5rem;
  }

  .dashboard-panel {
    min-height: 0;
    padding: 0;
  }

  body.dashboard-nav-open {
    overflow: hidden;
  }

  .dashboard-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .dashboard-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .dashboard-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .dashboard-main.is-terminal {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  body.dashboard-terminal-tab {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
  }

  body.dashboard-terminal-tab .dashboard-app {
    min-height: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.dashboard-terminal-tab .dashboard-main-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  body.dashboard-terminal-tab .terminal-panel {
    flex: 1;
    min-height: 0;
  }

  .terminal-local-banner {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }

  .terminal-embed-shell {
    flex: 1;
    min-height: 0;
    height: auto !important;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  /* Soft shell: overlay only — no right-column width.
     height/width 0 keeps this grid item from eating the viewport on the
     single-column mobile layout while fixed children (dock/sheet) still show. */
  .gp-right-shell {
    position: fixed;
    inset: 0;
    z-index: 36;
    height: 0;
    max-height: none;
    width: 0;
    border: none;
    background: transparent;
    pointer-events: none;
    overflow: visible;
    display: block;
    align-self: auto;
  }

  .gp-assistant-host {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #0c0c0c;
    color: #ececef;
  }

  html[data-theme="light"] .gp-assistant-host {
    background: #f7f5f2;
    color: #1c1b19;
  }

  .gp-assistant-resizer {
    display: none !important;
  }

  .gp-widget-rail {
    pointer-events: auto;
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-around;
    width: 100%;
    height: auto;
    min-height: var(--gp-mobile-dock-clearance);
    padding: 6px 4px;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    gap: 2px;
    border-left: none;
    border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
    background: #0c0c0c;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    overflow: visible;
    box-sizing: border-box;
  }

  html[data-theme="light"] .gp-widget-rail {
    background: #f7f5f2;
    border-top-color: #e6e3de;
    box-shadow: 0 -4px 24px rgba(28, 27, 25, 0.08);
  }

  .gp-rail-page,
  .gp-rail-global {
    display: contents;
  }

  .gp-rail-spacer {
    display: none;
  }

  .gp-rail-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    min-height: 48px;
    padding: 5px 2px 4px;
    gap: 4px;
    border-radius: 10px;
    position: relative;
  }

  .gp-rail-label {
    display: block;
    max-width: 100%;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
    text-align: center;
  }

  .gp-rail-btn.active::before,
  .gp-rail-btn[aria-pressed="true"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--green, #3ecf8e);
  }

  /* Soft as bottom sheet above dock */
  .gp-right-shell[data-open="true"] .gp-assistant-host:not([hidden]) {
    pointer-events: auto;
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: var(--gp-mobile-dock-clearance);
    width: 100% !important;
    max-width: none !important;
    height: min(85dvh, calc(100dvh - var(--gp-mobile-dock-clearance) - 48px));
    border-radius: 16px 16px 0 0;
    border: 1px solid color-mix(in srgb, #fff 10%, transparent);
    border-bottom: none;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
    z-index: 38;
    transition: height 0.22s ease;
    background: #0c0c0c;
    color: #ececef;
    overflow: hidden;
  }

  html[data-theme="light"] .gp-right-shell[data-open="true"] .gp-assistant-host:not([hidden]) {
    border-color: #e6e3de;
    box-shadow: 0 -12px 40px rgba(28, 27, 25, 0.12);
    background: #f7f5f2;
    color: #1c1b19;
  }

  .gp-assistant-empty {
    margin: 10vh auto 0;
  }

  /* Fullscreen Soft on mobile: fill above dock; dock stays */
  .dashboard-app.is-assistant-fullscreen {
    --gp-rail-col: 0px;
  }

  .dashboard-app.is-assistant-fullscreen .gp-right-shell {
    width: auto;
    max-width: none;
  }

  .dashboard-app.is-assistant-fullscreen .gp-right-shell[data-open="true"] .gp-assistant-host:not([hidden]) {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: var(--gp-mobile-dock-clearance) !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    flex: none !important;
    z-index: 38;
  }

  .dashboard-app.is-assistant-fullscreen .dashboard-main-wrap {
    pointer-events: none;
  }

  .dashboard-app.is-assistant-fullscreen .gp-widget-rail {
    position: fixed;
    z-index: 40;
  }
}

@media (min-width: 1101px) {
  .dashboard-app {
    grid-template-columns: var(--dashboard-sidebar-w, 260px) minmax(0, 1fr) var(--gp-rail-col, 44px);
  }

  .dashboard-menu-toggle {
    display: none !important;
  }

  .dashboard-backdrop,
  .dashboard-backdrop[hidden] {
    display: none !important;
  }

  .dashboard-sidebar {
    position: sticky !important;
    inset: auto;
    width: auto !important;
    height: 100vh;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: none;
    transition: none;
  }

  .dashboard-sidebar.open {
    transform: none !important;
  }

  .dashboard-topbar {
    position: static;
    padding: 0 1.5rem;
  }

  .dashboard-breadcrumb-root,
  .dashboard-breadcrumb-sep {
    display: inline;
  }

  body.dashboard-nav-open {
    overflow: auto;
  }
}

/* ── Soft Assistant shell + right rail ── */
/* Desktop layout only — mobile Soft/dock rules live in @media (max-width: 1100px) above
   and must not be overridden by these sticky/flex defaults. */
@media (min-width: 1101px) {
  .gp-right-shell {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    align-self: start;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: #0c0c0c;
    border-left: 1px solid var(--border);
    z-index: 35;
  }

  html[data-theme="light"] .gp-right-shell {
    background: #f7f5f2;
    border-left-color: var(--border);
  }

  .gp-assistant-host {
    width: 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #0c0c0c;
    color: #ececef;
    transition: width 0.2s ease;
    position: relative;
  }

  html[data-theme="light"] .gp-assistant-host {
    background: #f7f5f2;
    color: #1c1b19;
  }

  .gp-right-shell[data-open="true"] .gp-assistant-host:not([hidden]) {
    width: var(--gp-assistant-w, 380px);
    border-right: 1px solid var(--border);
  }

  html[data-theme="light"] .gp-right-shell[data-open="true"] .gp-assistant-host:not([hidden]) {
    border-right-color: var(--border);
  }

  .gp-assistant-resizer {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    z-index: 45;
    cursor: col-resize;
    touch-action: none;
    background: transparent;
    pointer-events: none;
  }

  .gp-right-shell[data-open="true"] .gp-assistant-resizer.is-active {
    display: block;
    pointer-events: auto;
  }

  .gp-assistant-resizer:hover,
  body.is-assistant-resizing .gp-assistant-resizer {
    background: color-mix(in srgb, var(--green) 55%, transparent);
  }

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

  body.is-assistant-resizing .gp-assistant-host {
    transition: none;
  }

  body.is-assistant-resizing .dashboard-app {
    transition: none;
  }

  body.is-assistant-resizing #terminal-embed {
    pointer-events: none;
  }

  .gp-widget-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: var(--gp-rail-w, 44px);
    flex-shrink: 0;
    height: 100%;
    min-height: 0;
    padding: 8px 4px;
    background: #0c0c0c;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .gp-widget-rail::-webkit-scrollbar {
    display: none;
  }

  html[data-theme="light"] .gp-widget-rail {
    background: #f7f5f2;
  }

  .gp-rail-page,
  .gp-rail-global {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
  }

  .gp-rail-spacer {
    flex: 1;
    min-height: 8px;
  }
}

.gp-assistant-host[hidden] {
  display: none !important;
  width: 0 !important;
}

.gp-assistant-panel.llm-panel {
  flex: 1;
  min-height: 0;
  height: 100%;
  /* Must be opaque — on mobile the parent shell is transparent for overlay layout. */
  background: #0c0c0c;
  color: #ececef;
}

html[data-theme="light"] .gp-assistant-panel.llm-panel {
  background: #f7f5f2;
  color: #1c1b19;
}

.gp-assistant-empty {
  margin: 18vh auto 0;
  max-width: 16rem;
  text-align: center;
  color: #8b8b93;
  font-size: 0.84rem;
  line-height: 1.45;
}

html[data-theme="light"] .gp-assistant-empty {
  color: #8a8680;
}

/* Shared rail control chrome (layout direction set per breakpoint above / mobile). */
.gp-widget-rail {
  display: flex;
  background: #0c0c0c;
  scrollbar-width: none;
}

.gp-widget-rail::-webkit-scrollbar {
  display: none;
}

html[data-theme="light"] .gp-widget-rail {
  background: #f7f5f2;
}

.gp-rail-btn {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #8b8b93;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

html[data-theme="light"] .gp-rail-btn {
  color: #8a8680;
}

.gp-rail-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.gp-rail-label {
  display: none;
  max-width: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.gp-rail-btn:hover {
  color: #ececef;
  background: color-mix(in srgb, #fff 6%, transparent);
}

html[data-theme="light"] .gp-rail-btn:hover {
  color: #1c1b19;
  background: color-mix(in srgb, #000 5%, transparent);
}

.gp-rail-btn.active,
.gp-rail-btn[aria-pressed="true"] {
  color: #ececef;
  background: color-mix(in srgb, #fff 10%, transparent);
}

html[data-theme="light"] .gp-rail-btn.active,
html[data-theme="light"] .gp-rail-btn[aria-pressed="true"] {
  color: #1c1b19;
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 27, 25, 0.06);
}

.gp-rail-btn[data-rail="collapse"].active {
  background: transparent;
  color: inherit;
}

/* Soft message + composer tokens inside dashboard host */
.gp-assistant-host {
  --tv-panel: #0c0c0c;
  --tv-surface: #0c0c0c;
  --tv-border: #222228;
  --tv-text: #ececef;
  --tv-heading: #f4f4f5;
  --tv-muted: #8b8b93;
  --tv-accent: #059669;
  --tv-hover: #1c1c20;
  --tv-red: #ef4444;
}

html[data-theme="light"] .gp-assistant-host {
  --tv-panel: #f7f5f2;
  --tv-surface: #ffffff;
  --tv-border: #e6e3de;
  --tv-text: #1c1b19;
  --tv-heading: #111110;
  --tv-muted: #8a8680;
  --tv-accent: #059669;
  --tv-hover: #efede9;
}

.gp-assistant-host .llm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 56px;
  min-height: 56px;
  box-sizing: border-box;
  padding: 0 0.85rem;
  /* Match dashboard topbar hairline */
  border-bottom: 1px solid var(--border, var(--tv-border));
  flex-shrink: 0;
}

.gp-assistant-host .llm-panel-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.gp-assistant-host .llm-brand-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--tv-heading);
}

.gp-assistant-host .llm-brand-icon svg {
  width: 16px;
  height: 16px;
}

.gp-assistant-host .llm-panel-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--tv-heading);
}

.gp-assistant-host .llm-panel-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 1px 0 0;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--tv-muted);
}

.gp-assistant-host .llm-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tv-muted);
  flex-shrink: 0;
}

.gp-assistant-host .llm-status-dot.is-connected {
  background: var(--tv-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tv-accent) 22%, transparent);
}

.gp-assistant-host .llm-status-dot.is-busy {
  background: #f59e0b;
  box-shadow: 0 0 0 3px color-mix(in srgb, #f59e0b 22%, transparent);
  animation: gp-llm-pulse 1.2s ease-in-out infinite;
}

@keyframes gp-llm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.gp-assistant-host .llm-panel-head-actions {
  display: flex;
  gap: 6px;
}

.gp-assistant-host .llm-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--tv-border);
  background: var(--tv-surface);
  color: var(--tv-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gp-assistant-host .llm-icon-btn svg {
  width: 15px;
  height: 15px;
}

.gp-assistant-host .llm-icon-btn:hover,
.gp-assistant-host .llm-icon-btn.is-active {
  color: var(--tv-text);
  border-color: color-mix(in srgb, var(--tv-accent) 45%, var(--tv-border));
  background: color-mix(in srgb, var(--tv-accent) 10%, var(--tv-surface));
}

.gp-assistant-host .llm-thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.85rem 0.8rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gp-assistant-host .llm-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.gp-assistant-host .llm-msg-row-user {
  flex-direction: row-reverse;
}

.gp-assistant-host .llm-msg-avatar {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tv-heading);
}

.gp-assistant-host .llm-msg-avatar[hidden] {
  display: none !important;
}

.gp-assistant-host .llm-msg-avatar svg {
  width: 14px;
  height: 14px;
}

.gp-assistant-host .llm-msg-content {
  min-width: 0;
  max-width: 100%;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--tv-text);
}

.gp-assistant-host .llm-msg-user .llm-msg-content {
  background: #1c1c20;
  border-radius: 18px 18px 6px 18px;
  padding: 0.55rem 0.75rem;
  width: fit-content;
  max-width: 92%;
}

html[data-theme="light"] .gp-assistant-host .llm-msg-user .llm-msg-content {
  background: #e6e3de;
}

.gp-assistant-host .llm-msg-assistant .llm-msg-content {
  background: transparent;
  border: 0;
  padding: 0.1rem 0;
}

.gp-assistant-host .llm-msg-user {
  align-self: flex-end;
}

.gp-assistant-host .llm-msg-assistant {
  align-self: stretch;
}

.gp-assistant-host .llm-msg-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.gp-assistant-host .llm-msg-body.llm-md {
  white-space: normal;
}

.gp-assistant-host .llm-msg-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78em;
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--tv-muted) 14%, transparent);
}

.gp-assistant-host .llm-msg-footer {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--tv-muted);
}

.gp-assistant-host .llm-msg-image {
  display: block;
  margin-top: 0.45rem;
  max-width: 100%;
  border-radius: 10px;
}

.gp-assistant-host .llm-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 1em;
}

.gp-assistant-host .llm-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tv-muted);
  animation: gp-llm-pulse 1s ease-in-out infinite;
}

.gp-assistant-host .llm-typing i:nth-child(2) { animation-delay: 0.15s; }
.gp-assistant-host .llm-typing i:nth-child(3) { animation-delay: 0.3s; }

.gp-assistant-host .llm-composer {
  flex-shrink: 0;
  padding: 0.45rem 0.65rem max(0.75rem, env(safe-area-inset-bottom));
  border-top: none;
}

.gp-assistant-host .llm-composer-box {
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--tv-border) 85%, transparent);
  background: var(--tv-surface);
  box-shadow:
    0 2px 8px color-mix(in srgb, #000 6%, transparent),
    0 10px 28px color-mix(in srgb, #000 5%, transparent);
  overflow: hidden;
  padding: 0.65rem 0.7rem 0.55rem;
}

html[data-theme="dark"] .gp-assistant-host .llm-composer-box,
:root:not([data-theme="light"]) .gp-assistant-host .llm-composer-box {
  border-radius: 18px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}

.gp-assistant-host .llm-composer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: end;
}

.gp-assistant-host .llm-input {
  width: 100%;
  min-height: 28px;
  max-height: 120px;
  resize: none;
  padding: 0.15rem 0.15rem 0.35rem;
  border: none;
  background: transparent;
  color: var(--tv-text);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
}

.gp-assistant-host .llm-input:focus {
  outline: none;
}

.gp-assistant-host .llm-composer-tools {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.25rem;
}

.gp-assistant-host .llm-composer-spacer {
  flex: 1;
}

.gp-assistant-host .llm-ghost-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tv-muted);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gp-assistant-host .llm-ghost-icon svg {
  width: 16px;
  height: 16px;
}

.gp-assistant-host .llm-ghost-icon:hover,
.gp-assistant-host .llm-ghost-icon.is-active {
  color: var(--tv-text);
  background: color-mix(in srgb, var(--tv-muted) 12%, transparent);
}

.gp-assistant-host .llm-send {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #111110;
  color: #f4f4f5;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="light"] .gp-assistant-host .llm-send {
  background: #111110;
  color: #fff;
}

.gp-assistant-host .llm-send svg {
  width: 16px;
  height: 16px;
}

.gp-assistant-host .llm-send[hidden],
.gp-assistant-host .llm-send-stop[hidden] {
  display: none !important;
}

.gp-assistant-host .llm-send-stop {
  background: color-mix(in srgb, var(--tv-red) 18%, var(--tv-surface));
  color: var(--tv-red);
}

/* Fullscreen Soft: cover #dashboard-main column only; left nav + rail stay */
.dashboard-app.is-assistant-fullscreen {
  --gp-rail-col: var(--gp-rail-w);
}

.dashboard-app.is-assistant-fullscreen .gp-right-shell {
  width: var(--gp-rail-w, 44px);
  max-width: var(--gp-rail-w, 44px);
}

.dashboard-app.is-assistant-fullscreen .gp-right-shell[data-open="true"] .gp-assistant-host:not([hidden]) {
  position: fixed !important;
  top: 0;
  bottom: 0;
  left: var(--dashboard-sidebar-w, 260px);
  right: var(--gp-rail-w, 44px);
  width: auto !important;
  max-width: none !important;
  flex: 0 0 0 !important;
  min-width: 0 !important;
  z-index: 30;
  border-right: 1px solid color-mix(in srgb, #fff 8%, transparent);
  box-shadow: none;
}

.dashboard-app.is-assistant-fullscreen .dashboard-main-wrap {
  pointer-events: none;
}

.dashboard-app.is-assistant-fullscreen .gp-widget-rail {
  position: relative;
  z-index: 40;
}

@media (max-width: 1100px) {
  /* Desktop fullscreen rules above don't apply on the bottom-dock layout */
  .dashboard-app.is-assistant-fullscreen .gp-right-shell {
    width: auto;
    max-width: none;
  }

  .dashboard-app.is-assistant-fullscreen .gp-right-shell[data-open="true"] .gp-assistant-host:not([hidden]) {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: var(--gp-mobile-dock-clearance) !important;
    height: auto !important;
    border-radius: 0;
  }

  .dashboard-app.is-assistant-fullscreen .gp-widget-rail {
    position: fixed;
    z-index: 40;
  }

  body.dashboard-terminal-tab .gp-right-shell {
    height: auto;
    max-height: none;
  }
}

@media (min-width: 1101px) {
  body.dashboard-terminal-tab .gp-right-shell {
    /* Terminal main is viewport-locked; keep shell locked to the same height. */
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
  }
}

body.dashboard-terminal-tab .dashboard-app {
  grid-template-rows: minmax(0, 1fr);
}
