:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --orange: #db6d28;
  --red: #f85149;
  --purple: #bc8cff;
  --teal: #39d353;
  --cyan: #79c0ff;
  --blue: #58a6ff;
}

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

body {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Hero ── */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 40px;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero h1 span { color: var(--accent); }

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
}

.install-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.install-box:hover { border-color: var(--accent); }

.install-box .prompt { color: var(--green); }
.install-box .cmd { color: var(--text); }
.install-box .copy-hint {
  color: var(--text-dim);
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.install-box:hover .copy-hint { opacity: 1; }

.install-alt {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 48px;
}

.install-alt a {
  color: var(--accent);
  text-decoration: none;
}

.install-alt a:hover { text-decoration: underline; }

/* ── Terminal Demo ── */
.demo-section {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.terminal {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1c2128;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.terminal-dot.r { background: #f85149; }
.terminal-dot.y { background: #d29922; }
.terminal-dot.g { background: #3fb950; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.terminal-body {
  display: flex;
  height: 520px;
  font-size: 13px;
  line-height: 1.45;
}

.panels-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 0;
  min-width: 0;
}

.panel {
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s;
}

.panel:hover { border-color: color-mix(in srgb, var(--panel-color) 60%, transparent); }
.panel.active { border-color: var(--panel-color); }

.panel-header {
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--panel-color);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  white-space: nowrap;
}

.panel-header .count {
  color: var(--text-dim);
  font-weight: 400;
}

.panel-body {
  flex: 1;
  overflow: hidden;
  padding: 2px 0;
}

.section-label {
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.ticket-row {
  padding: 1px 10px;
  display: flex;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.8rem;
}

.ticket-row:hover { background: rgba(255,255,255,0.04); }
.ticket-row.selected { background: rgba(88,166,255,0.12); }

.ticket-priority { width: 14px; text-align: center; flex-shrink: 0; }
.ticket-key { color: var(--accent); flex-shrink: 0; width: 76px; }
.ticket-summary { color: var(--text); overflow: hidden; text-overflow: ellipsis; }

/* Detail pane */
.detail-pane {
  width: 50%;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-header {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.85rem;
}

.detail-body {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
  font-size: 0.8rem;
}

.detail-body::-webkit-scrollbar { width: 4px; }
.detail-body::-webkit-scrollbar-track { background: transparent; }
.detail-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.detail-field {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.detail-label {
  color: var(--text-dim);
  min-width: 80px;
  flex-shrink: 0;
}

.detail-value { color: var(--text); }

.detail-desc {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text);
  line-height: 1.6;
}

.detail-desc h3 {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.detail-desc p { margin-bottom: 8px; }
.detail-desc code {
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.78rem;
}
.detail-desc .code-block {
  background: #1c2128;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.78rem;
  overflow-x: auto;
}

.status-bar {
  padding: 4px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  background: #1c2128;
}

.status-bar .keys span {
  margin-left: 12px;
}

.status-bar .keys kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 0.68rem;
}

/* ── Features ── */
.features {
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.features h2 {
  font-size: 1.5rem;
  margin-bottom: 32px;
  text-align: center;
  color: var(--text);
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.feature-card h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.feature-icon {
  font-size: 1.3rem;
  margin-bottom: 8px;
  display: block;
}

/* ── Keys ── */
.keys-section {
  max-width: 700px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.keys-section h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  text-align: center;
}

.keys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.keys-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}

.keys-table td:first-child {
  width: 140px;
  color: var(--accent);
}

.keys-table td:last-child {
  color: var(--text-dim);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .terminal-body {
    flex-direction: column;
    height: auto;
  }
  .panels-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .panel { min-height: 120px; }
  .detail-pane {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    min-height: 300px;
  }
}
