/* ==========================================================================
   Error State Handling — Modern Minimalist Design System
   Fluid-First Multi-Viewport Responsive Architecture (320px to 2560px+)
   ========================================================================== */

:root {
  /* Color Palette - Clean Minimalist Light */
  --bg-page: #FBFBFC;
  --bg-subtle: #F4F4F6;
  --surface: #FFFFFF;
  --surface-hover: #F9F9FB;
  --surface-raised: #FFFFFF;
  
  --border-light: #ECECEF;
  --border-medium: #E2E2E8;
  --border-focus: #2563EB;
  
  --text-primary: #0C0D0E;
  --text-secondary: #525462;
  --text-muted: #7A7C8C;
  --text-inverse: #FFFFFF;
  
  /* Brand & Accent */
  --accent-blue: #2563EB;
  --accent-blue-hover: #1D4ED8;
  --accent-blue-light: #EFF6FF;
  --accent-blue-border: #BFDBFE;

  /* Error & Warning (Before State & Bad Patterns) */
  --bad-bg: #FEF2F2;
  --bad-border: #FECACA;
  --bad-text: #991B1B;
  --bad-accent: #EF4444;

  /* Success & Handled (After State & Good Patterns) */
  --good-bg: #F0FDF4;
  --good-border: #BBF7D0;
  --good-text: #166534;
  --good-accent: #10B981;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px -4px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 32px -4px rgba(0, 0, 0, 0.08);
  --shadow-popover: 0 10px 38px -10px rgba(22, 23, 24, 0.15), 0 10px 20px -15px rgba(22, 23, 24, 0.1);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Fluid Layout Widths */
  --container-max: min(1200px, 92vw);
}

/* ==========================================================================
   Reset & Media Normalization
   ========================================================================== */

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

/* All media elements are fluid by default */
img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  /* Overflow defense: zero horizontal spill at root */
  overflow-x: hidden;
  background-image: radial-gradient(#e5e5eb 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
}

/* Subtle gradient glow in background: strictly contained to 100vw */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 100vw);
  height: min(480px, 50vh);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Fluid Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 3.5vw, 32px);
  position: relative;
  z-index: 1;
}

/* Typography Utilities with Fluid Clamping */
h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* ==========================================================================
   Navigation Header & Mobile Drawer
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 252, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  min-height: 44px;
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.brand-badge.small {
  width: 26px;
  height: 26px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Buttons with WCAG 44×44px touch compliance */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-align: center;
}

.btn-sm {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border-medium);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #D1D1D9;
}

.btn-dark {
  background: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-dark:hover {
  background: #27272A;
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Menu Button (44×44px touch target) */
.mobile-menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.mobile-menu-btn:hover {
  background: var(--bg-subtle);
}

.mobile-menu-btn .icon-close {
  display: none;
}

.mobile-menu-btn.active .icon-menu {
  display: none;
}

.mobile-menu-btn.active .icon-close {
  display: block;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-medium);
  box-shadow: var(--shadow-popover);
  padding: 18px 24px 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 99;
}

.mobile-nav-drawer.open {
  display: flex;
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav-footer {
  padding-top: 6px;
}

.mobile-cli-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none; /* IE / Edge */
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
}

.mobile-cli-pill::-webkit-scrollbar {
  display: none; /* Chrome, Safari, WebKit */
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: clamp(40px, 8vw, 84px) 0 clamp(36px, 6vw, 64px);
  text-align: center;
  position: relative;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 860px;
  margin-inline: auto;
}

.hero-badge-wrap {
  margin-bottom: clamp(16px, 3vw, 24px);
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-size: clamp(0.75rem, 1.5vw, 0.82rem);
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 100%;
}

.pill-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

.pill-divider {
  color: var(--border-medium);
}

.pill-sub {
  color: var(--text-muted);
  font-weight: 500;
}

/* Fluid Hero Headline: scales continuously from 320px to 2560px */
.hero-headline {
  font-size: clamp(2rem, 5vw + 0.9rem, 3.65rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: clamp(16px, 2.5vw, 22px);
  font-weight: 800;
  background: linear-gradient(180deg, #09090B 0%, #3F3F46 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: normal;
  overflow-wrap: break-word;
}

.hero-subhead {
  font-size: clamp(1rem, 1.2vw + 0.75rem, 1.25rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: clamp(28px, 4vw, 40px);
  font-weight: 450;
}

/* Command Install Box */
.hero-command-box {
  width: 100%;
  max-width: 580px;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.command-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-align: left;
}

.command-input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
  width: 100%;
  gap: 8px;
}

.command-input-group:focus-within,
.command-input-group:hover {
  border-color: #BFDBFE;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08), var(--shadow-card);
}

.command-code {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 0.94rem);
  color: var(--text-primary);
  overflow-x: auto;
  white-space: nowrap;
  padding-right: 8px;
  flex: 1;
  min-width: 0;
  -ms-overflow-style: none; /* IE / Edge */
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
}

.command-code::-webkit-scrollbar {
  display: none; /* Chrome, Safari, WebKit */
}

.cli-prompt {
  color: var(--accent-blue);
  font-weight: 700;
  -webkit-user-select: none;
  user-select: none;
  flex-shrink: 0;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #EAEAEF;
  border-color: #D1D1D8;
}

.copy-btn .check-icon {
  display: none;
  color: var(--good-accent);
}

.copy-btn.copied {
  background: var(--good-bg);
  border-color: var(--good-border);
  color: var(--good-text);
}

.copy-btn.copied .copy-icon {
  display: none;
}

.copy-btn.copied .check-icon {
  display: inline-block;
}

.command-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Fluid Highlights Grid */
.hero-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  padding: clamp(14px, 2vw, 20px) clamp(16px, 2.5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.highlight-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.highlight-text {
  display: flex;
  flex-direction: column;
}

.highlight-text strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.highlight-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.highlight-sep {
  display: none;
}

/* ==========================================================================
   Common Section Styles
   ========================================================================== */

.section {
  padding: clamp(54px, 8vw, 96px) 0;
  position: relative;
}

.section-header {
  max-width: 680px;
  margin: 0 auto clamp(32px, 5vw, 56px);
}

.section-header.text-center {
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  border: 1px solid var(--accent-blue-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.65rem, 3vw + 0.8rem, 2.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.section-description {
  font-size: clamp(0.95rem, 0.8vw + 0.75rem, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Principles Section (The 3 Laws)
   ========================================================================== */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: clamp(18px, 2.5vw, 24px);
}

.principle-card {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.5vw, 32px) clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.principle-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: #D4D4D8;
}

.principle-number {
  position: absolute;
  top: clamp(16px, 2.5vw, 24px);
  right: clamp(16px, 2.5vw, 24px);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: #D4D4D8;
}

.principle-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.principle-pill {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.pill-what { background: #FEF3C7; color: #92400E; }
.pill-why { background: #E0E7FF; color: #3730A3; }
.pill-next { background: #DCFCE7; color: #166534; }

.principle-title {
  font-size: clamp(1.15rem, 0.8vw + 0.9rem, 1.32rem);
  letter-spacing: -0.02em;
}

.principle-desc {
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
  flex-grow: 1;
}

.principle-example {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.example-bad, .example-good {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.4;
  flex-wrap: wrap;
}

.bad-tag {
  color: var(--bad-text);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.example-bad code {
  color: var(--bad-text);
  background: #FEE2E2;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  word-break: break-all;
  overflow-wrap: anywhere;
}

.good-tag {
  color: var(--good-text);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.example-good span {
  color: var(--good-text);
  font-weight: 500;
}

/* ==========================================================================
   Simulator Section (Container Query Enhanced)
   ========================================================================== */

.simulator-wrapper {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Scenario Tabs Nav */
.scenario-tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-light);
  background: #FDFDFE;
}

.scenario-tab {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-light);
  padding: 16px 18px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  position: relative;
}

.scenario-tab:last-child {
  border-right: none;
}

.scenario-tab:hover {
  background: var(--bg-subtle);
}

.scenario-tab.active {
  background: var(--surface);
}

.scenario-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
}

.scenario-tab-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.scenario-tab-info {
  display: flex;
  flex-direction: column;
}

.scenario-tab-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.scenario-tab-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Container Query Card Wrapper */
.simulator-stage-card {
  container-type: inline-size;
  container-name: simulator;
}

/* Stage Control Bar */
.stage-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
}

.stage-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  flex-shrink: 0;
}

/* Switch Control with 44×44px Touch Target */
.stage-toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
  min-height: 44px;
}

.toggle-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
}

.toggle-label.active {
  color: var(--text-primary);
}

.toggle-label-bad.active {
  color: var(--bad-accent);
}

.toggle-label-good.active {
  color: var(--accent-blue);
}

.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 10px;
  left: 2px;
  right: 2px;
  bottom: 10px;
  background-color: #E4E4E7;
  transition: .25s;
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .switch-slider {
  background-color: var(--bad-accent);
}

input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Simulator Split Layout */
.stage-display-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: unset;
}

/* Left: Component Canvas */
.canvas-preview-panel {
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  background: #FDFDFE;
  min-width: 0;
}

.canvas-window-header {
  min-height: 40px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--surface);
  gap: 10px;
}

.window-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #EF4444; }
.dot-yellow { background-color: #F59E0B; }
.dot-green { background-color: #10B981; }

.window-address-bar {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 3px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.mode-badge.badge-good {
  background: #DCFCE7;
  color: #166534;
}

.mode-badge.badge-bad {
  background: #FEE2E2;
  color: #991B1B;
}

.canvas-viewport {
  padding: clamp(20px, 3.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  background: radial-gradient(#ebebf0 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Simulated Component Cards inside viewport */
.mockup-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px -2px rgba(0,0,0,0.06), 0 2px 6px -1px rgba(0,0,0,0.04);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  transition: all 0.25s ease;
}

/* Before (Bad) Component Styling */
.mockup-bad {
  border-color: var(--bad-border);
}

.mockup-bad .mockup-header {
  background: var(--bad-bg);
  border-bottom: 1px solid var(--bad-border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mockup-bad .mockup-header-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bad-text);
  font-family: var(--font-mono);
}

.mockup-bad .mockup-body {
  padding: 20px 18px;
}

.raw-error-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--bad-text);
  background: #FEF2F2;
  border: 1px dashed var(--bad-border);
  padding: 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
  line-height: 1.5;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.mockup-bad .mockup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mockup-bad .btn-disabled {
  background: #E4E4E7;
  color: #A1A1AA;
  border: none;
  cursor: not-allowed;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* After (Good) Component Styling */
.mockup-good {
  border-color: #D1D5DB;
  box-shadow: 0 10px 30px -5px rgba(0,0,0,0.08);
}

.mockup-good .mockup-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.status-icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FEF3C7;
  color: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mockup-title-wrap h4 {
  font-size: clamp(0.96rem, 1.5vw, 1.05rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.mockup-title-wrap p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.three-part-pills {
  margin: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.part-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.84rem;
}

.part-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tag-what { background: #FEF3C7; color: #92400E; }
.tag-why { background: #E0E7FF; color: #3730A3; }
.tag-next { background: #DCFCE7; color: #166534; }

.part-text {
  color: var(--text-primary);
  font-weight: 500;
}

.mockup-good .mockup-footer {
  padding: 14px 20px;
  background: #FAFAFB;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mockup-support-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.mockup-support-link:hover {
  color: var(--text-primary);
}

.mockup-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-action-primary {
  background: var(--accent-blue);
  color: white;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-action-secondary {
  background: white;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action-secondary:hover {
  background: var(--bg-subtle);
}

/* Right: Diagnosis Panel */
.diagnosis-panel {
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  min-width: 0;
}

.diagnosis-card-header {
  margin-bottom: 20px;
}

.diagnosis-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.diagnosis-title {
  font-size: clamp(1.15rem, 1vw + 0.9rem, 1.3rem);
  letter-spacing: -0.02em;
}

.diagnosis-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.diagnosis-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.point-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.point-icon.danger {
  background: #FEE2E2;
  color: #991B1B;
}

.point-icon.success {
  background: #DCFCE7;
  color: #166534;
}

.point-body strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.point-body p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Server Log Container */
.diagnosis-server-log {
  background: #18181B;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #F4F4F5;
  overflow: hidden;
}

.server-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #27272A;
}

.log-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.log-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
}

.log-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #A1A1AA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: #27272A;
  color: #D4D4D8;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.log-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #A1A1AA;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.4;
  max-width: 100%;
}

/* Container Query for Simulator Card */
@container simulator (max-width: 820px) {
  .stage-display-grid {
    grid-template-columns: 1fr;
  }
  .canvas-preview-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
}

/* ==========================================================================
   Never vs Always Matrix Section (Fluid Grid)
   ========================================================================== */

.rules-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(18px, 2.5vw, 28px);
}

.rules-column {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.5vw, 32px);
  box-shadow: var(--shadow-card);
}

.rules-never {
  border-top: 4px solid var(--bad-accent);
}

.rules-always {
  border-top: 4px solid var(--good-accent);
}

.column-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.column-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-never {
  background: var(--bad-bg);
  color: var(--bad-text);
  border: 1px solid var(--bad-border);
}

.badge-always {
  background: var(--good-bg);
  color: var(--good-text);
  border: 1px solid var(--good-border);
}

.column-title {
  font-size: clamp(1.2rem, 1vw + 0.9rem, 1.4rem);
  letter-spacing: -0.02em;
}

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

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.rule-icon-cross {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #991B1B;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.rule-icon-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #DCFCE7;
  color: #166534;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.rule-body strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.rule-body p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.rule-body code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.82em;
  word-break: break-all;
}

/* ==========================================================================
   Integration & Compatibility Section (Fluid Grid)
   ========================================================================== */

.integration-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

.integration-card {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 0;
}

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

.integration-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

.integration-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.claude-avatar { background: #D97706; color: white; }
.ide-avatar { background: #09090B; color: white; }
.agy-avatar { background: #2563EB; color: white; }

.agent-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.agent-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.agent-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.integration-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.code-box {
  background: #18181B;
  border-radius: var(--radius-sm);
  padding: 8px 10px 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.code-box code {
  color: #E4E4E7;
  font-size: 0.78rem;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  -ms-overflow-style: none; /* IE / Edge */
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  padding-right: 6px;
}

.code-box code::-webkit-scrollbar {
  display: none; /* Chrome, Safari, WebKit */
}

/* Touch-compliant mini copy button with 44×44px hit boundary */
.mini-copy-btn {
  background: #27272A;
  border: 1px solid #3F3F46;
  color: #D4D4D8;
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  position: relative;
}

.mini-copy-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}

.mini-copy-btn:hover {
  background: #3F3F46;
  color: white;
}

/* ==========================================================================
   Comprehensive Guide & Deep Dive Section (SEO & Architecture Standard)
   ========================================================================== */

.guide-section {
  position: relative;
  background-color: var(--bg-page);
}

.guide-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3.5vw, 36px);
  max-width: 980px;
  margin: 0 auto;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.guide-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue) 0%, #3B82F6 50%, #60A5FA 100%);
  opacity: 0.8;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: #D1D1D8;
}

.guide-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.guide-badge {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  border: 1px solid var(--accent-blue-border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.guide-read-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.guide-heading {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 14px;
}

.guide-lead {
  font-size: clamp(0.96rem, 1.6vw, 1.04rem);
  font-weight: 500;
  color: #27272A;
  line-height: 1.65;
  margin-bottom: 14px;
}

.guide-body {
  font-size: clamp(0.9rem, 1.4vw, 0.95rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
}

.guide-body code,
.guide-lead code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text-primary);
}

.guide-highlight-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.guide-highlight-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.guide-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
}

.pill-c1 {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.pill-c2 {
  background: #E0E7FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
}

.pill-c3 {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.guide-code-snippet {
  background: #18181B;
  color: #A1A1AA;
  border: 1px solid #27272A;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-x: auto;
}

.guide-code-snippet code {
  color: #F4F4F5;
  white-space: nowrap;
}

.guide-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin-top: 8px;
}

.guide-feat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.feat-check {
  color: var(--good-accent);
  font-weight: 800;
  font-size: 1rem;
}

.guide-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.guide-stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-blue);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Frequently Asked Questions (FAQ) Section
   ========================================================================== */

.faq-section {
  position: relative;
}

/* Category Filter Wrap */
.faq-filter-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(24px, 4vw, 36px);
}

.faq-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  padding: 6px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.faq-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

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

.faq-filter-btn.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.faq-count {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.faq-filter-btn.active .faq-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-inverse);
}

/* FAQ Accordion List */
.faq-accordion-container {
  max-width: 840px;
  margin: 0 auto;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.25s ease;
  overflow: hidden;
}

.faq-item:hover {
  border-color: #D1D1D8;
  box-shadow: var(--shadow-card);
}

.faq-item.active {
  border-color: var(--accent-blue-border);
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.08), var(--shadow-card);
}

.faq-item.hidden {
  display: none !important;
}

/* Trigger Button */
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2.5vw, 22px) clamp(16px, 3vw, 24px);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--text-primary);
  transition: background 0.15s ease;
  outline: none;
}

.faq-trigger:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
}

.faq-trigger:hover {
  background: var(--surface-hover);
}

.faq-trigger-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.faq-category-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.badge-integration {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.badge-security {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.badge-rules {
  background: #FAF5FF;
  color: #7E22CE;
  border: 1px solid #E9D5FF;
}

.faq-question {
  font-size: clamp(0.96rem, 1.8vw, 1.08rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin: 0;
  transition: color 0.15s ease;
}

.faq-item.active .faq-question {
  color: var(--accent-blue);
}

/* Icon / Rotating Chevron */
.faq-icon-wrapper {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-secondary);
}

.faq-trigger:hover .faq-icon-wrapper {
  background: #EAEAEF;
  color: var(--text-primary);
}

.faq-item.active .faq-icon-wrapper {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
  transform: rotate(180deg);
}

.faq-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

/* Collapsible Content Area */
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-content {
  grid-template-rows: 1fr;
}

.faq-content-inner {
  overflow: hidden;
  padding: 0 clamp(16px, 3vw, 24px);
  color: var(--text-secondary);
  font-size: clamp(0.88rem, 1.5vw, 0.94rem);
  line-height: 1.65;
}

.faq-item.active .faq-content-inner {
  padding-bottom: clamp(18px, 2.5vw, 24px);
  border-top: 1px solid var(--border-light);
  margin-top: 2px;
  padding-top: 16px;
}

.faq-content-inner p {
  margin-bottom: 12px;
}

.faq-content-inner p:last-child {
  margin-bottom: 0;
}

.faq-content-inner code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.84em;
  color: #09090B;
}

.faq-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.faq-bullet-list li {
  position: relative;
  padding-left: 20px;
}

.faq-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  top: 0;
  color: var(--accent-blue);
  font-weight: 800;
  font-size: 1.1rem;
}

/* FAQ Help Callout Box */
.faq-help-box {
  margin-top: clamp(32px, 5vw, 48px);
  background: var(--surface);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: clamp(16px, 3vw, 24px) clamp(18px, 3.5vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.faq-help-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.faq-help-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.faq-help-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.faq-help-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.faq-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Bottom CTA Banner
   ========================================================================== */

.cta-banner-card {
  background: linear-gradient(135deg, #18181B 0%, #09090B 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px) clamp(18px, 4vw, 48px);
  text-align: center;
  box-shadow: var(--shadow-card-hover);
  position: relative;
  overflow: hidden;
}

.cta-banner-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100%);
  height: 300px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.cta-headline {
  font-size: clamp(1.8rem, 3.5vw + 0.8rem, 2.65rem);
  color: white;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.cta-subhead {
  font-size: clamp(0.95rem, 0.8vw + 0.75rem, 1.12rem);
  color: #A1A1AA;
  margin-bottom: clamp(24px, 4vw, 34px);
}

.cta-command-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cli-command-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #27272A;
  border: 1px solid #3F3F46;
  padding: 6px 6px 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 2vw, 0.88rem);
  max-width: 100%;
  min-width: 0;
}

.cli-command-pill code {
  color: #F4F4F5;
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  -ms-overflow-style: none; /* IE / Edge */
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
  padding-right: 6px;
}

.cli-command-pill code::-webkit-scrollbar {
  display: none; /* Chrome, Safari, WebKit */
}

/* Progressive enhancement for Firefox / modern browsers supporting scrollbar-width */
@supports (scrollbar-width: none) {
  .mobile-cli-pill,
  .command-code,
  .code-box code,
  .cli-command-pill code {
    scrollbar-width: none;
  }
}

.copy-pill-btn {
  background: #3F3F46;
  border: 1px solid #52525B;
  color: white;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.copy-pill-btn:hover {
  background: #52525B;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: clamp(32px, 5vw, 48px) 0;
  margin-top: auto;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

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

.footer-copy a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.footer-nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
}

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

/* ==========================================================================
   Toast Notification (Centered Bottom on Mobile, Fixed Right on Desktop)
   ========================================================================== */

.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #09090B;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-popover);
  border: 1px solid #27272A;
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification svg {
  color: #10B981;
  flex-shrink: 0;
}

/* ==========================================================================
   Targeted Breakpoint Adjustments
   ========================================================================== */

/* Large screens (> 1600px): Proportional luxury expansion */
@media (min-width: 1600px) {
  :root {
    --container-max: 1360px;
  }
}

/* Tablet Landscape & Below (<= 860px): Seamless Navigation switch */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

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

  .scenario-tab:nth-child(1),
  .scenario-tab:nth-child(2) {
    border-bottom: 1px solid var(--border-light);
  }

  .scenario-tab:nth-child(2n) {
    border-right: none;
  }
}

/* Mobile Devices (<= 640px) */
@media (max-width: 640px) {
  .github-btn-text {
    display: none;
  }

  .github-btn {
    padding: 8px 12px;
  }

  /* Scenario Tabs: Native App-like horizontal swipe */
  .scenario-tabs-nav {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-bottom: 1px solid var(--border-light);
  }

  .scenario-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .scenario-tab {
    flex: 0 0 clamp(180px, 50vw, 210px);
    min-width: 180px;
    border-bottom: none !important;
    border-right: 1px solid var(--border-light) !important;
    scroll-snap-align: start;
    padding: 14px 16px;
  }

  .stage-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }

  .stage-toggle-control {
    width: 100%;
    justify-content: space-between;
  }

  .canvas-viewport {
    padding: 18px 12px;
  }

  .mockup-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    text-align: center;
  }

  .mockup-btn-group {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .btn-action-primary,
  .btn-action-secondary {
    flex: 1;
    width: 100%;
  }

  .part-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .cta-command-group {
    flex-direction: column;
    width: 100%;
  }

  .cli-command-pill {
    width: 100%;
  }

  .cta-banner-card .btn-dark {
    width: 100%;
  }

  /* FAQ Mobile Adaptations */
  .faq-filters {
    border-radius: var(--radius-md);
    padding: 4px;
    width: 100%;
  }

  .faq-filter-btn {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    font-size: 0.78rem;
    padding: 7px 10px;
  }

  .faq-help-box {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
  }

  .faq-help-btn {
    width: 100%;
    justify-content: center;
  }

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

  .footer-brand {
    justify-content: center;
  }

  .footer-nav {
    justify-content: center;
  }

  /* Centered bottom toast on mobile */
  .toast-notification {
    left: 16px;
    right: 16px;
    margin-inline: auto;
    justify-content: center;
    bottom: 16px;
  }
}

/* Extra Small Mobile (<= 380px, iPhone SE, 320px devices) */
@media (max-width: 380px) {
  .pill-divider,
  .pill-sub {
    display: none;
  }

  .command-input-group {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
  }

  .command-code {
    justify-content: center;
  }

  .copy-btn {
    width: 100%;
  }

  .stage-toggle-control {
    padding: 4px 8px;
  }

  .toggle-label {
    font-size: 0.74rem;
    padding: 4px 2px;
  }

  .mockup-btn-group {
    flex-direction: column;
  }

  .cli-command-pill {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .copy-pill-btn {
    width: 100%;
  }
}
