/* ============================================================
   THESIS ATLAS · stylesheet
   Pure-black ground, hairline-white ink, archival typography.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500&family=IBM+Plex+Serif:wght@300;400;500&display=swap');

:root {
  --bg:        #000000;
  --ink:       #ffffff;
  --ink-dim:   rgba(255, 255, 255, 0.55);
  --ink-faint: rgba(255, 255, 255, 0.22);
  --hair:      0.5px;
  --mono:      'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --serif:     'IBM Plex Serif', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 300;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: crosshair;
}

#atlas {
  width: 100vw;
  height: 100vh;
  display: block;
}

/* hide the bounding-box helpers that are embedded in the SVG */
#Zooms { display: none; }

/* ---- Top-right: key legend ---- */
.legend {
  position: fixed;
  top: 18px; right: 22px;
  z-index: 10;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  text-transform: uppercase;
  text-align: right;
  user-select: none;
  pointer-events: auto;
}
.legend .toggle {
  cursor: pointer;
  border: var(--hair) solid var(--ink-faint);
  padding: 4px 8px;
  display: inline-block;
}
.legend .toggle:hover { color: var(--ink); border-color: var(--ink); }
.legend .panel {
  display: none;
  margin-top: 8px;
  border: var(--hair) solid var(--ink-faint);
  padding: 10px 12px;
  background: rgba(0,0,0,0.72);
  line-height: 1.9;
  text-align: left;
  min-width: 260px;
}
.legend.open .panel { display: block; }

/* recording mode: hide legend too */
.legend .panel .k {
  display: inline-block;
  width: 18px;
  color: var(--ink);
  border: var(--hair) solid var(--ink-faint);
  text-align: center;
  margin-right: 8px;
  padding: 1px 0;
}

/* ---- Focus blur overlay (4 panels surrounding the active zoom box) ---- */
.fp {
  position: fixed;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.45s ease;
}
body.recording .fp { display: none; }

/* ---- loading state ---- */
.loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  color: var(--ink-dim);
  font-size: 10px;
  letter-spacing: 0.3em;
  z-index: 100;
}
.loading.hidden { display: none; }

/* ---- recording mode hides all chrome ---- */
body.recording .legend { display: none; }
