/* Copyright (c) 2026 Martial Systems LLC. All rights reserved. */
/* Shared chrome: topbar, logo, nav */

:root {
  --bg: #090b0f;
  --panel: #141b24;
  --border: #2a3a4c;
  --border-soft: #1e2a38;
  --text: #eef3f8;
  --muted: #a8b4c2;
  --faint: #8a96a6;
  --accent: #2ec27e;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
}

.topbar {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(9, 11, 15, 0.96);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand-link:hover { color: var(--text); }

.brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
  border-radius: 7px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav a.active {
  color: var(--text);
  background: rgba(46, 194, 126, 0.12);
}

.sync {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
}

.sync .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2.4s ease-out infinite;
}

.sync.stale .dot { background: #d4a017; animation: none; }
.sync.error .dot { background: #e85d5d; animation: none; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 194, 126, 0.4); }
  70% { box-shadow: 0 0 0 7px rgba(46, 194, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 194, 126, 0); }
}

.top-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.15rem 3rem;
}

/* Small intro box under page titles — not full body text */
.intro-box {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.9rem;
  max-width: 40rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.intro-box p {
  margin: 0;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
  max-width: none;
}

footer.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-soft);
  color: var(--faint);
  font-size: 0.78rem;
}

footer.site-footer a { color: var(--accent); }
footer.site-footer .legal {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.72rem;
  line-height: 1.55;
  max-width: 42rem;
}

footer.site-footer .legal h2 {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

footer.site-footer .legal p { margin: 0 0 0.5rem; }
footer.site-footer .legal .title { color: var(--muted); font-weight: 600; }

@media (max-width: 520px) {
  .brand-name { font-size: 0.88rem; }
  .nav a { padding: 0.35rem 0.55rem; font-size: 0.84rem; }
}
