:root {
  --panel: rgba(12, 13, 11, 0.40);
  --panel-strong: rgba(12, 13, 11, 0.9);
  --line: rgba(255, 255, 255, 0.16);
  --line-hot: rgba(238, 151, 56, 0.74);
  --text: #f5efe4;
  --muted: #cfc1ad;
  --clay: #ee9738;
  --cyan: #80ffff;
  --green: #80ff80;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html,
body,
.docs-nav,
.docs-content,
table {
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 178, 191, 0.42) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.docs-nav::-webkit-scrollbar,
.docs-content::-webkit-scrollbar,
table::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.docs-nav::-webkit-scrollbar-track,
.docs-content::-webkit-scrollbar-track,
table::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.docs-nav::-webkit-scrollbar-thumb,
.docs-content::-webkit-scrollbar-thumb,
table::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(159, 178, 191, 0.42);
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.docs-nav::-webkit-scrollbar-thumb:hover,
.docs-content::-webkit-scrollbar-thumb:hover,
table::-webkit-scrollbar-thumb:hover {
  background: rgba(238, 151, 56, 0.68);
  background-clip: padding-box;
}

html {
  min-height: 100%;
  background: #14110e;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.54), rgba(10, 10, 9, 0.18) 48%, rgba(7, 8, 8, 0.56)),
    linear-gradient(180deg, rgba(8, 8, 7, 0.18), rgba(8, 8, 7, 0.42)),
    url("../../../../assets/images/rutted-mx-background.png") center / cover fixed no-repeat;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.58);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 30% 0%, rgba(238, 151, 56, 0.1), transparent 34%);
}

a { color: var(--clay); }
a:hover { color: #ffc47f; }

.docs-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 0;
}

.mobile-menu-toggle {
  display: none;
  width: 100%;
  margin: 0 0 14px;
  padding: 13px 16px;
  border: 1px solid var(--line-hot);
  color: var(--text);
  background: var(--panel-strong);
  font: inherit;
  font-weight: 850;
  text-transform: uppercase;
  cursor: pointer;
}

.docs-grid {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.docs-nav,
.docs-content {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.docs-nav {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.nav-art {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
}

.home-link {
  display: block;
  margin: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line-hot);
  color: #fff8e8;
  background: linear-gradient(135deg, rgba(238, 151, 56, 0.28), rgba(0, 0, 0, 0.28));
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.docs-nav h2 {
  margin: 0;
  padding: 13px 16px;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-nav ul {
  margin: 0;
  padding: 8px 0 14px;
  list-style: none;
}

.docs-nav a:not(.home-link) {
  display: block;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.docs-nav a:not(.home-link):hover,
.docs-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(238, 151, 56, 0.13);
}

.docs-nav a[aria-current="page"] {
  border-left: 3px solid var(--clay);
  padding-left: 13px;
}

.docs-content {
  min-width: 0;
  padding: clamp(24px, 4vw, 52px);
}

.docs-content > :first-child { margin-top: 0; }
.docs-content > :last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  color: #fff8e8;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-hot);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 950;
  text-transform: uppercase;
}

.docs-content font[color="#80FFFF"],
.docs-content font[color="#00FFFF"] { color: var(--cyan) !important; }
.docs-content font[color="#80FF80"],
.docs-content font[color="#00FF80"] { color: var(--green) !important; }

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

.docs-content img {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
}

table {
  max-width: 100%;
  border-collapse: collapse;
}

td { padding: 8px; }
hr { border: 0; border-top: 1px solid var(--line); }

.front-cover { text-align: center; }
.front-cover .cover-logo { width: min(100%, 520px); }
.front-cover .notice { text-align: left; }

@media (max-width: 800px) {
  .docs-shell { width: min(100% - 24px, 760px); padding: 12px 0; }
  .mobile-menu-toggle { display: block; }
  .docs-grid { display: block; }
  .docs-nav { display: none; position: static; max-height: none; margin-bottom: 14px; }
  .docs-nav.is-open { display: block; }
  .docs-content { padding: 22px 18px; }
  table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
