/* ==========================================================================
   styles.css — Drein Shared Design System & Core Styles
   A monochromatic, high-contrast design system for the builder ecosystem.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Core Monochromatic Dark Palette (Pitch Black Void + Charcoal + Crisp High-Contrast White) */
  --void: #0a0a0b;
  --void-soft: #111114;
  --paper: #0e0e11;
  --paper-dim: #18181c;
  --ink: #f4f3ef;
  --fog: #9c9a92;
  --mist: #c8c6bc;

  /* Accent Charcoals */
  --ember: #2e2e32;
  --ember-dim: #1c1c20;
  --glow: #ffffff;

  /* Borders & Lines */
  --line-dark: rgba(255, 255, 255, 0.10);
  --line-light: rgba(255, 255, 255, 0.08);

  /* Status & Gamification Accents (Strictly Monochromatic) */
  --gold: #ffffff;
  --gold-glow: rgba(255, 255, 255, 0.15);
  --success: #ffffff;
  --danger: #9c9a92;
  --info: #c8c6bc;

  /* Typography */
  --font-display: 'DotGothic16', var(--font-mono);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Sizing & Layout */
  --nav-h: 84px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Spring Transition Easing */
  --spring-ease: cubic-bezier(0.22, 0.68, 0, 1.2);
}

/* --------------------------------------------------------------------------
   2. THEME OVERRIDES (Dark / Light Modes — Feature H1)
   -------------------------------------------------------------------------- */
html[data-theme="dark"] {
  --void: #0a0a0b;
  --void-soft: #111114;
  --paper: #0e0e11;
  --paper-dim: #18181c;
  --ink: #f4f3ef;
  --fog: #9c9a92;
  --mist: #c8c6bc;
  --ember: #2e2e32;
  --ember-dim: #1c1c20;
  --line-light: rgba(255, 255, 255, 0.08);
  --line-dark: rgba(255, 255, 255, 0.10);
  --gold: #ffffff;
  --gold-glow: rgba(255, 255, 255, 0.15);
  --success: #ffffff;
  --danger: #9c9a92;
  --info: #c8c6bc;
}

html[data-theme="light"] {
  --void: #0a0a0b;
  --void-soft: #16161a;
  --paper: #0e0e11;
  --paper-dim: #18181c;
  --ink: #f4f3ef;
  --fog: #9c9a92;
  --mist: #c8c6bc;
  --ember: #2e2e32;
  --ember-dim: #1c1c20;
  --line-light: rgba(255, 255, 255, 0.08);
  --line-dark: rgba(255, 255, 255, 0.10);
  --gold: #ffffff;
  --gold-glow: rgba(255, 255, 255, 0.15);
  --success: #ffffff;
  --danger: #9c9a92;
  --info: #c8c6bc;
}

/* Smooth theme transition */
body, .page-wrapper, .panel, .feature-card, .nav, .modal, .toast,
.mobile-drawer, .search-modal, .card, .kanban-col, .kanban-card,
.story-col, .auth-card, .site-footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --------------------------------------------------------------------------
   3. GLOBAL BASE & RESET
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Custom 6px Global Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--paper-dim);
}
::-webkit-scrollbar-thumb {
  background: var(--mist);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--fog);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--mist) var(--paper-dim);
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Modular Heading Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.2;
  font-weight: 400;
}
h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 20px; line-height: 1.15; }
h2 { font-size: clamp(24px, 3.5vw, 32px); margin-bottom: 16px; line-height: 1.2; }
h3 { font-size: clamp(18px, 2.5vw, 24px); margin-bottom: 16px; line-height: 1.25; }
h4 { font-size: 18px; margin-bottom: 12px; line-height: 1.3; }
h5 { font-size: 15px; margin-bottom: 8px; line-height: 1.35; }
h6 { font-size: 13px; margin-bottom: 8px; line-height: 1.4; }

p {
  text-wrap: pretty;
  line-height: 1.7;
  margin-bottom: 16px;
}
p:last-child {
  margin-bottom: 0;
}

.font-mono, .mono-label, code, pre, kbd, .kbd-key {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.label-secondary, .text-secondary, .sub-label, .caption, .meta-text, .mono-label {
  font-size: 12px;
  color: var(--fog);
}

img, svg, canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--ember);
  color: #fff;
}

/* 8pt Spacing Grid & Section Padding */
section, .section, .hero-section, .landing-section, .section-padded {
  padding: clamp(64px, 8vw, 112px) 0;
  padding-block: clamp(64px, 8vw, 112px);
  padding(-block)?: clamp(64px, 8vw, 112px);
}

.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-40 { gap: 40px; }
.gap-48 { gap: 48px; }
.gap-64 { gap: 64px; }

.p-8  { padding: 8px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.p-32 { padding: 32px; }
.p-40 { padding: 40px; }
.p-48 { padding: 48px; }
.p-64 { padding: 64px; }

.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }

/* Micro-interaction Active Feedback */
.btn:active, .pill:active, .card:active, .panel:active, [data-tab]:active, .nav-links a:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   4. CORE REUSABLE BUTTONS, PILLS, CARDS & AVATARS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  transition: transform 0.2s cubic-bezier(0.22, 0.68, 0, 1.2),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              color 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform .25s ease;
}

.btn:hover .btn-icon {
  transform: translateX(2px);
}

.btn-solid {
  background: var(--ember);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 0 rgba(46, 46, 46, 0.45);
}

.btn-solid .btn-icon {
  background: rgba(255, 255, 255, 0.18);
}

.btn-solid:hover {
  background: var(--ember-dim);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 46, 46, 0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(46, 46, 46, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-foot .btn-solid {
    animation: ctaPulse 3.2s ease-in-out infinite;
  }
}

.btn-ghost {
  background: var(--void-soft);
  color: #fff;
  border: 1px solid var(--line-dark);
}

.btn-ghost .btn-icon {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  border: 1px solid transparent;
}

.btn-dark .btn-icon {
  background: rgba(255, 255, 255, 0.14);
}

.btn-dark:hover {
  background: #000;
}

.btn-danger {
  background: var(--void-soft);
  color: #fff;
  border: 1px solid var(--line-dark);
}

.btn-danger:hover {
  background: var(--ember);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn:disabled, .btn[disabled], button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-sm .btn-icon {
  width: 20px;
  height: 20px;
}

/* Pills */
.pill, .pill-light {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  width: fit-content;
  line-height: 1.4;
  transition: border-color 0.2s ease, transform 0.2s cubic-bezier(0.22, 0.68, 0, 1.2), background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.pill span, .pill-light span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: #0a0a0b;
  flex-shrink: 0;
  font-size: 12px;
  transition: transform .25s ease;
}

.pill:hover, .pill-light:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.pill:hover span, .pill-light:hover span {
  transform: translateX(2px);
}

.pill-light {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--line-dark);
}

.pill-light span {
  background: #fff;
  color: #0a0a0b;
}

/* Base Card & Panel Standard Primitives */
.card, .panel, .dashboard-panel, .feed-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s cubic-bezier(0.22, 0.68, 0, 1.2),
              box-shadow 0.25s ease,
              border-color 0.2s ease,
              background-color 0.3s ease;
}

.card:hover, .panel:hover, .dashboard-panel:hover, .feed-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
}

.card:active, .panel:active {
  transform: translateY(-1px) scale(0.99);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .dashboard-panel,
html[data-theme="dark"] .feed-card {
  background: var(--paper);
  border-color: var(--line-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .panel:hover,
html[data-theme="dark"] .dashboard-panel:hover,
html[data-theme="dark"] .feed-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Standard Avatar System */
.avatar, .avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ember);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--glow);
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  border: 1.5px solid var(--line-light);
}

html[data-theme="dark"] .avatar,
html[data-theme="dark"] .avatar-placeholder {
  border-color: var(--line-dark);
}

.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl { width: 64px; height: 64px; font-size: 22px; }

/* --------------------------------------------------------------------------
   5. NAVIGATION, PROGRESS BAR & HEADER (Features H1, H2, D1, D5, A1, C3)
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 48px);
}

@keyframes navIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .nav { animation: navIn .7s ease .05s both; }
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,9,0.7), rgba(8,8,9,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
  transition: opacity .35s ease, background .35s ease;
}

.nav.scrolled,
.nav.nav--solid {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--line-light);
}

.nav.scrolled::before,
.nav.nav--solid::before {
  background: linear-gradient(to bottom, rgba(8,8,9,0.92), rgba(8,8,9,0.78));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--line-light);
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--ink);
  z-index: 200;
  transition: width .12s linear;
}

/* Nav XP Bar (Feature D1) */
.nav-xp-bar, .nav-xp-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--line-light);
  z-index: 101;
  pointer-events: none;
}

.nav-xp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mist), #ffffff, var(--mist));
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  transition: width 0.4s ease;
}

.nav-inner {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  transition: transform .4s cubic-bezier(.2,.8,.3,1.4);
}

.logo:hover {
  transform: rotate(20deg) scale(1.1);
}

/* Nav Links Pill */
.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-dark);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  padding: 5px;
}

.nav-links a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fog);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: color .2s ease, background .2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a.active {
  background: #ffffff;
  color: #0a0a0b !important;
  font-weight: 600;
}

.nav-links a.active::after {
  display: none;
}

/* Nav Actions Container */
.nav-cta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nav Level Badge (Feature D1) */
.nav-level-badge, .level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--line-dark);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

/* Streak Badge (Feature D5) */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  color: #fff;
  cursor: pointer;
  transition: transform .2s ease;
}

.streak-badge:hover {
  transform: scale(1.05);
}

.streak-fire {
  display: inline-block;
  animation: streakPulse 2s ease-in-out infinite;
}

@keyframes streakPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

/* Search Trigger in Nav (Feature C1) */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
  cursor: pointer;
  transition: all .2s ease;
}

.nav-search-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.nav-search-kbd {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  color: #fff;
}

/* Theme Toggle Button (Feature H1) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s ease;
}

.theme-toggle-btn:hover {
  transform: rotate(20deg);
  border-color: rgba(255,255,255,0.3);
}

/* Notifications Button & Dropdown (Feature A1) */
.nav-notif-wrapper {
  position: relative;
}

.nav-notif-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  color: #fff;
  cursor: pointer;
  position: relative;
  transition: all .2s ease;
}

.nav-notif-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.notif-badge, .nav-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ffffff;
  color: #000000;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
  font-family: var(--font-mono);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  background: var(--void-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  color: #fff;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.25s cubic-bezier(.22,.68,0,1.2);
  overflow: hidden;
}

.notif-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-dark);
}

.notif-header-title {
  font-family: var(--font-display);
  font-size: 14px;
}

.notif-mark-read {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.notif-mark-read:hover {
  color: #fff;
  text-decoration: underline;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-item.unread {
  background: rgba(255, 255, 255, 0.03);
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.notif-item-content {
  flex: 1;
}

.notif-item-text {
  font-size: 12.5px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.notif-item-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

.notif-empty {
  padding: 32px 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

/* User Avatar & Collab Dot (Feature C3) */
.nav-avatar-wrapper {
  position: relative;
  display: inline-flex;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ember);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--line-dark);
}

.collab-dot, .avatar-collab-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 50%;
  border: 1.5px solid var(--void);
}

.collab-dot::after, .avatar-collab-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.6;
  animation: pingDot 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingDot {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Hamburger Button (Feature H2) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 768px) {
  .grid-2, .two-col, .form-grid, .sidebar-layout, .messaging-layout, .settings-layout, .feed-layout, .split-layout, .two-col-grid {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }
  .nav-links {
    display: none;
  }
  .nav-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }
  .nav-hamburger {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   6. MOBILE NAVIGATION DRAWER (Feature H2)
   -------------------------------------------------------------------------- */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 85vw);
  background: var(--void);
  border-left: 1px solid var(--line-dark);
  color: #fff;
  z-index: 1500;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.68, 0, 1.2);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-dark);
}

.mobile-drawer-title {
  font-family: var(--font-display);
  font-size: 18px;
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--mist);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.mobile-drawer-close:hover {
  color: #fff;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--mist);
  transition: all 0.2s ease;
}

.mobile-drawer-link:hover, .mobile-drawer-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --------------------------------------------------------------------------
   7. GLOBAL TOAST NOTIFICATIONS (Features H5, D1)
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.toast, .toast-enter {
  pointer-events: auto;
  background: var(--void-soft);
  color: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  position: relative;
  overflow: hidden;
  transform: translateX(110%);
  animation: toastSlideIn 0.35s cubic-bezier(0.22, 0.68, 0, 1.2) both;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 0.68, 0, 1.2), opacity 0.25s ease;
}

.toast.is-visible, .toast.active, .toast.toast-active {
  transform: translateX(0);
  opacity: 1;
}

.toast:hover {
  transform: translateY(-2px);
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  font-size: 13px;
  line-height: 1.4;
  flex: 1;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  width: 100%;
  transform-origin: left;
  animation: toastCountdown linear forwards;
}

.toast-dismissing {
  animation: toastSlideOut 0.25s ease forwards !important;
}

/* Gold XP Toast (Feature D1) - Monochromatic Style */
.toast-xp {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.6);
  background: var(--void-soft);
}

.toast-xp .toast-progress {
  background: #ffffff;
}

.toast-xp .toast-icon {
  color: #ffffff;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(110%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(110%); }
}

@keyframes toastCountdown {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* --------------------------------------------------------------------------
   8. MODALS & CONFIRMATION DIALOGS (Features H6, H3)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active,
.modal-overlay.is-active,
.modal-overlay.open,
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal,
.modal-panel,
.modal-dialog,
.modal-content {
  background: var(--void-soft);
  color: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 24px;
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 0.68, 0, 1.2), opacity 0.3s ease;
  position: relative;
}

.modal-overlay.active .modal,
.modal-overlay.is-active .modal,
.modal-overlay.open .modal,
.modal-overlay.is-open .modal,
.modal-overlay.active .modal-panel,
.modal-overlay.is-active .modal-panel,
.modal-overlay.open .modal-panel,
.modal-overlay.is-open .modal-panel,
.modal-overlay.active .modal-dialog,
.modal-overlay.is-active .modal-dialog,
.modal-overlay.open .modal-dialog,
.modal-overlay.is-open .modal-dialog,
.modal-overlay.active .modal-content,
.modal-overlay.is-active .modal-content,
.modal-overlay.open .modal-content,
.modal-overlay.is-open .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.modal-close {
  background: none;
  border: none;
  color: var(--mist);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--mist);
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Destructive Confirmation Modal */
.modal-confirm .modal-title {
  color: #fff;
}

.modal-confirm .modal-body {
  color: var(--mist);
}

/* Keyboard Shortcuts Modal (Feature H3) */
.shortcuts-modal {
  max-width: 560px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-top: 16px;
}

@media (max-width: 540px) {
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shortcut-desc {
  font-size: 13px;
  color: var(--mist);
}

kbd, .kbd-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   9. GLOBAL SEARCH MODAL (Feature C1)
   -------------------------------------------------------------------------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--void-soft);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(.22,.68,0,1.2);
  color: #fff;
}

.search-overlay.is-open .search-modal {
  transform: translateY(0) scale(1);
}

.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-dark);
}

.search-icon {
  font-size: 18px;
  color: var(--fog);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 15px;
  color: inherit;
}

.search-input::placeholder {
  color: var(--fog);
}

.search-esc-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--mist);
  border: 1px solid var(--line-dark);
}

.search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
}

.search-category {
  margin-bottom: 16px;
}

.search-category-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fog);
  padding: 6px 12px;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.search-item:hover, .search-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.search-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-item-icon {
  font-size: 16px;
}

.search-item-title {
  font-size: 13.5px;
  font-weight: 500;
}

.search-item-desc {
  font-size: 12px;
  color: var(--fog);
  font-family: var(--font-mono);
}

.search-item-type {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  border: 1px solid var(--line-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

.search-empty {
  padding: 48px 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fog);
}

/* --------------------------------------------------------------------------
   10. KANBAN BOARD SYSTEM (Feature B1)
   -------------------------------------------------------------------------- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  .kanban-board {
    grid-template-columns: repeat(4, 280px);
  }
}

.kanban-col {
  background: var(--paper-dim);
  border: 1px solid var(--line-light);
  border-radius: 14px;
  padding: 16px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kanban-col.drag-over {
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
  outline: 2px dashed var(--fog);
  outline-offset: -4px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.kanban-col-count {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 12px;
  color: var(--fog);
}

.kanban-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 100px;
}

.kanban-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: 14px;
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  user-select: none;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.kanban-card.is-dragging {
  opacity: 0.35;
  transform: scale(0.98);
  cursor: grabbing;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

.kanban-card-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: var(--paper-dim);
  color: var(--ink);
}

.kanban-add-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px dashed var(--line-light);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.kanban-add-card-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper);
}

/* --------------------------------------------------------------------------
   11. 24H BUILDER STORIES & VIEWER (Feature A5)
   -------------------------------------------------------------------------- */
.stories-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stories-bar::-webkit-scrollbar {
  display: none;
}

.story-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  text-align: center;
}

.story-bubble-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #fff, var(--fog), var(--ember));
  transition: transform 0.2s;
  position: relative;
}

.story-bubble:hover .story-bubble-ring {
  transform: scale(1.06);
}

.story-bubble.seen .story-bubble-ring {
  background: var(--line-light);
}

.story-bubble-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-dim);
  border: 2px solid var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.story-bubble-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Stories Overlay */
.stories-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 11, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stories-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.stories-viewer-card {
  position: relative;
  width: min(400px, 92vw);
  height: min(640px, 85vh);
  background: var(--void-soft);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
}

.stories-progress-bars {
  display: flex;
  gap: 4px;
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  z-index: 10;
}

.stories-progress-seg {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stories-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: var(--radius-full);
}

.stories-progress-seg.completed .stories-progress-fill {
  width: 100%;
}

.story-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: #fff;
  z-index: 10;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-author-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}

.story-time {
  font-size: 12px;
  color: var(--fog);
}

.story-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 12px;
  z-index: 5;
  color: #fff;
}

.story-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.story-tap-prev, .story-tap-next {
  position: absolute;
  top: 60px;
  bottom: 0;
  width: 45%;
  z-index: 8;
  cursor: pointer;
}

.story-tap-prev { left: 0; }
.story-tap-next { right: 0; }

/* --------------------------------------------------------------------------
   12. THREADED COMMENTS & @MENTIONS (Features A2, A3)
   -------------------------------------------------------------------------- */
.comments-tray {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.comments-tray.hidden {
  display: none;
}

.comment-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--paper-dim);
  border: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.comment-main {
  flex: 1;
  background: var(--paper-dim);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-light);
}

.comment-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.comment-author {
  font-weight: 600;
  color: var(--ink);
}

.comment-time {
  color: var(--fog);
  font-size: 12px;
}

.comment-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
}

.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

.comment-like-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-like-btn.liked {
  color: var(--danger);
  font-weight: 600;
}

.comment-composer {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  position: relative;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-light);
  background: var(--paper);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--ink);
  outline: none;
}

/* @Mentions Floating Dropdown (Feature A3) */
.mentions-dropdown {
  position: absolute;
  z-index: 1100;
  background: var(--void-soft);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-height: 180px;
  overflow-y: auto;
  width: 220px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
}

.mentions-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.mentions-item:hover, .mentions-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.mentions-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ember);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.mentions-handle {
  color: var(--mist);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   13. INTERACTIVE COMPONENTS & ECOSYSTEM WIDGETS
   -------------------------------------------------------------------------- */

/* Builder Radar Heatmap (Feature C6) */
.radar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 4px;
}

.radar-cell {
  aspect-ratio: 1/1;
  border-radius: 3px;
  background: var(--paper-dim);
  border: 1px solid var(--line-light);
  transition: transform 0.15s ease, background 0.15s ease;
  position: relative;
  cursor: pointer;
}

.radar-cell:hover {
  transform: scale(1.15);
  z-index: 5;
}

.radar-cell[data-level="0"] { background: var(--paper-dim); }
.radar-cell[data-level="1"] { background: rgba(255, 255, 255, 0.15); }
.radar-cell[data-level="2"] { background: rgba(255, 255, 255, 0.35); }
.radar-cell[data-level="3"] { background: rgba(255, 255, 255, 0.65); }
.radar-cell[data-level="4"] { background: #ffffff; }

.radar-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--void);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 20;
}

.radar-cell:hover .radar-tooltip {
  opacity: 1;
}

/* Pro Gate Lock Overlay (Feature G1) */
.pro-gate-lock {
  position: relative;
  overflow: hidden;
}

.pro-gate-lock::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 11, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10;
}

.pro-gate-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 15;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.pro-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: #ffffff;
  color: #000000;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Confetti Particle Canvas (Feature B3) */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  width: 100%;
  height: 100%;
}

/* Pinned Announcements Banner (Feature F6) */
.announcement-banner {
  background: var(--void-soft);
  color: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.announcement-dismiss {
  background: none;
  border: none;
  color: var(--mist);
  cursor: pointer;
  font-size: 16px;
}

/* Sponsored Feed Card (Feature G3) */
.sponsored-card {
  border: 1px solid var(--line-dark);
  position: relative;
}

.sponsored-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
  background: var(--paper-dim);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Hackathon Countdown Grid (Feature C4) */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.countdown-box {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 8px 4px;
}

.countdown-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.countdown-lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--fog);
}

/* MVP Scope Estimator (Feature B6) */
.estimator-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.range-slider {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
}

/* Activity Timeline (Feature H7) */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  background: var(--line-light);
}

.activity-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
  border: 2px solid var(--paper);
}

/* Resource & Job Cards (Features F3, G2) */
.resource-card, .job-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s cubic-bezier(0.22, 0.68, 0, 1.2), box-shadow 0.25s ease;
}

.resource-card:hover, .job-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.10);
}

.upvote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-light);
  background: var(--paper-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.upvote-btn.upvoted {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   14. LANDING PAGE SPECIFIC LAYOUTS (Hero, Intro, Story, Footer)
   -------------------------------------------------------------------------- */

/* Hero Section */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--void);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 24px) 24px 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
  will-change: transform;
}

.stars {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
}

@keyframes starsDrift {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .stars { animation: starsDrift 260s linear infinite; }
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .star { animation: twinkle 4.5s ease-in-out infinite; }
}

@keyframes twinkle {
  0%, 100% { opacity: var(--o, .5); }
  50%      { opacity: .08; }
}

.glow-ring {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%,-50%);
  width: min(680px, 62vh, 88vw);
  height: min(680px, 62vh, 88vw);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 53%, rgba(255,255,255,0.22) 56%, rgba(255,255,255,0.42) 58%, rgba(255,255,255,0.34) 59.5%, rgba(255,255,255,0.06) 62%, transparent 66%);
}

@keyframes ringPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.9; }
  50%      { transform: translate(-50%,-50%) scale(1.025); opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .glow-ring { animation: ringPulse 7s ease-in-out infinite; }
}

.glow-ring::before {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 68%);
  filter: blur(40px);
}

.ledge {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: clamp(70px, 15vh, 130px);
}

.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 90;
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-full);
  pointer-events: none;
  transition: opacity .3s ease;
}

.scroll-cue-dot {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #fff;
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-cue-dot { animation: scrollCueBounce 1.8s ease-in-out infinite; }
}

@keyframes scrollCueBounce {
  0%, 100% { opacity: 0.9; transform: translateX(-50%) translateY(0); }
  50%      { opacity: 0.3; transform: translateX(-50%) translateY(12px); }
}

@media (max-width: 760px) { .scroll-cue { display: none; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue { display: none; } }

.eyebrow {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 18px;
  text-align: center;
  opacity: 0;
}

.hero-foot { opacity: 0; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes titleFlickerIn {
  0%   { opacity: 0; transform: translateY(18px); }
  38%  { opacity: 1; transform: translateY(0); }
  44%  { opacity: 0.25; }
  50%  { opacity: 1; }
  56%  { opacity: 0.4; }
  63%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .eyebrow { animation: heroIn .8s ease .15s both; }
  .hero-title { animation: titleFlickerIn 1.1s linear .32s both; }
  .hero-foot { animation: heroIn .9s ease .68s both; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .hero-foot { opacity: 1; }
}

.hero-title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 6.6vw, 66px);
  line-height: 1.22;
  text-align: center;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 0 4px rgba(255,255,255,0.5), 0 0 34px rgba(255,255,255,0.25);
  max-width: 16ch;
}

.hero-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px,4vw,48px) 32px;
}

.hero-sub {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mist);
  max-width: 30ch;
}

@media (max-width: 640px) {
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 20px; }
}

/* Intro Section */
.intro { background: var(--paper); }
.intro-pin { position: relative; height: 230vh; }
.intro-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 32px) clamp(20px,4vw,48px) 60px;
  overflow: hidden;
}

.intro-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 60px;
}

.intro-copy p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--fog);
  max-width: 34ch;
  margin-bottom: 24px;
}

.ink-blot {
  justify-self: end;
  width: min(420px, 100%);
  aspect-ratio: 1/1;
  will-change: transform;
}

.intro-headline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
}

.headline-col {
  overflow: hidden;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.3;
  height: 1.3em;
}

.headline-col.align-right { text-align: right; }
.headline-track { will-change: transform; }
.headline-track h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: -0.02em;
}

@media (max-width: 820px) {
  .intro-top, .intro-headline { grid-template-columns: 1fr; }
  .ink-blot { justify-self: start; width: 280px; margin-top: 20px; }
  .headline-col.align-right { text-align: left; }
  .intro-headline { gap: 20px; }
  .intro-pin { height: 200vh; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-pin { height: auto; }
  .intro-sticky { position: static; min-height: 0; }
  .headline-col { height: auto !important; overflow: visible; }
  .headline-track { transform: none !important; }
  .headline-track h2 + h2 { margin-top: 0.3em; }
  .ink-blot { transform: none !important; }
}

/* Story Section */
.story {
  background: var(--paper);
  padding: 0 clamp(20px,4vw,48px) 120px;
}

.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.15fr 1fr;
  gap: 2px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
  border-radius: 20px;
  overflow: hidden;
}

.story-col {
  background: var(--paper);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}

.story-grid.is-visible .story-col { opacity: 1; transform: none; }
.story-grid.is-visible .story-col:nth-child(1) { transition-delay: 0s; }
.story-grid.is-visible .story-col:nth-child(2) { transition-delay: .14s; }
.story-grid.is-visible .story-col:nth-child(3) { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  .story-col { transition: none; opacity: 1; transform: none; }
}

.col-signal .num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--fog);
  margin-bottom: 18px;
}

.num-mark {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--ember);
  flex-shrink: 0;
}

.col-lead {
  font-size: 15px;
  line-height: 1.55;
  max-width: 26ch;
  margin-bottom: auto;
}

.col-signal .pill { margin-top: 28px; }
.col-teaser {
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fog);
  max-width: 28ch;
}

.col-card {
  background: var(--void);
  color: #fff;
  justify-content: space-between;
}

.card-body {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--mist);
  max-width: 38ch;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 40px);
  margin: 28px 0;
  color: #fff;
}

.col-visual { padding: 24px; gap: 16px; }
.visual-frame {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-dim);
  min-height: 220px;
}
#halftone { width: 100%; height: 100%; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; border-radius: 16px; }
  .story-col { min-height: 0; }
}

/* Footer Section */
.site-footer {
  background: var(--void);
  color: var(--mist);
  padding: 40px clamp(20px,4vw,48px);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}

.footer-inner .logo { width: 26px; height: 26px; color: #fff; }
.footer-inner a:hover { color: #fff; }

.footer-expanded {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding: 48px clamp(20px,4vw,48px) 32px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  max-width: 22ch;
  line-height: 1.5;
}

.footer-links-grid { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 4px;
}

.footer-col a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  transition: color .2s;
}

.footer-col a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   15. UTILITY CLASSES & SCROLL REVEALS — RICH ANIMATION SYSTEM
   -------------------------------------------------------------------------- */

/* ── Reveal: fade + rise (default) ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 0.68, 0, 1.2),
              transform 0.5s cubic-bezier(0.22, 0.68, 0, 1.2);
  transition-delay: calc(var(--reveal-index, 0) * 80ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Delay variants for staggered siblings */
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }
.reveal-d5 { transition-delay: 400ms; }
.reveal-d6 { transition-delay: 480ms; }

/* Slide from left / right */
.reveal-left  { opacity: 0; transform: translateX(-28px); transition: opacity .7s cubic-bezier(.22,.68,0,1.1), transform .7s cubic-bezier(.22,.68,0,1.1); }
.reveal-right { opacity: 0; transform: translateX(28px);  transition: opacity .7s cubic-bezier(.22,.68,0,1.1), transform .7s cubic-bezier(.22,.68,0,1.1); }
.reveal-left.is-visible, .reveal-right.is-visible { opacity: 1; transform: none; }

/* Scale-in reveal */
.reveal-scale { opacity: 0; transform: scale(0.92); transition: opacity .6s ease, transform .6s cubic-bezier(.34,1.4,.64,1); }
.reveal-scale.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    transition: none; opacity: 1; transform: none;
  }
  .star { animation: none; }
}

/* ── Page Entrance (immediate on load) ─────────────────────────────────── */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pageEnterScale {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes springPop {
  0%   { opacity: 0; transform: scale(0.88); }
  60%  { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

.page-enter          { animation: pageEnter 0.65s cubic-bezier(.22,.68,0,1.1) both; }
.page-enter-scale    { animation: pageEnterScale 0.6s cubic-bezier(.34,1.3,.64,1) both; }
.page-enter-delay-1  { animation-delay: 0.10s; }
.page-enter-delay-2  { animation-delay: 0.22s; }
.page-enter-delay-3  { animation-delay: 0.36s; }
.page-enter-delay-4  { animation-delay: 0.50s; }
.anim-fade-in        { animation: fadeIn .5s ease both; }
.anim-slide-left     { animation: slideInLeft .55s cubic-bezier(.22,.68,0,1.1) both; }
.anim-slide-right    { animation: slideInRight .55s cubic-bezier(.22,.68,0,1.1) both; }
.anim-slide-up       { animation: slideInUp .55s cubic-bezier(.22,.68,0,1.1) both; }
.anim-spring-pop     { animation: springPop .5s cubic-bezier(.34,1.4,.64,1) both; }

@media (prefers-reduced-motion: reduce) {
  .page-enter, .page-enter-scale,
  .anim-fade-in, .anim-slide-left,
  .anim-slide-right, .anim-slide-up,
  .anim-spring-pop { animation: none; opacity: 1; transform: none; }
}

/* ── Card hover lift ────────────────────────────────────────────────────── */
.card-lift {
  transition: transform .25s cubic-bezier(.22,.68,0,1.2),
              box-shadow .25s ease,
              border-color .25s ease;
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

/* ── Pulse / skeleton loader ────────────────────────────────────────────── */
@keyframes skeletonShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--paper-dim) 25%, var(--paper) 50%, var(--paper-dim) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Smooth link underline ──────────────────────────────────────────────── */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── Global smooth transition helpers ──────────────────────────────────── */
.transition-fast { transition: all .15s ease; }
.transition-med  { transition: all .25s ease; }
.transition-slow { transition: all .45s ease; }

/* ── Stagger children (apply to parent) ────────────────────────────────── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.22,.68,0,1.1),
              transform .55s cubic-bezier(.22,.68,0,1.1);
}

.stagger-children.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.stagger-children.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: .1s; }
.stagger-children.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: .2s; }
.stagger-children.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: .3s; }
.stagger-children.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: .4s; }
.stagger-children.is-visible > *:nth-child(n+6) { opacity: 1; transform: none; transition-delay: .5s; }

@media (prefers-reduced-motion: reduce) {
  .stagger-children > * { transition: none; opacity: 1; transform: none; }
}

/* ── Number counter (JS-driven) ─────────────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.count-up { animation: countUp .4s ease both; }

/* --------------------------------------------------------------------------
   16. AUTH & FORM INPUT STYLES (login.html, register.html, modals, settings)
   -------------------------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  background: var(--void);
  color: #fff;
  position: relative;
}

.auth-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.auth-card {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 36px 32px;
  backdrop-filter: blur(12px);
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.auth-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
  margin-bottom: 28px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fog);
}

.form-input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], select.form-input, select {
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line-light);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, select.form-input:focus, select:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08);
}

html[data-theme="dark"] .form-input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] select {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-dark);
  color: #fff;
}

html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] input[type="text"]:focus,
html[data-theme="dark"] input[type="email"]:focus,
html[data-theme="dark"] input[type="password"]:focus,
html[data-theme="dark"] input[type="search"]:focus,
html[data-theme="dark"] select:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10);
}

.form-input::placeholder, input::placeholder, textarea::placeholder {
  color: var(--fog);
}

select.form-input, select {
  -webkit-appearance: none;
  cursor: pointer;
}

textarea, .form-textarea {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line-light);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

textarea:focus, .form-textarea:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08);
}

html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-textarea {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-dark);
  color: #fff;
}

html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  height: 44px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  margin-top: 6px;
}

.auth-forgot {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  text-align: right;
  margin-top: -10px;
  margin-bottom: 18px;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-forgot:hover { color: var(--mist); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-dark);
}

.auth-divider span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

.auth-footer-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
  text-align: center;
  margin-top: 18px;
}

.auth-footer-link a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.auth-footer-link a:hover { color: var(--mist); }


/* Global Shell Layout, Responsive Wrappers & Containment Utilities */
.page-wrapper, .main-content {
  padding-top: var(--nav-h);
}

.container, .hero-container, .hero-content, .page-container, .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  margin-inline: auto;
  margin(-inline)?: auto;
  width: 100%;
}

.kanban-board {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper, .table-responsive, .table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

code, pre, .font-mono, .hash, .snippet {
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: auto;
  (overflow-wrap|word-break|overflow-x): break-word;
}

.card, .feed-card, .feature-card {
  overflow: hidden;
}

.activity-list, .notif-list, .menu-list, .dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  (gap|margin-bottom): 8px;
}

/* --------------------------------------------------------------------------
   14. STANDARDIZED ATMOSPHERIC PAGE HERO (Landing-Page-Inspired)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  background: var(--void);
  color: #fff;
  padding: clamp(48px, 6vw, 80px) clamp(16px, 4vw, 48px) clamp(56px, 7vw, 96px);
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.page-hero-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 80vw);
  height: min(600px, 80vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 45%, transparent 70%);
  pointer-events: none;
}

.page-hero-ledge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(50px, 10vh, 90px);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.page-hero-inner.centered {
  align-items: center;
  text-align: center;
}

.page-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mist);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--mist);
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
}

.page-hero-sub {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--fog);
  max-width: 620px;
}

.page-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ==========================================================================
   19. PROFILE CUSTOMIZATION STUDIO & WEB AUDIO (Features R1 & R5)
   ========================================================================== */

/* Global Audio Toggle in Navigation */
.nav-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--paper-dim);
  border: 1px solid var(--line-dark);
  color: var(--mist);
  cursor: pointer;
  transition: all 0.2s var(--spring-ease, cubic-bezier(0.22, 0.68, 0, 1.2));
}

.nav-audio-btn:hover {
  background: var(--ember);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.nav-audio-btn:active {
  transform: scale(0.96);
}

/* --------------------------------------------------------------------------
   CUSTOM PROFILE THEMES (PRO 🔒)
   -------------------------------------------------------------------------- */
[data-profile-theme="mono-high-contrast"] {
  --profile-void: #000000;
  --profile-bg: #000000;
  --profile-border: rgba(255, 255, 255, 0.35);
  --profile-card-bg: #000000;
  --profile-text: #ffffff;
  --profile-dim: #9c9a92;
}

[data-profile-theme="onyx-glass"] {
  --profile-void: rgba(16, 17, 22, 0.75);
  --profile-bg: linear-gradient(180deg, rgba(20, 21, 26, 0.85) 0%, rgba(10, 10, 12, 0.95) 100%);
  --profile-border: rgba(255, 255, 255, 0.18);
  --profile-card-bg: rgba(22, 23, 29, 0.65);
  --profile-text: #f4f3ef;
  --profile-dim: #c8c6bc;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

[data-profile-theme="titanium-brushed"] {
  --profile-void: #121317;
  --profile-bg: linear-gradient(135deg, #1c1e24 0%, #101114 100%);
  --profile-border: rgba(255, 255, 255, 0.16);
  --profile-card-bg: #16181e;
  --profile-text: #ffffff;
  --profile-dim: #c8c6bc;
}

[data-profile-theme="void-obsidian"] {
  --profile-void: #040406;
  --profile-bg: #040406;
  --profile-border: rgba(255, 255, 255, 0.10);
  --profile-card-bg: #08080c;
  --profile-text: #ffffff;
  --profile-dim: #9c9a92;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.95);
}

.profile-hero[data-profile-theme="mono-high-contrast"],
.profile-preview-card[data-profile-theme="mono-high-contrast"] {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.profile-hero[data-profile-theme="onyx-glass"],
.profile-preview-card[data-profile-theme="onyx-glass"] {
  background: rgba(16, 17, 22, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(20px) saturate(180%);
}

.profile-hero[data-profile-theme="titanium-brushed"],
.profile-preview-card[data-profile-theme="titanium-brushed"] {
  background: linear-gradient(135deg, #1c1e24 0%, #101114 100%) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.profile-hero[data-profile-theme="void-obsidian"],
.profile-preview-card[data-profile-theme="void-obsidian"] {
  background: #040406 !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

/* --------------------------------------------------------------------------
   AVATAR EFFECT SHADERS (PRO 🔒)
   -------------------------------------------------------------------------- */
/* 1. Glowing Outline */
.effect-glow-outline .avatar,
.avatar.effect-glow-outline,
.preview-avatar.effect-glow-outline,
.effect-glow-outline .avatar-img-placeholder {
  border-color: #ffffff !important;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.75), inset 0 0 8px rgba(255, 255, 255, 0.4) !important;
  animation: glowPulse 2.4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.4), inset 0 0 4px rgba(255, 255, 255, 0.2); }
  100% { box-shadow: 0 0 24px rgba(255, 255, 255, 0.9), inset 0 0 12px rgba(255, 255, 255, 0.6); }
}

/* 2. Pulsing Aura */
.effect-pulsing-aura::before,
.avatar-wrapper.effect-pulsing-aura::before,
.preview-avatar-wrapper.effect-pulsing-aura::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  animation: auraPulseRing 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes auraPulseRing {
  0% { transform: scale(0.95); opacity: 0.9; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* 3. Holographic Shimmer */
.effect-holo-shimmer::after,
.avatar.effect-holo-shimmer::after,
.preview-avatar.effect-holo-shimmer::after,
.effect-holo-shimmer .avatar::after,
.effect-holo-shimmer .avatar-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 80%);
  background-size: 200% 200%;
  animation: holoSweep 2.8s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes holoSweep {
  0% { background-position: -100% -100%; }
  100% { background-position: 200% 200%; }
}

/* 4. Cyber Glitch */
.effect-cyber-glitch .avatar,
.avatar.effect-cyber-glitch,
.preview-avatar.effect-cyber-glitch,
.effect-cyber-glitch .avatar-img-placeholder {
  animation: cyberGlitchJitter 3.5s infinite;
}

@keyframes cyberGlitchJitter {
  0%, 92%, 100% { transform: translate(0, 0); }
  93% { transform: translate(-2px, 1px); filter: drop-shadow(2px -1px 0 #ffffff); }
  95% { transform: translate(2px, -1px); filter: drop-shadow(-2px 1px 0 #9c9a92); }
  97% { transform: translate(0, 0); filter: none; }
}

/* --------------------------------------------------------------------------
   AVATAR DECORATIONS (PRO 🔒)
   -------------------------------------------------------------------------- */
/* Founder Ring */
.deco-founder-ring::after,
.preview-avatar-deco.deco-founder-ring,
.avatar-wrapper.deco-founder-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.85);
  animation: rotateRing 16s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Arch-Engineer Crown */
.deco-crown::before,
.preview-avatar-deco.deco-crown,
.avatar-wrapper.deco-crown::before {
  content: '👑';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
  z-index: 4;
  pointer-events: none;
}

/* Core Contributor Crest */
.deco-crest::after,
.preview-avatar-deco.deco-crest,
.avatar-wrapper.deco-crest::after {
  content: '🛡️';
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 16px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

/* --------------------------------------------------------------------------
   PROFILE CUSTOMIZATION STUDIO MODAL LAYOUT
   -------------------------------------------------------------------------- */
.modal-studio {
  max-width: 1080px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.studio-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-dark);
  background: var(--void-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.studio-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
  background: var(--paper);
}

@media (max-width: 860px) {
  .studio-body {
    grid-template-columns: 1fr;
  }
}

.studio-controls-pane {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Studio Tabs */
.studio-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-light);
  scrollbar-width: none;
}

.studio-tabs::-webkit-scrollbar {
  display: none;
}

.studio-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fog);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--spring-ease, cubic-bezier(0.22, 0.68, 0, 1.2));
}

.studio-tab-btn:hover {
  color: var(--ink);
  background: var(--paper-dim);
  border-color: var(--line-light);
}

.studio-tab-btn.active {
  background: var(--ember);
  color: #ffffff;
  border-color: var(--line-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.studio-tab-content {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.studio-tab-content.active {
  display: block;
}

.studio-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-section-header h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  margin: 0;
}

.studio-hint {
  font-size: 13px;
  color: var(--fog);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Badges & Pills */
.pro-tag, .lock-pill, .pro-badge-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

.free-badge, .free-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--mist);
  border: 1px solid var(--line-light);
}

/* Avatar Dropzone */
.avatar-dropzone {
  border: 2px dashed var(--line-dark);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  background: var(--void-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.avatar-dropzone:hover, .avatar-dropzone.drag-over {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.01);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dropzone-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.dropzone-text {
  font-size: 14px;
  color: #ffffff;
}

.dropzone-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

.avatar-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Preset & Theme Grids */
.preset-grid, .theme-preset-grid, .deco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 18px;
}

.preset-card, .theme-card, .deco-card {
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: 10px;
  background: var(--void-soft);
  cursor: pointer;
  transition: all 0.2s var(--spring-ease, cubic-bezier(0.22, 0.68, 0, 1.2));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-card:hover, .theme-card:hover, .deco-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.preset-card.active, .theme-card.active, .deco-card.active {
  border-color: #ffffff;
  background: var(--ember);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
}

.preset-preview {
  height: 54px;
  border-radius: 6px;
  background: var(--paper-dim);
  border: 1px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  overflow: hidden;
  position: relative;
}

.preset-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
}

.theme-sample {
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--line-dark);
}

.theme-default { background: var(--paper); }
.theme-high-contrast { background: #000000; border-color: #ffffff; }
.theme-onyx-glass { background: linear-gradient(180deg, rgba(20,21,26,0.9), rgba(10,10,12,0.95)); }
.theme-titanium { background: linear-gradient(135deg, #1c1e24 0%, #101114 100%); }
.theme-obsidian { background: #040406; box-shadow: inset 0 0 10px rgba(0,0,0,0.9); }

.theme-card span, .deco-card span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
  text-align: center;
}

.deco-card {
  align-items: center;
  text-align: center;
  padding: 14px 10px;
}

.deco-icon {
  font-size: 24px;
}

/* Effect Buttons */
.effect-selector-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 18px;
}

.effect-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--void-soft);
  border: 1px solid var(--line-light);
  color: var(--mist);
  cursor: pointer;
  transition: all 0.2s var(--spring-ease, cubic-bezier(0.22, 0.68, 0, 1.2));
}

.effect-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.effect-btn.active {
  background: var(--ink);
  color: var(--void);
  border-color: var(--ink);
  font-weight: 600;
}

/* Custom Banner Upload */
.custom-banner-upload {
  background: var(--void-soft);
  border: 1px solid var(--line-light);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   STUDIO PREVIEW PANE & LIVE PROFILE CARD
   -------------------------------------------------------------------------- */
.studio-preview-pane {
  position: sticky;
  top: 0;
}

.preview-sticky-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  letter-spacing: 0.08em;
}

.preview-status-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--mist);
  border: 1px solid var(--line-light);
}

.profile-preview-card {
  background: var(--void);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  position: relative;
  transition: all 0.3s var(--spring-ease, cubic-bezier(0.22, 0.68, 0, 1.2));
}

.preview-banner-layer {
  height: 110px;
  background: var(--void-soft);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}

.preview-banner-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
}

.preview-card-body {
  padding: 16px 20px 24px;
  position: relative;
}

.preview-avatar-section {
  margin-top: -48px;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.preview-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
}

.preview-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--void-soft);
  border: 2px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.preview-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.preview-avatar-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.preview-identity-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 0;
}

.preview-handle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

.preview-mission {
  font-size: 13px;
  color: var(--mist);
  line-height: 1.5;
  margin: 0;
}

.preview-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Studio Footer */
.studio-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line-dark);
  background: var(--void-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-footer-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
}

.studio-footer-actions {
  display: flex;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   20. MESSAGING ACTIONS & ATTACHMENTS (Feature R1 & R2)
   -------------------------------------------------------------------------- */
.msg-bubble-wrap {
  position: relative;
}

.msg-bubble-wrap:hover .msg-actions-toolbar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.msg-actions-toolbar {
  position: absolute;
  top: -14px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--void);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 2px 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: all 0.2s var(--spring-ease);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.msg-bubble-wrap.received .msg-actions-toolbar {
  left: 8px;
  right: auto;
}

.msg-action-btn {
  background: transparent;
  border: none;
  color: var(--fog);
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.msg-action-btn:hover {
  background: var(--paper-dim);
  color: var(--ink);
  transform: scale(1.1);
}

.msg-bubble.is-editing {
  border: 1px dashed var(--mist);
  background: var(--void-soft) !important;
}

.msg-edit-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.msg-edit-textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 12px;
  background: var(--void);
  color: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  resize: vertical;
}

.msg-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.msg-edited-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fog);
  margin-left: 6px;
  font-style: italic;
}

/* Attachment Block */
.msg-attachment-card {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.attachment-code-block {
  margin-top: 8px;
  background: #000;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e2e0d8;
  overflow-x: auto;
  position: relative;
}

/* --------------------------------------------------------------------------
   21. BUILDER-FIRST MONETIZATION SUPERPOWERS (Feature R2)
   -------------------------------------------------------------------------- */
/* Verified Builder Pro Badge */
.badge-pro, .pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: #0a0a0b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.2);
  vertical-align: middle;
}

.badge-pro-icon {
  font-size: 12px;
}

/* Priority AI Co-Founder Match / Synergy */
.synergy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.synergy-badge.high {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

/* AI Canvas High-Resolution Export */
.canvas-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--void-soft);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  margin-top: 12px;
}

.canvas-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid var(--line-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.canvas-export-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Custom Project Vanity URL Slug Box */
.vanity-url-box {
  display: flex;
  align-items: center;
  background: var(--void-soft);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mist);
  gap: 8px;
  margin: 10px 0;
}

.vanity-prefix {
  color: var(--fog);
  user-select: none;
}

.vanity-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}

/* Advanced Builder Analytics: Velocity & Traffic */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.analytics-stat-card {
  background: var(--paper-dim);
  border: 1px solid var(--line-light);
  border-radius: 12px;
  padding: 16px;
}

.velocity-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 60px;
  margin-top: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-light);
}

.velocity-bar {
  flex: 1;
  background: var(--ink);
  border-radius: 4px 4px 0 0;
  transition: height 0.4s var(--spring-ease), background 0.2s ease;
  min-height: 4px;
  position: relative;
}

.velocity-bar:hover {
  background: #ffffff;
}

/* Recruiter Superpower Filters */
.recruiter-filter-panel {
  background: var(--paper-dim);
  border: 1px solid var(--line-light);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.recruiter-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.recruiter-badge-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   22. MOBILE RESPONSIVE LAYOUT & TOUCH ACCESSIBILITY (Feature R3)
   -------------------------------------------------------------------------- */
/* Touch targets minimum 44x44px */
.btn, .pill, .icon-btn, .nav-links a, .msg-tab, .studio-tab-btn {
  min-height: 44px;
  touch-action: manipulation;
}

@media (max-width: 900px) {
  /* Messaging 1-column switch */
  .messaging-workspace {
    grid-template-columns: 1fr !important;
    position: relative;
  }

  .msg-sidebar {
    display: flex;
  }

  .messaging-workspace.in-chat .msg-sidebar {
    display: none;
  }

  .messaging-workspace.in-chat .chat-feed-column {
    display: flex;
  }

  .messaging-workspace:not(.in-chat) .chat-feed-column {
    display: none;
  }

  .ai-assistant-panel {
    display: none;
  }

  /* Profile Studio Modal on mobile */
  .studio-body {
    grid-template-columns: 1fr !important;
    max-height: calc(85vh - 120px) !important;
  }

  .studio-preview-pane {
    position: static !important;
    order: -1;
  }

  .profile-preview-card {
    max-width: 100%;
  }

  .preset-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal scroll globally */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  .story-grid, .features-grid, .radar-container, .kanban-board {
    grid-template-columns: 1fr !important;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .feed-layout {
    grid-template-columns: 1fr !important;
  }

  .feed-sidebar-left, .feed-sidebar-right {
    display: none !important;
  }

  .stats-band-inner {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .billing-grid {
    grid-template-columns: 1fr !important;
  }

  .custom-banner-upload {
    flex-direction: column;
    align-items: stretch;
  }

  .studio-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .studio-footer-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: clamp(24px, 7vw, 32px) !important;
  }

  .auth-box {
    padding: 20px 16px;
  }

  .modal-dialog {
    padding: 20px 16px !important;
    width: 95vw !important;
  }
}


