/* ═══════════════════════════════════════════════════════
   HOOK GENERATOR — Premium Dark Hook Generator Tool
   Design System & Complete Styles
   ═══════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
  /* Core Palette — Obsidian & Deep Space */
  --bg-primary: #070912;
  --bg-secondary: #0b0e1b;
  --bg-tertiary: #111628;
  --bg-elevated: #161d33;

  /* Surfaces & Glassmorphism */
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-active: rgba(255, 255, 255, 0.1);
  --glass: rgba(11, 15, 27, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.18);

  /* Text & Contrast */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #05060b;

  /* Vibrant Accents */
  --violet: #8b5cf6;
  --violet-hover: #9f7aea;
  --violet-dim: rgba(139, 92, 246, 0.14);
  --violet-glow: rgba(139, 92, 246, 0.28);
  --cyan: #06b6d4;
  --cyan-hover: #22d3ee;
  --cyan-dim: rgba(6, 182, 212, 0.14);
  --cyan-glow: rgba(6, 182, 212, 0.28);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.14);
  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.14);
  --rose: #f43f5e;
  --rose-dim: rgba(244, 63, 94, 0.14);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #06b6d4 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #f43f5e 100%);
  --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
  --gradient-hero: linear-gradient(110deg, #c4b5fd 0%, #8b5cf6 25%, #06b6d4 60%, #10b981 85%, #c4b5fd 100%);
  --gradient-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  --gradient-card: linear-gradient(145deg, rgba(18, 24, 42, 0.88), rgba(11, 15, 27, 0.84));

  /* Shadows & Glows */
  --glow-violet: 0 0 28px rgba(139, 92, 246, 0.35);
  --glow-cyan: 0 0 28px rgba(6, 182, 212, 0.35);
  --glow-soft: 0 0 50px rgba(139, 92, 246, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.36), 0 1px 2px rgba(255, 255, 255, 0.05) inset;
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(255, 255, 255, 0.08) inset;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-body: "Segoe UI Variable Text", "Aptos", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Segoe UI Variable Display", "Aptos Display", Inter, ui-sans-serif, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Layout */
  --max-width: 1440px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(6, 182, 212, 0.06), transparent),
    radial-gradient(ellipse 50% 30% at 10% 40%, rgba(139, 92, 246, 0.04), transparent);
  background-attachment: fixed;
  isolation: isolate;
}

body::before,
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  width: min(42vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  opacity: .42;
}

body::before {
  top: 12vh;
  left: -22vw;
  background: radial-gradient(circle, rgba(124, 92, 252, .13), transparent 67%);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

body::after {
  right: -22vw;
  bottom: 4vh;
  background: radial-gradient(circle, rgba(20, 184, 212, .11), transparent 68%);
  animation: ambientDrift 22s ease-in-out -8s infinite alternate-reverse;
}

@keyframes ambientDrift {
  to { transform: translate3d(5vw, -4vh, 0) scale(1.12); }
}

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

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

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

:where(a, button, textarea, input, select):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

textarea, input, select {
  font-family: inherit;
  outline: none;
}

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

/* Base fieldset & legend fix for unstyled browser defaults */
fieldset {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px 18px 18px;
  background: linear-gradient(145deg, rgba(16, 22, 38, 0.7), rgba(10, 13, 24, 0.7));
  margin: var(--space-lg) 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

fieldset:focus-within {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(6, 182, 212, 0.12);
}

legend {
  padding: 3px 12px;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition-base);
  background: rgba(7, 9, 18, 0.8);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar.scrolled {
  background: rgba(7, 9, 18, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  transition: opacity var(--transition-fast);
}

.nav-logo strong {
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo:hover {
  opacity: 0.9;
}

.nav-logo svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  margin-left: 6px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-search-btn:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-search-btn kbd {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-free-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-free-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: dotPulse 2s ease-in-out infinite;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.nav-mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-mobile-toggle.active span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

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

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ═══════════════════════════════════════════════════════
   SECTION COMMON
   ═══════════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--violet-dim);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   GENERATOR TOOL (HERO)
   ═══════════════════════════════════════════════════════ */
.generator {
  padding: calc(var(--nav-height) + 28px) var(--space-xl) var(--space-3xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.generator-header {
  position: relative;
  margin-bottom: var(--space-2xl);
  isolation: isolate;
}

.generator-header::before,
.generator-header::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 47%;
  border-radius: 50%;
  pointer-events: none;
}

.generator-header::before {
  width: min(58vw, 560px);
  aspect-ratio: 1;
  border: 1px solid rgba(124, 92, 252, .14);
  box-shadow: inset 0 0 72px rgba(124, 92, 252, .035), 0 0 72px rgba(20, 184, 212, .025);
  transform: translate(-50%, -50%) rotate(8deg);
  animation: orbitSlow 28s linear infinite;
}

.generator-header::after {
  width: min(40vw, 390px);
  aspect-ratio: 1;
  border: 1px dashed rgba(20, 184, 212, .13);
  transform: translate(-50%, -50%) rotate(-12deg);
  animation: orbitReverse 22s linear infinite;
}

@keyframes orbitSlow { to { transform: translate(-50%, -50%) rotate(368deg); } }
@keyframes orbitReverse { to { transform: translate(-50%, -50%) rotate(-372deg); } }

.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: var(--space-md);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-full);
  color: #c4b5fd;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: fadeInUp 0.5s ease-out both;
}

.badge-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: dotPulse 2s ease-in-out infinite;
}

.generator-title {
  --title-rotate-x: 0deg;
  --title-rotate-y: 0deg;
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
  font-size: clamp(2.9rem, 6vw, 5rem);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.04em;
  perspective: 800px;
  animation: fadeInUp 0.5s ease-out 0.06s both;
}

.generator-title span {
  display: inline-block;
  background: var(--gradient-hero);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 20px rgba(139, 92, 246, 0.25));
  transform: rotateX(var(--title-rotate-x)) rotateY(var(--title-rotate-y));
  transform-style: preserve-3d;
  transition: transform 180ms ease-out, filter 250ms ease;
  animation: titleGradientFlow 8s ease-in-out infinite;
}

.generator-title:hover span {
  filter: drop-shadow(0 8px 28px rgba(6, 182, 212, 0.35));
}

@keyframes titleGradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.generator-header > p {
  animation: fadeInUp 0.5s ease-out 0.12s both;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* Mode Navigation Dock */
.mode-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  max-width: 960px;
  margin: 0 auto var(--space-xl);
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  background: rgba(14, 18, 33, 0.85);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.mode-nav::-webkit-scrollbar { display: none; }

.mode-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.mode-nav a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.mode-nav a.active {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.45);
  background: var(--violet-dim);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.mode-nav a span {
  font-size: 0.85rem;
  color: var(--cyan);
}
.mode-nav a.active span {
  color: #c4b5fd;
}

/* Draft Recovery Alert */
.draft-recovery {
  max-width: 820px;
  margin: 0 auto var(--space-xl);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  color: #a5f3fc;
  font-size: 0.84rem;
  backdrop-filter: blur(12px);
}
.draft-recovery[hidden] { display: none; }

.draft-recovery-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.draft-recovery button {
  padding: 5px 12px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.12);
  color: #cffafe;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.draft-recovery button:hover {
  background: rgba(6, 182, 212, 0.24);
  color: #fff;
}

/* Generator Container Layout */
.generator-container {
  display: grid;
  grid-template-columns: minmax(380px, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(18px, 2vw, 30px);
  align-items: start;
}

.gen-panel {
  background: var(--gradient-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: clamp(20px, 2.5vw, 28px);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .025);
  position: relative;
}

.gen-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .72), rgba(6, 182, 212, .72), transparent);
  background-size: 180% 100%;
  animation: borderGlide 7s ease-in-out infinite;
}

@keyframes borderGlide { 50% { background-position: 100% 0; } }

.gen-input {
  position: relative;
  max-height: none;
  overflow: visible;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.panel-title-row h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.panel-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.local-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Input Groups */
.input-group {
  margin-bottom: var(--space-md);
}

.input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.input-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(8, 11, 20, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 84px;
  transition: all var(--transition-base);
}

.input-group textarea:focus {
  border-color: var(--violet);
  background: rgba(10, 14, 26, 0.9);
  box-shadow: 0 0 0 3px var(--violet-dim), 0 12px 32px rgba(0, 0, 0, .22), 0 0 24px rgba(139, 92, 246, 0.12);
}

.input-group textarea::placeholder {
  color: var(--text-muted);
}

.input-hint {
  display: block;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Selectors (Platform, Tone, Type) */
.platform-selector,
.tone-selector,
.type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.platform-btn,
.tone-btn,
.type-btn {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.platform-btn:hover,
.tone-btn:hover,
.type-btn:hover {
  border-color: var(--glass-border-hover);
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.platform-btn.active,
.tone-btn.active,
.type-btn.active {
  background: linear-gradient(135deg, rgba(124, 92, 252, .25), rgba(20, 184, 212, .09));
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* Input Row */
.input-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.input-group-half {
  flex: 1;
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  outline: none;
  margin-top: 8px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--gradient-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--gradient-primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* Length Toggle Segmented Control */
.length-toggle {
  display: flex;
  background: rgba(8, 11, 20, 0.7);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  padding: 2px;
}

.length-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all var(--transition-fast);
  text-align: center;
}

.length-btn:hover {
  color: var(--text-primary);
}

.length-btn.active {
  background: var(--violet-dim);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

/* Advanced Settings Accordion */
.advanced-settings {
  margin: 0 0 var(--space-md);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.advanced-settings summary::-webkit-details-marker { display: none; }

.advanced-settings summary::after {
  content: '+';
  color: var(--cyan);
  font-size: 1.15rem;
  font-weight: 400;
  transition: transform var(--transition-fast);
}

.advanced-settings[open] summary::after {
  transform: rotate(45deg);
}

.advanced-summary-hint {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.advanced-settings-body {
  padding: var(--space-md);
  border-top: 1px solid var(--glass-border);
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px var(--space-md);
}

.input-group input[type="text"],
.input-group select,
.advanced-grid select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(8, 11, 20, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  transition: all var(--transition-base);
  color-scheme: dark;
}

.input-group input[type="text"]:focus,
.input-group select:focus,
.advanced-grid select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px var(--violet-dim);
}

.advanced-seed label span {
  color: var(--text-muted);
  font-weight: 400;
}

.writing-controls {
  margin: var(--space-sm) 0;
}

.writing-controls summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.advanced-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--glass-border);
}

.advanced-footer p {
  max-width: 340px;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.advanced-footer > div {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.secondary-tool-btn {
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  transition: var(--transition-fast);
}
.secondary-tool-btn:hover {
  background: var(--surface-hover);
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
}

.settings-summary {
  margin: 0 0 var(--space-md);
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.5;
  font-family: var(--font-mono);
}

/* Generate Button */
.generate-btn {
  width: 100%;
  padding: 14px var(--space-xl);
  background: var(--gradient-primary);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: 0 12px 30px rgba(82, 71, 218, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.generate-btn:hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow: 0 18px 46px rgba(82, 71, 218, .38), 0 0 28px rgba(6, 182, 212, .2), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.generate-btn:active {
  transform: translateY(0);
}

.generate-btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

.generate-btn-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.generate-btn-content,
.generate-btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════
   RESULTS PANEL (GENERATED HOOKS)
   ═══════════════════════════════════════════════════════ */
.gen-results {
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.results-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hook-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  min-height: 32px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.action-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

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

.action-btn svg {
  display: inline-block;
  flex-shrink: 0;
}

#favoritesBtn:hover:not(:disabled) {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--amber);
}

#historyBtn:hover:not(:disabled) {
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

#exportBtn:hover:not(:disabled) {
  border-color: rgba(6, 182, 212, 0.4);
  color: #a5f3fc;
}

/* Bulk action field */
.bulk-action-field select {
  min-height: 32px;
  height: 32px;
  max-width: 155px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(8, 11, 20, 0.8);
  color: var(--text-primary);
  font-size: 0.76rem;
  padding: 4px 8px;
  cursor: pointer;
  color-scheme: dark;
}
.bulk-action-field select:disabled { opacity: 0.35; cursor: not-allowed; }

/* Results List — Naturally Scrollable & Clean Spacing */
.results-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.results-list.has-results {
  height: auto;
  max-height: none;
  overflow: visible;
}

.results-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  min-height: 300px;
  border: 1px dashed rgba(139, 92, 246, .2);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(139, 92, 246, .08), transparent 44%);
}

.placeholder-icon {
  margin-bottom: var(--space-md);
  opacity: 0.6;
  animation: gentleFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(124, 92, 252, .28));
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.placeholder-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.placeholder-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ─── Hook Card (World-Class Polish) ─── */
.hook-card {
  background: radial-gradient(circle at 100% 0%, rgba(20, 184, 212, .055), transparent 34%), linear-gradient(145deg, rgba(18, 24, 41, .97), rgba(10, 14, 26, .96));
  border: 1px solid rgba(255, 255, 255, .085);
  border-left: 3px solid var(--violet);
  border-radius: 18px;
  padding: 18px 20px;
  position: relative;
  transition: all var(--transition-base);
  animation: hookSlideIn 0.35s ease-out both;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .02);
  overflow: clip;
}

.hook-card::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  right: -72px;
  bottom: -78px;
  border-radius: 50%;
  background: rgba(124, 92, 252, .12);
  filter: blur(22px);
  opacity: 0;
  transition: opacity var(--transition-base), transform var(--transition-base);
  pointer-events: none;
}

.hook-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  border-left-color: var(--cyan);
  background: linear-gradient(145deg, rgba(21, 28, 48, 0.98), rgba(13, 18, 32, 0.96));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .34), 0 8px 30px rgba(139, 92, 246, .1);
  transform: translateY(-3px);
}

.hook-card:hover::after { opacity: 1; transform: scale(1.2); }
.hook-card:has([data-select-hook]:checked) {
  border-color: rgba(20, 184, 212, .46);
  border-left-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(20, 184, 212, .09), 0 18px 44px rgba(0, 0, 0, .3);
}

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

.hook-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hook-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  margin-bottom: 6px;
}

.hook-select:hover { color: var(--text-secondary); }

.hook-select input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--violet);
  cursor: pointer;
}

.hook-number {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.1);
  letter-spacing: -0.04em;
  pointer-events: none;
}

.hook-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: #c4b5fd;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hook-char-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: auto;
  margin-right: 28px;
}

.hook-char-count.over-limit {
  color: var(--rose);
}

.hook-text {
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
  line-height: 1.58;
  color: var(--text-primary);
  margin-bottom: 10px;
  word-wrap: break-word;
  font-weight: 610;
  letter-spacing: -0.016em;
}

.hook-text .power-word {
  color: #fbbf24;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}

.hook-safety-note {
  margin: 4px 0 10px;
  padding: 6px 10px;
  background: var(--amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  color: #fcd34d;
  font-size: 0.7rem;
  line-height: 1.4;
}

/* Strength Meter */
.hook-strength {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.score-ring {
  --ring-color: var(--cyan);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bg-tertiary) 56%, transparent 58%), conic-gradient(var(--ring-color) calc(var(--score) * 1%), rgba(255,255,255,.08) 0);
}

.score-ring strong {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 700;
}
.score-ring.weak { --ring-color: var(--rose); }
.score-ring.moderate { --ring-color: var(--amber); }
.score-ring.strong { --ring-color: var(--emerald); }
.score-ring.excellent { --ring-color: var(--cyan); }

.strength-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.strength-bar {
  display: none;
}

/* Hook Actions */
.hook-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hook-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  min-height: 31px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.hook-action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}

.hook-action-btn.fav-btn.favorited {
  background: var(--amber-dim);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.hook-action-btn svg {
  flex-shrink: 0;
}

.hook-action-btn.reroll-btn:hover svg {
  transform: rotate(180deg);
  transition: transform 0.4s ease;
}

.improve-btn {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.08);
  color: #c4b5fd;
}

.improve-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
}

.rewrite-menu select {
  min-height: 31px;
  height: 31px;
  max-width: 145px;
  padding: 4px 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(14, 18, 32, 0.95);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  color-scheme: dark;
  transition: all var(--transition-fast);
}

.rewrite-menu select:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
}

.rewrite-menu select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px var(--violet-dim);
}

.hook-action-btn.trash-hook-btn:hover {
  background: var(--rose-dim);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

/* Expanded Hook More Panel */
.hook-more-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.hook-more-panel[hidden] { display: none; }

.hook-more-panel span {
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
}

.hook-more-panel small, .hook-more-panel strong { display: block; }
.hook-more-panel small { color: var(--text-muted); font-size: 0.58rem; text-transform: capitalize; }
.hook-more-panel strong { margin-top: 2px; font-size: 0.74rem; font-family: var(--font-mono); color: var(--cyan); }
.hook-more-panel p { grid-column: 1 / -1; color: var(--text-muted); font-size: 0.65rem; }

.why-hook, .rewrite-diff {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(6, 9, 17, 0.45);
}

.why-hook summary, .rewrite-diff summary {
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.why-hook p { margin-top: 6px; color: var(--text-secondary); font-size: 0.74rem; line-height: 1.5; }

.rewrite-diff > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.rewrite-diff section {
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 6px;
  font-size: 0.72rem;
}

.rewrite-diff b { display: block; margin-bottom: 4px; color: var(--cyan); }
.rewrite-diff small { display: block; margin-top: 4px; color: var(--text-muted); }

.version-history {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(5, 7, 14, 0.6);
  margin-top: 8px;
}

.version-history > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.version-timeline {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.version-timeline i {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.68rem;
}

.version-node, .version-actions button {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.version-node.current, .version-node.selected {
  border-color: rgba(139, 92, 246, 0.6);
  background: var(--violet-dim);
  color: #c4b5fd;
}

.version-preview-text {
  margin: 8px 0;
  padding: 8px 10px;
  border-left: 2px solid var(--violet);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-size: 0.74rem;
  line-height: 1.45;
}

.version-actions {
  display: flex;
  gap: 6px;
}

.version-actions button:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--glass-border-hover);
}

/* ═══════════════════════════════════════════════════════
   QUICK TOOLS SECTION
   ═══════════════════════════════════════════════════════ */
.quick-tools {
  width: min(var(--max-width), calc(100% - 2 * var(--space-xl)));
  margin: 0 auto;
  padding: var(--space-3xl) 0 var(--space-4xl);
}

.quick-tools-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.quick-tools-heading h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.quick-tools-heading > a {
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 700;
  transition: color var(--transition-fast);
}
.quick-tools-heading > a:hover { color: var(--cyan-hover); }

.section-kicker {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
  display: block;
}

.quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.quick-tool-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.quick-tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.45);
  background: linear-gradient(145deg, rgba(22, 29, 49, 0.95), rgba(13, 17, 30, 0.92));
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.15);
}

.quick-tool-card > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.quick-tool-card strong, .quick-tool-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-tool-card strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quick-tool-card small {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.quick-tool-card b {
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.quick-tool-card:hover b {
  color: var(--cyan);
  transform: translateX(3px);
}

.quick-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--violet-dim);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════
   HOW IT WORKS
   ═══════════════════════════════════════════════════════ */
.how-it-works {
  padding: var(--space-4xl) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
}

.steps-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.step {
  flex: 1;
  max-width: 340px;
  text-align: center;
  padding: var(--space-xl);
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step:hover {
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--glow-soft), var(--shadow-card);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.step-visual {
  width: 190px;
  height: 105px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 9, 17, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Step Visual Demos */
.mini-input-demo {
  width: 150px;
  padding: 8px 12px;
}

.mini-input-bar {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.72rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  min-height: 28px;
}

.mini-input-cursor {
  color: var(--cyan);
  animation: cursorBlink 1s step-end infinite;
  font-weight: 400;
}

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

.mini-pills-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  justify-content: center;
}

.mini-pill {
  padding: 4px 9px;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.64rem;
  color: var(--text-muted);
  transition: var(--transition-base);
}

.mini-pill.active {
  background: var(--violet-dim);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.mini-cards-demo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  width: 150px;
}

.mini-card {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 6px 8px;
  opacity: 0.85;
}

.mc-bar {
  width: 55%;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
  margin-bottom: 4px;
}

.mc-line {
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  margin-bottom: 3px;
}
.mc-l1 { width: 88%; }
.mc-l2 { width: 60%; }

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  flex-shrink: 0;
  position: relative;
}

.connector-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  opacity: 0.4;
}

.connector-arrow {
  position: absolute;
  color: var(--cyan);
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════
   HOOK TYPES EXPLORER
   ═══════════════════════════════════════════════════════ */
.hook-types {
  padding: var(--space-4xl) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.types-tabs-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-xl);
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}
.types-tabs-wrapper::-webkit-scrollbar { display: none; }

.types-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
  width: max-content;
  margin: 0 auto;
  padding: 2px 8px;
}

.type-tab {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.type-tab:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}

.type-tab.active {
  background: var(--violet-dim);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.types-content {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-card);
}

.type-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.type-info h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.type-info > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.type-formula {
  margin-bottom: var(--space-lg);
}

.formula-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.type-formula code {
  display: block;
  padding: 12px 14px;
  background: rgba(6, 9, 17, 0.75);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #67e8f9;
  line-height: 1.5;
}

.type-effectiveness {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.effectiveness-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 80px;
}

.effectiveness-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.effectiveness-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--gradient-primary);
  transition: width 0.8s ease-out;
}

.effectiveness-score {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  color: var(--cyan);
  min-width: 40px;
}

.use-type-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.use-type-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-violet);
}

.type-examples {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-card {
  background: rgba(6, 9, 17, 0.55);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--violet);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all var(--transition-fast);
}

.example-card:hover {
  background: rgba(14, 18, 33, 0.8);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}

.example-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.example-card .example-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════
   VISUAL INTERACTIVE TOOLS
   ═══════════════════════════════════════════════════════ */
.visual-tools {
  width: min(var(--max-width), calc(100% - 2 * var(--space-xl)));
  margin: 0 auto;
  padding: var(--space-4xl) 0;
}

.tool-experience {
  margin-bottom: var(--space-2xl);
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--gradient-card);
  box-shadow: var(--shadow-card);
  position: relative;
}

.tool-experience::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.35), rgba(6, 182, 212, 0.35), transparent);
}

.analyzer-tool {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: var(--space-2xl);
}

.tool-copy h3 {
  margin: 4px 0 8px;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.tool-copy p {
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.tool-copy label, .compact-tool > label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.tool-number {
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tool-experience textarea,
.tool-experience input,
.tool-experience select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(8, 11, 20, 0.8);
  color: var(--text-primary);
  font-size: 0.86rem;
  transition: all var(--transition-base);
  color-scheme: dark;
}

.tool-experience textarea {
  min-height: 105px;
  resize: vertical;
}

.tool-experience textarea:focus,
.tool-experience input:focus,
.tool-experience select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px var(--violet-dim);
}

.tool-actions, .inline-tool-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.tool-primary-btn, .tool-secondary-btn {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.tool-primary-btn {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}
.tool-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-violet);
}

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

.analyzer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.analyzer-actions button {
  padding: 6px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.analyzer-actions button:hover {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--violet-dim);
}

.analysis-visual {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(6, 9, 17, 0.65);
}

.overall-score {
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--bg-secondary) 56%, transparent 58%), conic-gradient(var(--violet) calc(var(--score, 0) * 1%), rgba(255,255,255,.08) 0);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.overall-score span {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.overall-score small {
  max-width: 80px;
  color: var(--text-muted);
  font-size: 0.64rem;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-stack {
  display: grid;
  gap: 8px;
}

.analysis-metric {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.analysis-metric > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.analysis-metric strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.metric-track {
  height: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
}

.metric-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
  transition: width 0.45s ease;
}

.analysis-insight {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.74rem;
}

.tool-empty {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.analysis-highlights {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  line-height: 1.8;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.analysis-highlights mark {
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
}
.analysis-highlights .flag-risky-claim { background: rgba(244, 63, 94, 0.45); border: 1px solid rgba(244, 63, 94, 0.5); }
.analysis-highlights .flag-clickbait { background: rgba(245, 158, 11, 0.45); border: 1px solid rgba(245, 158, 11, 0.5); }
.analysis-highlights .flag-cliché { background: rgba(139, 92, 246, 0.45); border: 1px solid rgba(139, 92, 246, 0.5); }
.analysis-highlights .flag-filler { background: rgba(6, 182, 212, 0.45); border: 1px solid rgba(6, 182, 212, 0.5); }
.analysis-highlights small { display: block; margin-top: 6px; color: var(--text-muted); }

/* Formula Builder */
.formula-workspace {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.formula-blocks {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.formula-block {
  min-width: 175px;
  padding: 14px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  background: var(--violet-dim);
}

.formula-block > span {
  display: block;
  margin-bottom: 7px;
  color: #c4b5fd;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.formula-block input {
  padding: 8px 10px;
  background: rgba(6, 9, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.8rem;
}

.formula-block > div {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
}

.formula-block button {
  width: 28px;
  height: 26px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  transition: all var(--transition-fast);
}

.formula-block button:hover {
  background: var(--surface-hover);
  color: #fff;
  border-color: var(--glass-border-hover);
}

.formula-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: rgba(6, 9, 17, 0.7);
  border: 1px solid var(--glass-border);
}

.formula-preview > span {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.formula-preview p {
  margin: 10px 0 var(--space-md);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.55;
  color: #f8fafc;
}

.formula-preview label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Opening Flow */
.opening-flow {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  gap: 10px;
}

.opening-flow > i {
  color: var(--cyan);
  font-style: normal;
  transform: rotate(-90deg);
  font-weight: 700;
}

.flow-stage {
  width: min(100%, 250px);
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(6, 9, 17, 0.6);
}

.flow-stage > span {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.flow-stage textarea {
  min-height: 95px;
  padding: 8px 10px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.flow-stage button {
  margin-top: 8px;
  color: #c4b5fd;
  font-size: 0.68rem;
  font-weight: 600;
}
.flow-stage button:hover { color: #fff; text-decoration: underline; }

.flow-preview {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.04);
}

.flow-preview > span {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.flow-preview p {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* Compare Tool */
.compact-copy { margin-bottom: var(--space-lg); }

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}

.compare-card {
  display: block;
  padding: var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(6, 9, 17, 0.55);
}

.compare-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compare-result {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.compare-result strong, .compare-result span { display: block; }
.compare-result strong { margin-bottom: 3px; color: var(--cyan); font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; }

.compare-vs {
  align-self: center;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--violet-dim);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.72rem;
  font-weight: 800;
}

.compare-action {
  display: block;
  margin: 14px auto 0;
}

.compare-summary {
  min-height: 22px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: center;
}

/* Tool Pair: Repurposer & Planner */
.tool-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.compact-tool { margin-bottom: 0; }
.inline-tool-controls select { flex: 1; }

.repurpose-output {
  min-height: 105px;
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(6, 9, 17, 0.4);
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-line;
}

.planner-toggle {
  display: flex;
  flex: 1;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(6, 9, 17, 0.6);
  padding: 2px;
}

.planner-toggle button {
  flex: 1;
  padding: 6px 8px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.planner-toggle button.active {
  background: var(--violet-dim);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.planner-day {
  min-height: 90px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(6, 9, 17, 0.55);
}

.planner-day span {
  color: var(--violet);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.planner-day p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════
   EDGE WORKSPACE & CREATION STUDIO
   ═══════════════════════════════════════════════════════ */
.edge-workspace {
  width: min(var(--max-width), calc(100% - 2 * var(--space-xl)));
  margin: 0 auto;
  padding: var(--space-4xl) 0;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.edge-header-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-lg);
}

.edge-shell {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--gradient-card);
  box-shadow: var(--shadow-card);
}

.edge-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px;
  border-bottom: 1px solid var(--glass-border);
  scrollbar-width: thin;
}

.edge-tabs button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.edge-tabs button:hover, .edge-tabs button.active {
  border-color: rgba(139, 92, 246, 0.35);
  background: var(--violet-dim);
  color: var(--text-primary);
}

.edge-panels {
  padding: clamp(16px, 3vw, 32px);
}

.edge-panel { display: none; }
.edge-panel.active { display: block; animation: edgePanelIn 0.22s ease both; }

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

.edge-panel > header {
  max-width: 760px;
  margin-bottom: var(--space-xl);
}

.edge-panel > header > span {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edge-panel > header h3 {
  margin: 4px 0;
  font: 800 clamp(1.35rem, 3vw, 2rem) var(--font-heading);
}

.edge-panel > header p, .edge-help {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.edge-grid { display: grid; gap: 14px; }
.edge-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.edge-card {
  min-width: 0;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(6, 9, 17, 0.55);
}

.edge-card.span-two { grid-column: 1 / -1; }
.edge-card h4 { margin-bottom: 10px; font: 700 0.96rem var(--font-heading); }
.edge-card hr { margin: 18px 0; border: 0; border-top: 1px solid var(--glass-border); }
.edge-card label { display: block; color: var(--text-secondary); font-size: 0.74rem; font-weight: 600; }

.edge-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.edge-card textarea,
.edge-card select {
  width: 100%;
  margin-top: 5px;
  padding: 9px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(8, 11, 20, 0.8);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.78rem;
  color-scheme: dark;
}

.edge-card textarea { min-height: 80px; resize: vertical; }

.edge-card input:focus, .edge-card textarea:focus, .edge-card select:focus, .edge-card button:focus {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.edge-card > button, .edge-actions button, .file-button {
  min-height: 34px;
  margin-top: 10px;
  padding: 7px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.edge-card > button:hover, .edge-actions button:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

.edge-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.edge-fields .span-two { grid-column: 1 / -1; }
.recipe-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.edge-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.edge-actions select { width: auto; margin-top: 10px; }

.file-button {
  display: inline-flex !important;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}
.file-button input, .drop-file input { position: absolute; inset: 0 auto auto 0; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }

.drop-file {
  display: grid !important;
  min-height: 86px;
  place-items: center;
  margin: 10px 0;
  border: 1px dashed rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-md);
  background: var(--violet-dim);
  cursor: pointer;
}

.edge-empty { color: var(--text-muted); font-size: 0.76rem; }

.validation-output {
  min-height: 24px;
  margin-top: 9px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.025);
  color: var(--text-muted);
  font-size: 0.72rem;
}
.validation-output.good { background: var(--emerald-dim); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.validation-output.bad { background: var(--rose-dim); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.3); }

.constraint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.constraint-grid > label:nth-child(-n+4) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(10, 14, 26, 0.7);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.constraint-grid > label:nth-child(-n+4):hover {
  background: rgba(22, 29, 52, 0.85);
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.constraint-grid > label:nth-child(-n+4):has(input:checked) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.1));
  border-color: rgba(139, 92, 246, 0.6);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.22);
}

.constraint-grid > label:nth-child(-n+4) input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(6, 9, 18, 0.85);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: grid;
  place-items: center;
}

.constraint-grid > label:nth-child(-n+4) input[type="checkbox"]:checked {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.constraint-grid > label:nth-child(-n+4) input[type="checkbox"]:checked::after {
  content: '';
  width: 3.5px;
  height: 7px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
}

.diversity-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.diversity-grid label { text-transform: capitalize; }
.diversity-grid label span { display: flex; align-items: center; gap: 3px; }

.risk-options { display: grid; gap: 8px; }
.risk-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.risk-options label:hover { background: var(--surface-hover); border-color: var(--glass-border-hover); }
.risk-options span, .risk-options strong, .risk-options small { display: block; }
.risk-options small { margin-top: 2px; color: var(--text-muted); font-weight: 400; }

.compact-list, .thread-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 290px;
  overflow-y: auto;
}
.compact-list > button, .compact-list > p, .compact-list > article {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-align: left;
  font-size: 0.72rem;
}
.compact-list span, .compact-list b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.compact-list b { color: var(--cyan); }
.compact-list article { display: grid; }
.compact-list article div { display: flex; gap: 6px; }
.compact-list article button { padding: 5px 8px; border: 1px solid var(--glass-border); border-radius: 6px; }

.thread-item {
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}
.thread-item.resolved { opacity: 0.6; }
.thread-item > div { display: flex; justify-content: space-between; gap: 8px; }
.thread-item time, .thread-item small { color: var(--text-muted); font-size: 0.65rem; }
.thread-item p { margin: 6px 0; color: var(--text-secondary); font-size: 0.76rem; }
.thread-item button { color: var(--violet); font-size: 0.68rem; font-weight: 600; }

.status-history { margin-top: 12px; }
.status-history p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.7rem;
}
.status-history span { color: var(--text-muted); }

.annotation-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.72rem;
}
.annotation-item.resolved { opacity: 0.58; }
.annotation-item mark { border-radius: 4px; background: var(--amber-dim); color: var(--amber); }
.annotation-item div { display: flex; gap: 4px; }
.annotation-item button, .outlier-item button { padding: 4px 7px; border: 1px solid var(--glass-border); border-radius: 5px; color: var(--text-muted); font-size: 0.62rem; }

.outlier-item { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 6px; margin-top: 6px; }
.freshness-fields { display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.freshness-fields input { width: 100%; margin-top: 3px; padding: 6px; border: 1px solid var(--glass-border); border-radius: 5px; background: var(--bg-tertiary); color: var(--text-primary); font-size: 0.65rem; }

.ownership-label, .dependency-note {
  padding: 9px 12px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  background: var(--emerald-dim);
  color: #6ee7b7;
  font-size: 0.74rem;
}
.dependency-note { border-color: rgba(139, 92, 246, 0.3); background: var(--violet-dim); color: #c4b5fd; line-height: 1.5; }

.table-scroll { overflow-x: auto; margin-top: 10px; }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.table-scroll th, .table-scroll td { padding: 8px 10px; border-bottom: 1px solid var(--glass-border); text-align: left; white-space: nowrap; }
.table-scroll th { color: var(--cyan); font-weight: 700; text-transform: uppercase; font-size: 0.66rem; }

.benchmark-hero { display: flex; align-items: baseline; gap: 8px; margin: 12px 0; }
.benchmark-hero strong { font: 800 2rem var(--font-heading); color: var(--cyan); }
.benchmark-hero span, .decay-note { color: var(--text-muted); font-size: 0.72rem; }
.benchmark-bar { display: grid; grid-template-columns: 80px 1fr 55px; align-items: center; gap: 8px; margin: 7px 0; font-size: 0.7rem; }
.benchmark-bar i { height: 6px; border-radius: 5px; background: linear-gradient(90deg, var(--violet) var(--bar), rgba(255,255,255,.06) var(--bar)); }

.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.check-list p { display: flex; gap: 7px; padding: 8px; border-radius: 7px; font-size: 0.72rem; }
.check-list .pass { background: var(--emerald-dim); color: #6ee7b7; }
.check-list .warn { background: var(--amber-dim); color: #fcd34d; }

.funnel-result { display: flex; align-items: center; gap: 14px; }
.funnel-result > strong { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--gradient-primary); font: 800 1.2rem var(--font-heading); color: #fff; }
.funnel-result p { color: var(--text-muted); font-size: 0.74rem; }

.morph-grid, .cluster-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.morph-grid article, .cluster-grid details { padding: 10px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); }
.morph-grid span { color: var(--cyan); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; }
.morph-grid p, .cluster-grid p { margin-top: 4px; color: var(--text-secondary); font-size: 0.72rem; }

.tree-view { margin-top: 12px; }
.tree-view details { margin: 5px 0 5px 12px; padding-left: 8px; border-left: 1px solid rgba(139, 92, 246, 0.4); }
.tree-view summary { cursor: pointer; color: var(--text-secondary); font-size: 0.74rem; }
.tree-view p { margin: 5px 0; padding: 7px; border-radius: 6px; background: rgba(255,255,255,0.025); color: var(--text-muted); font-size: 0.7rem; }

.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.integration-card { padding: 16px; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: rgba(255,255,255,0.02); }
.integration-card span { color: var(--cyan); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.integration-card h4 { margin: 5px 0; font-size: 0.86rem; }
.integration-card p { color: var(--text-muted); font-size: 0.72rem; line-height: 1.5; }

.budget-preview {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  background: var(--violet-dim);
  color: #c4b5fd;
  font: 700 0.92rem var(--font-heading);
  text-align: center;
}

.queue-meter { height: 8px; overflow: hidden; border-radius: 6px; background: rgba(255,255,255,0.06); }
.queue-meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--gradient-primary); transition: width 0.2s ease; }

.edge-tour {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(12px);
}
.edge-tour[hidden] { display: none; }
.edge-tour-card {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-elevated);
}
.edge-tour-card > span { color: var(--cyan); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.edge-tour-card h3 { margin: 6px 0; font: 800 1.4rem var(--font-heading); }
.edge-tour-card p { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.55; }
.edge-tour-card > div { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 10px; }
.edge-tour-card button { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; }
.edge-tour-card label { color: var(--text-muted); font-size: 0.7rem; }

/* Collection Hooks */
.collection-hooks { display: grid; gap: 10px; margin: 10px 0; }
.collection-hook { padding: 12px; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: var(--surface); }
.collection-hook p { margin: 0 0 8px; overflow-wrap: anywhere; font-size: 0.84rem; }
.collection-hook > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.collection-hook select { min-height: 32px; max-width: 180px; background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--glass-border-hover); border-radius: 6px; font-size: 0.75rem; }

/* ─── Creation Studio ─── */
.creation-studio {
  max-width: var(--max-width);
  margin: 48px auto;
  padding: 0 var(--space-xl);
}
.studio-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.studio-heading h2 { font: 800 clamp(1.8rem, 4vw, 2.7rem)/1.1 var(--font-heading); margin: 6px 0; }
.studio-heading p, .studio-card header p { color: var(--text-muted); max-width: 720px; font-size: 0.9rem; }
.studio-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 14px; scrollbar-width: thin; }
.studio-tabs button {
  white-space: nowrap;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.035);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  min-height: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.studio-tabs button:hover { border-color: var(--glass-border-hover); color: var(--text-primary); }
.studio-tabs button[aria-selected="true"] { color: #fff; border-color: rgba(139, 92, 246, 0.5); background: var(--violet-dim); box-shadow: 0 0 14px rgba(139, 92, 246, 0.2); }

.studio-card {
  border: 1px solid var(--glass-border);
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-card);
}
.studio-card h3 { font-size: 1.6rem; font-weight: 800; margin: 4px 0; }
.studio-card h4 { margin: 22px 0 12px; font-size: 1.1rem; font-weight: 700; color: var(--cyan); }
.studio-card label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 0.82rem; font-weight: 600; margin: 10px 0; }
.studio-card input:not([type=checkbox]):not([type=range]),
.studio-card textarea,
.studio-card select {
  width: 100%;
  border: 1px solid var(--glass-border);
  background: rgba(6, 9, 17, 0.75);
  color: #f4f4f5;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 40px;
  font-size: 0.84rem;
  color-scheme: dark;
}
.studio-card textarea { min-height: 85px; resize: vertical; }
.studio-card .long-input { min-height: 220px; }

.studio-card button {
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: var(--violet-dim);
  color: #f4f4f5;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  min-height: 38px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.studio-card button:hover { background: rgba(139, 92, 246, 0.25); border-color: rgba(139, 92, 246, 0.6); }
.studio-card button:disabled { opacity: 0.45; cursor: not-allowed; }

.studio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.studio-inline, .studio-actions, .preview-controls { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.studio-inline > label, .preview-controls > label { flex: 1; min-width: 160px; }

.trait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.trait-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.trait-grid label:hover {
  background: rgba(22, 29, 52, 0.85);
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--text-primary);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 12px rgba(139, 92, 246, 0.15);
}

.trait-grid label:active {
  transform: translateY(0);
}

.trait-grid label:has(input:checked) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(6, 182, 212, 0.12));
  border-color: rgba(139, 92, 246, 0.65);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.trait-grid label:has(input:checked):hover {
  border-color: rgba(139, 92, 246, 0.85);
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.4), 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.trait-grid input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  background: rgba(6, 9, 18, 0.85);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: grid;
  place-items: center;
}

.trait-grid label:hover input[type="checkbox"] {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.trait-grid input[type="checkbox"]:checked {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

.trait-grid input[type="checkbox"]:checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
}

.studio-output {
  display: block;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  background: var(--cyan-dim);
  border-radius: var(--radius-md);
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  color: #cffafe;
}

.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.pack-grid article, .library-list article {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(6, 9, 17, 0.6);
}
.pack-grid p, .library-list p { overflow-wrap: anywhere; font-size: 0.82rem; }

.platform-preview {
  margin-top: 14px;
  max-width: 720px;
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(22, 28, 48, 0.95), rgba(7, 9, 18, 0.95));
  padding: 20px;
}
.platform-preview.mobile { max-width: 380px; min-height: 220px; }
.platform-preview p { font-size: 1.15rem; margin: 30px 0; }
.platform-preview span, .platform-preview small { color: var(--text-muted); }

.weight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 18px; }
.weight-grid label { grid-template-columns: 1fr auto; align-items: center; }
.weight-grid input { grid-column: 1/-1; }

.coverage-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.coverage-map > div { border: 1px solid var(--glass-border); padding: 12px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.02); }
.coverage-map span {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.35) var(--heat), rgba(255, 255, 255, 0.025) var(--heat));
  font-size: 0.74rem;
}

.library-list { display: grid; gap: 10px; margin-top: 12px; }
.library-list article > div { display: flex; gap: 6px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════
   TIPS SECTION
   ═══════════════════════════════════════════════════════ */
.tips-section {
  padding: var(--space-4xl) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.tip-card {
  background: var(--gradient-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.tip-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.tip-header {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tip-header:hover {
  background: var(--surface-hover);
}

.tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tip-header h3 {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.tip-toggle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: var(--transition-base);
  flex-shrink: 0;
}

.tip-card.open .tip-toggle {
  transform: rotate(45deg);
  background: var(--violet-dim);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.tip-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease-out;
  padding: 0 var(--space-lg);
}

.tip-card.open .tip-content {
  max-height: 300px;
  padding: 0 var(--space-lg) var(--space-lg);
}

.tip-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════
   FAQ SECTION
   ═══════════════════════════════════════════════════════ */
.faq-section {
  padding: var(--space-4xl) 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
}

.faq-grid details {
  padding: 16px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  transition: border-color var(--transition-fast);
}

.faq-grid details:hover {
  border-color: var(--glass-border-hover);
}

.faq-grid details[open] {
  border-color: rgba(139, 92, 246, 0.4);
  background: linear-gradient(145deg, rgba(20, 26, 46, 0.95), rgba(11, 15, 27, 0.92));
}

.faq-grid summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.faq-grid summary::after {
  content: '+';
  color: var(--cyan);
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform var(--transition-fast);
  margin-left: 12px;
}

.faq-grid details[open] summary::after {
  transform: rotate(45deg);
}

.faq-grid p {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   FINAL CTA
   ═══════════════════════════════════════════════════════ */
.final-cta {
  width: min(980px, calc(100% - 2 * var(--space-xl)));
  margin: 0 auto var(--space-4xl);
  padding: clamp(32px, 5vw, 60px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-2xl);
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.25), transparent 70%), var(--gradient-card);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.final-cta > span {
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.final-cta h2 {
  margin: 8px 0 10px;
  font: 800 clamp(2rem, 4.5vw, 3rem) var(--font-heading);
  letter-spacing: -0.03em;
}

.final-cta p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.final-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-xl);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.final-cta a:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-violet);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
  padding: var(--space-4xl) var(--space-xl) var(--space-xl);
  border-top: 1px solid var(--glass-border);
  background: var(--bg-secondary);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: var(--space-md);
  max-width: 320px;
  line-height: 1.6;
}

.footer-logo {
  margin-bottom: var(--space-sm);
}

.footer-links h4 {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.footer-links a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 5px 0;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-bottom strong {
  color: var(--emerald);
}

/* ═══════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 5, 12, 0.75);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
  padding: var(--space-xl);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease, visibility 0s;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-elevated);
  transform: translateY(20px) scale(0.97);
  transition: var(--transition-spring);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--rose-dim);
  border-color: rgba(244, 63, 94, 0.35);
  color: var(--rose);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg) var(--space-xl);
}

.modal-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.modal-empty p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 4px;
}

.modal-empty-sub {
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
}

.modal-footer {
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
}

.modal-footer-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.modal-footer-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

/* History Entry */
.history-entry {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.history-topic {
  font-weight: 700;
  font-size: 0.95rem;
}

.history-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.history-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.history-tag {
  padding: 2px 8px;
  background: var(--surface);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.history-hooks {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.history-hook-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 12px;
  background: rgba(6, 9, 17, 0.6);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.history-hook-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.history-hook-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 18px;
}

/* Favorites Entry */
.favorite-entry {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: var(--transition-fast);
}

.favorite-entry:hover {
  background: var(--bg-elevated);
}

.favorite-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.favorite-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.fav-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.fav-action-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.fav-action-btn.remove:hover {
  background: var(--rose-dim);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.35);
}

/* ═══════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 22px;
  background: rgba(18, 24, 42, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: #f8fafc;
  z-index: 3000;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition-spring);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2);
  white-space: nowrap;
}

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

/* ═══════════════════════════════════════════════════════
   SCROLL TO TOP
   ═══════════════════════════════════════════════════════ */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 24, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-secondary);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-base);
  box-shadow: var(--shadow-card);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--violet-dim);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════
   COMMAND PALETTE
   ═══════════════════════════════════════════════════════ */
.command-palette {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(2, 4, 10, 0.75);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.command-palette.open {
  opacity: 1;
  visibility: visible;
}

.command-dialog {
  width: min(620px, calc(100% - 32px));
  overflow: hidden;
  border: 1px solid var(--glass-border-hover);
  border-radius: 16px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-elevated);
}

.command-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border);
}

.command-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.95rem;
}

.command-search kbd {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-family: var(--font-mono);
}

.command-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.command-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: 9px;
  text-align: left;
  transition: var(--transition-fast);
}

.command-item:hover, .command-item:focus {
  background: var(--violet-dim);
}

.command-item span {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.command-item small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

body.modal-open { overflow: hidden; }

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

/* ═══════════════════════════════════════════════════════
   FINAL PREMIUM VISUAL PASS
   ═══════════════════════════════════════════════════════ */
.nav-container { max-width: 1500px; }
.navbar { border-bottom-color: rgba(255, 255, 255, .065); }
.nav-logo svg { filter: drop-shadow(0 0 10px rgba(124, 92, 252, .28)); }
.nav-logo strong { color: #fff; }
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -7px;
  height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: left var(--transition-base), right var(--transition-base);
}
.nav-links a:hover::after { left: 12%; right: 12%; }

.section-header { margin-bottom: clamp(28px, 4vw, 54px); }
.section-header h2 { font-size: clamp(2.15rem, 4vw, 3.15rem); line-height: 1.08; }
.section-tag,
.section-kicker,
.panel-eyebrow,
.tool-number { letter-spacing: .11em; }

.quick-tools,
.how-it-works,
.hook-types,
.visual-tools,
.edge-workspace,
.creation-studio,
.tips-section,
.faq-section {
  position: relative;
}

.how-it-works,
.hook-types,
.visual-tools,
.edge-workspace,
.tips-section,
.faq-section {
  padding-top: clamp(58px, 7vw, 94px);
  padding-bottom: clamp(58px, 7vw, 94px);
}

.creation-studio {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: clamp(58px, 7vw, 94px);
  padding-bottom: clamp(58px, 7vw, 94px);
}

.how-it-works::before,
.hook-types::before,
.visual-tools::before,
.edge-workspace::before,
.creation-studio::before,
.tips-section::before,
.faq-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(760px, 72vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(124, 92, 252, .22), rgba(20, 184, 212, .18), transparent);
}

.mode-nav,
.edge-tabs,
.studio-tabs {
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
}
.mode-nav > *, .edge-tabs > *, .studio-tabs > * { scroll-snap-align: center; }

.step,
.type-detail,
.tool-experience,
.edge-shell,
.studio-card,
.tip-card,
.faq-grid details,
.quick-tool-card {
  box-shadow: 0 18px 58px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .025);
}

.step,
.tool-experience,
.studio-card,
.edge-card,
.tip-card,
.faq-grid details {
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}

@media (hover: hover) {
  .tool-experience:hover,
  .studio-card:hover,
  .edge-card:hover,
  .tip-card:hover,
  .faq-grid details:hover {
    border-color: rgba(139, 92, 246, .24);
    box-shadow: 0 24px 68px rgba(0, 0, 0, .26), 0 0 38px rgba(124, 92, 252, .045), inset 0 1px 0 rgba(255, 255, 255, .035);
  }
}

.tool-experience,
.studio-card,
.edge-shell {
  background-image:
    radial-gradient(circle at 92% 0%, rgba(20, 184, 212, .035), transparent 28%),
    linear-gradient(145deg, rgba(16, 21, 36, .95), rgba(9, 13, 24, .94));
}

.tool-experience::before,
.studio-card::before {
  background-size: 180% 100%;
  animation: borderGlide 9s ease-in-out infinite;
}

.tool-experience :is(input, textarea, select),
.studio-card :is(input:not([type="checkbox"]):not([type="range"]), textarea, select),
.edge-card :is(input:not([type="checkbox"]):not([type="range"]), textarea, select) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
}

.tool-experience :is(input, textarea, select):hover,
.studio-card :is(input:not([type="checkbox"]):not([type="range"]), textarea, select):hover,
.edge-card :is(input:not([type="checkbox"]):not([type="range"]), textarea, select):hover {
  border-color: rgba(255, 255, 255, .18);
}

.tool-experience :is(input, textarea, select):focus,
.studio-card :is(input:not([type="checkbox"]):not([type="range"]), textarea, select):focus,
.edge-card :is(input:not([type="checkbox"]):not([type="range"]), textarea, select):focus {
  border-color: rgba(20, 184, 212, .62);
  box-shadow: 0 0 0 3px rgba(20, 184, 212, .1), 0 10px 28px rgba(0, 0, 0, .2);
}

.placeholder-icon { position: relative; }
.placeholder-icon::before {
  content: '';
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(124, 92, 252, .2);
  border-right-color: rgba(20, 184, 212, .48);
  border-radius: 50%;
  animation: placeholderOrbit 8s linear infinite;
}
@keyframes placeholderOrbit { to { transform: rotate(360deg); } }

.action-btn,
.hook-action-btn,
.tool-primary-btn,
.tool-secondary-btn,
.secondary-tool-btn,
.studio-card button,
.edge-card button {
  -webkit-tap-highlight-color: transparent;
}

:where(.action-btn, .hook-action-btn, .tool-primary-btn, .tool-secondary-btn, .secondary-tool-btn, .studio-card button, .edge-card button):active:not(:disabled) {
  transform: translateY(0) scale(.98);
}

.settings-summary {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
}

.results-header {
  position: relative;
  z-index: 1;
  margin: -8px -8px 14px;
  padding: 8px 8px 12px;
  background: linear-gradient(180deg, rgba(11, 15, 27, .62), rgba(11, 15, 27, 0));
}

.score-ring { box-shadow: 0 0 18px color-mix(in srgb, var(--ring-color) 18%, transparent); }
.hook-type-badge { backdrop-filter: blur(10px); }
.hook-number { font-size: 1.3rem; color: rgba(255, 255, 255, .075); }

.final-cta {
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28), 0 0 60px rgba(124, 92, 252, .06);
}

@media (max-width: 768px) {
  body { background-attachment: scroll; }
  body::before, body::after { opacity: .26; }
  .generator { padding-top: calc(var(--nav-height) + 24px); }
  .generator-title { font-size: clamp(2.55rem, 13vw, 4rem); }
  .generator-header::before { width: 150vw; opacity: .55; }
  .generator-header::after { width: 104vw; opacity: .48; }
  .gen-panel { border-radius: 19px; }
  .results-header { margin: 0 0 12px; padding: 0 0 10px; background: transparent; }
  .hook-card { padding: 16px; border-radius: 15px; }
  .hook-text { font-size: 1rem; }
  .how-it-works,
  .hook-types,
  .visual-tools,
  .edge-workspace,
  .creation-studio,
  .tips-section,
  .faq-section { padding-top: 54px; padding-bottom: 54px; }
}

@media (max-width: 480px) {
  .section-header { margin-bottom: 26px; }
  .generator-container { gap: 14px; }
  .platform-selector, .tone-selector, .type-grid { gap: 6px; }
  .platform-btn, .tone-btn, .type-btn { min-height: 34px; }
  .results-placeholder { min-height: 235px; padding: 42px 18px; }
  .hook-actions { gap: 7px; }
  .hook-action-btn { min-height: 36px; }
  .quick-tool-card { padding: 15px; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE MEDIA QUERIES
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .generator-container {
    grid-template-columns: 1fr;
  }

  .gen-input {
    position: static;
    max-height: none;
  }

  .gen-results {
    min-height: auto;
  }

  .type-detail {
    grid-template-columns: 1fr;
  }

  .types-tabs {
    justify-content: flex-start;
    margin: 0;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .quick-tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analyzer-tool, .formula-workspace { grid-template-columns: 1fr; }
  .opening-flow { grid-template-columns: 1fr; }
  .opening-flow > i { justify-self: center; transform: none; }
  .flow-stage { width: 100%; }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-md);
    background: rgba(7, 9, 18, 0.98);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .nav-free-pill { margin-left: auto; }
  .mode-nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .mode-nav a { flex: 0 0 auto; }

  .steps-container {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    padding-top: 0;
    width: auto;
    height: 48px;
    transform: rotate(90deg);
  }

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

  .types-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scrollbar-width: none;
  }

  .types-content {
    padding: var(--space-lg);
  }

  .input-row {
    flex-direction: column;
    gap: 0;
  }

  .draft-recovery,
  .advanced-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .draft-recovery-actions,
  .advanced-footer > div {
    flex-wrap: wrap;
  }

  .results-actions span {
    display: none;
  }

  .results-list.has-results {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .quick-tools,
  .visual-tools,
  .faq-section,
  .edge-workspace { width: min(100% - 2 * var(--space-md), var(--max-width)); }
  .quick-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-pair, .faq-grid { grid-template-columns: 1fr; }
  .analysis-visual { grid-template-columns: 100px 1fr; }
  .overall-score { width: 94px; height: 94px; }
  .formula-blocks { align-items: stretch; }
  .flow-preview { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-vs { margin: -3px auto; }
  .planner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .final-cta { width: calc(100% - 2 * var(--space-md)); }
  .edge-grid.two, .integration-grid { grid-template-columns: 1fr; }
  .edge-card.span-two { grid-column: auto; }
  .recipe-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diversity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .footer-container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .modal {
    max-height: 90vh;
    margin: var(--space-md);
  }

  .bulk-action-field { flex: 1 1 100%; }
  .bulk-action-field select { max-width: none; width: 100%; }
}

@media (max-width: 480px) {
  .generator,
  .how-it-works,
  .hook-types,
  .tips-section {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .gen-panel {
    padding: var(--space-md);
  }

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

  .nav-free-pill { display: none; }
  .nav-logo { font-size: 1.15rem; }
  .quick-tools-grid { grid-template-columns: 1fr; }
  .quick-tools-heading { align-items: flex-start; flex-direction: column; }
  .analysis-visual { grid-template-columns: 1fr; justify-items: center; }
  .metric-stack { width: 100%; }
  .analysis-insight { text-align: center; }
  .tool-actions, .inline-tool-controls { align-items: stretch; flex-direction: column; }
  .hook-more-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hook-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hook-action-btn { justify-content: center; }
  .edge-panels { padding: 12px; }
  .edge-fields, .recipe-fields, .constraint-grid, .morph-grid, .cluster-grid, .check-list { grid-template-columns: 1fr; }
  .edge-fields .span-two { grid-column: auto; }
  .diversity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edge-header-actions { align-items: stretch; flex-direction: column; }

  .platform-btn,
  .tone-btn,
  .type-btn {
    font-size: 0.72rem;
    padding: 5px 8px;
  }
}

@media(max-width:760px){
  .creation-studio{padding:0 14px}
  .studio-heading{align-items:start}
  .studio-grid{grid-template-columns:1fr}
  .studio-card{padding:16px}
  .rewrite-diff>div{grid-template-columns:1fr}
  .trait-grid{grid-template-columns:1fr}
  .studio-actions button{flex:1 1 130px}
  .platform-preview.mobile{max-width:100%}
}
@media(max-width:360px){
  .creation-studio{padding:0 10px}
  .studio-card{padding:13px}
  .studio-tabs button{padding:9px 11px}
  .pack-grid{grid-template-columns:1fr}
  html,body{max-width:100%;overflow-x:hidden}
  .studio-heading{flex-wrap:wrap}
  .creation-studio *{min-width:0}
  .studio-tabs{max-width:100%}
}

[dir="rtl"] .creation-studio,[dir="rtl"] .generator,[dir="rtl"] .edge-workspace{text-align:right}
[dir="rtl"] .studio-inline,[dir="rtl"] .studio-actions,[dir="rtl"] .hook-actions{flex-direction:row-reverse}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.footer-languages {
  width: 100%;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media print {
  body { background: #fff !important; color: #111 !important; }
  .navbar, .hero, .quick-tools, .how-it-works, .hook-types, .tips-section, .faq-section, .final-cta, .mode-nav, .generate-btn, .hook-actions, .results-actions, .studio-tabs, .scroll-top-btn, .toast, .edge-tabs, button { display: none !important; }
  .generator, .visual-tools, .edge-workspace, .creation-studio { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .gen-input { display: none !important; }
  .gen-results, .hook-card, .planner-grid, .edge-panel, .studio-card { display: block !important; background: #fff !important; color: #111 !important; border: 1px solid #bbb !important; box-shadow: none !important; break-inside: avoid; }
  .results-list { max-height: none !important; overflow: visible !important; }
  .hook-text, .hook-card * { color: #111 !important; }
  .studio-panels > [hidden] { display: none !important; }
  a { color: #111 !important; text-decoration: none; }
}
