@import url("/static/css/explorer-controls.css");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #080808;
  --muted: #5f5f5f;
  --border: #e0e0e0;
  --surface: #f5f5f5;
  --missing: #f2f2ef;
  --unalloc: #d5d3cc;
}

/* The site header's toggle sets data-theme; without it, follow the system. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #020202;
    --text: #f4f4f0;
    --muted: #bdbdbd;
    --border: #2a2a2a;
    --surface: #1a1a1a;
    --missing: #141414;
    --unalloc: #383733;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #020202;
  --text: #f4f4f0;
  --muted: #bdbdbd;
  --border: #2a2a2a;
  --surface: #1a1a1a;
  --missing: #141414;
  --unalloc: #383733;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 'JetBrains Mono', ui-monospace, monospace;
}
main { max-width: calc(1400px + 3rem); padding: 1.5rem 1.5rem 4rem; margin: 0 auto; }
h1 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 0.25rem; font-weight: 600; }
h2 { font-size: 1rem; margin: 0 0 0.35rem; font-weight: 600; }
h3 { font-size: 0.9rem; margin: 1.5rem 0 0.25rem; font-weight: 600; }
p { margin: 0.25rem 0; max-width: 95ch; }
a { color: inherit; }
code { font-family: inherit; background: var(--surface); padding: 0.1rem 0.3rem; border-radius: 3px; font-size: 0.92em; }
.sub { color: var(--muted); font-size: 12px; margin: 0.25rem 0 0.65rem; max-width: 95ch; }
ul.sub { padding-left: 1.25rem; }
ul.sub li { margin: 0.25rem 0; }
.src { color: var(--muted); font-size: 11.5px; margin-top: 0.75rem; max-width: 95ch; }

section { margin: 2rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--border); scroll-margin-top: 1.5rem; }
section:first-of-type { margin-top: 1.25rem; padding-top: 0; border-top: 0; }

.controls { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; margin: 0.75rem 0; }
.controls label { max-width: 100%; min-width: 0; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 12px; }
.seg { display: inline-flex; gap: 0; flex-wrap: wrap; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
.seg button:last-child { border-radius: 0 4px 4px 0; }

.legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; font-size: 12px; color: var(--muted); margin: 0.5rem 0; }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; flex: none; }
.legend i.ramp, .ramp { width: 140px; height: 11px; border-radius: 2px; display: inline-block; vertical-align: middle; }

.tiles {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.75rem; margin: 0.65rem 0; padding: 0.55rem 0.9rem;
  border: 1px solid var(--border); border-radius: 4px; width: fit-content; max-width: 100%;
}
.tiles .tile { min-width: 110px; }
.tiles .k { font-size: 11px; color: var(--muted); }
.tiles .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.two > * { min-width: 0; }

details { margin-top: 0.75rem; font-size: 12px; }
summary { cursor: pointer; color: var(--muted); }
summary:hover { color: var(--text); }

table.data { border-collapse: collapse; margin-top: 0.5rem; font-size: 12px; width: 100%; max-width: 1000px; }
table.data th, table.data td { text-align: left; padding: 0.25rem 0.75rem 0.25rem 0; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-weight: 400; font-size: 11.5px; }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody tr:hover { background: var(--surface); }

.scroll-x { overflow-x: auto; }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
[hidden] { display: none !important; }

@media (min-width: 601px) {
  body:has(.page-contents) main { padding-right: 48px; max-width: calc(1400px + 1.5rem + 48px); }
}
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
@media (max-width: 600px) { main { padding: 1rem 1rem 3rem; } }
