/* ==========================================================================
   memori tty01 — Base
   Reset, the mono-everywhere rule, selection + focus, scrollbars.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  height: 100%;
  overflow: hidden; /* the tube scrolls inside .screen, not the page */
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: var(--fs-term);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Phosphor selection: ember block, ink text — same rule as the brand. */
::selection {
  background: var(--accent);
  color: var(--ink);
}

/* Focus is the terminal's job: the block cursor turns solid when the input
   owns focus. Keep a real outline for the statusbar buttons. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Thin archive scrollbars, hairline thumb. */
.screen {
  scrollbar-width: thin;
  scrollbar-color: var(--hair-strong) transparent;
}
.screen::-webkit-scrollbar {
  width: 8px;
}
.screen::-webkit-scrollbar-thumb {
  background: var(--hair-strong);
  border-radius: var(--radius-l);
}
.screen::-webkit-scrollbar-track {
  background: transparent;
}

/* Every link in output: ember, hairline underline — no default blue. */
a {
  color: var(--accent-hi);
  text-decoration: underline;
  text-decoration-color: var(--hair-strong);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Reduced motion: the tube stops flickering, the caret holds solid,
   staged reveals print instantly (JS checks RM too). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
