/* ============================================
   Claude Code Extensions Guide — Global Styles
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  /* Backgrounds */
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-surface-hover: #1c2129;
  --bg-code: #1a1e24;
  --border: #30363d;
  --border-light: #21262d;

  /* Text */
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  /* Accent colors — one per section */
  --accent-hooks: #f97316;
  --accent-skills: #a78bfa;
  --accent-plugins: #34d399;
  --accent-mcp: #38bdf8;
  --accent-community: #f472b6;
  --accent-start: #fbbf24;

  /* Misc */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --max-width: 900px;
  --nav-width: 240px;
  --transition: 0.2s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 0.75rem; margin-top: 2.5rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); margin-bottom: 0.5rem; margin-top: 1.5rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }
p + p { margin-top: 0; }

a {
  color: var(--accent-mcp);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #7dd3fc; text-decoration: underline; }

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

/* --- Layout --- */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-logo a {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-logo a:hover { color: var(--accent-mcp); text-decoration: none; }

.sidebar-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-hooks), var(--accent-skills));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar nav { flex: 1; padding: 0 0.75rem; }

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0.5rem 0.35rem;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar nav a:hover {
  background: var(--bg-surface-hover);
  color: var(--text);
  text-decoration: none;
}

.sidebar nav a.active {
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
}

.sidebar nav a .nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-footer a { color: var(--text-muted); }
.sidebar-footer a:hover { color: var(--accent-mcp); }

/* Main content */
.main-content {
  margin-left: var(--nav-width);
  flex: 1;
  min-width: 0;
}

.content-area {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* --- Mobile nav toggle --- */
.nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text);
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}

/* --- Hero --- */
.hero {
  margin-bottom: 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero .lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--border-light);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* --- Coded Mockups (terminal, editor, file tree) --- */
.mockup {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.85rem;
  background: #1a1e24;
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mockup-dot.red { background: #ff5f57; }
.mockup-dot.yellow { background: #febc2e; }
.mockup-dot.green { background: #28c840; }

.mockup-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.mockup-body {
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  overflow-x: auto;
}

.mockup-body .prompt { color: var(--accent-plugins); }
.mockup-body .command { color: var(--text); }
.mockup-body .comment { color: var(--text-muted); }
.mockup-body .output { color: var(--text-secondary); }
.mockup-body .string { color: var(--accent-hooks); }
.mockup-body .key { color: var(--accent-mcp); }
.mockup-body .value { color: var(--accent-skills); }
.mockup-body .keyword { color: var(--accent-community); }
.mockup-body .line { display: block; min-height: 1.65em; }
.mockup-body .line.blank { min-height: 0.8em; }

/* --- Collapsible code blocks --- */
details.code-example {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem 0;
  overflow: hidden;
}

details.code-example summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: background var(--transition);
}

details.code-example summary:hover {
  background: var(--bg-surface-hover);
}

details.code-example summary::marker,
details.code-example summary::-webkit-details-marker {
  display: none;
}

details.code-example summary::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform var(--transition);
  flex-shrink: 0;
}

details.code-example[open] summary::before {
  transform: rotate(90deg);
}

details.code-example .code-body {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  background: var(--bg-code);
  overflow-x: auto;
}

details.code-example pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text);
}

details.code-example code {
  font-family: inherit;
}

/* Inline code */
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent-hooks);
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

th, td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text);
  background: var(--bg-surface);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td { color: var(--text-secondary); }

tr:hover td { background: var(--bg-surface); }

/* --- Callouts --- */
.callout {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border: 1px solid;
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.callout p { margin-bottom: 0; font-size: 0.9rem; }
.callout strong { display: block; margin-bottom: 0.25rem; }

.callout.tip {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.25);
}
.callout.tip .callout-icon { color: var(--accent-plugins); }

.callout.info {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
}
.callout.info .callout-icon { color: var(--accent-mcp); }

.callout.warning {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.25);
}
.callout.warning .callout-icon { color: var(--accent-hooks); }

/* --- Section divider --- */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* --- Feature list (icon + text rows) --- */
.feature-list {
  list-style: none;
  margin: 1rem 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
}

.feature-list li:last-child { border-bottom: none; }

.feature-list .feat-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--text-muted);
}

.feature-list .feat-text { font-size: 0.92rem; }
.feature-list .feat-text strong { font-weight: 600; }

/* --- Comparison table highlight --- */
.vs-table td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* --- Architecture diagram --- */
.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2rem 0;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  position: relative;
  transition: all 0.3s ease;
}

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

.arch-layer:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.arch-layer:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.arch-layer + .arch-layer { border-top: none; }

.arch-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.arch-label h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.arch-label p {
  font-size: 0.8rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* Arrow between layers */
.arch-arrow {
  display: flex;
  justify-content: center;
  padding: 0.15rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* --- Page-specific accent overrides --- */
body.page-hooks { --page-accent: var(--accent-hooks); }
body.page-skills { --page-accent: var(--accent-skills); }
body.page-plugins { --page-accent: var(--accent-plugins); }
body.page-mcp { --page-accent: var(--accent-mcp); }
body.page-community { --page-accent: var(--accent-community); }
body.page-start { --page-accent: var(--accent-start); }

/* ================================================
   ANIMATIONS — Data flow, typing, pulse, sequences
   ================================================ */

/* Cursor blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--text);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* Data flow pulse — glowing dot that moves along a path */
@keyframes flowPulse {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

@keyframes flowPulseY {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

/* Typing animation for mockup lines */
@keyframes typeIn {
  from { width: 0; }
  to { width: 100%; }
}

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

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Gentle glow pulse */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(56, 189, 248, 0.15); }
}

/* Subtle breathing for live elements */
@keyframes breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Sequence reveal — staggered appearance */
.seq-reveal > * {
  opacity: 0;
  animation: fadeSlideUp 0.4s ease forwards;
}
.seq-reveal > *:nth-child(1) { animation-delay: 0s; }
.seq-reveal > *:nth-child(2) { animation-delay: 0.1s; }
.seq-reveal > *:nth-child(3) { animation-delay: 0.2s; }
.seq-reveal > *:nth-child(4) { animation-delay: 0.3s; }
.seq-reveal > *:nth-child(5) { animation-delay: 0.4s; }
.seq-reveal > *:nth-child(6) { animation-delay: 0.5s; }
.seq-reveal > *:nth-child(7) { animation-delay: 0.6s; }
.seq-reveal > *:nth-child(8) { animation-delay: 0.7s; }

/* ================================================
   ANIMATED DATA FLOW DIAGRAM
   ================================================ */

.flow-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-code);
  min-width: 100px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
}

.flow-node-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.flow-node-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.flow-arrow {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 60px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

.flow-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--border);
}

/* The animated dot on the arrow */
.flow-arrow .flow-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-mcp);
  box-shadow: 0 0 6px var(--accent-mcp);
  animation: flowPulse 2s ease-in-out infinite;
}

.flow-arrow:nth-child(2) .flow-dot { animation-delay: 0s; }
.flow-arrow:nth-child(4) .flow-dot { animation-delay: 0.5s; }
.flow-arrow:nth-child(6) .flow-dot { animation-delay: 1s; }
.flow-arrow:nth-child(8) .flow-dot { animation-delay: 1.5s; }

/* ================================================
   BRAND LOGO GRID
   ================================================ */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.logo-card:hover {
  border-color: var(--text-muted);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.logo-card .brand-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-card .brand-logo svg {
  width: 100%;
  height: 100%;
}

.logo-card .brand-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.logo-card .brand-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

/* ================================================
   SUBSCRIPTION / COST BADGES
   ================================================ */

.cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cost-badge.free {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-plugins);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.cost-badge.included {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-mcp);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.cost-badge.paid {
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-hooks);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.cost-badge.freemium {
  background: rgba(167, 139, 250, 0.15);
  color: var(--accent-skills);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

/* ================================================
   DONATE / SUPPORT BUTTONS
   ================================================ */

.donate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: rgba(244, 114, 182, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.25);
  color: var(--accent-community);
  text-decoration: none;
  transition: all var(--transition);
}

.donate-link:hover {
  background: rgba(244, 114, 182, 0.2);
  color: var(--accent-community);
  text-decoration: none;
  transform: translateY(-1px);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: rgba(139, 148, 158, 0.1);
  border: 1px solid rgba(139, 148, 158, 0.25);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.github-link:hover {
  background: rgba(139, 148, 158, 0.2);
  color: var(--text);
  text-decoration: none;
}

/* ================================================
   AUTHOR / CREDIBILITY SECTION
   ================================================ */

.author-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-hooks), var(--accent-skills));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.author-info h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.author-info .author-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.author-info .author-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

.author-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* ================================================
   CSS UI MOCKUP — Claude Code Interface
   ================================================ */

.ui-mockup {
  background: #1e1e2e;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.ui-mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.85rem;
  background: #191926;
  border-bottom: 1px solid #2a2a3c;
}

.ui-mockup-tabs {
  display: flex;
  gap: 0;
  margin-left: 1rem;
  flex: 1;
}

.ui-mockup-tab {
  padding: 0.35rem 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  font-family: 'Inter', sans-serif;
}

.ui-mockup-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent-mcp);
  background: rgba(56, 189, 248, 0.05);
}

.ui-mockup-body {
  display: flex;
  min-height: 280px;
}

.ui-mockup-sidebar {
  width: 200px;
  background: #191926;
  border-right: 1px solid #2a2a3c;
  padding: 0.75rem 0;
  flex-shrink: 0;
}

.ui-mockup-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: default;
}

.ui-mockup-sidebar-item.active {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
}

.ui-mockup-sidebar-item .item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ui-mockup-main {
  flex: 1;
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.65;
  overflow: hidden;
}

/* ================================================
   ANIMATED HOOK SEQUENCE
   ================================================ */

.hook-sequence {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0;
}

.hook-step {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.hook-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  flex-shrink: 0;
}

.hook-step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.hook-step-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  position: relative;
}

/* Animated data moving down the line */
.hook-step-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--page-accent, var(--accent-hooks));
  box-shadow: 0 0 6px var(--page-accent, var(--accent-hooks));
  animation: flowPulseY 1.5s ease-in-out infinite;
}

.hook-step:last-child .hook-step-line { display: none; }

.hook-step-content {
  flex: 1;
  padding: 0.5rem 0 1.25rem 0.75rem;
}

.hook-step-content h4 {
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  margin-top: 0;
}

.hook-step-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ================================================
   PROJECT CARD (community page — extended)
   ================================================ */

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
  transition: all var(--transition);
}

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

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-card-header .project-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-card-header .project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
}

.project-card-header .project-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.project-card-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.project-card-body p { margin-bottom: 0.5rem; }
.project-card-body p:last-child { margin-bottom: 0; }

.project-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ================================================
   COST SUMMARY TABLE (enhanced)
   ================================================ */

.cost-table td:nth-child(2) { white-space: nowrap; }

.cost-table .cost-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ================================================
   STEP LIST (numbered steps for getting-started)
   ================================================ */

.step-list {
  counter-reset: steps;
  list-style: none;
  margin: 1.5rem 0;
}

.step-list li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.step-list li::before {
  content: counter(steps);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--page-accent, var(--accent-mcp));
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-list li h4 { margin-bottom: 0.3rem; font-size: 1rem; }
.step-list li p { margin-bottom: 0; font-size: 0.9rem; }

/* ================================================
   PAGE NAV (prev/next links)
   ================================================ */

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-nav a {
  font-size: 0.9rem;
}

/* --- Site footer --- */
.site-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent-mcp); }

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .content-area {
    padding: 4.5rem 1.25rem 3rem;
  }

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

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .arch-layer {
    padding: 0.75rem 1rem;
  }

  .flow-diagram {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-arrow {
    min-width: 0;
    width: 2px;
    height: 40px;
    align-self: center;
  }

  .flow-arrow::after {
    right: auto;
    bottom: -1px;
    top: auto;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--border);
    border-bottom: none;
    left: 50%;
    transform: translateX(-50%);
  }

  .flow-arrow .flow-dot {
    animation-name: flowPulseY;
  }

  .ui-mockup-sidebar { display: none; }
  .ui-mockup-body { min-height: 200px; }

  .author-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-links { justify-content: center; }

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

  .hook-sequence { margin-left: 0; }
}

@media (max-width: 480px) {
  .content-area {
    padding: 4rem 1rem 2.5rem;
  }

  .mockup-body {
    font-size: 0.72rem;
    padding: 0.75rem 1rem;
  }

  details.code-example .code-body {
    padding: 0.75rem 1rem;
  }

  details.code-example pre {
    font-size: 0.72rem;
  }

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

/* --- Scrollbar (dark) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
