/* ATLAS — black field, white line, teal courses. The page is a HUD laid over the object:
   the object is never a background, so nothing here paints one. Panels float, the field stays
   pure black, and the only colour in the interface is the teal the courses are lit with. */
:root {
  --ink: #000000;
  --white: #fefefe;
  --bright: #56d8f0;
  --teal: #1a89a4;
  --deep: #0d3a5c;
  --mist: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.40);
  --panel: rgba(8, 11, 16, 0.76);
  --panel-hi: rgba(16, 22, 30, 0.84);
  --line: rgba(134, 206, 228, 0.18);
  --line-hi: rgba(134, 206, 228, 0.42);
  --gut: 18px;
  --rail: 420px;
  --r: 3px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; background: var(--ink); }
body {
  font-family: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.58; color: var(--white);
  overflow: hidden; -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- the stage ---------- */
#stage { position: fixed; inset: 0; z-index: 0; }
#stage canvas { width: 100%; height: 100%; display: block; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(118% 88% at 38% 34%, transparent 42%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, transparent 26%);
}

/* ---------- top bar ---------- */
.top {
  position: fixed; z-index: 4; top: 0; left: 0; right: 0; height: 62px;
  display: flex; align-items: center; gap: 14px; padding: 0 var(--gut);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), transparent);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; display: block; }
.brand b {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: 25px; letter-spacing: 0.055em; line-height: 1;
}
.chip {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 4px 9px; border-radius: var(--r);
  color: var(--mist); white-space: nowrap;
}
.chip b { color: var(--bright); font-weight: 600; }
.top .sp { flex: 1; }
.num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.btn {
  border: 1px solid var(--line-hi); background: var(--panel-hi); color: var(--white);
  padding: 8px 15px; border-radius: var(--r); cursor: pointer; font-size: 13px;
  letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600;
  backdrop-filter: blur(12px); transition: border-color .16s, background .16s, transform .12s;
}
.btn:hover { border-color: var(--bright); background: rgba(24, 40, 52, 0.88); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .42; cursor: not-allowed; }
.btn.primary { border-color: var(--bright); background: rgba(16, 60, 78, 0.78); }
.btn.primary:hover { background: rgba(22, 86, 110, 0.9); }
.btn.ghost { background: transparent; border-color: var(--line); }

/* ---------- the courses: the nav is a row of the same chevrons ---------- */
.courses {
  position: fixed; z-index: 4; left: var(--gut); bottom: var(--gut);
  display: flex; gap: 7px; align-items: flex-end;
}
.courses a {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  padding: 9px 13px 10px; min-width: 94px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(12px);
  transition: border-color .18s, background .18s, transform .18s;
}
.courses a::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: transparent; transition: background .18s;
}
.courses a i {
  font-family: 'Instrument Serif', Georgia, serif; font-style: normal;
  font-size: 11px; letter-spacing: 0.2em; color: var(--faint);
}
.courses a span { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.courses a:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.courses a[aria-current='page'] { background: var(--panel-hi); border-color: var(--line-hi); }
.courses a[aria-current='page']::before { background: var(--bright); }
.courses a[aria-current='page'] i { color: var(--bright); }

/* ---------- the stele: the reading column ---------- */
.stele {
  position: fixed; z-index: 3; top: 62px; right: 0; bottom: 0; width: var(--rail);
  padding: 10px var(--gut) 26px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(134, 206, 228, .3) transparent;
}
.stele::-webkit-scrollbar { width: 6px; }
.stele::-webkit-scrollbar-thumb { background: rgba(134, 206, 228, .28); border-radius: 3px; }
.page { display: none; animation: rise .32s ease both; }
.page.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bright);
  margin: 6px 0 8px;
}
h1 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: 40px; line-height: 1.04; letter-spacing: -0.01em; margin: 0 0 12px;
}
h2 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: 23px; line-height: 1.16; margin: 24px 0 8px;
}
h3 { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 20px 0 8px; font-weight: 600; }
p { margin: 0 0 12px; color: var(--mist); }
p strong, li strong { color: var(--white); font-weight: 600; }
.lead { font-size: 16.5px; color: rgba(255, 255, 255, 0.82); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 15px; margin: 12px 0; backdrop-filter: blur(14px) saturate(118%);
}
.card.hi { background: var(--panel-hi); border-color: var(--line-hi); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 14px 0; }
.grid > div { background: rgba(6, 9, 13, 0.82); padding: 12px 13px; backdrop-filter: blur(14px); }
.grid dt { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 0 5px; }
.grid dd { margin: 0; font-size: 19px; font-weight: 600; }
.grid dd small { font-size: 11px; color: var(--faint); font-weight: 500; margin-left: 4px; }

.rows { border-top: 1px solid var(--line); margin: 12px 0 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.row span { color: var(--faint); }
.row b { font-weight: 600; }

.field { display: flex; gap: 8px; align-items: stretch; margin: 10px 0 6px; }
.field input {
  flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 13px; font-family: 'JetBrains Mono', monospace;
  font-size: 16px; letter-spacing: -0.01em;
}
.field input:focus { border-color: var(--bright); outline: none; }
.field .unit { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--faint); font-size: 12px; letter-spacing: .12em; }

.note { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }
.note.warn { color: #f2b06a; }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.state i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: block; }
.state.open i { background: var(--bright); box-shadow: 0 0 10px var(--bright); }
.state.shut i { background: #e07a5f; box-shadow: 0 0 10px #e07a5f; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 10px 0; }
.steps li { position: relative; padding: 0 0 0 36px; margin: 0 0 14px; color: var(--mist); }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: var(--r);
  border: 1px solid var(--line-hi); display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--bright);
}
.steps li b { color: var(--white); }

.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; word-break: break-all; color: var(--mist); }
.lot { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 13px; margin: 10px 0; background: var(--panel); backdrop-filter: blur(14px); }
.lot header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.lot header b { font-family: 'Instrument Serif', Georgia, serif; font-size: 18px; font-weight: 400; }
.lot .acts { display: flex; gap: 8px; margin-top: 10px; }
.lot .acts .btn { flex: 1; padding: 7px 10px; font-size: 11.5px; }

.bar { height: 4px; background: rgba(255, 255, 255, .09); border-radius: 2px; overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--bright)); width: 0; transition: width .5s ease; }

footer.feet { margin: 26px 0 10px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
footer.feet a:hover { color: var(--bright); }

/* ---------- narrow ---------- */
@media (max-width: 1080px) { :root { --rail: 360px; } h1 { font-size: 34px; } }
@media (max-width: 860px) {
  body { overflow: auto; }
  .stele {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto;
    max-height: 62dvh; padding: 14px var(--gut) 18px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .72) 7%, rgba(0, 0, 0, .9) 100%);
    border-top: 1px solid var(--line);
  }
  .courses {
    left: 0; right: 0; bottom: auto; top: 62px; padding: 0 var(--gut);
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .courses::-webkit-scrollbar { display: none; }
  .courses a { min-width: 84px; padding: 7px 11px 8px; }
  h1 { font-size: 30px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .top .chip.wide { display: none; }
}
