/*
 * awesomejev.org - Stylesheet
 * Dark Aurora Aesthetic with Space Grotesk, Inter Tight, and JetBrains Mono.
 * High-contrast WCAG AA accessible design, responsive grid, and fluid motion.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

: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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'Fira 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;
  /* Anchor jumps clear the sticky top bar; same offset as the sticky sidebar */
  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;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 65%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
    var(--bg-deep);
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--aurora-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #7dd3fc;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Container */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--aurora-cyan), var(--aurora-violet));
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  box-shadow: 0 0 12px var(--aurora-cyan-glow);
  color: #fff;
  font-size: 1rem;
}

/* Homepage top bar spans the viewport so the brand lines up with the site sidebar */
.nav-inner-wide {
  padding: 0 1.5rem;
  gap: 1rem;
}

.btn-nav-menu {
  display: none;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.btn-nav-menu:hover,
.btn-nav-menu[aria-expanded="true"] {
  border-color: var(--border-active);
}

/* Ask Jev trigger: looks like a search field, opens the floating Ask Jev dialog */
.ask-jev-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 1 22rem;
  min-width: 0;
  margin-left: auto;
  padding: 0.45rem 0.55rem 0.45rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.ask-jev-trigger:hover,
.ask-jev-trigger:focus-visible {
  border-color: var(--border-aurora);
  color: var(--text-secondary);
}

.ask-jev-trigger-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ask-jev-trigger-kbd,
.ask-jev-footer kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}

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

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-surface);
}

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

.btn-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-github:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
  color: #fff;
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 2rem;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border-aurora);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: #d8b4fe;
  margin-bottom: 1.5rem;
}

.hero-pill-badge {
  background: var(--aurora-violet);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 70%, var(--aurora-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 840px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--aurora-cyan), #0284c7);
  color: #030712;
  box-shadow: 0 0 20px var(--aurora-cyan-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #030712;
}

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

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
  color: #fff;
}

.btn-accent {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--border-aurora);
  color: #e9d5ff;
}

.btn-accent:hover {
  background: rgba(168, 85, 247, 0.25);
  color: #fff;
}

/* Stats Ticker Strip */
.stats-strip {
  display: grid;
  /* 150 px lets all six stats share one row beside the sidebar at 1440 px */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2.5rem;
}

.stat-item {
  text-align: center;
  padding: 0.5rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  display: block;
}

.stat-item:nth-child(1) .stat-value { color: var(--aurora-cyan); }
.stat-item:nth-child(2) .stat-value { color: var(--aurora-violet); }
.stat-item:nth-child(3) .stat-value { color: var(--aurora-emerald); }
.stat-item:nth-child(4) .stat-value { color: var(--aurora-amber); }
.stat-item:nth-child(5) .stat-value { color: #f43f5e; }
.stat-item-link { text-decoration: none; color: inherit; border-radius: var(--radius-sm); }
.stat-item-link:hover { background: var(--bg-card-hover); }
#stat-guides .stat-value { color: #ff4e45; }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Demos Lab highlight banner */
.demo-banner-section {
  margin-bottom: 3.5rem;
}

.demo-banner-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-aurora);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-violet-glow);
  position: relative;
  overflow: hidden;
}

.demo-banner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--aurora-cyan), var(--aurora-violet), var(--aurora-emerald));
}

.demo-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.demo-banner-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.demo-banner-icon {
  width: 40px;
  height: 40px;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid var(--border-aurora);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #e9d5ff;
}

.demo-banner-heading {
  font-size: 1.4rem;
  font-weight: 700;
}

.demo-banner-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Ask Jev: floating intent search dialog (command-palette layout) */
.ask-jev-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100vh - 10rem);
  margin: 5rem auto auto;
  padding: 0;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-aurora);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-violet-glow);
  overflow: hidden;
}

.ask-jev-dialog[open] {
  display: flex;
  flex-direction: column;
}

.ask-jev-dialog::backdrop {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ask-jev-palette {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.ask-jev-input-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.ask-jev-input-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ask-jev-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0.4rem 0;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.ask-jev-input:focus {
  outline: none;
}

.ask-jev-submit {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ask-jev-esc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  flex-shrink: 0;
}

.ask-jev-esc:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.ask-jev-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.ask-jev-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ask-jev-footer-keys {
  white-space: nowrap;
}

.ask-jev-footer-note {
  text-align: right;
  line-height: 1.4;
}

.ask-jev-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ask-chip-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.ask-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ask-chip:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: var(--border-aurora);
  color: #fff;
}

/* Jev Intent Decision Result Banner (inside the Ask Jev dialog) */
.jev-result-banner {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.jev-result-banner.active {
  display: block;
}

.jev-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.jev-badge-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--aurora-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.jev-decision-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--aurora-emerald);
}

.jev-result-banner.is-loading .jev-candidates-container {
  opacity: 0.45;
  transition: opacity var(--transition-fast);
}

.jev-result-banner.is-loading .jev-decision-time {
  color: var(--aurora-cyan);
}

.jev-result-banner.is-error {
  border-top-color: rgba(244, 63, 94, 0.4);
}

.jev-result-banner.is-error .jev-decision-time {
  color: var(--aurora-rose);
}

/* Jev Intent Match Summary & Confidence Meter */
.jev-intent-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.jev-intent-summary[hidden] {
  display: none;
}

.jev-match-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm, 4px);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
  transition: all var(--transition-fast, 0.15s ease);
}

.jev-match-label.is-jev,
.jev-match-pill.is-jev {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.jev-match-label.is-fallback,
.jev-match-pill.is-fallback {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.jev-search-source-description {
  margin: 0.6rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.jev-search-source-description[hidden] {
  display: none;
}

.jev-confidence {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.jev-confidence-track {
  display: block;
  width: 110px;
  height: 6px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.jev-confidence-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--aurora-cyan), var(--aurora-violet), var(--aurora-emerald));
  border-radius: var(--radius-full);
  transition: width var(--transition-smooth);
}

.jev-confidence-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.jev-confidence.is-low .jev-confidence-fill {
  background: linear-gradient(90deg, var(--aurora-amber), var(--aurora-rose));
}

.jev-confidence.is-low .jev-confidence-value {
  color: var(--aurora-amber);
}

/* Jev Intent Candidate Rows: one line of title, one of reason, category and stats on the right */
.jev-candidates-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.jev-candidate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  animation: fadeIn 0.25s ease-out forwards;
}

.jev-candidate-row:hover,
.jev-candidate-row:focus-visible {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  outline: none;
}

.jev-candidate-row:focus-visible {
  border-color: var(--aurora-cyan);
}

.jev-candidate-row.is-radar {
  border-style: dashed;
  border-color: rgba(244, 63, 94, 0.35);
}

.jev-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.jev-row-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.jev-row-rank {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--aurora-amber);
}

.jev-row-reason {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jev-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

.jev-row-cat {
  color: var(--text-secondary);
}

.jev-match-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--aurora-amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  white-space: normal;
}

.jev-row-main > .jev-match-pill {
  align-self: flex-start;
}

.jev-intent-empty {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Search Scope Toggle & Radar Candidate Badging */
.jev-scope-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.jev-scope-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.jev-scope-btn:hover {
  border-color: var(--border-aurora);
  color: var(--text-primary);
}

.jev-scope-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.18));
  border-color: var(--aurora-cyan);
  color: var(--text-primary);
  box-shadow: 0 0 12px var(--aurora-cyan-glow);
}

.jev-scope-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.jev-radar-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fda4af;
  background: rgba(244, 63, 94, 0.1);
  border: 1px dashed rgba(244, 63, 94, 0.5);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

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

.rec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: all var(--transition-fast);
}

.rec-card:hover {
  border-color: var(--aurora-cyan);
  transform: translateY(-2px);
}

.rec-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.rec-card-reason {
  font-size: 0.82rem;
  color: var(--aurora-amber);
  margin-bottom: 0.5rem;
}

.rec-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Curated Directory Controls */
.directory-section {
  margin-bottom: 4rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

/* Search and Toolbar */
.directory-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.search-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

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

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

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

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--aurora-cyan);
}

/* Category Filter Chips */
.category-chips-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.category-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.category-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--aurora-cyan);
}

.category-chip.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.2));
  border-color: var(--aurora-cyan);
  color: #fff;
  font-weight: 600;
}

.chip-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Site Shell: sticky left sidebar beside every page section */
.site-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1024px) {
  .site-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    column-gap: 0.5rem;
    padding-left: 1.5rem;
  }
}

.site-main {
  min-width: 0;
}

.category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1.25rem;
  padding: 0 0.25rem 1.5rem 0;
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
  z-index: 20;
}

.sidebar-header {
  padding: 0 0.75rem 0.4rem;
  margin-top: 1.25rem;
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-cat-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-cat-btn:hover,
.sidebar-cat-btn:focus-visible {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.sidebar-cat-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
  font-size: 0.95rem;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter var(--transition-fast), opacity var(--transition-fast);
}

.sidebar-cat-btn:hover .sidebar-cat-icon,
.sidebar-cat-btn.active .sidebar-cat-icon {
  filter: none;
  opacity: 1;
}

.sidebar-cat-title {
  flex: 1;
}

.sidebar-cat-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.sidebar-cat-btn.active .sidebar-cat-count {
  color: var(--aurora-cyan);
}

/* Mobile Category Drawer */
.mobile-category-bar {
  display: none;
  margin-bottom: 1rem;
}

.btn-mobile-categories {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-mobile-categories:hover {
  border-color: var(--aurora-cyan);
}

.mobile-cat-icon {
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

.mobile-cat-label {
  flex: 1;
  text-align: left;
}

.mobile-cat-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

@media (max-width: 1023px) {
  .mobile-category-bar {
    display: block;
  }

  .btn-nav-menu {
    display: grid;
  }

  .category-sidebar {
    display: none;
    position: fixed;
    top: 4.5rem;
    left: 1rem;
    right: 1rem;
    max-height: calc(100vh - 6rem);
    margin-top: 0;
    padding: 1rem 0.75rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
    border: 1px solid var(--border-active);
    z-index: 100;
  }

  .category-sidebar.mobile-open {
    display: flex;
    flex-direction: column;
    animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .btn-mobile-categories[aria-expanded="true"] .mobile-cat-arrow {
    transform: rotate(180deg);
  }
}

/* Contextual Breadcrumbs */
.category-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.crumb-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.crumb-link:hover {
  color: var(--aurora-cyan);
}

.crumb-sep {
  opacity: 0.4;
}

.crumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Category Header Block */
.category-header-block {
  background: linear-gradient(135deg, rgba(14, 20, 36, 0.95) 0%, rgba(19, 28, 49, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.cat-header-top {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.cat-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cat-header-titles {
  flex: 1;
}

.cat-header-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cat-header-count {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--aurora-cyan);
}

.cat-header-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-top: 0.35rem;
  max-width: 68ch;
}

.format-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.format-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.format-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.format-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--aurora-cyan);
  color: #fff;
  font-weight: 600;
}

/* Quick Filter Toggles & View Controls */
.controls-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.quick-toggles {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.toggle-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.toggle-checkbox:checked {
  background: var(--aurora-cyan);
  border-color: var(--aurora-cyan);
}

.toggle-checkbox:checked::after {
  content: '✓';
  color: #030712;
  font-size: 0.75rem;
  font-weight: 800;
}

.view-mode-buttons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

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

.view-btn.active {
  background: var(--bg-card);
  color: var(--aurora-cyan);
  box-shadow: var(--shadow-sm);
}

/* Tool Counter & Status */
.tool-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Visual Card Grid View */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-smooth);
  position: relative;
}

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

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

.tool-title-wrap {
  flex: 1;
}

.tool-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.tool-card-title a {
  color: #fff;
}

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

.tool-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.badge-lang {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.badge-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #fcd34d;
  font-family: var(--font-mono);
}

/* Tool Card Media Preview */
.tool-card-media-preview {
  position: relative;
  width: 100%;
  height: 130px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0.75rem 0;
  background: #020617;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.tool-card-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.tool-card-media-preview:hover img {
  transform: scale(1.04);
}

.card-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.tool-card-media-preview:hover .card-media-overlay {
  background: rgba(2, 6, 23, 0.15);
}

.card-media-play {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.card-media-audio {
  position: absolute;
  bottom: 0.45rem;
  right: 0.45rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--aurora-cyan);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.badge-cat {
  font-size: 0.72rem;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Prong 2 Empirical Metrics Strip on Card */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  margin: 0.85rem 0;
  text-align: center;
}

.metric-cell {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.15rem;
  color: var(--text-primary);
}

.metric-val.latency { color: var(--aurora-emerald); }
.metric-val.budget { color: var(--aurora-cyan); }
.metric-val.cost { color: var(--aurora-amber); }

.tool-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  /* Long URLs in descriptions must wrap rather than widen the card on phones */
  overflow-wrap: anywhere;
}

/* Card Actions */
.tool-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.card-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.card-btn-demo {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-btn-demo:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #fff;
}

.card-btn-dossier {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border: 1px solid var(--border-aurora);
}

.card-btn-dossier:hover {
  background: rgba(168, 85, 247, 0.25);
  color: #fff;
}

.card-btn-repo {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.card-btn-repo:hover {
  background: var(--bg-elevated);
  color: #fff;
  border-color: var(--border-active);
}

/* Video Guides */
.guides-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.guide-card .guide-thumb {
  height: auto;
  aspect-ratio: 16 / 9;
  margin-top: 0;
}

.guide-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: rgba(2, 6, 23, 0.25);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.guide-kind {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.guide-kind-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ff4e45;
}

.guide-creator {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0.35rem 0 0.75rem;
}

.guide-creator a {
  color: #fff;
  font-weight: 600;
}

.guide-handle,
.guide-via {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.guide-via {
  margin-left: auto;
}

.guide-kind-written {
  color: var(--aurora-cyan);
}

.guide-site {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.guide-language {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  padding: 0.05rem 0.45rem;
  border-radius: var(--radius-full);
}

.guide-title-en {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0.25rem 0 0;
}

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

/* Dense Data Table View */
.tools-table-container {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.tools-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.tools-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tools-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.tools-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.tools-table .col-title {
  font-weight: 700;
  color: #fff;
}

.tools-table .col-latency {
  font-family: var(--font-mono);
  color: var(--aurora-emerald);
}

.tools-table .col-budget {
  font-family: var(--font-mono);
  color: var(--aurora-cyan);
}

.tools-table .col-cost {
  font-family: var(--font-mono);
  color: var(--aurora-amber);
}

/* Interactive ROI & Latency Calculator */
.calculator-section {
  margin-bottom: 4.5rem;
}

.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.control-value {
  font-family: var(--font-mono);
  color: var(--aurora-cyan);
  font-size: 1rem;
}

.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  outline: none;
  border: 1px solid var(--border-subtle);
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--aurora-cyan), #0284c7);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--aurora-cyan-glow);
  border: 2px solid #fff;
}

.calc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--aurora-cyan), #0284c7);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--aurora-cyan-glow);
  border: 2px solid #fff;
}

.model-selector-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}

.model-option-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.model-option-btn:hover {
  border-color: var(--aurora-cyan);
  color: #fff;
}

.model-option-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--aurora-cyan);
  color: #fff;
  box-shadow: 0 0 12px var(--aurora-cyan-glow);
}

/* Calculator Outputs Display */
.calc-results {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.result-card-highlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.highlight-label {
  font-size: 0.82rem;
  color: var(--aurora-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.highlight-val {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0.25rem 0;
}

.highlight-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.result-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.res-metric {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.res-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.res-metric-val {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.2rem;
}

/* Primitive Sandbox */
.sandbox-section {
  margin-bottom: 4.5rem;
}

.sandbox-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.primitive-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.primitive-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.primitive-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.primitive-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--aurora-cyan);
}

.sandbox-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .sandbox-split {
    grid-template-columns: 1fr;
  }
}

.sandbox-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-textarea, .form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.form-textarea:focus, .form-input:focus {
  outline: none;
  border-color: var(--aurora-cyan);
}

.code-output-card {
  background: #050810;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.code-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lang-tab-buttons {
  display: flex;
  gap: 0.25rem;
}

.lang-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.lang-tab.active {
  background: var(--bg-elevated);
  color: #fff;
}

.btn-copy {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-copy:hover {
  background: var(--bg-elevated);
  color: #fff;
}

.code-pre {
  padding: 1rem;
  color: #e2e8f0;
  font-size: 0.82rem;
  overflow-x: auto;
  line-height: 1.5;
  flex: 1;
}

.sim-output-box {
  margin-top: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.sim-output-title {
  font-size: 0.8rem;
  color: var(--aurora-emerald);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* WebMCP Showcase Section */
.webmcp-section {
  margin-bottom: 4.5rem;
}

.webmcp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-aurora);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-violet-glow);
}

.action-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.action-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.action-group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--aurora-cyan);
  margin-bottom: 0.4rem;
}

.action-group-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.tool-signature {
  background: var(--bg-input);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e9d5ff;
  margin-bottom: 0.35rem;
  display: block;
}

/* Modal for Video/Media Popout & Sushi Pod Inspection */
.media-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  place-items: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.media-modal-backdrop.active {
  display: grid;
}

.media-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.25);
}

.media-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.media-modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.media-modal-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--aurora-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.media-modal-pod-idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.media-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

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

.media-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.media-modal-visual-wrap {
  position: relative;
  width: 100%;
  max-height: 50vh;
  min-height: 240px;
  background: #020617;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal-visual-wrap img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  display: block;
}

.media-modal-audio-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--aurora-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.media-modal-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-unmute-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-unmute-btn:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: var(--aurora-cyan);
}

.media-modal-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

#media-modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.modal-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.telemetry-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.box-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.box-val {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.text-cyan { color: var(--aurora-cyan) !important; }
.text-green { color: var(--aurora-emerald) !important; }
.text-amber { color: var(--aurora-amber) !important; }

.media-modal-footer {
  padding: 0.9rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.88rem;
}

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

/* Top Utilities & Featured Champions Shelf */
.top-utilities-shelf {
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.8) 0%, rgba(19, 28, 49, 0.6) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.shelf-tag {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--aurora-cyan);
  margin-right: 0.75rem;
}

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

.shelf-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(56, 189, 248, 0.15);
  color: var(--aurora-cyan);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

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

.shelf-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-smooth);
}

.shelf-card:hover {
  transform: translateY(-3px);
  border-color: var(--aurora-cyan);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.15);
}

.shelf-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.shelf-card-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--aurora-cyan);
  background: rgba(56, 189, 248, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.shelf-card-stars {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--aurora-amber);
}

.shelf-card-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.shelf-card-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex: 1;
}

.shelf-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.shelf-card-meta span {
  background: var(--bg-surface);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Highlighted Search Match */
.highlighted-top-match {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(19, 28, 49, 0.95) 0%, rgba(30, 44, 76, 0.95) 100%);
  border: 2px solid var(--aurora-cyan) !important;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.25) !important;
  position: relative;
  overflow: hidden;
}

.highlighted-top-match::before {
  content: '⚡ TOP RECOMMENDED MATCH';
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--aurora-amber);
  background: rgba(245, 158, 11, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Jev Intent Match Pinned in Directory */
.tool-card.intent-match {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, var(--aurora-violet), var(--aurora-cyan), var(--aurora-emerald)) border-box;
  box-shadow: var(--shadow-violet-glow);
}

.tool-card.intent-match:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-card-hover), var(--bg-card-hover)) padding-box,
    linear-gradient(135deg, var(--aurora-violet), var(--aurora-cyan), var(--aurora-emerald)) border-box;
}

.intent-match-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.intent-match-score {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--aurora-cyan);
}

.intent-match-terms {
  font-size: 0.72rem;
  color: #e9d5ff;
}

.tools-table tr.intent-match-row td {
  background: rgba(168, 85, 247, 0.08);
}

.tools-table tr.intent-match-row td:first-child {
  box-shadow: inset 3px 0 0 var(--aurora-violet);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

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

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

/* ==========================================================================
   Decision Sushi Train Component
   ========================================================================== */
.sushi-train-wrapper {
  margin: 2.5rem 0 1.5rem 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(10, 15, 29, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.75rem 1.5rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.sushi-train-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.sushi-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sushi-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--aurora-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  width: fit-content;
  letter-spacing: 0.05em;
}

.sushi-pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--aurora-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--aurora-cyan);
  animation: pulseGlow 1.6s infinite ease-in-out;
}

.sushi-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.sushi-subheading {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  max-width: 680px;
}

.sushi-controls-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sushi-speed-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.4rem;
}

.sushi-ctrl-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
  padding-left: 0.25rem;
}

.sushi-speed-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sushi-speed-btn:hover {
  color: #fff;
}

.sushi-speed-btn.active {
  background: var(--aurora-cyan);
  color: #020617;
  font-weight: 700;
}

.sushi-telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--aurora-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
}

.telemetry-live-dot {
  width: 6px;
  height: 6px;
  background: var(--aurora-emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--aurora-emerald);
}

/* Category Filter Pills for Sushi Train */
.sushi-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

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

.sushi-filter-btn:hover {
  border-color: var(--aurora-cyan);
  color: #fff;
}

.sushi-filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--aurora-cyan);
  color: var(--aurora-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Conveyor Viewport & Kaitenzushi Restaurant Counter */
.sushi-conveyor-viewport {
  position: relative;
  width: 100%;
  height: 485px;
  overflow: hidden;
  background: #070a10;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Polished Hinoki Wood Counter Rails & Steel Guides */
.sushi-counter-rail {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
}

.sushi-counter-top {
  top: 0;
  display: flex;
  flex-direction: column;
}

.sushi-counter-bottom {
  bottom: 0;
  display: flex;
  flex-direction: column;
}

.counter-wood-grain {
  height: 12px;
  background: linear-gradient(180deg, #2b1810 0%, #170d09 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.sushi-counter-bottom .counter-wood-grain {
  border-top: 1px solid rgba(0, 0, 0, 0.6);
  border-bottom: none;
}

.counter-steel-guide {
  height: 4px;
  background: linear-gradient(180deg, #94a3b8 0%, #475569 50%, #1e293b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.sushi-counter-bottom .counter-steel-guide {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
}

/* Moving Slat Conveyor Bed */
.sushi-belt-bed {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, #070a11 0px, #070a11 20px, #111827 21px, #1e293b 22px, #070a11 23px);
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.8), inset 0 -8px 16px rgba(0, 0, 0, 0.8);
}

.sushi-edge-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  z-index: 6;
  pointer-events: none;
}

.sushi-fade-left {
  left: 0;
  background: linear-gradient(90deg, rgba(7, 10, 16, 0.98) 0%, rgba(7, 10, 16, 0.7) 40%, transparent 100%);
}

.sushi-fade-right {
  right: 0;
  background: linear-gradient(270deg, rgba(7, 10, 16, 0.98) 0%, rgba(7, 10, 16, 0.7) 40%, transparent 100%);
}

/* Kinetic Track */
.sushi-track {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 2.25rem;
  width: max-content;
  height: 100%;
  align-items: center;
  padding: 0 1.5rem;
  animation: sushiConveyor var(--conveyor-duration, 65s) linear infinite;
  will-change: transform;
}

.sushi-conveyor-viewport:hover .sushi-track,
.sushi-conveyor-viewport:focus-within .sushi-track,
.sushi-track:hover,
.sushi-track:focus-within,
.sushi-track.is-hover-paused,
.sushi-track.is-modal-paused,
.sushi-track.is-paused {
  animation-play-state: paused !important;
}

@media (hover: hover) and (pointer: fine) {
  .sushi-conveyor-viewport:hover .sushi-track,
  .sushi-conveyor-viewport:focus-within .sushi-track,
  .sushi-track:hover,
  .sushi-track:focus-within {
    animation-play-state: paused !important;
  }
}

/* Kaitenzushi Plate Pod Assembly */
.sushi-pod {
  width: 480px;
  height: 430px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sushi-pod:hover {
  transform: translateY(-8px);
}

/* Acrylic Dome / Cloche Enclosure */
.sushi-dome-cover {
  position: relative;
  width: 100%;
  height: 285px;
  border-radius: 14px 14px 4px 4px;
  overflow: hidden;
  background: #030712;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.sushi-glass-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 30%, transparent 60%);
}

.sushi-kanji-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  font-family: serif, "Noto Serif JP", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.sushi-pod-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020617;
}

.sushi-pod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.sushi-pod:hover .sushi-pod-img {
  transform: scale(1.06);
}

.sushi-pod-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.sushi-pod:hover .sushi-pod-play-overlay {
  opacity: 1;
}

.sushi-play-icon {
  width: 42px;
  height: 42px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
  padding-left: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.sushi-pod-audio-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #38bdf8;
  z-index: 4;
}

/* Order Ticket Placard */
.sushi-dish-ticket {
  width: 95%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 6px 6px;
  padding: 0.45rem 0.65rem 0.35rem 0.65rem;
  z-index: 2;
  margin-top: -2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.sushi-pod-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.sushi-pod-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--aurora-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 185px;
}

.sushi-pod-idx {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sushi-pod-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 0.35rem 0;
}

.sushi-pod-telemetry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.telemetry-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--aurora-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.25);
  white-space: nowrap;
}

/* Lacquered Ceramic Sushi Plate Base */
.sushi-plate-base {
  position: relative;
  width: 100%;
  height: 32px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.sushi-plate-rim {
  width: 96%;
  height: 20px;
  border-radius: 50% / 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.25s ease;
}

.sushi-plate-inner-ring {
  width: 78%;
  height: 10px;
  border-radius: 50% / 5px;
  opacity: 0.6;
}

.sushi-plate-style-name {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: absolute;
  z-index: 2;
  opacity: 0.85;
  font-weight: 700;
}

.sushi-plate-shadow {
  width: 92%;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, transparent 75%);
  margin-top: -2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sushi-pod:hover .sushi-plate-shadow {
  transform: scale(1.1);
  opacity: 0.9;
}

/* Distinct Plate Colorways */
/* 1. Vermilion Cinnabar Lacquer (Aka) */
.plate-vermilion .sushi-plate-rim {
  background: linear-gradient(180deg, #991b1b 0%, #450a0a 100%);
  border: 2px solid #eab308;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
}

.plate-vermilion .sushi-plate-inner-ring {
  border: 1px solid #fde047;
}

.plate-vermilion .sushi-plate-style-name {
  color: #fef08a;
}

.plate-vermilion .sushi-kanji-tag {
  background: #7f1d1d;
  color: #fde047;
  border: 1px solid #ca8a04;
}

/* 2. Obsidian Black Ceramic (Kuro) */
.plate-obsidian .sushi-plate-rim {
  background: linear-gradient(180deg, #1e293b 0%, #030712 100%);
  border: 2px solid #cbd5e1;
  box-shadow: 0 0 12px rgba(203, 213, 225, 0.28);
}

.plate-obsidian .sushi-plate-inner-ring {
  border: 1px solid #94a3b8;
}

.plate-obsidian .sushi-plate-style-name {
  color: #e2e8f0;
}

.plate-obsidian .sushi-kanji-tag {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #64748b;
}

/* 3. Jade Celadon Porcelain (Seiji) */
.plate-celadon .sushi-plate-rim {
  background: linear-gradient(180deg, #065f46 0%, #022c22 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.plate-celadon .sushi-plate-inner-ring {
  border: 1px solid #34d399;
}

.plate-celadon .sushi-plate-style-name {
  color: #a7f3d0;
}

.plate-celadon .sushi-kanji-tag {
  background: #064e3b;
  color: #fef3c7;
  border: 1px solid #d97706;
}

/* 4. Royal Indigo Porcelain (Shiro) */
.plate-porcelain .sushi-plate-rim {
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.plate-porcelain .sushi-plate-inner-ring {
  border: 1px solid #0284c7;
}

.plate-porcelain .sushi-plate-style-name {
  color: #bae6fd;
}

.plate-porcelain .sushi-kanji-tag {
  background: #1e1b4b;
  color: #38bdf8;
  border: 1px solid #0284c7;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  .sushi-track {
    animation: none !important;
    overflow-x: auto;
    max-width: 100%;
  }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .jev-candidate-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .jev-row-meta {
    align-items: flex-start;
    text-align: left;
  }

  .nav-links {
    display: none;
  }
  .nav-inner-wide {
    padding: 0 1rem;
    gap: 0.5rem;
  }
  .ask-jev-trigger {
    flex: 0 0 auto;
  }
  .ask-jev-trigger-label,
  .ask-jev-trigger-kbd,
  .ask-jev-footer-note,
  .btn-github-label {
    display: none;
  }
  .tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .sushi-train-wrapper {
    padding: 1rem;
  }
  .sushi-heading {
    font-size: 1.15rem;
  }
  .sushi-conveyor-viewport {
    height: 350px;
  }
  .sushi-pod {
    width: 310px;
    height: 310px;
  }
  .sushi-dome-cover {
    height: 180px;
  }
  .modal-telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
