/* ─── Google Fonts (must be first) ─────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400&display=swap');

/* ═══════════════════════════════════════════════════════
   Human Design Website — Core Styles
   Tone: intelligent, grounded, slightly provocative
   Dark, clean, philosophical
   ═══════════════════════════════════════════════════════ */

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

:root {
  /* Colors — dark with warm accents */
  --bg-deep: #0a0a0f;
  --bg-card: #12121a;
  --bg-surface: #1a1a26;
  --bg-hover: #222233;
  
  --text-primary: #e8e6e1;
  --text-secondary: #9a9690;
  --text-muted: #5a5854;
  
  --accent: #c49a6c;
  --accent-dim: #8a6d4d;
  --accent-glow: rgba(196, 154, 108, 0.15);
  --accent-bright: #E8C170;

  /* Cover / launch tones — home & marketing surfaces */
  --bg-launch: #0E0B1F;
  --cover-vig-1: #1A1530;
  --cover-vig-2: #0E0B1F;
  --cover-vig-3: #08060F;
  
  --border: #2a2a38;
  --border-light: #333344;
  
  /* Type colors for HD types */
  --type-generator: #e8a838;
  --type-mg: #e87038;
  --type-manifestor: #c83838;
  --type-projector: #3888c8;
  --type-reflector: #88c888;
  
  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;
  
  /* Layout */
  --max-width: 1200px;
  --content-width: 720px;
  --nav-height: 72px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ─── Typography ───────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--text-primary);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--accent-dim);
}

blockquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ─── Navigation ───────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 101;
}

.nav-logo {
  height: 56px;
  width: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-brand:hover .nav-logo {
  transform: scale(1.03);
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a,
.nav-dropdown-trigger {
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > a.active,
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active {
  color: var(--accent);
}

/* ─── Nav Dropdown ─────────────────────────────────────── */

.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.dropdown-chevron {
  transition: transform 0.2s ease;
}

.nav-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 200px;
  padding: 0.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

.nav-dropdown-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu li a:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.nav-dropdown-menu .nav-coming-soon {
  cursor: not-allowed;
  opacity: 0.5;
}

.nav-dropdown-menu .nav-coming-soon:hover {
  background: transparent;
  color: var(--text-secondary);
}

.tbd-badge {
  font-size: 0.65rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

/* ─── Calculator Sub-Nav ──────────────────────────────── */

.calc-subnav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  margin-top: var(--nav-height, 72px);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calc-subnav a {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 20px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  border: 1px solid transparent;
}

.calc-subnav a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.calc-subnav a.active {
  color: var(--bg-deep);
  background: var(--accent);
  font-weight: 600;
}

@media (max-width: 600px) {
  .calc-subnav {
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
  }
  .calc-subnav a {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* ─── User Menu ────────────────────────────────────────── */

.nav-user {
  position: relative;
  margin-left: 0.5rem;
}

.user-icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
  padding: 0;
}

.user-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 160px;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-direction: column;
}

.user-dropdown.open {
  display: flex;
}

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  letter-spacing: 0.03em;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

.dropdown-upgrade-link {
  color: var(--accent) !important;
}

/* ─── Nav Right Controls (user icon + burger) ─────────── */

.nav-right-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 102;
}

/* Desktop: hide user icon from controls, show in nav-links */
.nav-right-controls > .nav-user {
  display: none;
}

/* Desktop inline user icon in nav-links: smaller */
.nav-user--inline {
  display: flex;
  align-items: center;
}

.nav-user--inline .user-icon-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
}

.nav-user--inline .user-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── Mobile Nav Toggle (Hamburger) ────────────────────── */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Layout ───────────────────────────────────────────── */

main {
  padding-top: var(--nav-height);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.content {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  padding: var(--space-2xl) 0;
}

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

/* ─── Hero ─────────────────────────────────────────────── */

.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  position: relative;
}

.hero h1 {
  max-width: 800px;
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-xl);
}

.hero-line {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-lg) auto;
}

/* ─── Cards ────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-lg);
  transition: border-color 0.3s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

/* ─── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}

.btn-primary:hover {
  background: var(--text-primary);
  color: var(--bg-deep);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--accent);
}

/* ─── Forms ────────────────────────────────────────────── */

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
}

/* ─── Chart Display ────────────────────────────────────── */

.chart-result {
  display: none;
  margin-top: var(--space-sm);
}

.chart-result.visible {
  display: block;
}

.chart-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.chart-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md) var(--space-lg);
  text-align: center;
}

.chart-stat .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.chart-stat .value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
}

.chart-planets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.planet-table {
  width: 100%;
  border-collapse: collapse;
}

.planet-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
}

.planet-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.planet-table .gate-cell {
  font-family: var(--font-mono);
  color: var(--accent);
}

.personality-label {
  color: var(--text-primary);
  font-weight: 600;
}

.design-label {
  color: #D4A843;
  font-weight: 600;
}

/* ─── Centers Visualization ────────────────────────────── */

.centers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  max-width: 300px;
  margin: var(--space-lg) auto;
}

.center-node {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid var(--border);
  transition: all 0.3s;
}

.center-node.defined {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.center-node.undefined {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

/* ─── Channels List ────────────────────────────────────── */

.channel-list {
  list-style: none;
}

.channel-list li {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.channel-list .channel-key {
  font-family: var(--font-mono);
  color: var(--accent);
  min-width: 60px;
}

.channel-list .channel-name {
  font-weight: 600;
  color: var(--text-primary);
}

.channel-list .channel-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ─── Calculator Sub-Nav ───────────────────────────────── */

.calc-subnav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding-top: var(--nav-height);
}

.calc-subnav-inner {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calc-subnav-link {
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.calc-subnav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.calc-subnav-link.active {
  color: var(--accent);
  background: rgba(196, 154, 108, 0.1);
  font-weight: 600;
}

@media (max-width: 768px) {
  .calc-subnav-inner {
    justify-content: flex-start;
    gap: 2px;
    padding: var(--space-xs) var(--space-sm);
  }
  .calc-subnav-link {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
  }
}

/* ─── Footer ───────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer p {
  color: var(--text-muted);
}

.footer-social { display: flex; justify-content: center; gap: 1rem; }
.footer-social a { color: var(--text-muted); transition: color 0.2s; }
.footer-social a:hover { color: var(--accent); }
.footer-social svg { width: 20px; height: 20px; }

/* ─── Utility ──────────────────────────────────────────── */

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-lg); }

.divider {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-xl) auto;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Loading ──────────────────────────────────────────── */

.loading {
  display: none;
  text-align: center;
  padding: var(--space-xl);
}

.loading.visible {
  display: block;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-md);
}

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

/* ─── Responsive ───────────────────────────────────────── */

/* Tablet (landscape) */
@media (max-width: 1024px) {
  nav {
    padding: 0 var(--space-md);
  }
  
  .nav-links {
    gap: var(--space-sm);
  }
  
  .nav-links > li > a,
  .nav-dropdown-trigger {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }
  
  .nav-logo {
    height: 38px;
  }
}

/* Tablet (portrait) and Mobile */
@media (max-width: 768px) {
  nav {
    padding: 0 var(--space-md);
  }
  
  .nav-logo {
    height: 36px;
  }
  
  nav {
    overflow: visible;
  }

  .nav-toggle {
    display: flex;
  }

  /* Mobile: show user icon in controls, hide from nav-links */
  .nav-right-controls > .nav-user {
    display: flex;
  }

  .nav-user--inline {
    display: none !important;
  }


  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--nav-height));
    background: #0a0a0f;
    flex-direction: column;
    padding: 0;
    gap: 0;
    overflow-y: auto;
    border-bottom: none;
    z-index: 101;
  }

  .nav-links.open {
    display: flex !important;
    flex-direction: column !important;
  }

  .nav-links > li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links > li:last-child {
    border-bottom: none;
  }

  .nav-links > li > a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-decoration: none;
  }

  .nav-links > li > a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
  }


  .chart-planets {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.5rem;
  }
  
  .footer-links a {
    white-space: nowrap;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  nav {
    padding: 0 var(--space-sm);
  }
  
  .nav-logo {
    height: 32px;
  }
  
  .nav-links > li > a,
  .nav-dropdown-trigger {
    font-size: 0.95rem;
  }
}

/* ─── (Google Fonts loaded at top of file) ─────────────── */

/* ─── Bodygraph Mobile Responsiveness ────────────────── */

@media (max-width: 480px) {
  .bodygraph-container {
    max-width: 100%;
    padding: 0 var(--space-sm);
    margin: var(--space-md) auto;
  }
  
  .bodygraph-legend {
    font-size: 0.65rem;
    gap: var(--space-sm);
  }
  
  /* Make gate pills slightly larger for touch */
  .gate-pill-clickable {
    transform-origin: center;
  }
  
  /* Improve touch targets */
  .gate-pill-clickable rect {
    stroke-width: 0.8;
  }
}

/* ─── Gate Pill Hover Effects ──────────────────────────── */

.gate-pill-clickable:hover .gate-hover {
  fill: rgba(196, 154, 108, 0.25) !important;
}

.gate-pill-clickable:hover text {
  fill: var(--accent) !important;
}

.gate-pill-clickable:active {
  opacity: 0.8;
}

/* Touch feedback for mobile - highlight touch target area */
@media (hover: none) and (pointer: coarse) {
  .gate-pill-clickable:active .gate-touch-target {
    fill: rgba(196, 154, 108, 0.15) !important;
  }
  
  .gate-pill-clickable:active text {
    fill: var(--accent) !important;
  }
}

/* Keyboard focus styles for accessibility */
.gate-pill-clickable:focus {
  outline: none;
}

.gate-pill-clickable:focus .gate-hover {
  fill: rgba(196, 154, 108, 0.3) !important;
}

.gate-pill-clickable:focus text {
  fill: var(--accent) !important;
}

/* ─── Center Hover Effects ─────────────────────────────── */

.ctr g:hover polygon,
.ctr g:hover rect {
  filter: brightness(1.15);
}

/* ─── Bodygraph Channel Animations ─────────────────────── */

/* Subtle glow pulse for defined channels on load */
@keyframes channelGlow {
  0% {
    filter: drop-shadow(0 0 0px transparent);
  }
  40% {
    filter: drop-shadow(0 0 4px currentColor);
  }
  100% {
    filter: drop-shadow(0 0 0px transparent);
  }
}

.ch-on line {
  animation: channelGlow 1.5s ease-out;
  animation-delay: calc(var(--channel-index, 0) * 0.08s);
}

/* Subtle breathing effect for defined centers */
@keyframes centerBreath {
  0%, 100% {
    filter: url(#glow);
  }
  50% {
    filter: url(#glow) brightness(1.1);
  }
}

.ctr g[filter] {
  animation: centerBreath 4s ease-in-out infinite;
  animation-delay: calc(var(--center-index, 0) * 0.3s);
}

/* ─── Circuit Diagram Container ────────────────────────── */

.chart-full-layout {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}

.circuit-container {
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 240px;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.circuit-svg {
  width: 100%;
  height: auto;
  min-height: 300px;
}

/* Layout for .bodygraph-with-activations, .activations-column, .bodygraph-center
   is defined in chart.css to avoid duplicate/conflicting rules */

.activations-label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
  text-align: left;
}

.design-label {
  color: #D4A843;
}

.personality-label {
  color: #C0C0C0;
}

.activations-sublabel {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: var(--space-sm);
  text-align: left;
}

.activation-side-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  font-size: 0.9rem;
}

.gate-line-clickable {
  font-family: var(--font-mono);
  color: var(--accent);
  cursor: pointer;
  transition: color 0.2s ease;
  min-width: 3.2em;
  display: inline-block;
}

.gate-line-clickable:hover {
  color: var(--text-primary);
}

.planet-symbol {
  font-size: 0.9rem;
  opacity: 0.85;
}

.activation-angle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  min-width: 45px;
}

.design-column {
  align-items: flex-start;
}

.design-column .activation-angle {
  text-align: right;
}

.personality-column .activation-angle {
  text-align: left;
}

.design-column .activation-side-row {
  flex-direction: row;
}

.personality-column .activation-side-row {
  flex-direction: row-reverse;
}

/* .bodygraph-center layout is in chart.css */

@media (max-width: 768px) {
  .chart-full-layout {
    flex-direction: column;
    align-items: center;
  }

  .circuit-container {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    order: 2;
  }

  .bodygraph-with-activations {
    order: 1;
    width: 100%;
  }

  .bodygraph-overlay-controls .overlay-btn {
    min-width: 90px;
    text-align: center;
  }
}

/* ─── Circuit Layout ───────────────────────────────────── */

.circuit-layout {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  flex-wrap: wrap;
}

.circuit-diagram-container {
  flex: 1 1 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-md);
  text-align: center;
}

.circuit-diagram-container .circuit-svg {
  width: 100%;
  height: auto;
  min-height: 400px;
}

.circuit-cards-container {
  flex: 1;
  min-width: 300px;
}

@media (max-width: 768px) {
  .circuit-layout {
    flex-direction: column;
  }
  
  .circuit-diagram-container {
    flex: 1 1 100%;
    max-width: 100%;
  }
  
  .circuit-cards-container {
    width: 100%;
  }
}

/* ─── Circuit Summary Styles ───────────────────────────── */

.circuit-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.circuit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.circuit-card.circuit-active {
  border-color: var(--circuit-color, var(--accent));
  box-shadow: 0 0 20px rgba(var(--circuit-color, 196, 154, 108), 0.1);
}

.circuit-card.circuit-inactive {
  opacity: 0.6;
}

.circuit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.circuit-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--circuit-color, var(--text-primary));
  font-weight: 600;
}

.circuit-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.circuit-bar {
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.circuit-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.circuit-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.circuit-channels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.circuit-channel-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.circuit-channel-badge:hover {
  background: var(--bg-hover);
  border-color: var(--circuit-color, var(--accent));
}

/* ─── Integration Circuit Special Styling ─── */

.circuit-card.circuit-integration {
  background: linear-gradient(135deg, var(--bg-card), rgba(184, 134, 11, 0.08));
  border: 1px solid rgba(184, 134, 11, 0.4);
  position: relative;
  overflow: hidden;
}

.circuit-card.circuit-integration::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4bc98a, #5ed9a0, #4bc98a);
}

.circuit-card.circuit-integration .circuit-name {
  color: #5ed9a0;
}

.circuit-card.circuit-integration .circuit-desc {
  font-style: italic;
}

.integration-badge {
  background: rgba(94, 217, 160, 0.15);
  border-color: #5ed9a0 !important;
}

/* ─── Circuit Diagram Interactivity ─── */

/* Channel hover effects */
.circuit-channel-group {
  transition: all 0.2s ease;
}

.circuit-channel-group:hover .circuit-channel-line {
  stroke: #E8D4B8;
  stroke-width: 3;
  filter: drop-shadow(0 0 4px rgba(232, 212, 184, 0.4));
}

.circuit-channel-group:hover .circuit-channel-label {
  fill: #E8D4B8;
  font-weight: 600;
}

.circuit-channel-group:hover .circuit-gate-num {
  fill: #E8D4B8;
}

.circuit-channel-group.highlighted .circuit-channel-line {
  stroke: #FFD700;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

/* Center node hover effects */
.circuit-center-group {
  transition: all 0.2s ease;
}

.circuit-center-group.defined:hover .circuit-center-rect {
  filter: drop-shadow(0 0 6px rgba(196, 154, 108, 0.5));
  stroke: #E8D4B8;
  stroke-width: 2;
}

.circuit-center-group:not(.defined):hover .circuit-center-rect {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1.5;
}

/* Hanging gate hover */
.circuit-hanging-gate:hover {
  opacity: 1 !important;
}
.circuit-hanging-gate:hover rect {
  stroke: var(--accent);
  stroke-width: 1.2;
}
.circuit-hanging-gate:hover text {
  fill: var(--accent);
}

/* Open center hover */
.circuit-open-center:hover {
  opacity: 0.8 !important;
}
.circuit-open-center:hover rect {
  stroke: rgba(136, 200, 136, 0.5);
  stroke-width: 1.2;
}
.circuit-open-center:hover text {
  fill: rgba(136, 200, 136, 0.9);
}

/* Entry animation for channels — trace drawing effect */
@keyframes traceIn {
  0% {
    stroke-dashoffset: 600;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.circuit-channel-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.circuit-channel-line.animate-in {
  animation: traceIn 0.8s ease-out forwards;
  animation-delay: calc(var(--channel-index, 0) * 0.1s);
}

/* Channel tooltip */
.circuit-tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.circuit-tooltip.visible {
  opacity: 1;
}

/* Mobile responsiveness for circuit summary */
@media (max-width: 768px) {
  .circuit-summary {
    grid-template-columns: 1fr;
  }
  
  .circuit-card {
    padding: var(--space-md);
  }
  
  .circuit-name {
    font-size: 1.1rem;
  }
}

/* ─── Profile Section Styles ─── */
.profile-section {
  margin-top: var(--space-xl);
}

.profile-lines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.profile-line-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.profile-line-card.conscious {
  border-left: 4px solid #2a2a2a;
}

.profile-line-card.unconscious {
  border-left: 4px solid #c46c6c;
}

.profile-line-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.profile-line-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.profile-line-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.profile-line-type {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: auto;
}

.profile-line-theme {
  font-size: 0.9rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.profile-line-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.profile-gifts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.gifts-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: var(--space-xs);
}

.gift-tag {
  font-size: 0.75rem;
  color: var(--text);
  background: rgba(196, 154, 108, 0.15);
  border: 1px solid rgba(196, 154, 108, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Mobile responsiveness for profile section */
@media (max-width: 768px) {
  .profile-lines-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-line-card {
    padding: var(--space-md);
  }
  
  .profile-line-number {
    font-size: 1.5rem;
  }
  
  .profile-line-name {
    font-size: 1rem;
  }
  
  .profile-line-type {
    margin-left: 0;
  }
}

/* ─── Hover Cross-Linking (Bodygraph <-> Activation Rows) ─── */
.activation-side-row.hover-highlight {
  background: rgba(196, 154, 108, 0.3);
  box-shadow: 0 0 12px rgba(196, 154, 108, 0.5);
  border-radius: 4px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.activation-side-row {
  transition: background 0.15s ease, box-shadow 0.15s ease;
  padding: 2px 4px;
}

[id^="GateTextBg"].svg-hover-highlight circle,
[id^="GateTextBg"].svg-hover-highlight path {
  filter: brightness(2.5) drop-shadow(0 0 4px rgba(255, 255, 255, 1));
}

/* ─── SVG Gate Hover Effect (all gates, including non-activated) ─── */
.hd-bodygraph svg [id^="GateTextBg"] {
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.hd-bodygraph svg [id^="GateTextBg"]:hover {
  filter: brightness(1.3) drop-shadow(0 0 4px rgba(196, 154, 108, 0.4));
  transform: scale(1.08);
  transform-origin: center;
  transform-box: fill-box;
}

/* ─── Gate Panel Activation Summary ─── */
#gate-panel-activations {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

#gate-panel-activations .activation-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

#gate-panel-activations .activation-entry .act-planet-symbol {
  font-size: 1.1rem;
  min-width: 1.4rem;
  text-align: center;
}

#gate-panel-activations .activation-entry .act-planet-name {
  color: var(--text-secondary);
  min-width: 5rem;
}

#gate-panel-activations .activation-entry .act-type-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

#gate-panel-activations .activation-entry .act-type-label.design {
  background: rgba(212, 168, 67, 0.2);
  color: #D4A843;
}

#gate-panel-activations .activation-entry .act-type-label.personality {
  background: rgba(192, 192, 192, 0.15);
  color: #C0C0C0;
}

#gate-panel-activations .activation-entry .act-detail {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: auto;
}

/* ─── Bodygraph Overlay Controls ─── */
.bodygraph-overlay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  margin-top: var(--space-md);
}

.overlay-btn {
  font-family: var(--font-body);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.overlay-btn:hover {
  background: var(--bg-surface);
  border-color: var(--text-muted);
}

.overlay-btn.active {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(196, 154, 108, 0.15);
}

/* ─── Chiron iOS Toggle ─── */
.chiron-row {
  /* no extra spacing — flush with other planet rows */
}

.chiron-row .chiron-ios-toggle {
  flex-shrink: 0;
}

.chiron-inactive {
  opacity: 0.5;
}

.chiron-label-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chiron-ios-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.chiron-ios-toggle input[type="checkbox"] {
  display: none;
}

.chiron-toggle-slider {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.chiron-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.chiron-ios-toggle input:checked + .chiron-toggle-slider {
  background: rgba(170, 85, 170, 0.3);
  border-color: #aa55aa;
}

.chiron-ios-toggle input:checked + .chiron-toggle-slider::after {
  transform: translateX(18px);
  background: #cc88cc;
}

.chiron-toggle-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.chiron-ios-toggle input:checked ~ .chiron-toggle-label {
  color: #cc88cc;
}

/* ─── Lilith iOS Toggle ─── */
.lilith-row {
  /* no extra spacing — flush with other planet rows */
}

.lilith-row .lilith-ios-toggle {
  flex-shrink: 0;
}

.lilith-inactive {
  opacity: 0.5;
}

.lilith-label-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lilith-ios-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.lilith-ios-toggle input[type="checkbox"] {
  display: none;
}

.lilith-toggle-slider {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.lilith-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.lilith-ios-toggle input:checked + .lilith-toggle-slider {
  background: rgba(138, 58, 58, 0.3);
  border-color: #8a3a3a;
}

.lilith-ios-toggle input:checked + .lilith-toggle-slider::after {
  transform: translateX(18px);
  background: #c45a5a;
}

.lilith-toggle-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.lilith-ios-toggle input:checked ~ .lilith-toggle-label {
  color: #c45a5a;
}

.ascendant-row {
  /* no extra spacing — flush with other planet rows */
}

.ascendant-row .ascendant-ios-toggle {
  flex-shrink: 0;
}

.ascendant-inactive {
  opacity: 0.5;
}

.ascendant-label-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ascendant-ios-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.ascendant-ios-toggle input[type="checkbox"] {
  display: none;
}

.ascendant-toggle-slider {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.ascendant-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.ascendant-ios-toggle input:checked + .ascendant-toggle-slider {
  background: rgba(212, 168, 67, 0.3);
  border-color: #d4a843;
}

.ascendant-ios-toggle input:checked + .ascendant-toggle-slider::after {
  transform: translateX(18px);
  background: #e8c473;
}

.ascendant-toggle-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.ascendant-ios-toggle input:checked ~ .ascendant-toggle-label {
  color: #e8c473;
}

/* ─── Optional-bodies pill row (Chiron / Lilith / Ascendant) ─── */
.optional-bodies-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 1.25rem;
}

.body-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.body-pill:hover {
  border-color: var(--text-muted);
}

.body-pill input[type="checkbox"] {
  display: none;
}

.body-pill-glyph {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.18s ease;
}

.body-pill-label {
  font-weight: 500;
}

/* Active states — each body keeps its accent color */
.body-pill.active {
  color: #fff;
}
.body-pill.active .body-pill-glyph {
  opacity: 1;
}

.chiron-pill.active {
  background: rgba(170, 85, 170, 0.18);
  border-color: #aa55aa;
  color: #d98fd9;
  box-shadow: 0 0 0 1px rgba(170, 85, 170, 0.25) inset;
}
.lilith-pill.active {
  background: rgba(138, 58, 58, 0.18);
  border-color: #c45a5a;
  color: #e09393;
  box-shadow: 0 0 0 1px rgba(196, 90, 90, 0.25) inset;
}
.ascendant-pill.active {
  background: rgba(212, 168, 67, 0.18);
  border-color: #d4a843;
  color: #e8c473;
  box-shadow: 0 0 0 1px rgba(212, 168, 67, 0.25) inset;
}

/* ─── Overlay Section Labels ─── */
.overlay-section-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.15rem;
  flex-basis: 100%;
  margin-top: 0.35rem;
}

.overlay-section-label:first-child {
  margin-top: 0;
}

/* ─── Wearables: Connected Devices ────────────────────────── */
.wearables-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}
.wearables-intro .privacy {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.wearables-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.wearable-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.95rem 1.05rem;
  transition: border-color 0.2s, opacity 0.2s;
}
.wearable-card.coming-soon {
  opacity: 0.7;
}
.wearable-card.connected {
  border-color: rgba(196, 154, 108, 0.45);
}
.wearable-card.error {
  border-color: rgba(200, 56, 56, 0.55);
  background: rgba(200, 56, 56, 0.05);
}
.wearable-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.wearable-logo {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.wearable-logo svg { width: 100%; height: 100%; }
.wearable-meta {
  flex: 1;
  min-width: 140px;
}
.wearable-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wearable-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.1rem 0 0;
}
.wearable-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.wearable-btn {
  background: var(--accent);
  color: var(--bg-deep);
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: inherit;
}
.wearable-btn:hover { opacity: 0.9; }
.wearable-btn:disabled { opacity: 0.45; cursor: wait; }
.wearable-btn.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.wearable-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.wearable-btn.danger {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.wearable-btn.danger:hover {
  border-color: #c83838;
  color: #c83838;
}
.wearable-coming-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(154, 150, 144, 0.12);
  color: var(--text-muted);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-weight: 600;
}
.wearable-status-line {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.45rem 0 0;
  flex-basis: 100%;
}
.wearable-status-line.error-msg {
  color: #e87070;
}
.wearable-howto {
  margin-top: 0.75rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.65rem;
}
.wearable-howto summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}
.wearable-howto summary::-webkit-details-marker { display: none; }
.wearable-howto summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s;
  color: var(--text-muted);
  font-size: 0.7rem;
}
.wearable-howto[open] summary::before {
  transform: rotate(90deg);
}
.wearable-howto summary:hover {
  color: var(--accent);
}
.wearable-howto ol {
  margin: 0.55rem 0 0.45rem 1.25rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.wearable-howto ol li { margin-bottom: 0.2rem; }
.wearable-howto .howto-link {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
}
.wearable-howto .howto-link:hover { text-decoration: underline; }
.wearable-key-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}
.wearable-key-form input:not([type="checkbox"]) {
  flex: 1;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
.wearable-key-form input:not([type="checkbox"]):focus {
  outline: none;
  border-color: var(--accent);
}
.wearable-form-error {
  font-size: 0.82rem;
  color: #e87070;
  margin: 0.4rem 0 0;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex-basis: 100%;
  margin-top: 0.45rem;
}
.wearable-key-form > [data-uh-consent-error] { flex-basis: 100%; }
.consent-row input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0.2rem 0 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-row label {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
  cursor: pointer;
}
.wearable-form-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0;
  font-style: italic;
}
.wearable-progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.5rem 0 0;
}
.wearable-progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0;
}
.wearable-progress-bar.indeterminate > span {
  width: 35%;
  animation: wearable-indet 1.4s ease-in-out infinite;
}
@keyframes wearable-indet {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(285%); }
}
.wearable-not-config {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
  font-style: italic;
}

/* Disconnect modal */
.wearable-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.wearable-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
}
.wearable-modal h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.wearable-modal p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}
.wearable-modal label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  cursor: pointer;
}
.wearable-modal label input { margin-top: 0.2rem; }
.wearable-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* TestFlight waitlist modal (re-uses .wearable-modal* scaffolding).
   The modal is a sibling of <main class="signal-main">, so signal.css's
   `.signal-main .signal-btn*` rules and `--sn-*` tokens don't reach it.
   The styles below mirror that look so the modal feels like the rest of
   the home page (Cosmic Pulse styling). */
#testflight-modal[hidden] { display: none; }
#testflight-modal .wearable-modal {
  background: #14102a;
  border: 1px solid rgba(214, 198, 255, 0.10);
  max-width: 440px;
  padding: 1.75rem 1.75rem 1.5rem;
  color: #ece6ff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
#testflight-modal .wearable-modal h2 {
  margin: 0 0 0.4rem;
  font-family: 'Outfit', 'DM Sans', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ece6ff;
}
#testflight-modal .wearable-modal > p {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #b8aee0;
  margin: 0 0 1.25rem;
}
#testflight-modal form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b8aee0;
  margin-bottom: 0.85rem;
  cursor: text;
}
#testflight-modal form input[type="text"],
#testflight-modal form input[type="email"] {
  background: #1c1740;
  color: #ece6ff;
  border: 1px solid rgba(214, 198, 255, 0.10);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
#testflight-modal form input:focus {
  outline: none;
  border-color: #e9b96a;
  background: #221a4d;
}
#testflight-modal .testflight-error {
  background: rgba(196, 80, 76, 0.14);
  border: 1px solid rgba(196, 80, 76, 0.5);
  color: #f4b8b8;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.9rem;
}
#testflight-modal .testflight-success p {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #ece6ff;
  margin: 0 0 1.25rem;
}
#testflight-modal .wearable-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
/* Buttons: mirror .signal-main .signal-btn* from signal.css so the modal
   buttons match the home-page hero CTAs. */
#testflight-modal .signal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  background: #1c1740;
  color: #ece6ff;
  border-color: rgba(214, 198, 255, 0.18);
}
#testflight-modal .signal-btn:hover {
  background: #2a2356;
}
#testflight-modal .signal-btn-primary {
  background: #e9b96a;
  color: #0c0917;
  border-color: #e9b96a;
}
#testflight-modal .signal-btn-primary:hover {
  background: #f3c876;
  border-color: #f3c876;
}
#testflight-modal .signal-btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}
#testflight-modal .signal-btn-ghost {
  background: transparent;
  color: #b8aee0;
  border-color: rgba(214, 198, 255, 0.10);
}
#testflight-modal .signal-btn-ghost:hover {
  color: #ece6ff;
  border-color: rgba(214, 198, 255, 0.18);
}

@media (max-width: 600px) {
  .wearable-actions { width: 100%; }
  .wearable-actions .wearable-btn { flex: 1; }
}

/* ─── Global .eyebrow utility ──────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 600;
  display: inline-block;
}

