/* The hub's look: old gold on near-black, one monospace face, square corners,
   hierarchy from size and letter-spacing. No webfont: the machine's own
   monospace, as on the hub. */

:root {
  --bg: #0a0906;
  --bg-2: #14110a;
  --panel: #18140b;
  --ink: #eadfc2;
  --ink-strong: #f8f0da;
  --dim: #a48f60;
  --accent: #d4af37;
  --accent-2: #f0d27a;
  --line: rgba(212, 175, 55, .30);
  --line-soft: rgba(212, 175, 55, .13);
  --font: ui-monospace, "JetBrains Mono", "IBM Plex Mono", "SF Mono", SFMono-Regular,
          Menlo, Consolas, "DejaVu Sans Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 15px/1.65 var(--font); }
a { color: var(--accent-2); }
a:hover { color: var(--ink-strong); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.brand {
  color: var(--ink-strong);
  text-decoration: none;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: 1rem;
}
.brand span { color: var(--accent); }
.hub {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .5rem .8rem;
  border: 1px solid var(--line);
}

.layout { display: flex; max-width: 1180px; margin: 0 auto; }
.side {
  flex: 0 0 230px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow: auto;
  padding: 1.6rem 16px 1.6rem 24px;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.side a {
  padding: .35rem .6rem;
  color: var(--dim);
  text-decoration: none;
  font-size: .82rem;
  border-left: 2px solid transparent;
}
.side a:hover { color: var(--ink); }
.side a[aria-current="page"] { color: var(--accent); border-left-color: var(--accent); }

main { flex: 1; min-width: 0; padding: 1.4rem 24px 4rem; max-width: 860px; }
h1, h2, h3 { font-weight: 500; color: var(--ink-strong); line-height: 1.3; }
h1 { font-size: 1.7rem; letter-spacing: .06em; margin: .6rem 0 1rem; }
h2 {
  font-size: .9rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.4rem 0 .8rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line-soft);
}
h3 { font-size: 1rem; margin: 1.8rem 0 .6rem; }
p, li { max-width: 72ch; }
strong { color: var(--ink-strong); font-weight: 600; }

code {
  font: inherit;
  font-size: .9em;
  color: var(--accent-2);
  background: rgba(212, 175, 55, .08);
  padding: .05em .3em;
}
pre {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  padding: .9rem 1rem;
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.55;
}
pre code { background: none; padding: 0; color: var(--ink); }

table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.4rem; font-size: .85rem; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: .5rem .7rem; border-bottom: 1px solid var(--line-soft); }
th { color: var(--dim); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; white-space: nowrap; }
td code { white-space: nowrap; }

img { max-width: 100%; height: auto; }
.figure { margin: 1.4rem 0; padding: 1rem; background: var(--panel); border: 1px solid var(--line-soft); }

footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.2rem 24px 2.4rem 278px;
  font-size: .75rem;
  color: var(--dim);
}

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .side {
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    padding: .8rem 16px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .side a { border-left: 0; border-bottom: 2px solid transparent; padding: .3rem .5rem; }
  .side a[aria-current="page"] { border-bottom-color: var(--accent); }
  main { padding: 1rem 16px 3rem; }
  footer { padding: 1rem 16px 2rem; }
  .top { padding: .8rem 16px; }
  .brand { font-size: .85rem; letter-spacing: .2em; }
}
