html { background: var(--bg); color-scheme: dark; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-tag {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--accent);
  line-height: 1;
}
.brand-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  opacity: 0.6;
}

.nav-cluster { display: flex; align-items: center; gap: 16px; }
.nav-main {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.nav-main a {
  text-decoration: none;
  padding: 8px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d1d5db;
  white-space: nowrap;
}
.nav-main a:hover { color: var(--accent); }
.nav-main a.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 62, 0, 0.3);
}
.nav-main a.nav-admin {
  color: var(--accent);
  border: 1px solid rgba(255, 62, 0, 0.4);
}
.nav-main a.nav-admin.active { color: #fff; border-color: transparent; }

.nav-account { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 16px; height: 1.5px; background: #d1d5db; }

.site-main {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
  flex: 1;
}

.site-footer {
  background: #000;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: auto;
}
.footer-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 48px var(--gutter) 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.site-footer h4 {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 12px;
}
.site-footer a, .site-footer button {
  display: block;
  background: none;
  border: 0;
  padding: 4px 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.site-footer a:hover, .site-footer button:hover { color: var(--accent); }
.site-footer .discord-link { color: var(--discord); font-weight: 700; }
.footer-note { max-width: 36ch; line-height: 1.6; }
.footer-motto {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 12px;
}
.footer-bar {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: #000;
}
.admin-side .brand-tag { font-size: 1.75rem; }
.admin-side nav { display: grid; gap: 4px; margin-top: 28px; }
.admin-side nav a {
  text-decoration: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding: 10px 8px;
  color: #d1d5db;
}
.admin-side nav a:hover, .admin-side nav a.active { color: #fff; background: var(--accent); }
.admin-main { padding: 32px 36px 48px; }
.admin-bar { display: flex; justify-content: space-between; margin-bottom: 32px; color: var(--muted); font-size: 0.8rem; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .nav-cluster {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 80px;
    background: #050505;
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .site-header.is-open .nav-cluster { display: flex; }
  .nav-main {
    flex-direction: column;
    border-radius: 0;
    background: transparent;
    border: 0;
    padding: 0;
  }
  .nav-main a { padding: 12px 16px; }
  .nav-account { flex-direction: column; }
  .footer-grid, .admin-shell { grid-template-columns: 1fr; }
  .admin-main { padding: 24px var(--gutter) 48px; }
}
