:root {
  --bg: #0d0d14;
  --surface: #141520;
  --surface-2: #1c1d2b;
  --border: #2c2b3d;
  --text: #d6dae3;
  --text-muted: #7a7f90;
  --text-dim: #50536a;
  --accent: #a78bfa;
  --accent-dim: #5b3f9e;
  --accent-glow: rgba(167, 139, 250, 0.08);
  --jet: #6ee7b7;
  --jet-dim: #2d6a56;
  --jet-glow: rgba(110, 231, 183, 0.06);
  --warm: #f0b866;
  --warm-dim: #6b5230;
  --warm-glow: rgba(240, 184, 102, 0.06);
  --blue: #60a5fa;
  --orange: #fbbf24;
  --red: #f87171;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  font-size: 15px;
}

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

/* ─── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem 1rem;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.04) 0%, transparent 100%);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.jet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--jet-dim), #1a4a3a);
  border: 2px solid var(--jet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--jet);
  box-shadow: 0 0 20px rgba(110, 231, 183, 0.12);
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.jet-status-line {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border-radius: 8px;
  border-left: 3px solid var(--warm-dim);
  line-height: 1.5;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.live-badge.online {
  background: rgba(110,231,183,0.12);
  color: var(--jet);
}

.live-badge.offline {
  background: rgba(107,114,128,0.12);
  color: var(--text-muted);
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

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

/* ─── Tabs (mobile) ─────────────────────────────────────────────────────────── */

.tabs {
  display: none;
  border-bottom: 1px solid var(--border);
}

.tabs button {
  flex: 1;
  padding: 0.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Panels ────────────────────────────────────────────────────────────────── */

.panels {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 0;
  min-height: calc(100vh - 120px);
}

.panel {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.panel:last-child { border-right: none; }

.panel h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.intro-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.muted { color: var(--text-muted); font-size: 0.9rem; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ─── Jet's World (left panel) ──────────────────────────────────────────────── */

.narrative-block {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text);
}

.narrative-block .label {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

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

.narrative-block .accent { color: var(--jet); }
.narrative-block .warn { color: var(--orange); }

.hw-block {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hw-chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.hw-chip.good { border-color: rgba(110,231,183,0.3); color: var(--jet); }
.hw-chip.warm { border-color: rgba(251,191,36,0.3); color: var(--orange); }
.hw-chip.hot { border-color: rgba(248,113,113,0.3); color: var(--red); }

.countdown-text {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.window-list {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.about-block {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-block p { margin-bottom: 0.75rem; }

/* ─── Ask Jet (center panel) ────────────────────────────────────────────────── */

.question-form {
  margin-bottom: 1.5rem;
}

.question-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 72px;
  transition: border-color 0.15s;
}

.question-form textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.question-form textarea::placeholder { color: var(--text-dim); }

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.char-count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.btn {
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-accent {
  background: var(--accent-dim);
  color: var(--accent);
}
.btn-accent:hover { background: #357a60; }
.btn-accent:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-subtle {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-subtle:hover { border-color: var(--accent-dim); color: var(--text); }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }

/* ─── Q&A Items ─────────────────────────────────────────────────────────────── */

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.qa-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}

.qa-top {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.qa-content {
  flex: 1;
  min-width: 0;
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.4rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 40px;
  color: var(--text-muted);
  font-family: var(--mono);
}

.vote-btn:hover {
  border-color: var(--warm-dim);
  color: var(--warm);
}

.vote-btn.voted {
  background: var(--warm-glow);
  border-color: var(--warm-dim);
  color: var(--warm);
}

.vote-arrow {
  font-size: 0.9rem;
  line-height: 1;
}

.vote-count {
  font-size: 0.75rem;
  font-weight: 600;
}

.vote-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.5rem;
  min-width: 40px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.qa-item .question {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.qa-item .answer {
  font-size: 0.88rem;
  color: var(--text);
  border-left: 3px solid var(--jet-dim);
  padding-left: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.7;
}

.qa-item .answer code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
}

.qa-item .answer.pending {
  border-left-color: var(--border);
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

.qa-item .meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
}

.empty-personality {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  font-style: italic;
}

/* ─── Explore (right panel) ─────────────────────────────────────────────────── */

.article-card {
  display: block;
  padding: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}

.article-card:hover {
  border-color: var(--accent-dim);
  text-decoration: none;
  box-shadow: 0 0 14px var(--accent-glow);
}

.article-card .title {
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.article-card .meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.topic-tag {
  padding: 0.2rem 0.5rem;
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  opacity: 0.85;
}

/* ─── Suggest ───────────────────────────────────────────────────────────────── */

.suggest-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggest-form input {
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
}

.suggest-form input:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.suggest-form input::placeholder { color: var(--text-dim); }

/* ─── Toast ─────────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .tabs { display: flex; }
  .panels { grid-template-columns: 1fr; }
  .panel { border-right: none; display: none; }
  .panel.active { display: block; }
  .hero { padding: 1rem 1.25rem 0.75rem; }
  .hero-sub { display: none; }
  .jet-status-line { font-size: 0.78rem; }
}
