:root {
  --bg: #0a0705;
  --surface: #100a06;
  --panel: #160d07;
  --bloom: #1f1006;
  --accent: #f88008;
  --accent-rgb: 248,128,8;
  --accent-soft: #ffb057;
  --accent-pale: #ffd9a8;
  --line: rgba(248,128,8,.32);
  --line-soft: rgba(248,128,8,.13);
  --txt: #f5ebe0;
  --hi: #fff8f0;
  --txt2: #d9c3a8;
  --txt3: #b39a82;
  --ink: #1a0d00;
  --font-display: "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent-soft); text-underline-offset: 3px; }
a:hover { color: var(--accent-pale); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

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

/* Header */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 7, 5, 0.9);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 2px;
  text-decoration: none;
}

.brand img { width: 28px; height: 28px; object-fit: contain; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.22em;
  color: var(--hi);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.28);
}
.btn-primary:hover { background: var(--accent-soft); color: var(--ink); }

.btn-secondary {
  background: var(--surface);
  color: var(--hi);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--accent); background: var(--bloom); color: var(--hi); }

/* Article */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px 56px;
}

.crumbs {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--txt3);
  margin: 0 0 20px;
}
.crumbs a { color: var(--txt2); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--hi);
  line-height: 1.2;
  overflow-wrap: break-word;
}

h1 { font-size: 2rem; font-weight: 700; margin: 0 0 16px; }
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
h3 { font-size: 1.1875rem; font-weight: 600; margin: 28px 0 8px; }

p { margin: 0 0 16px; overflow-wrap: break-word; }

.lead { font-size: 1.1875rem; color: var(--txt2); }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--accent-pale);
  overflow-wrap: anywhere;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  padding: 14px 16px;
  margin: 0 0 20px;
  overflow-x: auto;
  color: var(--txt);
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }

/* HUD tables */
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; min-width: 520px; }

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}
tr:last-child td { border-bottom: 0; }

th {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: var(--surface);
  white-space: nowrap;
}
td:first-child { color: var(--hi); font-weight: 600; }

/* FAQ */
.faq h3 { margin-top: 24px; }

/* CTA */
.cta {
  margin: 48px 0 0;
  padding: 24px 20px;
  background: var(--bloom);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.cta h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 1.375rem; }
.cta p { color: var(--txt2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.note { font-size: 0.9375rem; color: var(--txt3); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  padding: 32px 0;
}
.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--txt2);
  font-size: 0.9375rem;
}
.footer-links a:hover { color: var(--accent-soft); }
.footer-legal { display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; color: var(--txt3); }

/* 404 */
.lost { text-align: center; padding-top: 72px; }
.lost .footer-links { justify-content: center; }

@media (min-width: 720px) {
  h1 { font-size: 2.5rem; }
  .article { padding-top: 56px; }
  .footer-inner { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .footer-legal { flex-direction: row; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
