/* ── Bid'i Kunuku — Website Styles ──────────────────────────────── */

:root {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --text: #e0ddd5;
  --muted: #8c8878;
  --accent: #d4a33a;
  --accent-dim: #8b6918;
  --border: #2a2820;
  --radius: 8px;
  --max-w: 960px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

body { display: flex; flex-direction: column; }

/* ── Nav ────────────────────────────────────────────────────────── */

.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 1.5rem; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

/* ── Main ────────────────────────────────────────────────────────── */

main { flex: 1; }

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

.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  background: linear-gradient(180deg, #1a1810 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-stats { padding: 2.5rem 1rem; }

.hero-stats h1 { font-size: 2.2rem; }

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #1a1810; }

.btn-primary:hover { background: #e0b045; }

.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.btn-secondary:hover { background: #242424; }

/* ── Sections ────────────────────────────────────────────────────── */

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-dim);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.section-body p { margin-bottom: 0.85rem; color: var(--text); }

.section-body a { color: var(--accent); text-decoration: underline; }

/* ── Steps Grid ──────────────────────────────────────────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.step-num {
  display: inline-block;
  width: 28px; height: 28px;
  background: var(--accent-dim);
  color: var(--text);
  border-radius: 50%;
  text-align: center;
  line-height: 28px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.step-card h3 { font-size: 1rem; margin-bottom: 0.4rem; color: var(--accent); }

.step-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

/* ── Stats Grid ──────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* ── Event Feed ──────────────────────────────────────────────────── */

.event-feed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.event-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.event-item:last-child { border-bottom: none; }

.event-time {
  color: var(--accent-dim);
  font-family: monospace;
  white-space: nowrap;
  min-width: 6ch;
}

.event-text { color: var(--muted); }

.empty-state { color: var(--muted); text-align: center; padding: 2rem 0; }

/* ── Error Page ──────────────────────────────────────────────────── */

.error-page {
  text-align: center;
  padding: 5rem 1rem;
}

.error-page h1 { font-size: 1.8rem; color: var(--accent); margin-bottom: 0.75rem; }

.error-page p { color: var(--muted); margin-bottom: 1.5rem; }

.error-page a { color: var(--accent); }

/* ── Footer ──────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Guide Layout ─────────────────────────────────── */

.guide-layout {
  display: flex;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: calc(100vh - 120px);
}

.guide-sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--bg);
}

.guide-content {
  flex: 1;
  min-width: 0;
  padding: 2rem;
}

/* Sidebar nav */

.guide-nav-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-nav-tree li {
  margin: 0;
}

.guide-nav-tree a {
  display: block;
  padding: 0.35rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.guide-nav-tree a:hover {
  color: var(--text);
  background: var(--surface);
}

.guide-nav-tree a.active {
  color: var(--accent);
  background: rgba(212, 163, 58, 0.1);
  font-weight: 600;
}

.guide-nav-section > summary {
  padding: 0.35rem 0.75rem;
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  list-style: none;
}

.guide-nav-section > summary::-webkit-details-marker {
  display: none;
}

.guide-nav-section > ul {
  padding-left: 0.75rem;
}

.guide-nav-section {
  margin-bottom: 0.25rem;
}

/* Breadcrumbs */

.guide-breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.guide-breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.guide-breadcrumbs a:hover {
  color: var(--accent);
}

.guide-breadcrumbs .sep {
  color: var(--border);
}

/* Locale switcher */

.guide-locale-switcher {
  display: flex;
  gap: 0.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.guide-locale-switcher a {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
}

.guide-locale-switcher a.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(212, 163, 58, 0.1);
}

/* Guide hero */

.guide-hero {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.guide-hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.guide-hero-tagline {
  color: var(--muted);
  line-height: 1.6;
}

.guide-live-indicator {
  font-size: 0.85rem;
  color: var(--accent-dim);
  font-style: italic;
}

/* Guide cards */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.guide-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.guide-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.guide-card-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.guide-card-link:hover {
  text-decoration: underline;
}

/* Guide sections */

.guide-section {
  margin-bottom: 2rem;
}

.guide-section h2 {
  color: var(--text);
  font-size: 1.5rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.guide-section h3 {
  color: var(--text);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

/* Todo placeholder */

.todo-value {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px dashed #8b6918;
  background: rgba(139, 105, 24, 0.1);
  color: #8b6918;
  font-size: 0.8rem;
  border-radius: 3px;
  font-style: italic;
}

/* Inventory source badge */

.inventory-source {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inventory-source.inferred {
  background: rgba(139, 105, 24, 0.15);
  color: #8b6918;
}

.inventory-source.authored {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.inventory-source.live {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

/* Hamburger toggle (mobile) */

.guide-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
}

/* Guide table styles */

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.guide-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}

.guide-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
}

.guide-table tr:hover td {
  background: var(--surface);
}

/* Responsive */

@media (max-width: 768px) {
  .guide-layout {
    flex-direction: column;
  }

  .guide-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  .guide-sidebar.collapsed .guide-nav-tree {
    display: none;
  }

  .guide-sidebar.collapsed .guide-locale-switcher {
    display: none;
  }

  .guide-hamburger {
    display: block;
    margin-bottom: 0.5rem;
  }

  .guide-content {
    padding: 1rem;
  }

  .guide-hero h1 {
    font-size: 1.5rem;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
}
