/* Explorations open as a panel with open margins, over a blurred machine.
   The margins are live: clicking one returns to the machine, and seeing the
   machine through the blur is what says so. */

.explore {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 5vh, 3rem) clamp(1.25rem, 4vw, 3.5rem);
  /* Light enough that the machine stays readable through the blur, which is
     what tells you the margins lead back to it. */
  background: rgba(6, 8, 12, 0.32);
  -webkit-backdrop-filter: blur(9px) saturate(0.9);
  backdrop-filter: blur(9px) saturate(0.9);
  animation: explore-fade 180ms ease-out;
}

.explore[hidden] { display: none; }

.explore-panel {
  width: min(72rem, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: explore-rise 200ms ease-out;
}

@keyframes explore-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes explore-rise {
  from { transform: translateY(14px); }
  to   { transform: none; }
}

/* ── overlay header ──────────────────────────────────── */

.explore-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #070910;
}

.explore-bar h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}

.explore-bar .explore-span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dimmer);
}

.explore-back {
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--vga);
  font-size: 0.9rem;
  color: var(--dim);
  cursor: pointer;
  transition: color var(--ease);
}

.explore-back:hover { color: var(--accent); }
.explore-back::before { content: "\2190"; margin-right: 0.5rem; }

/* ── scrolling body ──────────────────────────────────── */

.explore-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.explore-inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2.4rem 1.5rem 6rem;
}

.explore-intro {
  font-size: 1.06rem;
  line-height: 1.68;
  color: #c6cede;
  max-width: 48rem;
  margin: 0 0 3rem;
}

/* ── era headings ────────────────────────────────────── */

.era {
  margin: 3.6rem 0 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.era:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }

.era-years {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.8;
  margin: 0 0 0.35rem;
}

.era h3 {
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.7rem;
  color: #fff;
}

.era p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: #b3bccd;
  max-width: 46rem;
  margin: 0;
}

/* ── entries ─────────────────────────────────────────── */

.entry {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.entry:hover { background: rgba(56, 189, 248, 0.03); }

.entry-year {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--dimmer);
  padding-top: 0.12rem;
}

.entry-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: #e8edf6;
  margin: 0 0 0.2rem;
}

.entry-spec {
  font-family: var(--mono);
  font-size: 0.735rem;
  line-height: 1.5;
  color: var(--accent);
  opacity: 0.72;
  margin: 0 0 0.45rem;
}

.entry-text {
  font-size: 0.92rem;
  line-height: 1.62;
  color: #a9b3c4;
  margin: 0;
  max-width: 44rem;
}

.entry.is-key .entry-name { color: #fff; }
.entry.is-key {
  border-left: 2px solid var(--accent-dk);
  margin-left: -1rem;
  padding-left: 1rem;
}

/* ── figures ─────────────────────────────────────────── */

figure.shot {
  margin: 0 0 0.5rem;
  grid-column: 2;
}

/* Previews are small on purpose; clicking one opens it full size. */
.shot-thumb {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel-alt);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
}

.shot-thumb:hover,
.shot-thumb:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

/* No percentage max-width here: the button shrinks to fit the image, so a
   width relative to the parent is circular and collapses to nothing. */
.shot-thumb img {
  display: block;
  height: 9rem;
  width: auto;
}

figure.shot .placeholder {
  display: grid;
  place-items: center;
  gap: 0.3rem;
  width: 16rem;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--line);
  border-radius: 3px;
  background: repeating-linear-gradient(
    45deg, #10141c, #10141c 8px, #0d1119 8px, #0d1119 16px);
  text-align: center;
  padding: 1rem;
}

.placeholder-msg {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--dim);
}

.placeholder-what {
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.4;
  color: var(--dimmer);
}

figure.shot figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dimmer);
  margin-top: 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
  .explore,
  .explore-panel { animation: none; }
  .explore-scroll { scroll-behavior: auto; }
}

/* ── cross topic pointer ─────────────────────────────── */

.cross-link {
  margin: 3rem 0 1rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.cross-link p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: #b3bccd;
  max-width: 46rem;
  margin: 0 0 1.1rem;
}

/* ── entry links ─────────────────────────────────────── */

.entry-name a {
  color: #e8edf6;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color var(--ease), border-color var(--ease);
}

.entry-name a:hover,
.entry-name a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

/* Small outward arrow, so it is clear the link leaves the page. */
.entry-name a::after {
  content: "\2197";
  margin-left: 0.3rem;
  font-size: 0.78em;
  color: var(--dimmer);
  border: none;
  transition: color var(--ease);
}

.entry-name a:hover::after,
.entry-name a:focus-visible::after { color: var(--accent); }

/* ── screenshot at full size ─────────────────────────── */

.lightbox {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 3rem 2rem;
  background: rgba(5, 7, 11, 0.92);
  cursor: zoom-out;
  animation: lightbox-in 140ms ease-out;
}

.lightbox[hidden] { display: none; }

@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox figure {
  margin: 0;
  cursor: default;
}

/* Sized against the viewport rather than the parent, for the same reason. */
.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: calc(100vh - 9rem);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.lightbox figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  margin-top: 0.7rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
}

.lightbox-close:hover,
.lightbox-close:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }

@media (prefers-reduced-motion: reduce) {
  .lightbox { animation: none; }
  .shot-thumb { transition: none; }
}
