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

:root {
  --bg: #050505;
  --surface: #0F0F0F;
  --text: #FAFAFA;
  --muted: #A3A3A3;
  --primary: #EAB308;
  --secondary: #CA8A04;
  --accent: #22C55E;
  --border: rgba(250, 250, 250, 0.14);
  --sidebar-w: 72px;
  --mobile-nav-h: 52px;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.disclosure {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.15), rgba(202, 138, 4, 0.15));
  font-size: 12px;
  font-weight: 400;
  padding: 8px 16px;
  text-align: center;
  width: 100%;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  z-index: 100;
}

.sidebar__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 24px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
}

.sidebar__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sidebar__link:hover,
.sidebar__link:focus {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.08);
}

.sidebar__link::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  padding: 6px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 200;
}

.sidebar__link:hover::after,
.sidebar__link:focus::after {
  opacity: 1;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 150;
}

.mobile-nav__logo {
  height: 36px;
  width: auto;
}

.mobile-nav__burger {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-nav__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-nav__burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav__burger.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-nav__burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 140;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 80px 24px 24px;
}

.mobile-overlay.is-open {
  display: flex;
}

.mobile-overlay__link {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  padding: 12px 24px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.mobile-overlay__link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-wrap > main {
  flex: 1;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  margin-top: auto;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.site-footer__brand img {
  height: 48px;
  width: auto;
  margin-bottom: 12px;
}

.site-footer__brand p {
  color: var(--muted);
  font-size: 13px;
  max-width: 280px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.site-footer__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer__links a:hover {
  color: var(--primary);
}

.site-footer__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.site-footer__badges a,
.site-footer__badges span {
  display: block;
}

.site-footer__badges img {
  height: 40px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.site-footer__badges a:hover img {
  opacity: 1;
}

.site-footer__copy {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.is-hidden {
  display: none;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--accent);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  position: relative;
}

.modal::before,
.modal::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent);
  border-style: solid;
}

.modal::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.modal::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.modal h2 {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--primary);
}

.modal p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.modal__actions {
  display: flex;
  gap: 12px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--primary {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: var(--muted);
  color: var(--text);
}

.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.legal-page h1 {
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

.legal-page__updated {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 32px 0 12px;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.subpage-hero {
  padding: 48px 24px 32px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(34, 197, 94, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

.subpage-hero h1 {
  font-family: var(--font-mono);
  font-size: 32px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 800px;
  margin: 0 auto;
}

.subpage-header {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

.subpage-header__logo {
  height: 36px;
  width: auto;
}

.page-wrap--sub {
  margin-left: 0;
  padding-top: var(--mobile-nav-h);
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .page-wrap {
    margin-left: 0;
    padding-top: var(--mobile-nav-h);
  }
}
