/* ─── Fonts ──────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&family=Inter:wght@400;500;600&family=Poppins:wght@600&display=swap');

/* ─── Design Tokens (Dark) ───────────────────────────────────── */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --border: #2e3346;
  --text: #e1e4ed;
  --text-muted: #8b90a0;
  --accent: #126ed3;
  --accent-dim: #126ed322;
  --green: #4ade80;
  --green-dim: #4ade8018;
  --orange: #fb923c;
  --orange-dim: #fb923c18;
  --red: #f87171;
  --pink: #e879a0;
  --cyan: #67e8f9;
  --cyan-dim: #67e8f918;
  --pill-bg: #272b3a;
  --pill-border: #363c52;
}

/* ─── Light Theme ────────────────────────────────────────────── */
[data-theme="light"] {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface2: #f0f2f5;
  --border: #dde1ea;
  --text: #1e2133;
  --text-muted: #626d8a;
  --accent: #126ed3;
  --accent-dim: #126ed320;
  --green: #07a35a;
  --green-dim: #07a35a18;
  --orange: #ed7d20;
  --orange-dim: #ed7d2018;
  --red: #e1434c;
  --pink: #c24789;
  --cyan: #0eb5cc;
  --cyan-dim: #0eb5cc18;
  --pill-bg: #eaecf5;
  --pill-border: #cdd1df;
}

/* Light-mode overrides for selection/hover states */
[data-theme="light"] .tree-row:hover   { background: #d6e8f7; }
[data-theme="light"] .tree-row.selected { background: #bcd9f2; }
[data-theme="light"] .col-row:hover    { background: #d6e8f7; }
[data-theme="light"] .col-row.selected  { background: #bcd9f2; }
[data-theme="light"] .tree-children::before,
[data-theme="light"] .tree-children > .tree-node > .tree-row::before { background: #e4e8f0; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── Logo ───────────────────────────────────────────────────── */
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.logo img {
  height: 28px;
  display: block;
}
.logo .logo-light { display: none; }
.logo .logo-dark  { display: block; }
[data-theme="light"] .logo .logo-light { display: block; }
[data-theme="light"] .logo .logo-dark  { display: none; }
.logo:hover { text-decoration: none; opacity: 0.85; }

/* ─── Version Badge ──────────────────────────────────────────── */
.beta-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  letter-spacing: 0.3px;
}

.version {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  border: 1px solid var(--border);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2.4px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { border-color: var(--accent); background: var(--accent-dim); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { opacity: 0.88; background: var(--accent); border-color: var(--accent); text-decoration: none; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--text);
}
[data-theme="light"] .btn-outline { color: #290042; }
.btn-outline:hover { background: var(--accent-dim); text-decoration: none; }
.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 6px;
  letter-spacing: 0;
}

/* ─── Pills ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'SF Mono', 'Fira Code', monospace;
  white-space: nowrap;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  user-select: none;
  cursor: pointer;
}
.pill-root {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: default;
}
.pill-group { color: var(--text); }
.pill-leaf  { color: var(--text-muted); }
.pill.selected { background: var(--accent-dim); border-color: var(--accent); border-width: 2px; }
.pill.path-highlight { border-color: var(--accent); }
.pill-root.path-highlight { background: var(--accent); }

/* ─── Type Badges ────────────────────────────────────────────── */
.pill-type {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pill-type.cmd { background: var(--green-dim); color: var(--green); }
.pill-type.group { background: var(--orange-dim); color: var(--orange); }
.pill-type.string { background: var(--cyan-dim); color: var(--cyan); }
.pill-type.boolean { background: var(--green-dim); color: var(--green); }
.pill-type.number { background: var(--orange-dim); color: var(--orange); }
.pill-type.arg { background: #a78bfa22; color: #a78bfa; }

/* ─── Nav ────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 57px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.nav-link.active { color: var(--accent); }
.nav-feedback {
  background: var(--accent);
  color: #fff !important;
  border-radius: 999px;
  padding: 5px 14px;
}
.nav-feedback:hover {
  opacity: 0.88;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Code blocks ────────────────────────────────────────────── */
pre, code {
  font-family: 'SF Mono', 'Fira Code', monospace;
}
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  overflow-x: auto;
  line-height: 1.6;
}
code {
  font-size: 13px;
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
}
pre code {
  background: transparent;
  border: none;
  padding: 0;
}

/* ─── Copy button ────────────────────────────────────────────── */
.code-block { position: relative; }
.code-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { border-color: var(--green); color: var(--green); }

/* ─── Tables ─────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* ─── index.html ─────────────────────────────────────────────── */

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 80px 24px 64px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 72px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--accent); }
.hero h1 .beta-badge { font-size: 14px; vertical-align: middle; }
.hero .tagline {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.5;
}
[data-theme="light"] .hero .tagline {
  color: #290042;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* ─── Terminal typewriter ───────────────────────────────────── */
.terminal-intent {
  text-align: center;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.intent-human {
  font-size: 18px;
  font-weight: 500;
  min-height: 1.4em;
}
.intent-agent {
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-muted);
  min-height: 1.4em;
}
.intent-prefix { color: var(--text-muted); }
#terminal-intent-text { color: var(--text); }
#terminal-agent-text { color: var(--accent); }
.intent-cursor, .intent-cursor-agent {
  animation: blink 0.8s step-end infinite;
  margin-left: 1px;
}
.intent-cursor { color: var(--accent); }
.intent-cursor-agent { color: var(--text-muted); }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
.terminal {
  background: #0c0c0c;
  border-radius: 10px;
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: left;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  border: 1px solid #2a2a2a;
}
.terminal-bar {
  background: #1a1a1a;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #2a2a2a;
}
.terminal-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.terminal-dot:nth-child(1) { background: #f87171; }
.terminal-dot:nth-child(2) { background: #fb923c; }
.terminal-dot:nth-child(3) { background: #4ade80; }
.terminal-title {
  margin-left: auto;
  font-size: 11px;
  color: #555;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.terminal-body {
  padding: 18px 20px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: #d4d4d4;
  height: 300px;
  overflow: hidden;
  transition: opacity 0.4s;
}

/* ─── Sections ──────────────────────────────────────────────── */
.section {
  padding: 64px 24px;
  max-width: 960px;
  margin: 0 auto;
}
.section-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
}

/* ─── OS Tabs ───────────────────────────────────────────────── */
.hero-install {
  width: 100%;
  max-width: 900px;
  margin: 64px auto 64px;
}
.hero-install pre {
  padding: 14px 16px;
}
.hero-install-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.hero-install .tab-group {
  border: none;
  background: none;
  gap: 0;
  margin-bottom: 0;
}
.hero-install-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-install-label {
  font-size: 12px;
  color: var(--text-muted);
}
.hero-install .tab-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.hero-install .tab-btn.active { background: none; color: var(--text); font-weight: 600; }
.hero-install .tab-btn:hover { background: none; color: var(--text); }
.hero-install .tab-btn:not(:last-child) { border-right: none; }
.hero-install .tab-btn:not(:last-child)::after {
  content: ' | ';
  color: var(--border);
  padding: 0 4px;
}
.hero-install-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.hero-install-link:hover { color: var(--accent); }
.tab-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 16px;
}
.tab-btn {
  padding: 7px 18px;
  background: var(--surface2);
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.tab-btn:not(:last-child) { border-right: 1px solid var(--border); }
.tab-btn.active { background: var(--accent); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Quickstart steps ──────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steps-arrow { display: none; }
.step {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.step h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.step-code-wrap {
  position: relative;
}
.step code {
  display: block;
  font-size: 13px;
  padding: 8px 40px 8px 10px;
}
.step-copy-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 2px 8px;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.step-copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.step p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}
.steps-arrow {
  font-size: 20px;
  color: var(--border);
  align-self: center;
  flex-shrink: 0;
}

/* ─── I want to pills ──────────────────────────────────────── */
.jtbd-layout {
  display: flex;
  gap: 24px;
  margin-top: 36px;
  align-items: flex-start;
}
.jtbd-pills {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  width: 320px;
}
.jtbd-pill {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: var(--surface2);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1.3;
}
.jtbd-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.jtbd-pill.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
[data-theme="light"] .jtbd-pill { background: #eef1f8; border-color: transparent; color: #1e2366; }
[data-theme="light"] .jtbd-pill:hover { border-color: var(--accent); color: var(--accent); background: #dde8f8; }
[data-theme="light"] .jtbd-pill.active { border-color: var(--accent); background: #dde8f8; color: var(--accent); }
.jtbd-recipe {
  flex: 1;
  display: none;
}
.jtbd-recipe.visible { display: block; }
.jtbd-docs-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted, #888);
  text-decoration: none;
}
.jtbd-docs-link:hover { color: var(--accent); text-decoration: underline; }

/* ─── Feature cards ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .steps-arrow { display: none; }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.15s;
}
.feature-card:hover { border-color: var(--accent); }
.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── commands.html ──────────────────────────────────────────── */

html:has(body.commands-page),
body.commands-page { height: 100%; overflow: hidden; }

/* ─── Layout ────────────────────────────────────────────────── */
.app {
  display: flex;
  height: calc(100vh - 57px);
  overflow: hidden;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: 352px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-search {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

/* ─── View toggle ──────────────────────────────────────────── */
.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}
.view-toggle-btn {
  padding: 5px 9px;
  background: var(--surface2);
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.view-toggle-btn:not(:last-child) { border-right: 1px solid var(--border); }
.view-toggle-btn.active { background: var(--accent); color: #fff; }

/* ─── Sidebar col-mode ──────────────────────────────────────── */
.sidebar.col-mode {
  width: 352px;
}

/* ─── Column view ──────────────────────────────────────────── */
.tree-columns {
  position: relative;
  overflow-x: auto;
  padding: 0 0 8px;
}
.tree-columns::-webkit-scrollbar { height: 5px; }
.tree-columns::-webkit-scrollbar-track { background: transparent; }
.tree-columns::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.col-svg {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
}
.col-grid {
  position: relative;
  z-index: 1;
}
.col-cell {
  padding: 3px 8px;
  display: flex;
  align-items: center;
  min-height: 32px;
}
.col-cell-empty {
  padding: 0;
  min-height: 0;
}
.col-row {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: default;
  transition: background 0.1s;
}
.col-row:hover { background: var(--surface2); }
.col-row.selected { background: var(--accent-dim); }

.sidebar-tree {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}

/* ─── Tree nodes ─────────────────────────────────────────────── */
.tree-node { margin-bottom: 1px; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
  position: relative;
}
.tree-row:hover { background: var(--surface2); }
.tree-row.selected { background: var(--accent-dim); }

.tree-children {
  padding-left: 20px;
  position: relative;
}
.tree-children.collapsed { display: none; }

.tree-toggle {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 12px;
  transition: transform 0.15s;
}
.tree-toggle.open { transform: rotate(0deg); }

.tree-label {
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-label.group { color: var(--text); }
.tree-label.leaf { color: var(--text-muted); }
.tree-label.root { color: var(--accent); font-weight: 700; }

.tree-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.tree-badge.group { background: var(--orange-dim); color: var(--orange); }
.tree-badge.cmd { background: var(--green-dim); color: var(--green); }

/* ─── Main panel ─────────────────────────────────────────────── */
.main-panel {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--bg);
}

/* ─── Detail ─────────────────────────────────────────────────── */
.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.detail-title {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.detail-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.detail-badge.group { background: var(--orange-dim); color: var(--orange); }
.detail-badge.cmd { background: var(--green-dim); color: var(--green); }

.detail-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.detail-section {
  margin-bottom: 28px;
}
.detail-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Options table */
.opts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.opts-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.opts-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.opts-table tr:last-child td { border-bottom: none; }
.opts-table tr:hover td { background: var(--surface2); }
.opt-flag {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: #38bdf8;
  font-size: 12px;
  white-space: nowrap;
}
.opt-default {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text-muted);
}
.opt-req-yes { color: var(--orange); font-weight: 600; font-size: 12px; }
.opt-req-no { color: var(--text-muted); font-size: 12px; }
.opt-allowed { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.opt-allowed-val {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Type badge colors */
.type-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.type-badge.string { background: var(--cyan-dim); color: var(--cyan); }
.type-badge.boolean { background: var(--green-dim); color: var(--green); }
.type-badge.number { background: var(--orange-dim); color: var(--orange); }

/* Arguments table */
.args-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.args-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.args-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.args-table tr:last-child td { border-bottom: none; }
.args-table tr:hover td { background: var(--surface2); }
.arg-name {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--cyan);
  font-size: 12px;
}

/* Examples */
.example-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.example-desc {
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 14px 6px;
}
.example-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 8px 14px;
}
.example-code {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: none;
  overflow-x: auto;
  white-space: nowrap;
}

/* Subcommands */
.subcmd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.subcmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}
.subcmd-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}
.subcmd-name {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.subcmd-desc {
  font-size: 13px;
  color: var(--text-muted);
}
.subcmd-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 14px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* ─── Responsive ─────────────────────────────────────────────── */
/* ─── Feedback FAB ──────────────────────────────────────────── */
.feedback-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.feedback-fab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: 0 4px 20px rgba(18,110,211,0.4);
}
.feedback-fab-btn:hover {
  opacity: 0.9;
  box-shadow: 0 6px 24px rgba(18,110,211,0.5);
}
.feedback-fab-popover {
  display: none;
  position: relative;
  width: 260px;
  padding: 20px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  text-align: center;
}
.feedback-fab.open .feedback-fab-popover {
  display: block;
  animation: fab-slide-up 0.2s ease-out;
}
.feedback-fab.open .feedback-fab-btn {
  background: var(--surface2);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
@keyframes fab-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feedback-fab-x {
  position: absolute;
  top: 6px;
  right: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feedback-fab-x:hover {
  color: var(--text);
}
.feedback-fab-x svg {
  width: 14px;
  height: 14px;
}
.feedback-fab-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.feedback-fab-popover .btn {
  width: 100%;
  padding: 10px 22px;
  font-size: 14px;
}
@media (max-width: 768px) {
  .app { flex-direction: column; height: auto; overflow: auto; }
  .sidebar { width: 100%; flex-shrink: 0; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-tree { max-height: 40vh; overflow-y: auto; }
  .main-panel { overflow-y: visible; }
  html:has(body.commands-page),
  body.commands-page { height: auto; overflow: auto; }
}

/* ─── Signup CTA ─────────────────────────────────────────────── */
.cta-section { padding: 0 32px 64px; max-width: 1060px; margin: 0 auto; }

.cta-card {
  border: 3px solid #3d4f8a;
  border-radius: 16px;
  background: var(--surface);
  padding: 36px 56px;
  text-align: center;
}

[data-theme="light"] .cta-card { border-color: #2a3268; border-width: 3px; }

.cta-title {
  font-size: 46px;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.cta-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.cta-g2-logo {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}

.cta-stars {
  color: #f5a623;
  font-size: 17px;
  letter-spacing: 1px;
  line-height: 1;
}

.cta-stars .cta-star-dim { opacity: 0.35; }

.cta-rating-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-g2-logo { filter: brightness(0) invert(1); }
[data-theme="light"] .cta-g2-logo { filter: none; }

@media (max-width: 600px) {
  .cta-card { padding: 40px 24px; }
  .cta-title { font-size: 22px; }
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn { width: 100%; max-width: 260px; }
}
