/* Project:92DT — Pure Open-Void Power Presentation & Braille Shader (Review v5) */
:root {
  --bg: #06070a;
  --fg: #f1e6d2;
  --dim: #9d9384;
  --ps: #e86a3a;
  --hi: #5cc2e6;
  --gold: #f3c16a;
  --warn: #ff7a7a;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100svh;
  background-image: radial-gradient(
    ellipse 55% 65% at 74% 52%,
    rgba(232, 106, 58, 0.06),
    rgba(92, 194, 230, 0.02) 48%,
    transparent 74%
  );
}

/* Faint CRT texture strictly ambient over full void, non-flickering */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.013) 0 1px,
    transparent 1px 3px
  );
  z-index: 3;
}

/* Header Asset: Project:92DT (bare typography, zero chrome boxes) */
.hdr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 16px clamp(18px, 4vw, 48px) 20px;
  background: linear-gradient(to bottom, #06070a 78%, rgba(6, 7, 10, 0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.brand-mark {
  flex: none;
  filter: drop-shadow(0 0 10px rgba(232, 106, 58, 0.28));
}

.brand-name {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 17.5px);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand-name .p {
  color: var(--fg);
}

.brand-name .dt {
  color: var(--ps);
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-left: 2px;
}

.doc-id {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.util-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.text-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 4px 2px;
  min-height: 28px;
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 130ms ease;
}

.text-btn:hover {
  color: var(--fg);
}

.text-btn#skip-btn {
  color: var(--gold);
}

button:focus-visible {
  outline: 1px solid var(--hi);
  outline-offset: 3px;
}

.tail-prompt input:focus {
  outline: none;
}

.tail-prompt input:focus-visible {
  outline: none;
  border-bottom: 1px solid rgba(92, 194, 230, 0.55);
}

/* Open Void Layout: running left stream + floating right canvas */
.void {
  position: relative;
  min-height: 100svh;
  padding: 76px clamp(18px, 4vw, 48px) 68px;
}

.stream {
  width: min(58ch, 47%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-space {
  position: fixed;
  top: 56px;
  right: clamp(16px, 3vw, 44px);
  bottom: 24px;
  width: min(680px, 47vw);
  display: grid;
  place-items: center;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  z-index: 4;
}

.art-space.dragging {
  cursor: grabbing;
}

#art {
  width: 100%;
  height: 100%;
  display: block;
}

/* Typography inside the open terminal stream */
.line-p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.gap {
  height: 12px;
}

.sec-head {
  margin: 14px 0 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(241, 230, 210, 0.12);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ps {
  color: var(--ps);
}

.hi {
  color: var(--hi);
}

.k {
  color: var(--dim);
}

.gold {
  color: var(--gold);
}

.warn {
  color: var(--warn);
}

.bullet {
  padding-left: 2ch;
  text-indent: -2ch;
}

.redact {
  background: rgba(241, 230, 210, 0.12);
  color: var(--gold);
  padding: 0 3px;
}

.memo-head {
  color: var(--fg);
  letter-spacing: 0.04em;
}

/* Inline bare terminal choices (zero card borders/pills) */
.role-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 4px 0 2px;
}

.inline-opt {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(232, 106, 58, 0.38);
  padding: 3px 1px;
  color: var(--ps);
  font: inherit;
  cursor: pointer;
  transition: color 130ms ease, border-color 130ms ease;
}

.inline-opt:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.inline-opt[aria-pressed="true"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

.inline-skip {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 3px 2px;
  color: var(--dim);
  font: inherit;
  cursor: pointer;
}

.inline-skip:hover {
  color: var(--fg);
}

/* Bare interactive tail prompt (zero form chrome) */
.tail-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.tail-prompt label {
  flex: none;
  white-space: nowrap;
}

.tail-prompt input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--fg);
  font: inherit;
  caret-color: var(--ps);
}

.tail-prompt input::placeholder {
  color: rgba(157, 147, 132, 0.45);
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  vertical-align: -2px;
  margin-left: 3px;
  background: var(--ps);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive mobile / narrow screens: art anchored cleanly above running script */
@media (max-width: 900px) {
  .hdr {
    position: sticky;
    top: 0;
    padding: 10px 16px 10px;
    background: #06070a;
    flex-wrap: nowrap;
  }

  .void {
    padding: 4px 16px 48px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .art-space {
    position: sticky;
    top: 48px;
    right: auto;
    bottom: auto;
    order: 1;
    width: 100%;
    height: 248px;
    padding-bottom: 8px;
    background: linear-gradient(to bottom, #06070a 88%, rgba(6, 7, 10, 0));
    z-index: 10;
  }

  .stream {
    order: 2;
    width: 100%;
  }

  .tail-prompt input::placeholder {
    font-size: 11.5px;
  }
}

@media (max-width: 640px) {
  .doc-id {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}
