/* FreeUI kit — free to use in your own apps. Keep this credit if you redistribute the file. */

:root {
  --bg: #090a0d;
  --bg-2: #12141a;
  --text: #e8eef8;
  --site-muted: #9aa3b2;
  --line: rgba(143, 184, 255, 0.2);
  --neon: #3c8dff;
  --neon-2: #8fd4ff;
  --neon-deep: #1746c9;
  --glow: 0 0 16px rgba(60, 141, 255, 0.45);
  --panel: #101218;
  --panel-ink: #e8eef8;
  --panel-dim: #93a0b8;
  --groove: #07080c;
  --paper: var(--bg);
  --paper-2: var(--bg-2);
  --ink: var(--text);
  --oxide: var(--neon);
  --moss: var(--neon-deep);
  --brass: var(--neon);
  --brass-2: var(--neon-2);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
body::before {
  content: "";
  display: block;
  height: 2px;
  background: var(--neon);
  box-shadow: var(--glow);
}
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
:focus-visible { outline: 2px solid var(--neon-2); outline-offset: 3px; }
.bezel :focus-visible { outline-color: var(--neon-2); }
::selection { background: rgba(60, 141, 255, 0.4); color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em; }
p { margin: 0; }
a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--neon);
  color: #041018;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 10, 13, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.top-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.mark span { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; margin-left: 4px; color: var(--neon-2); }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a[aria-current="page"] { color: var(--neon-2); text-shadow: 0 0 12px rgba(143, 212, 255, 0.65); }
.take {
  text-decoration: none;
  border: 1px solid var(--neon);
  color: var(--neon-2);
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-pop { display: none; }
.nav-pop summary { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.nav-pop nav { display: grid; gap: 8px; padding-top: 8px; }

.hero { padding: 48px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
h1 { font-size: clamp(42px, 6vw, 78px); line-height: 0.94; margin: 0 0 16px; }
.lede { font-size: 18px; max-width: 42ch; color: var(--site-muted); }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-2);
  margin: 0 0 10px;
}
.cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 22px; }
.ink-btn {
  display: inline-flex;
  align-items: center;
  background: var(--neon);
  color: #041018;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  box-shadow: var(--glow);
}
.quiet-link { font-family: var(--serif); font-style: italic; color: var(--neon-2); }

.toc { padding: 28px 0 10px; }
.toc-row {
  display: grid;
  grid-template-columns: 64px 140px 1fr auto;
  gap: 12px;
  align-items: baseline;
  text-decoration: none;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.toc-row:last-child { border-bottom: 1px solid var(--line); }
.toc-no, .toc-count { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--neon-2); }
.toc-name { font-family: var(--serif); font-size: 28px; }
.toc-blurb { color: var(--site-muted); }

.band { padding: 48px 0; }
.band h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1; margin: 0 0 8px; }
.band-intro { color: var(--site-muted); max-width: 52ch; margin-bottom: 22px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.card { border-top: 1px solid var(--line); padding-top: 12px; }
.card h3 { font-size: 32px; margin: 0; }
.card h3 a { text-decoration: none; }
.kind { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--neon-2); }
.blurb { color: var(--site-muted); margin-top: 6px; }
.card-link { display: inline-block; margin-top: 10px; font-family: var(--serif); font-style: italic; color: var(--neon-2); }

.group { margin: 28px 0 8px; }
.group h2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--neon-2);
  margin: 0 0 12px;
}
.well { margin-top: 12px; min-height: 88px; }
.well-stage { position: relative; z-index: 1; display: grid; gap: 12px; }
.well-stage > .latch,
.well-stage > .dial,
.well-stage > .readout,
.well-stage > .menu { justify-self: start; }

.files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
pre, code, .mono { font-family: var(--mono); }
.term {
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 8px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
.file-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.file-links a { font-family: var(--mono); font-size: 13px; color: var(--neon-2); }

.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 24px; }
.faq details p { color: var(--site-muted); padding: 8px 0 4px; max-width: 62ch; }

.close-band { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 64px; }
.charge {
  display: inline-block;
  border: 2px solid var(--neon);
  color: var(--neon-2);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  text-decoration: none;
  transform: rotate(-8deg);
  box-shadow: var(--glow);
}

.colophon {
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
}
.colophon-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.colophon nav { display: flex; gap: 14px; flex-wrap: wrap; }
.colophon a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.fine { color: var(--site-muted); font-size: 14px; }

.page-head { padding: 36px 0 10px; }
.page-head h1 { font-size: clamp(40px, 6vw, 68px); line-height: 0.95; margin: 0 0 10px; }
.page-head .lede { max-width: 48ch; }

.prose { padding-bottom: 64px; max-width: 70ch; }
.prose h2 { font-size: 30px; margin: 1.4em 0 0.4em; }
.prose p { font-size: 17px; margin: 0.6em 0; }
.prose pre {
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 8px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
}
.prose a { color: var(--neon-2); }

.brief {
  width: 100%;
  min-height: 240px;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 48px; }
.pager a { font-family: var(--serif); font-style: italic; color: var(--neon-2); }

.marks-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; padding-bottom: 24px; }
.mark-cell {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 6px;
}
.mark-cell.on, .mark-cell:hover { border-color: var(--neon); background: rgba(60, 141, 255, 0.08); box-shadow: var(--glow); }
.mark-cell span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; }
.mark-detail {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 16px 0 48px;
}
.icon { display: inline-flex; }

.bezel {
  background: var(--panel);
  color: var(--panel-ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 16px 16px;
  position: relative;
  color-scheme: dark;
}
.screw {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1c212c;
  box-shadow: inset 0 0 0 1px #000;
}
.screw::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 4px;
  height: 1.5px;
  background: var(--neon);
}
.screw.a { top: 8px; left: 8px; }
.screw.b { top: 8px; right: 8px; }
.screw.c { bottom: 8px; left: 8px; }
.screw.d { bottom: 8px; right: 8px; }

.stamp {
  background: #1a1e28;
  color: var(--panel-ink);
  border: 1px solid #2a3344;
  border-radius: 3px;
  height: 36px;
  padding: 0 12px;
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.stamp.small { height: 28px; font-size: 12px; padding: 0 10px; }
.stamp:active { transform: translateY(1px); }
.stamp.pressed {
  background: var(--neon);
  color: #041018;
  border-color: var(--neon-2);
  box-shadow: var(--glow);
}

.latch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #141820;
  color: var(--panel-ink);
  border: 1px solid #2a3344;
  border-radius: 999px;
  height: 32px;
  padding: 0 10px 0 4px;
  font-weight: 650;
  font-size: 12px;
}
.latch-knob {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2a3344;
  box-shadow: inset 0 0 0 1px #000;
}
.latch[aria-pressed="true"] { border-color: var(--neon); box-shadow: var(--glow); }
.latch[aria-pressed="true"] .latch-knob { background: var(--neon-2); }

.fader-track {
  position: relative;
  height: 28px;
  background: var(--groove);
  border: 1px solid #1c2433;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px #000;
  touch-action: none;
  user-select: none;
}
.fader-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--neon-deep), var(--neon-2));
  border-radius: 999px;
  box-shadow: var(--glow);
  pointer-events: none;
}
.fader-thumb {
  position: absolute;
  top: 4px;
  width: 18px;
  height: 20px;
  border-radius: 4px;
  background: #d7ecff;
  box-shadow: 0 0 10px rgba(143, 212, 255, 0.8);
  pointer-events: none;
}
.fader-thumb::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #041018;
  opacity: 0.55;
}

.dial { display: grid; justify-items: center; gap: 6px; }
.dial-face {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #07080c;
  box-shadow: inset 0 0 0 8px #1a1e28, inset 0 0 0 9px #2a3344;
  position: relative;
  touch-action: none;
  user-select: none;
}
.dial.large .dial-face { width: 168px; height: 168px; box-shadow: inset 0 0 0 12px #1a1e28, inset 0 0 0 13px #2a3344; }
.dial-needle {
  position: absolute;
  left: calc(50% - 1px);
  bottom: 50%;
  width: 2px;
  height: 36%;
  background: var(--neon-2);
  box-shadow: var(--glow);
  transform-origin: 50% 100%;
  border-radius: 1px;
}
.dial-cap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #d7ecff;
  box-shadow: 0 0 8px rgba(143, 212, 255, 0.8);
}
.dial-value { font-family: var(--mono); font-size: 12px; color: var(--panel-dim); }

.readout {
  min-width: 72px;
  height: 32px;
  padding: 0 8px;
  background: var(--groove);
  color: var(--neon-2);
  border: 1px solid #2a3344;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  touch-action: none;
}
.readout-input {
  width: 72px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0;
}

.menu { position: relative; display: inline-block; }
.menu-pop {
  position: absolute;
  z-index: 6;
  left: 0;
  top: calc(100% + 4px);
  min-width: 100%;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #10131a;
  color: var(--text);
  border: 1px solid var(--neon);
  box-shadow: var(--glow);
}
.menu-pop li { padding: 6px 8px; cursor: pointer; font-size: 14px; }
.menu-pop li.hi, .menu-pop li:hover { background: var(--neon); color: #041018; }

.stack { display: grid; gap: 8px; }
.stack-row { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: center; }
.stack-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-dim);
}
.shelf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.foot {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 32px;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--panel-dim);
}
.foot-end { margin-left: auto; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--panel-dim);
}
.field input, .search input {
  width: 100%;
  background: var(--groove);
  color: var(--panel-ink);
  border: 1px solid #2a3344;
  border-radius: 3px;
  padding: 8px 10px;
}
.check {
  display: flex;
  gap: 8px;
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  padding: 3px 0;
}
.check-box {
  width: 16px;
  height: 16px;
  border: 1px solid var(--neon-2);
  border-radius: 2px;
  display: grid;
  place-items: center;
}
.check[aria-checked="true"] .check-box::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--neon-2);
  box-shadow: var(--glow);
}
.choice { display: grid; gap: 4px; }
.choice-item {
  text-align: left;
  background: transparent;
  color: inherit;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 6px 8px;
}
.choice-item[aria-checked="true"] { border-color: var(--neon-2); background: rgba(60, 141, 255, 0.14); }
.search-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.search-list li { font-size: 14px; }
.muted { color: var(--panel-dim); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  background: transparent;
  color: var(--panel-dim);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px;
}
.tabs button[aria-selected="true"] { color: var(--panel-ink); border-color: var(--neon-2); box-shadow: var(--glow); }
.tab-panel { padding-top: 8px; }
.drawer { border-top: 1px solid rgba(143, 184, 255, 0.2); }
.drawer-btn {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  padding: 8px 0;
  text-align: left;
}
.drawer-sum { margin-left: auto; color: var(--panel-dim); font-family: var(--mono); font-size: 12px; }
.caret { width: 1em; }
.split { display: flex; min-height: 120px; gap: 0; }
.split-pane { overflow: auto; padding: 8px; background: rgba(0, 0, 0, 0.28); border-radius: 4px; }
.split-gutter { width: 10px; cursor: col-resize; background: linear-gradient(var(--neon), var(--neon)) center/2px 100% no-repeat; }

.meter {
  height: 12px;
  background: var(--groove);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px #000;
}
.meter-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--neon-deep), var(--neon-2)); box-shadow: var(--glow); }
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(143, 212, 255, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag.oxide, .tag.signal { background: var(--neon); border-color: var(--neon); color: #041018; }
.tag.moss, .tag.ice { background: transparent; border-color: var(--neon-2); color: var(--neon-2); }
.tag.brass, .tag.neon { background: var(--neon-2); border-color: var(--neon-2); color: #041018; box-shadow: var(--glow); }
.note {
  border-left: 3px solid var(--neon-2);
  padding: 4px 0 4px 10px;
  color: var(--panel-ink);
}
.table-wrap { overflow: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--panel-dim);
  border-bottom: 1px solid rgba(143, 184, 255, 0.28);
  padding: 6px 4px;
  cursor: pointer;
}
table.grid td { border-bottom: 1px solid rgba(143, 184, 255, 0.12); padding: 6px 4px; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { display: grid; gap: 6px; justify-items: start; }
.empty-title { font-family: var(--serif); font-size: 22px; }

.dialog-back {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 6, 10, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
}
.dialog {
  width: min(420px, 100%);
  background: #10131a;
  color: var(--text);
  padding: 18px;
  border: 1px solid var(--neon);
  box-shadow: var(--glow);
}
.dialog h2 { margin: 0 0 8px; font-size: 28px; }
.dialog p { color: var(--site-muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.dialog .stamp { background: #1a1e28; color: var(--text); }
.dialog .stamp.pressed, .dialog .stamp.danger { background: var(--neon); color: #041018; }

.toast-pile {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 24px));
}
.toast {
  background: #10131a;
  color: var(--text);
  border: 1px solid var(--neon);
  box-shadow: var(--glow);
  padding: 10px 12px;
}

.tip { position: relative; display: inline-flex; }
.tip-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: #10131a;
  color: var(--text);
  border: 1px solid var(--neon);
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.tip.show .tip-bubble { opacity: 1; }

.hero-read {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-dim);
  margin-bottom: 8px;
}
.hero-read b { color: var(--neon-2); font-weight: 500; font-size: 18px; letter-spacing: 0; text-shadow: 0 0 12px rgba(143, 212, 255, 0.55); }

@media (max-width: 860px) {
  .hero-grid, .files, .close-band { grid-template-columns: 1fr; }
  .toc-row { grid-template-columns: 36px 1fr; }
  .toc-blurb { grid-column: 2; }
  .toc-count { display: none; }
  .close-band { align-items: start; }
}
@media (max-width: 720px) {
  .nav-links, .take { display: none; }
  .nav-pop { display: block; }
  .nav-pop[open] { position: absolute; right: 20px; top: 58px; background: var(--bg); border: 1px solid var(--neon); padding: 12px; z-index: 30; }
  .cards { grid-template-columns: 1fr; }
  .stack-row { grid-template-columns: 72px 1fr; }
  h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dial-needle { transition: none; }
}
