@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono&family=Press+Start+2P&display=swap");
:root {
  color-scheme: dark;
  --bg: #0a0a0f;
  --card: #12121a;
  --line: #555569;
  --text: #e0e0e0;
  --muted: #ababbd;
  --link: #00e5ff;
  --gold: #ffaa00;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --card: #fff;
  --line: #8b8b99;
  --text: #242432;
  --muted: #545464;
  --link: #00596a;
  --gold: #805200;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.7 Inter,
    system-ui,
    sans-serif;
}
a {
  color: var(--link);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
button,
input {
  font: inherit;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.45rem 0.7rem;
}
button {
  cursor: pointer;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 4%;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
header nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.logo {
  font:
    12px/2 "Press Start 2P",
    monospace;
  color: var(--gold);
  text-decoration: none;
}
.layout {
  max-width: 1500px;
  margin: auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 4%;
}
aside {
  min-width: 0;
}
.sections {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
}
.sections a {
  padding: 0.3rem 0.6rem;
  border-left: 2px solid var(--line);
}
main {
  min-width: 0;
  max-width: 1050px;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.3;
  color: var(--gold);
}
h2 {
  font-size: 1.5rem;
  margin-top: 2.4rem;
}
h3 {
  font-size: 1.15rem;
}
p,
li {
  overflow-wrap: anywhere;
}
main > p,
main > ul,
main > ol {
  max-width: 78ch;
}
input {
  width: 100%;
  margin: 0.5rem 0;
}
form button {
  width: 100%;
}
.breadcrumbs,
.version,
footer {
  color: var(--muted);
  font-size: 0.88rem;
}
footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
footer a {
  overflow-wrap: anywhere;
}
.history dl {
  max-width: 78ch;
  margin: 0;
}
.history dt {
  color: var(--gold);
  font-weight: 600;
  margin-top: 0.8rem;
}
.history dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
caption {
  text-align: left;
  font-weight: 700;
  padding: 0.8rem;
  background: var(--card);
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem;
  border-top: 1px solid var(--line);
  min-width: 85px;
}
th {
  background: var(--card);
}
td {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}
details {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--card);
  padding: 0.5rem;
  z-index: 2;
}
.skip:focus {
  top: 1rem;
}
.search-result {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.search-result p {
  font-size: 0.88rem;
  margin: 0.35rem 0;
}
#search-status {
  font-size: 0.88rem;
}
#search-results {
  max-height: 65vh;
  overflow: auto;
}
@media (max-width: 800px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.2rem 5%;
    gap: 1rem;
  }
  .sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 0.9rem;
  }
  .logo {
    font-size: 10px;
  }
  header {
    padding: 1rem 5%;
  }
  header nav {
    gap: 0.8rem;
    font-size: 0.9rem;
  }
  th,
  td {
    padding: 0.6rem;
  }
  main {
    width: 100%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  a,
  button {
    transition: color 0.12s;
  }
}
