/*
 * bend2.org - Stylesheet
 * Dark Aurora aesthetic with locally available system typography.
 * High-contrast WCAG AA accessible design, responsive grid, and fluid motion.
 */

:root {
  --bg-deep: #070a11;
  --bg-surface: #0e1424;
  --bg-card: #131c31;
  --bg-card-hover: #18243e;
  --bg-elevated: #1e2c4c;
  --bg-input: #0b101d;

  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-active: rgba(56, 189, 248, 0.4);
  --border-aurora: rgba(168, 85, 247, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #030712;

  --aurora-cyan: #38bdf8;
  --aurora-cyan-glow: rgba(56, 189, 248, 0.2);
  --aurora-violet: #a855f7;
  --aurora-violet-glow: rgba(168, 85, 247, 0.2);
  --aurora-emerald: #10b981;
  --aurora-emerald-glow: rgba(16, 185, 129, 0.2);
  --aurora-amber: #f59e0b;
  --aurora-rose: #f43f5e;

  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);
  --shadow-violet-glow: 0 0 25px rgba(168, 85, 247, 0.2);

  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--aurora-cyan);
}

:focus-visible {
  outline: 3px solid var(--aurora-cyan);
  outline-offset: 3px;
}

/* Verification comparison uses the site's existing surface and text tokens. */
#verification-matrix {
  color: var(--text-primary);
}

#verification-matrix a {
  color: var(--aurora-cyan);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.verification-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.verification-controls label {
  font-weight: 600;
}

.verification-controls select {
  font: inherit;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  max-width: 100%;
  min-height: 44px;
}

.verification-scroll {
  overflow-x: auto;
  border: 1px solid var(--text-muted);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  margin: 1rem 0;
}

#verification-matrix :focus-visible {
  outline: 3px solid var(--aurora-cyan);
  outline-offset: 3px;
}

.verification-table {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.verification-table caption {
  text-align: left;
  padding: 1rem;
  color: var(--text-secondary);
}

.verification-table th,
.verification-table td {
  padding: 0.8rem 1rem;
  vertical-align: top;
  border-top: 1px solid var(--text-muted);
}

.verification-table thead,
.verification-table tbody th {
  background: var(--bg-card);
}

.verification-table tr[hidden] {
  display: none;
}

@media (prefers-color-scheme: light) {
  #verification-matrix {
    --bg-surface: #ffffff;
    --bg-card: #e8eef5;
    --bg-input: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;
    --aurora-cyan: #075985;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
  }
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--aurora-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-inverse);
  font-size: 1.1rem;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--aurora-cyan);
}

.nav-badge-webmcp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--aurora-emerald);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--aurora-emerald);
  box-shadow: 0 0 8px var(--aurora-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 1.5rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-active);
  color: var(--aurora-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto 3rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--aurora-cyan);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Container */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  width: 100%;
}

/* Section Header */
.section-header {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Featured Explainer Video Section */
.explainer-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow-glow);
}

.explainer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 2.25rem;
  align-items: center;
}

.explainer-media-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.video-embed-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-active);
  background: var(--bg-deep);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.video-embed-facade:hover,
.video-embed-facade:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
  outline: 3px solid var(--aurora-cyan);
  outline-offset: 3px;
}

.video-embed-facade img,
.explainer-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.explainer-video-player {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-active);
  background: #000;
  aspect-ratio: 1 / 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 10, 17, 0.88) 0%, rgba(7, 10, 17, 0.25) 50%, rgba(7, 10, 17, 0.1) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem;
  gap: 0.65rem;
  transition: background var(--transition-fast);
}

.video-embed-facade:hover .play-overlay {
  background: linear-gradient(to top, rgba(7, 10, 17, 0.92) 0%, rgba(7, 10, 17, 0.35) 55%, rgba(7, 10, 17, 0.15) 100%);
}

.play-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-cyan), var(--aurora-violet));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  padding-left: 4px;
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.45);
  transition: transform var(--transition-fast);
}

.video-embed-facade:hover .play-badge {
  transform: scale(1.08);
}

.play-label {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.explainer-media-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.explainer-media-caption a {
  color: var(--aurora-cyan);
  text-decoration: none;
  font-weight: 600;
}

.explainer-media-caption a:hover {
  text-decoration: underline;
}

.explainer-copy-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.explainer-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid var(--border-aurora);
  color: #d8b4fe;
  font-size: 0.8rem;
  font-weight: 600;
}

.explainer-quote {
  background: rgba(7, 10, 17, 0.55);
  border-left: 3px solid var(--aurora-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.15rem;
  color: var(--text-primary);
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.55;
}

.explainer-quote footer {
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.explainer-quote footer a {
  color: var(--aurora-cyan);
  text-decoration: none;
  font-weight: 600;
}

.explainer-quote footer a:hover {
  text-decoration: underline;
}

.explainer-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.explainer-points li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.explainer-points li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.8rem;
}

.explainer-points code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--aurora-cyan);
}

.explainer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.explainer-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--aurora-cyan);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.explainer-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

.explainer-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.explainer-cta-secondary:hover {
  border-color: var(--aurora-cyan);
  color: #fff;
}

/* Benchmark Explorer */
.benchmark-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 3.5rem;
}

.benchmark-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.benchmark-filter-btn {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.benchmark-filter-btn:hover, .benchmark-filter-btn.active {
  background: var(--aurora-cyan);
  color: var(--text-inverse);
  border-color: var(--aurora-cyan);
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.bench-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.bench-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
}

.bench-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.bench-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.bench-badge {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.15);
  color: var(--aurora-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.bench-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.bench-speedup-bar-wrapper {
  margin-bottom: 0.75rem;
}

.bench-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.35rem;
}

.bench-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--aurora-cyan), var(--aurora-violet));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bench-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.bench-stats-row span strong {
  color: var(--text-primary);
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
  background: var(--aurora-cyan);
  color: var(--text-inverse);
  border-color: var(--aurora-cyan);
}

/* Search Bar */
.search-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--aurora-cyan);
  box-shadow: 0 0 0 3px var(--aurora-cyan-glow);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-shortcut {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border-subtle);
}

/* Resource Grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.resource-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.resource-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.card-title:hover {
  color: var(--aurora-cyan);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lang-pill {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.stars-pill {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #322711;
  color: #fcd34d;
  font-family: var(--font-mono);
  font-weight: 600;
}

.target-pill {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.license-pill {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.tag-chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-chip:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--aurora-cyan);
  color: #fff;
}

.card-highlights {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.85rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-highlights li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.card-highlights li::before {
  content: "•";
  color: var(--aurora-cyan);
  position: absolute;
  left: 0.2rem;
  font-weight: bold;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.card-links {
  display: flex;
  gap: 0.75rem;
}

.action-link {
  font-size: 0.82rem;
  color: var(--aurora-cyan);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  background: none;
  border: none;
}

.action-link:hover {
  text-decoration: underline;
}

/* Guides Section */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.guide-card:hover {
  border-color: var(--border-aurora);
  box-shadow: var(--shadow-violet-glow);
}

.guide-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.guide-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.guide-steps {
  list-style: none;
  counter-reset: guide-counter;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.guide-steps li {
  counter-increment: guide-counter;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.guide-steps li::before {
  content: counter(guide-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: var(--aurora-cyan);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-media-container {
  margin-top: 1rem;
  text-align: center;
}

.modal-media-container img,
.modal-media-container video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 2.5rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--aurora-cyan);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .site-header nav {
    width: 100%;
  }
  .nav-links,
  .footer-links {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .hero-section {
    padding: 2rem 1rem;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .explainer-container {
    padding: 1.25rem;
  }
  .explainer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Search Mode Engine Indicator Badge */
.search-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
}

.search-mode-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.search-mode-badge[data-engine="bm25"] {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary, #94a3b8);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.search-mode-badge[data-engine="bm25"] .badge-dot {
  background: #64748b;
}

.search-mode-badge[data-engine="classifier"] {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.search-mode-badge[data-engine="classifier"] .badge-dot {
  background: #06b6d4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
}

