:root {
  --bg: #0c1017;
  --bg-card: #151b26;
  --bg-code: #090d13;
  --border: #263040;
  --border-focus: #38bdf8;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --green: #34d399;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* Nav Bar */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 16, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--accent);
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

/* Container */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header & Meta */
header.hero {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 30px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge.green {
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.25);
}

h1.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-bright);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

p.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 14px;
  color: var(--text-muted);
}

/* CLI Import Callout */
.cli-box {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  border-radius: 12px;
  padding: 24px;
  margin: 36px 0;
}

.cli-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cli-box-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cli-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.cli-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.cli-tab-btn.active {
  color: var(--text-bright);
  background: var(--border);
}

.code-wrapper {
  position: relative;
  margin: 12px 0;
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
  color: #f1f5f9;
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(38, 48, 64, 0.8);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--text-bright);
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent);
}

/* Typography & Content */
h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-top: 48px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f8fafc;
  margin-top: 32px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 18px;
}

ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(56, 189, 248, 0.05);
  padding: 14px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  color: #cbd5e1;
}

blockquote.warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

/* Visual Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

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

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.gallery-caption {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.gallery-caption b {
  color: var(--text-bright);
  display: block;
  margin-bottom: 4px;
}

/* Charts & Diagrams */
.diagram-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin: 32px 0;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
}

.chart-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 5px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14.5px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-bright);
  font-weight: 600;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 64px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* Shared model stories and the Fable and Astra render galleries. */
.render { margin: 28px 0; }
.render img, .render video, .astra-story video { display: block; width: 100%; height: auto; border-radius: 12px; background: #090d13; }
.render figcaption, .media-note { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.render video, .astra-story video { aspect-ratio: 16 / 9; }
.model-stories .gallery-card img { aspect-ratio: 3 / 2; object-fit: cover; }
.model-stories h2 { margin-top: 0; }
.nav-links { flex-wrap: wrap; }
@media (max-width: 540px) { .nav-bar { padding: 12px 16px; gap: 16px; } .nav-links { gap: 10px; } }

/* Shared locale control remains available on every Batatais page. */
.language-picker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.language-picker select { color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 7px; font: inherit; cursor: pointer; }
.language-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-bar { flex-wrap: wrap; gap: 12px 20px; }
.cli-box h3 { margin-top: 24px; }
.cli-box .code-wrapper pre { padding-top: 42px; }
@media (max-width: 540px) { .language-picker { margin-left: auto; } }
