/* Enterprise Multi-Archetype Autonomous Stylesheet v3.0 */
:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #38bdf8;
  --bg: #090d16;
  --bg-elevated: #111827;
  --bg-card: #131c2e;
  --bg-muted: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--font-mono); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; color: var(--text);
  text-decoration: none !important;
}
.brand-badge {
  font-family: var(--font-mono); font-size: 0.7rem; padding: 2px 7px;
  border-radius: 4px; background: color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.pill-online {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--success);
  background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px; border-radius: 999px;
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 14px; border-radius: 7px; font-size: 0.84rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  transition: all 0.15s; text-decoration: none !important;
}
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

/* Stats Strip */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0;
}
.stat-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-box-label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.stat-box-val { font-family: var(--font-mono); font-size: 1.45rem; font-weight: 700; margin-top: 4px; color: var(--text); }
.stat-box-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* Panels & Tables */
.panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 20px; overflow: hidden;
}
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--bg-muted) 45%, transparent);
}
.panel-title { font-size: 0.92rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 18px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th, .data-table td {
  padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border);
}
.data-table th {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-muted) 30%, transparent);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: color-mix(in srgb, var(--primary) 5%, transparent); }

.tag {
  font-family: var(--font-mono); font-size: 0.72rem; padding: 2px 7px; border-radius: 4px;
  background: rgba(16, 185, 129, 0.12); color: var(--success); font-weight: 600;
}
.search-input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 7px 12px; border-radius: 6px; font-size: 0.84rem; min-width: 240px; outline: none;
}
.search-input:focus { border-color: var(--primary); }

/* Grid 2-col */
.grid-2 { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 20px; }

/* Code / Terminal */
.terminal {
  background: #050811; color: #cbd5e1; font-family: var(--font-mono); font-size: 0.78rem;
  padding: 14px 16px; border-radius: 8px; border: 1px solid #1e293b; overflow-x: auto;
  line-height: 1.6;
}

/* Wiki 3-col */
.wiki-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 24px 0; }
.wiki-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 84px; }
.wiki-nav a {
  padding: 7px 10px; border-radius: 6px; color: var(--text-muted); font-size: 0.86rem; text-decoration: none;
}
.wiki-nav a.active, .wiki-nav a:hover { background: var(--bg-card); color: var(--text); }
.doc-block { margin-bottom: 36px; scroll-margin-top: 80px; }
.doc-block h2 { font-size: 1.3rem; margin-bottom: 8px; }
.doc-block p { color: var(--text-muted); margin-bottom: 12px; font-size: 0.92rem; }

/* Gatekeeper Auth */
.gate-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.gate-card {
  width: 100%; max-width: 440px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

/* Footer */
.footer {
  margin-top: auto; border-top: 1px solid var(--border); padding: 20px 0;
  font-size: 0.8rem; color: var(--text-muted);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* Live Monitor (Backtick ` or Alt+M) */
.live-monitor {
  position: fixed; bottom: 18px; right: 18px; width: 370px; max-width: calc(100vw - 36px);
  background: rgba(9, 13, 22, 0.96); color: #f8fafc; border-radius: 10px;
  border: 1px solid #334155; padding: 14px; font-family: var(--font-mono); font-size: 0.75rem;
  z-index: 999; display: none; box-shadow: 0 16px 32px rgba(0,0,0,0.5);
}
.live-monitor.open { display: block; }
.monitor-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #1e293b; }
.monitor-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.monitor-stat { background: #111827; padding: 6px; border-radius: 5px; text-align: center; }
.monitor-feed { list-style: none; display: flex; flex-direction: column; gap: 5px; max-height: 140px; overflow: hidden; }
.monitor-feed li { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-verb { padding: 1px 5px; border-radius: 3px; font-weight: 700; font-size: 0.66rem; background: #0369a1; color: #e0f2fe; }
.feed-verb.POST { background: #15803d; color: #dcfce7; }

@media (max-width: 860px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .wiki-layout { grid-template-columns: 1fr; }
}

/* 011de10c94b6 */
