:root {
  --al-bg-base: #f8fafc;
  --al-bg-elevated: #ffffff;
  --al-bg-inset: #f1f5f9;
  --al-bg-hover: #e2e8f0;
  --al-bg-header: rgba(255, 255, 255, 0.85);

  --al-text: #0f172a;
  --al-text-secondary: #475569;
  --al-text-muted: #64748b;

  --al-border: rgba(15, 23, 42, 0.1);
  --al-border-strong: rgba(15, 23, 42, 0.18);

  --al-accent: #0d9488;
  --al-accent-secondary: #0891b2;
  --al-accent-bg: rgba(13, 148, 136, 0.12);
  --al-accent-text: #042f2e;

  --al-success: #16a34a;
  --al-warning: #d97706;
  --al-danger: #dc2626;
  --al-info: #2563eb;

  --al-emerald: #10b981;
  --al-cyan: #06b6d4;
  --al-violet: #8b5cf6;
  --al-rose: #f43f5e;
  --al-amber: #f59e0b;
  --al-teal: #14b8a6;

  --al-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --al-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --al-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --al-shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.16);

  --al-radius-sm: 8px;
  --al-radius-md: 12px;
  --al-radius-lg: 18px;
  --al-radius-xl: 24px;
  --al-radius-full: 9999px;

  --al-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --al-font-display: "Outfit", var(--al-font-sans);
  --al-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --al-transition-fast: 150ms ease;
  --al-transition-base: 200ms ease;
  --al-page-width: 1240px;
}

[data-theme="dark"] {
  --al-bg-base: #080a0f;
  --al-bg-elevated: #0f131d;
  --al-bg-inset: #161b2a;
  --al-bg-hover: #1e2538;
  --al-bg-header: rgba(8, 10, 15, 0.85);

  --al-text: #f8fafc;
  --al-text-secondary: #94a3b8;
  --al-text-muted: #64748b;

  --al-border: rgba(255, 255, 255, 0.08);
  --al-border-strong: rgba(255, 255, 255, 0.15);

  --al-accent: #2dd4bf;
  --al-accent-secondary: #22d3ee;
  --al-accent-bg: rgba(45, 212, 191, 0.12);
  --al-accent-text: #042f2e;

  --al-success: #34d399;
  --al-warning: #fbbf24;
  --al-danger: #fb7185;
  --al-info: #60a5fa;

  --al-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --al-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --al-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --al-shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --al-bg-base: #080a0f;
    --al-bg-elevated: #0f131d;
    --al-bg-inset: #161b2a;
    --al-bg-hover: #1e2538;
    --al-bg-header: rgba(8, 10, 15, 0.85);

    --al-text: #f8fafc;
    --al-text-secondary: #94a3b8;
    --al-text-muted: #64748b;

    --al-border: rgba(255, 255, 255, 0.08);
    --al-border-strong: rgba(255, 255, 255, 0.15);

    --al-accent: #2dd4bf;
    --al-accent-secondary: #22d3ee;
    --al-accent-bg: rgba(45, 212, 191, 0.12);
    --al-accent-text: #042f2e;

    --al-success: #34d399;
    --al-warning: #fbbf24;
    --al-danger: #fb7185;
    --al-info: #60a5fa;

    --al-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --al-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --al-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --al-shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--al-font-sans);
  background-color: var(--al-bg-base);
  color: var(--al-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  background:
    radial-gradient(circle at 15% 10%, rgba(13, 148, 136, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(8, 145, 178, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
    var(--al-bg-base);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--al-accent);
  outline-offset: 2px;
}

::selection {
  background: var(--al-accent-bg);
  color: var(--al-text);
}

a {
  color: var(--al-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--al-font-mono);
  font-size: 0.92em;
  background: var(--al-bg-inset);
  padding: 0.12em 0.3em;
  border-radius: var(--al-radius-sm);
  border: 1px solid var(--al-border);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--al-bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--al-border-strong);
  border-radius: var(--al-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--al-text-muted);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  z-index: 10000;
  background: var(--al-accent);
  color: var(--al-accent-text);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--al-radius-md) 0;
  transition: top var(--al-transition-fast);
}

.skip-link:focus {
  top: 0;
  text-decoration: none;
}

/* Container */
.container {
  max-width: var(--al-page-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--al-bg-header);
  border-bottom: 1px solid var(--al-border);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--al-text);
  text-decoration: none;
  font-family: var(--al-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.brand-wordmark {
  white-space: nowrap;
}

.brand-badge {
  background: linear-gradient(135deg, var(--al-emerald), var(--al-cyan));
  color: #021a12;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--al-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.25rem;
}

.nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--al-radius-md);
  background: var(--al-bg-inset);
  border: 1px solid var(--al-border);
  color: var(--al-text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav-toggle-open {
  display: block;
}

.nav-toggle-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-close {
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-menu a {
  color: var(--al-text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--al-transition-fast);
}

.nav-menu a:hover {
  color: var(--al-text);
}

.nav-cta-item .button {
  padding: 0.5rem 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--al-radius-md);
  background: var(--al-bg-inset);
  border: 1px solid var(--al-border);
  color: var(--al-text-secondary);
  cursor: pointer;
  transition: color var(--al-transition-fast), background var(--al-transition-fast);
}

.theme-toggle:hover {
  background: var(--al-bg-hover);
  color: var(--al-text);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  position: absolute;
}

.theme-icon-light,
.theme-icon-dark {
  transition: opacity var(--al-transition-fast), transform var(--al-transition-fast);
}

[data-theme="dark"] .theme-icon-light,
[data-theme="light"] .theme-icon-dark {
  opacity: 0;
  transform: scale(0.8) rotate(-30deg);
  pointer-events: none;
}

[data-theme="light"] .theme-icon-light,
[data-theme="dark"] .theme-icon-dark {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

@media (max-width: 1020px) {
  .nav {
    order: 3;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
    margin-right: 0.5rem;
  }

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

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.5rem 1.25rem;
    background: var(--al-bg-header);
    border-bottom: 1px solid var(--al-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav-menu.is-open {
    display: flex;
  }

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

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

  .nav-menu a,
  .nav-cta-item .button {
    display: flex;
    width: 100%;
    padding: 0.85rem 0;
  }

  .nav-cta-item .button {
    margin-top: 0.5rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 1.1rem;
    gap: 0.45rem;
  }

  .brand-mark {
    width: 1.4rem;
    height: 1.4rem;
  }

  .brand-badge {
    display: none;
  }

  .nav-wrapper {
    gap: 0.75rem;
  }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--al-radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--al-transition-fast), box-shadow var(--al-transition-fast),
    background var(--al-transition-fast), border-color var(--al-transition-fast);
}

.button:hover {
  text-decoration: none;
}

.button svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.button-primary {
  background: linear-gradient(135deg, var(--al-emerald), #059669);
  color: #021a12;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(16, 185, 129, 0.35);
}

.button-secondary {
  background: var(--al-bg-inset);
  color: var(--al-text);
  border-color: var(--al-border-strong);
}

.button-secondary:hover {
  background: var(--al-bg-hover);
  border-color: var(--al-border-strong);
  transform: translateY(-2px);
}

/* Hero */
.hero {
  position: relative;
  padding: 5rem 0 3.5rem;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% 0 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, var(--al-accent-bg) 0%, transparent 55%);
  opacity: 0.7;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--al-radius-full);
  background: var(--al-accent-bg);
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: var(--al-accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.eyebrow svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.hero h1 {
  font-family: var(--al-font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--al-emerald) 0%, var(--al-cyan) 50%, var(--al-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--al-text-secondary);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--al-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.hero-note svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Terminal */
.terminal-window {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 2.5rem auto 0;
  background: var(--al-bg-elevated);
  border: 1px solid var(--al-border-strong);
  border-radius: var(--al-radius-lg);
  box-shadow: var(--al-shadow-xl);
  overflow: hidden;
  text-align: left;
}

[data-theme="dark"] .terminal-window {
  background: #0b0e14;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(16, 185, 129, 0.07);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  background: var(--al-bg-inset);
  border-bottom: 1px solid var(--al-border);
}

[data-theme="dark"] .terminal-header {
  background: #111520;
}

.terminal-dots {
  display: flex;
  gap: 0.5rem;
}

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

.dot-red { background: #ff5f56; }
.dot-amber { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  font-family: var(--al-font-mono);
  font-size: 0.8rem;
  color: var(--al-text-muted);
  white-space: nowrap;
}

.terminal-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.terminal-tab-btn {
  background: transparent;
  border: 1px solid var(--al-border);
  color: var(--al-text-muted);
  padding: 0.3rem 0.65rem;
  border-radius: var(--al-radius-sm);
  font-family: var(--al-font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--al-transition-fast), border-color var(--al-transition-fast),
    color var(--al-transition-fast);
  white-space: nowrap;
}

.terminal-tab-btn:hover,
.terminal-tab-btn.active {
  background: var(--al-accent-bg);
  border-color: var(--al-accent);
  color: var(--al-accent);
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--al-font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--al-text);
  min-height: 280px;
  overflow-x: auto;
}

.terminal-body p {
  margin-bottom: 0.35rem;
}

.prompt-symbol {
  color: var(--al-emerald);
  font-weight: 700;
  margin-right: 0.5rem;
}

.term-cmd {
  color: var(--al-cyan);
  font-weight: 600;
}

.term-comment {
  color: var(--al-text-muted);
}

.term-highlight {
  color: var(--al-accent);
}

.term-warning {
  color: var(--al-warning);
}

.term-success {
  color: var(--al-success);
}

.term-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  margin-right: 0.35em;
}

.term-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-inset {
  background: var(--al-bg-inset);
  border-top: 1px solid var(--al-border);
  border-bottom: 1px solid var(--al-border);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--al-accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--al-font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--al-text-secondary);
  font-size: 1.05rem;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--al-bg-elevated);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  padding: 1.75rem;
  transition: transform var(--al-transition-base), box-shadow var(--al-transition-base),
    border-color var(--al-transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--al-emerald), var(--al-cyan));
  opacity: 0;
  transition: opacity var(--al-transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--al-border-strong);
  box-shadow: var(--al-shadow-lg);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--al-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.feature-icon-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--al-emerald);
}

.feature-icon-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--al-cyan);
}

.feature-icon-violet {
  background: rgba(139, 92, 246, 0.12);
  color: var(--al-violet);
}

.feature-icon-rose {
  background: rgba(244, 63, 94, 0.12);
  color: var(--al-rose);
}

.feature-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--al-amber);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--al-text);
}

.feature-card p {
  color: var(--al-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Rules explorer */
.rules-container {
  background: var(--al-bg-elevated);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--al-shadow);
}

.rules-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input {
  width: 100%;
  background: var(--al-bg-inset);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-full);
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  color: var(--al-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--al-transition-fast), background var(--al-transition-fast);
}

.search-input:focus {
  border-color: var(--al-accent);
  background: var(--al-bg-base);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--al-text-muted);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.category-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-pill {
  background: var(--al-bg-inset);
  border: 1px solid var(--al-border);
  color: var(--al-text-secondary);
  padding: 0.35rem 0.8rem;
  border-radius: var(--al-radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--al-transition-fast), border-color var(--al-transition-fast),
    color var(--al-transition-fast);
}

.category-pill.active,
.category-pill:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--al-cyan);
  color: var(--al-cyan);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.rule-card {
  background: var(--al-bg-base);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  padding: 1.25rem;
  transition: transform var(--al-transition-fast), border-color var(--al-transition-fast);
}

.rule-card:hover {
  border-color: var(--al-border-strong);
  transform: translateY(-2px);
}

.rule-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rule-id {
  font-family: var(--al-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--al-emerald);
}

.rule-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--al-radius-full);
  background: var(--al-bg-inset);
  color: var(--al-text-muted);
  text-transform: uppercase;
  border: 1px solid var(--al-border);
}

.rule-card h4 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--al-text);
}

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

.rules-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--al-text-muted);
  padding: 2.5rem 1rem;
}

.rules-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.rules-load-more {
  background: var(--al-bg-inset);
  border: 1px solid var(--al-border);
  color: var(--al-text);
  padding: 0.55rem 1.25rem;
  border-radius: var(--al-radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--al-transition-fast), border-color var(--al-transition-fast),
    color var(--al-transition-fast);
}

.rules-load-more:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--al-cyan);
  color: var(--al-cyan);
}

.rules-load-more[hidden] {
  display: none;
}

.rules-showing {
  font-size: 0.85rem;
  color: var(--al-text-muted);
}

/* Privacy comparator */
.privacy-comparator {
  background: var(--al-bg-elevated);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  padding: 2rem;
  box-shadow: var(--al-shadow);
}

.privacy-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.privacy-tab {
  padding: 0.6rem 1.1rem;
  border-radius: var(--al-radius-full);
  background: var(--al-bg-inset);
  border: 1px solid var(--al-border);
  color: var(--al-text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--al-transition-fast), border-color var(--al-transition-fast),
    color var(--al-transition-fast);
}

.privacy-tab.active {
  background: linear-gradient(135deg, var(--al-emerald), #059669);
  color: #021a12;
  border-color: var(--al-emerald);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.privacy-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.privacy-box {
  background: var(--al-bg-base);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  padding: 1.25rem;
}

.privacy-box h4 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--al-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.privacy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--al-text-secondary);
  line-height: 1.5;
}

.privacy-list svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.privacy-list .check-icon {
  color: var(--al-success);
}

.privacy-list .cross-icon {
  color: var(--al-danger);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background: var(--al-bg-elevated);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--al-transition-base), box-shadow var(--al-transition-base),
    border-color var(--al-transition-base);
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--al-cyan);
  box-shadow: var(--al-shadow-lg);
}

.gallery-img-wrapper {
  aspect-ratio: 16 / 10;
  background: var(--al-bg-inset);
  overflow: hidden;
  position: relative;
}

.gallery-img-wrapper {
  position: relative;
}

.gallery-img-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.gallery-img-wrapper .screenshot-dark {
  opacity: 0;
  z-index: 1;
}

html[data-theme="dark"] .gallery-img-wrapper .screenshot-light {
  opacity: 0;
  z-index: 0;
}

html[data-theme="dark"] .gallery-img-wrapper .screenshot-dark {
  opacity: 1;
  z-index: 1;
}

.gallery-card:hover .gallery-img-wrapper img {
  transform: scale(1.03);
}

.gallery-caption {
  padding: 1.15rem;
}

.gallery-caption h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--al-text);
}

.gallery-caption p {
  font-size: 0.88rem;
  color: var(--al-text-secondary);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 6, 10, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--al-transition-base);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--al-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--al-radius-md);
  color: #fff;
  cursor: pointer;
  transition: background var(--al-transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.lightbox-title {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--al-text-secondary);
}

/* Quickstart */
.quickstart-grid {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.code-box {
  position: relative;
  background: var(--al-bg-elevated);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  padding: 1.25rem 1.5rem;
  font-family: var(--al-font-mono);
  font-size: 0.88rem;
  overflow-x: auto;
}

[data-theme="dark"] .code-box {
  background: #090c12;
  border-color: var(--al-border-strong);
}

.code-box code {
  display: block;
  color: var(--al-text);
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1.7;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--al-bg-inset);
  border: 1px solid var(--al-border);
  color: var(--al-text-secondary);
  padding: 0.35rem 0.7rem;
  border-radius: var(--al-radius-sm);
  font-family: var(--al-font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--al-transition-fast), border-color var(--al-transition-fast),
    color var(--al-transition-fast);
}

.copy-btn:hover {
  background: var(--al-accent-bg);
  border-color: var(--al-emerald);
  color: var(--al-emerald);
}

.copy-btn svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--al-emerald);
  color: #021a12;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--al-radius-full);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 2000;
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--al-border);
  padding: 4rem 0 2rem;
  background: var(--al-bg-elevated);
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.75fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--al-text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

.footer-links {
  display: contents;
}

.footer-col h5 {
  font-family: var(--al-font-display);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
  color: var(--al-text);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: var(--al-text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--al-transition-fast);
}

.footer-col a:hover {
  color: var(--al-text);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--al-border);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--al-text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 3.5rem 0;
  }

  .privacy-details {
    grid-template-columns: 1fr;
  }

  .privacy-tabs,
  .category-pills,
  .terminal-tabs {
    justify-content: flex-start;
  }

  .rules-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrapper {
    min-width: auto;
    width: 100%;
  }

  .terminal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid,
  .footer-links {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .brand-wordmark {
    font-size: 1.15rem;
  }

  .brand-badge {
    display: none;
  }
}
