
/* Global Utility & Hidden Invariant */
[hidden] {
  display: none !important;
}

/* Ensure sticky 2-row navigation never cuts off section tops */
section[id], div[id], [id] {
  scroll-margin-top: 130px;
}

/* Language Segmented Switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: #f8fafc;
}

.lang-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-node-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-node-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

/* ==============================================================================
   ComputeMesh Official Portal Design System & Stylesheet
   ============================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121d;
  --bg-surface: #131b2a;
  --bg-card: rgba(19, 27, 42, 0.75);
  --bg-card-hover: rgba(28, 40, 62, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(0, 240, 255, 0.3);
  --border-emerald: rgba(16, 185, 129, 0.3);
  
  --accent-cyan: #00f0ff;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-glow-cyan: 0 0 30px rgba(0, 240, 255, 0.15);
  --shadow-glow-emerald: 0 0 30px rgba(16, 185, 129, 0.15);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

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

/* Typography */
h1, h2, h3, h4, .brand-logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-emerald {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 10, 19, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  padding: 0;
  width: 100%;
}

/* Remove any container width clamps inside header */
header.site-header .container,
header.site-header .nav-top-row,
header.site-header .nav-sub-row .container,
header.site-header .nav-sub-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Top Row: Brand on far left, Action buttons on far right */
.nav-top-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0.65rem 1.25rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  box-sizing: border-box !important;
}

.brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  text-decoration: none !important;
  color: var(--text-main) !important;
  flex-shrink: 0 !important;
  margin-left: 0 !important;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.92;
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #38bdf8;
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
  transition: all 0.25s ease;
}

.brand-badge:hover {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
  transform: translateY(-1px);
}

.brand-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.brand-badge:has(.pulse-dot)::before {
  display: none;
}

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

.nav-actions {
  display: flex !important;
  align-items: center !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  gap: 0.65rem !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.nav-actions .btn,
.nav-actions .lang-toggle {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.83rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-actions .btn-secondary,
.nav-actions #auth-nav-btn,
.nav-actions .fleet-login-btn {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
}

.nav-actions .btn-secondary:hover,
.nav-actions #auth-nav-btn:hover,
.nav-actions .fleet-login-btn:hover {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25) !important;
  transform: translateY(-1px) !important;
}

.nav-actions .btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.35) !important;
}

.nav-actions .btn-primary:hover {
  background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%) !important;
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.6) !important;
  transform: translateY(-1px) !important;
}

.lang-toggle {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
  font-family: inherit !important;
  cursor: pointer !important;
}

.lang-toggle:hover {
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: var(--accent-cyan) !important;
  background: rgba(56, 189, 248, 0.12) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25) !important;
  transform: translateY(-1px) !important;
}

/* Sub Row Navigation */
.nav-sub-row {
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(14px);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  width: 100%;
}

.nav-sub-container {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.15rem 1.25rem !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

@media (max-width: 900px) {
  .nav-sub-container {
    overflow-x: auto !important;
    scrollbar-width: none;
  }
  .nav-sub-container::-webkit-scrollbar {
    display: none;
  }
}

.nav-links {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(56, 189, 248, 0.2);
}

.nav-links a.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* General Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 240, 255, 0.4);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

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

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-bright);
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero p.hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 820px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

/* Telemetry Ticker */
.telemetry-ticker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  text-align: left;
}

.ticker-item {
  border-left: 2px solid var(--accent-cyan);
  padding-left: 1rem;
}

.ticker-item.emerald {
  border-left-color: var(--accent-emerald);
}

.ticker-item.indigo {
  border-left-color: var(--accent-indigo);
}

.ticker-item.amber {
  border-left-color: var(--accent-amber);
}

.ticker-val {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.ticker-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Section Headings */
.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-glow-cyan);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-bright);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Calculator Section */
section.calculator-sec {
  padding: 5rem 0;
}

.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
}

.calc-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.calc-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.calc-tab.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-bright);
}

.calc-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.slider-group {
  margin-bottom: 1.75rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.calc-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}

.calc-big-num {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  margin: 0.5rem 0;
}

/* ==============================================================================
   Modern Multi-Platform Downloads & App Center
   ============================================================================== */
section.downloads-sec {
  padding: 6rem 0;
  position: relative;
  background: radial-gradient(circle at 50% 10%, rgba(0, 242, 254, 0.04) 0%, transparent 60%);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
  align-items: stretch;
}

.download-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(11, 17, 33, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: opacity 0.3s ease;
}

.download-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 20px 40px -15px rgba(0, 242, 254, 0.18), 0 0 0 1px rgba(0, 242, 254, 0.2);
}

.download-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.download-card.highlight {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 12px 35px -10px rgba(16, 185, 129, 0.2);
}

.download-card.highlight::before {
  background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
}

.download-card.highlight:hover {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 22px 45px -12px rgba(16, 185, 129, 0.3), 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.dl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.dl-platform-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.download-card:hover .dl-platform-icon-wrap {
  transform: scale(1.08);
}

.dl-tag-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dl-tag-badge.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.dl-tag-badge.cyan {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.3);
}

.dl-tag-badge.purple {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.download-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
  color: #ffffff;
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

/* QR Code Box with Solid Clean White Background */
.qr-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 12px 10px 12px;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.qr-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--accent-cyan);
}

.qr-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.qr-img {
  width: 135px;
  height: 135px;
  display: block;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 4px;
}

.qr-sub {
  font-size: 0.72rem;
  color: #475569;
  margin-top: 8px;
  line-height: 1.3;
}

.qr-sub strong {
  color: #0f172a;
}

/* Linux Code Box */
.dl-code-box {
  background: rgba(5, 7, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.dl-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.dl-actions-col .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.65rem 1rem;
}

.dl-actions-col .btn.btn-sm {
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
}

.dl-sub-link {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 0.25rem;
  transition: color 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-sub-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}


/* Code Snippet Box */
.code-window {
  background: #05070a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-glow-cyan);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-bright);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Calculator Section */
section.calculator-sec {
  padding: 5rem 0;
}

.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
}

.calc-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.calc-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.calc-tab.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-bright);
}

.calc-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.slider-group {
  margin-bottom: 1.75rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.calc-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}

.calc-big-num {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  margin: 0.5rem 0;
}



/* Code Snippet Box */
.code-window {
  background: #05070a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

pre {
  max-width: 100%;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #e2e8f0;
  overflow-x: auto;
}

pre code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Modal Window */
.modal-backdrop,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 1rem;
}

.modal-backdrop.active,
.modal-overlay.active {
  display: flex !important;
}

.modal-box,
.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-box.modal-lg,
.modal-card.modal-lg {
  max-width: 880px;
  width: 95vw;
  padding: 2.25rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Teaser Conversion Modal Styles */
.conv-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.conv-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.25s ease;
  box-sizing: border-box;
  min-width: 0;
}

.conv-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.conv-card.highlight {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(15, 23, 42, 0.85));
}

.conv-card.emerald {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.85));
}

.conv-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 0.75rem;
}

.conv-card-badge.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.conv-cli-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  margin: 0.85rem 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.conv-cli-box code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #ffffff;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

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

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

.modal-close:hover {
  color: var(--text-main);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label,
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color-scheme: dark;
}

/* Keep native select popovers readable in light-OS/browser themes. */
.form-control option,
.pg-select option {
  background-color: #0f172a;
  color: #f8fafc;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

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

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

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

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

/* ==============================================================================
   AI Playground & Teaser Studio Styles
   ============================================================================== */
.playground-sec {
  padding: 3rem 1.5rem 2.5rem;
  position: relative;
  scroll-margin-top: 130px;
}

.playground-studio {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(99, 102, 241, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

/* Authenticated User Llama-UI Banner */
.pg-auth-banner {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16) 0%, rgba(0, 242, 254, 0.16) 100%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.pg-auth-banner-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 260px;
}

.pg-auth-banner-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.pg-auth-banner-text strong {
  display: block;
  font-size: 0.92rem;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.pg-auth-banner-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

.pg-auth-banner-btn {
  white-space: nowrap;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* Toolbar */
.pg-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.pg-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.pg-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.pg-select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
  color-scheme: dark;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pg-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.pg-cluster-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
}

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

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--accent-emerald); }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.pg-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pg-quota-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pg-quota-pill:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
}

.pg-btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.pg-btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* Chat Stream */
.pg-chat-stream {
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  scroll-padding-bottom: 1rem;
}

.pg-chat-stream::-webkit-scrollbar {
  width: 6px;
}

.pg-chat-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.chat-msg {
  display: flex;
  gap: 0.85rem;
  max-width: 94%;
  animation: fadeInMsg 0.25s ease-out;
}

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

.chat-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-ai {
  align-self: flex-start;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-msg-user .chat-avatar {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.chat-bubble {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.35rem;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  word-break: break-word;
  overflow-wrap: break-word;
}

.chat-msg-user .chat-bubble {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  border-color: rgba(99, 102, 241, 0.4);
}

.chat-author {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.chat-body pre {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  margin: 0.5rem 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
}

.chat-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  color: #38bdf8;
}

/* Responsive Markdown Table Styles in Chat */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 0.8rem 0;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.65);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  -webkit-overflow-scrolling: touch;
}

.chat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: #e2e8f0;
  text-align: left;
}

.chat-table th {
  background: rgba(30, 41, 59, 0.95);
  color: #38bdf8;
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
}

.chat-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: middle;
}

.chat-table tr:last-child td {
  border-bottom: none;
}

.chat-table tr:hover {
  background: rgba(56, 189, 248, 0.06);
}

.chat-body h1, .chat-body h2, .chat-body h3, .chat-body h4 {
  color: #f1f5f9;
  margin: 0.75rem 0 0.35rem;
  font-weight: 600;
}
.chat-body h1 { font-size: 1.25rem; }
.chat-body h2 { font-size: 1.15rem; }
.chat-body h3 { font-size: 1.05rem; color: #38bdf8; }
.chat-body h4 { font-size: 0.95rem; color: #94a3b8; }

.chat-blockquote {
  border-left: 3px solid #38bdf8;
  padding: 0.5rem 0.85rem;
  margin: 0.6rem 0;
  background: rgba(56, 189, 248, 0.08);
  border-radius: 0 6px 6px 0;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0.85rem 0;
}

.chat-list {
  margin: 0.4rem 0 0.6rem 1.4rem;
  padding: 0;
  color: #cbd5e1;
}

.chat-list li {
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.chat-p {
  margin: 0 0 0.5rem 0;
  line-height: 1.55;
}
.chat-p:last-child {
  margin-bottom: 0;
}

.chat-spacer {
  height: 0.4rem;
}

.chat-link {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.chat-link:hover {
  color: #7dd3fc;
}

.chat-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent-cyan);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 0.9s infinite;
}

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

/* Metrics Bar */
.pg-metrics-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 1.5rem;
  background: rgba(2, 6, 23, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  flex-wrap: wrap;
}

.pg-metric-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pg-metric-lbl {
  color: var(--text-dim);
}

.pg-metric-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}

.pg-metric-val.emerald {
  color: var(--accent-emerald);
}

/* Quick Prompts */
.pg-quick-prompts {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem 0.5rem;
  flex-wrap: wrap; /* allow wrapping so no prompt pill gets cut off */
}

.pg-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  white-space: normal;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pg-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Input Area */
.pg-input-container {
  padding: 0.85rem 1.5rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.pg-textarea {
  flex: 1;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.45;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pg-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.pg-send-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  height: 44px;
  white-space: nowrap;
}

.pg-ollama-config {
  margin: 0 1.5rem 1.5rem;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: var(--radius-sm);
}

.pg-config-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 0.75rem;
}

.pg-config-head span:last-child {
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pg-snippet-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  flex-wrap: wrap;
}

.pg-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pg-tab-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.35);
  color: var(--text-main);
}

.pg-tab-btn.active {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--accent-cyan);
  color: #00f0ff;
  font-weight: 700;
}

.pg-ollama-config pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 0.85rem;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

.pg-ollama-config code {
  font-family: var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pg-ollama-config p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}



/* Responsive Design */
@media (max-width: 900px) {
  .hero h1 { font-size: 2.6rem; }
  .calc-content { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .conv-options-grid { grid-template-columns: 1fr; }
  .pg-toolbar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  header.site-header {
    padding: 0;
  }

  .nav-top-row {
    padding: 0.45rem 0.75rem !important;
    gap: 0.4rem !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
  }

  .brand {
    gap: 0.5rem !important;
  }

  .brand-logo {
    font-size: 1.2rem;
  }

  .brand-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.45rem;
  }

  .nav-actions {
    gap: 0.35rem !important;
  }

  .lang-toggle,
  .nav-actions .btn {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.78rem !important;
    height: 30px !important;
  }

  .nav-sub-row {
    padding: 0.2rem 0;
  }

  .nav-sub-container {
    overflow-x: auto !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0.2rem 0.75rem !important;
  }

  .nav-links {
    display: flex !important;
    gap: 0.65rem;
    white-space: nowrap;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  section.hero {
    padding: 2.25rem 0 2.75rem;
  }

  .hero-tagline {
    max-width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.35;
    padding: 0.45rem 0.75rem;
    white-space: normal;
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 2.65rem);
    line-height: 1.12;
    margin-bottom: 1.15rem;
  }

  .hero p.hero-sub {
    font-size: 1rem;
    line-height: 1.58;
    margin-bottom: 1.75rem;
  }

  .hero-cta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-cta .btn,
  .hero-cta button {
    width: 100%;
  }

  .telemetry-ticker {
    grid-template-columns: 1fr;
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  .ticker-val {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  .section-header h2 {
    font-size: 1.85rem;
    overflow-wrap: anywhere;
  }

  .features-grid,
  .download-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card,
  .download-card,
  .calc-box,
  .playground-studio,
  .code-window {
    width: 100%;
    min-width: 0;
  }

  .feature-card,
  .download-card {
    padding: 1.2rem;
  }

  .calc-box {
    padding: 1.2rem;
  }

  .calc-tabs {
    gap: 0.5rem;
    overflow-x: auto;
  }

  .calc-tab {
    flex: 0 0 auto;
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
  }

  .pg-toolbar {
    padding: 0.85rem 1rem;
  }

  .pg-toolbar-left,
  .pg-toolbar-right,
  .pg-control-group {
    width: 100%;
    min-width: 0;
  }

  .pg-control-group {
    align-items: flex-start;
    flex-direction: column;
  }

  .pg-select {
    width: 100%;
    min-width: 0;
  }

  .pg-cluster-badge,
  .pg-quota-pill {
    max-width: 100%;
    white-space: normal;
  }

  .pg-quick-prompts {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    overscroll-behavior-inline: contain;
  }

  .pg-input-container {
    flex-direction: column;
    align-items: stretch;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pg-send-btn {
    width: 100%;
  }

  pre,
  .dl-code-box,
  .chat-body pre {
    max-width: 100%;
  }

  pre code {
    white-space: pre-wrap;
  }

  main.container {
    overflow-wrap: anywhere;
  }

  main.container > div[style*="grid-template-columns: 280px 1fr"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem !important;
  }

  main.container > div[style*="grid-template-columns: 280px 1fr"] > aside {
    position: static !important;
    top: auto !important;
  }

  main.container > div[style*="grid-template-columns: 280px 1fr"] > div {
    min-width: 0;
    width: 100%;
  }

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

/* ==============================================================================
   ComputeMesh Thinking & Deep Reasoning Accordion (DeepSeek-R1 / o1 parity)
   ============================================================================== */
.cm-thinking-block {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-left: 3px solid #38bdf8;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0.75rem 0;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.cm-thinking-block summary {
  cursor: pointer;
  color: #38bdf8;
  font-weight: 600;
  outline: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cm-thinking-block summary:hover {
  color: #7dd3fc;
}

.cm-thinking-body {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  .hero-tagline {
    max-width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.35;
    padding: 0.45rem 0.75rem;
    white-space: normal;
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 2.65rem);
    line-height: 1.12;
    margin-bottom: 1.15rem;
  }

  .hero p.hero-sub {
    font-size: 1rem;
    line-height: 1.58;
    margin-bottom: 1.75rem;
  }

  .hero-cta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-cta .btn,
  .hero-cta button {
    width: 100%;
  }

  .telemetry-ticker {
    grid-template-columns: 1fr;
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  .ticker-val {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  .section-header h2 {
    font-size: 1.85rem;
    overflow-wrap: anywhere;
  }

  .features-grid,
  .download-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card,
  .download-card,
  .calc-box,
  .playground-studio,
  .code-window {
    width: 100%;
    min-width: 0;
  }

  .feature-card,
  .download-card {
    padding: 1.2rem;
  }

  .calc-box {
    padding: 1.2rem;
  }

  .calc-tabs {
    gap: 0.5rem;
    overflow-x: auto;
  }

  .calc-tab {
    flex: 0 0 auto;
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
  }

  .pg-toolbar {
    padding: 0.85rem 1rem;
  }

  .pg-toolbar-left,
  .pg-toolbar-right,
  .pg-control-group {
    width: 100%;
    min-width: 0;
  }

  .pg-control-group {
    align-items: flex-start;
    flex-direction: column;
  }

  .pg-select {
    width: 100%;
    min-width: 0;
  }

  .pg-cluster-badge,
  .pg-quota-pill {
    max-width: 100%;
    white-space: normal;
  }

  .pg-quick-prompts {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    overscroll-behavior-inline: contain;
  }

  .pg-input-container {
    flex-direction: column;
    align-items: stretch;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pg-send-btn {
    width: 100%;
  }

  pre,
  .dl-code-box,
  .chat-body pre {
    max-width: 100%;
  }

  pre code {
    white-space: pre-wrap;
  }

  main.container {
    overflow-wrap: anywhere;
  }

  main.container > div[style*="grid-template-columns: 280px 1fr"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem !important;
  }

  main.container > div[style*="grid-template-columns: 280px 1fr"] > aside {
    position: static !important;
    top: auto !important;
  }

  main.container > div[style*="grid-template-columns: 280px 1fr"] > div {
    min-width: 0;
    width: 100%;
  }

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

/* ==============================================================================
   ComputeMesh Thinking & Deep Reasoning Accordion (DeepSeek-R1 / o1 parity)
   ============================================================================== */
.cm-thinking-block {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-left: 3px solid #38bdf8;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0.75rem 0;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.cm-thinking-block summary {
  cursor: pointer;
  color: #38bdf8;
  font-weight: 600;
  outline: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cm-thinking-block summary:hover {
  color: #7dd3fc;
}

.cm-thinking-body {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 350px;
  overflow-y: auto;
}

/* ==============================================================================
   ComputeMesh Vast.ai-Grade Marketplace, Model Library & DX Architecture Styles
   ============================================================================== */

/* Dropdown Navigation Menu */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(56, 189, 248, 0.2);
}

.dropdown-arrow {
  font-size: 0.65rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-item.has-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: rgba(13, 18, 29, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.08);
  padding: 0.65rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 300px;
  z-index: 1200;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.dropdown-item:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
  transform: translateX(3px);
}

.dropdown-item .item-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.dropdown-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 600;
}

.dropdown-item p {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

/* Hero CTA Row & Trust Bar */
.hero-cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.trust-badge:hover {
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--text-main);
  transform: translateY(-1px);
}

.trust-badge .badge-icon {
  font-size: 0.95rem;
}

/* GPU Marketplace Section */
.marketplace-sec {
  padding: 5rem 0 4rem;
  position: relative;
}

.marketplace-controls {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-box {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-box .search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.05rem;
  pointer-events: none;
  opacity: 0.6;
}

.search-box input {
  width: 100%;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.85rem 3rem;
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.filter-pills-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.filter-pills-row.secondary {
  margin-bottom: 0;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 0.25rem;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--text-main);
}

.filter-pill.active {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

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

.market-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.market-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 25px rgba(0, 240, 255, 0.12);
}

.market-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.gpu-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.gpu-badge.nvidia {
  background: rgba(118, 185, 0, 0.15);
  color: #84cc16;
  border-color: rgba(118, 185, 0, 0.35);
}

.gpu-badge.amd {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.gpu-badge.rig {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.35);
}

.gpu-badge.enterprise {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.35);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.market-gpu-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.market-gpu-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}

.market-specs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  margin-bottom: 1.15rem;
}

.spec-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spec-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.spec-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 3px;
}

.market-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.price-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.price-unit {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hourly-est {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.verified-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.verified-tag.emerald {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.verified-tag.purple {
  color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
}

.market-card-actions {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.65rem;
}

/* Curated Model Library Section */
.models-sec {
  padding: 5rem 0 4rem;
  position: relative;
}

.model-category-pills {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.category-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-main);
  transform: translateY(-1px);
}

.category-pill.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(99, 102, 241, 0.2));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  font-weight: 700;
}

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

.model-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.model-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 25px rgba(99, 102, 241, 0.15);
}

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

.model-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.model-badge.code {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.3);
}

.model-badge.reasoning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.3);
}

.model-badge.enterprise {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.3);
}

.model-badge.vision {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
}

.model-badge.fast {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.model-context {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.model-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.model-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.15rem;
  flex-grow: 1;
}

.model-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.4rem;
  margin-bottom: 1.25rem;
}

.m-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.m-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.m-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 3px;
}

.m-val.emerald {
  color: var(--accent-emerald);
}

.model-card-footer {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.65rem;
}

/* Calculator Section */
.calculator-sec {
  padding: 5rem 0 4rem;
  position: relative;
}

.calc-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.calc-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}

.calc-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.calc-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.calc-tab.active {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.calc-pane {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.slider-group {
  margin-bottom: 1.65rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.form-control {
  width: 100%;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--accent-cyan);
}

.calc-result-card {
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  text-align: center;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.08);
}

.calc-big-num {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.6rem 0;
}

.savings-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
}

/* Quickstart & Developer Experience (DX) */
.quickstart-sec {
  padding: 5rem 0 4rem;
  position: relative;
}

.dx-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.dx-tabs {
  display: flex;
  background: rgba(2, 6, 23, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0.85rem;
  gap: 0.4rem;
  overflow-x: auto;
}

.dx-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dx-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.dx-tab-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.3);
}

.code-window {
  padding: 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(2, 6, 23, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.code-file-title {
  margin-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-window pre {
  padding: 1.25rem 1.5rem;
  background: #020617;
  margin: 0;
  overflow-x: auto;
}

.code-window code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #38bdf8;
  white-space: pre;
}

/* ==============================================================================
   Comprehensive Mobile & Tablet Responsiveness Suite (All Pages & Breakpoints)
   ============================================================================== */

@media (max-width: 992px) {
  .hero-grid,
  .footer-grid,
  .calc-grid,
  .status-metrics-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .nav-top-row {
    padding: 0.65rem 1rem !important;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal layout jitter */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .container {
    padding: 0 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 1. Header Navigation Optimization on Mobile */
  .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: rgba(7, 9, 14, 0.95) !important;
    backdrop-filter: blur(18px) !important;
    width: 100% !important;
  }

  .nav-top-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.5rem 0.85rem !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
  }

  .brand-logo {
    font-size: 1.25rem !important;
  }

  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    margin-left: auto !important;
    flex-wrap: nowrap !important;
  }

  /* Hide non-critical buttons in mobile top bar */
  .nav-actions .nav-github-btn,
  .nav-actions button[onclick="openDepositModal()"] {
    display: none !important;
  }

  .nav-actions .btn,
  .nav-actions .lang-toggle {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.78rem !important;
    height: 32px !important;
    border-radius: 6px !important;
  }

  /* Sub Row Navigation - Smooth Horizontal Pill Scroll */
  .nav-sub-row {
    padding: 0.3rem 0 !important;
    background: rgba(2, 6, 23, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .nav-sub-container {
    padding: 0.15rem 0.75rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    display: flex !important;
    width: 100% !important;
  }

  .nav-sub-container::-webkit-scrollbar {
    display: none !important;
  }

  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.45rem !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .nav-links li {
    flex-shrink: 0 !important;
  }

  .nav-links a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    white-space: nowrap !important;
    min-height: 30px !important;
  }

  .nav-links a.active,
  .nav-links a:hover {
    background: rgba(0, 240, 255, 0.15) !important;
    border-color: rgba(0, 240, 255, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2) !important;
  }

  /* 2. Responsive Hero & Typography */
  h1, .hero-title {
    font-size: clamp(1.8rem, 6.5vw, 2.75rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.01em !important;
  }

  h2, .section-header h2 {
    font-size: clamp(1.4rem, 5vw, 2.1rem) !important;
    line-height: 1.25 !important;
  }

  .hero-sub, .section-header p {
    font-size: clamp(0.9rem, 3.5vw, 1.05rem) !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
  }

  .hero-section {
    padding: 2.5rem 0 2rem 0 !important;
    text-align: center !important;
  }

  .hero-cta-group,
  .hero-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.65rem !important;
    margin: 1.5rem auto !important;
  }

  .hero-cta-group .btn,
  .hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
  }

  .hero-ticker-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .ticker-card {
    padding: 0.85rem !important;
  }

  .ticker-val {
    font-size: 1.25rem !important;
  }

  /* 3. Grids & Card Layouts */
  .models-grid,
  .features-grid,
  .market-grid,
  .apps-grid,
  .downloads-grid,
  .servers-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .model-card,
  .feature-card,
  .app-card,
  .download-card,
  .server-card {
    padding: 1.25rem !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .model-card-footer {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .model-card-footer .btn {
    width: 100% !important;
  }

  /* 4. Playground Mobile Optimization */
  .playground-studio {
    padding: 1rem !important;
    border-radius: 14px !important;
    margin: 1.5rem 0 !important;
  }

  .pg-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .pg-toolbar-left,
  .pg-toolbar-right {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }

  .pg-quick-prompts {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 0.5rem !important;
    gap: 0.45rem !important;
  }

  .pg-quick-prompts::-webkit-scrollbar {
    display: none !important;
  }

  .qp-chip {
    flex-shrink: 0 !important;
    font-size: 0.78rem !important;
    padding: 0.4rem 0.75rem !important;
  }

  .pg-auth-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    gap: 0.85rem !important;
    padding: 1rem !important;
  }

  .pg-auth-banner-content {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .pg-auth-banner-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 5. Fleet Cockpit Mobile Optimization */
  .fleet-hero {
    padding: 2rem 0.5rem 1.5rem 0.5rem !important;
  }

  .fleet-auth-card {
    padding: 1.5rem 1.15rem !important;
    border-radius: 16px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .fleet-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
    padding: 3px !important;
  }

  .fleet-tab-btn {
    padding: 0.5rem 0.2rem !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  .fleet-stat-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .fleet-nav-tabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 0.45rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .fleet-nav-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .fleet-nav-tab {
    flex-shrink: 0 !important;
    font-size: 0.8rem !important;
    padding: 0.5rem 0.85rem !important;
    white-space: nowrap !important;
  }

  /* 6. Tables & Downloads */
  .table-responsive,
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  th, td {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
  }

  /* 7. Modal Dialogs */
  .modal-card,
  .deposit-card {
    width: 95% !important;
    max-width: 480px !important;
    padding: 1.5rem 1rem !important;
    border-radius: 16px !important;
    margin: 1rem auto !important;
  }
}

@media (max-width: 440px) {
  .brand-badge {
    display: none !important;
  }

  .brand-logo {
    font-size: 1.15rem !important;
  }

  .nav-top-row {
    padding: 0.4rem 0.65rem !important;
  }

  .lang-toggle {
    font-size: 0.75rem !important;
    padding: 0.3rem 0.55rem !important;
  }

  .fleet-login-btn {
    font-size: 0.75rem !important;
    padding: 0.3rem 0.55rem !important;
  }

  .hero-ticker-grid {
    grid-template-columns: 1fr !important;
  }

  .fleet-tabs {
    grid-template-columns: 1fr !important;
  }
}

