/* ==============================================================================
   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, 9, 14, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
}

.nav-top-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0.65rem 1.5rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.nav-sub-row {
  background: rgba(2, 6, 23, 0.65);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-sub-container {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.5rem;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.brand-badge {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--border-bright);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  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.25rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

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

/* Language Toggle Button */
.lang-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.lang-toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* 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;
}

/* Downloads Section */
section.downloads-sec {
  padding: 5rem 0;
}

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

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.download-card.highlight {
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-glow-emerald);
}

.dl-platform-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.download-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.dl-code-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

/* 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 {
  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 {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

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

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

.form-group 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;
}

.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: 4rem 1.5rem;
  position: relative;
}

.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: 1000px;
  margin: 0 auto;
}

/* 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;
  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: 480px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
}

.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: 88%;
  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: 0.9rem 1.2rem;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.55;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.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;
}

.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.25rem;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.pg-quick-prompts::-webkit-scrollbar {
  height: 4px;
}

.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.3rem 0.8rem;
  font-size: 0.76rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.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-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;
}

/* Conversion Modal Grid */
.conv-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.conv-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.conv-card.highlight {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.15);
}

.conv-card.emerald {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
}

.conv-card-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.conv-card-badge.emerald {
  background: var(--accent-emerald);
}

.conv-cli-box {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #38bdf8;
  overflow: hidden;
}

.conv-cli-box code {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-code {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.3rem;
  color: var(--text-muted);
}

.btn-copy-code:hover {
  color: var(--text-main);
}

/* Responsive */
@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: 1280px) {
  .nav-links {
    display: none;
  }
}

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

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

  header.site-header {
    padding: 0.65rem 0;
  }

  .nav-wrap {
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
    justify-content: center;
    min-width: 0;
    gap: 0.55rem;
    font-size: 1.18rem;
  }

  .brand-badge {
    max-width: min(48vw, 11rem);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.62rem;
    padding: 0.18rem 0.5rem;
  }

  .nav-links { display: none; }

  .nav-actions {
    width: 100%;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
  }

  .lang-toggle,
  .nav-actions .btn {
    min-width: 0;
    padding: 0.48rem 0.62rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
  }

  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; }
}
