/* ════════════════════════════════════════════════════════════
   Terminal Tribune — GETEILTE Oberflaeche
   CRT Amber Phosphor Terminal Interface

   ⚠ DIESE DATEI GEHOERT VIER SEITEN: index.html, impressum.html,
     entitaet/index.html und schattenatlas.html.
     entitaet/index.html laedt AUSSCHLIESSLICH sie — dort faengt kein zweites
     Stylesheet einen Fehler auf.
   ⚠ Was nur der Atlas braucht, gehoert nach css/atlas.css. Am 2026-09-01 wurde
     das getrennt (#950), weil ein Umbruchpunkt, der fuer den Atlas richtig war,
     den drei anderen Seiten die Kopfzeile beschaedigt hat. Wer hier etwas
     einfuegt, aendert vier Seiten.
   ════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

:root {
  --amber:        #FFB000;
  --amber-bright: #FFD060;
  --amber-dim:    rgba(255, 176, 0, 0.55);
  --amber-glow:   rgba(255, 176, 0, 0.15);
  --bg:           #080600;
  --bg-panel:     #0d0b00;
  --bg-secondary: #110f01;
  --border:       rgba(255, 176, 0, 0.18);
  --border-bright:rgba(255, 176, 0, 0.38);
  --text:         #FFB000;
  --text-dim:     rgba(255, 176, 0, 0.55);
  --red:          #ff4422;
  --green:        #44cc66;
  --blue:         #3a9bd4;
  --font-crt:     'VT323', monospace;
  --font-mono:    'Share Tech Mono', 'Courier New', monospace;
}

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


/* ── CRT Scanlines Overlay ──────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
}


/* ── CRT Boot Flash ─────────────────────────────────────────── */
#crt-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(255, 176, 0, 0.06);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#crt-boot-overlay.active {
  opacity: 1;
  animation: crt-boot 0.6s ease-out forwards;
}
@keyframes crt-boot {
  0%   { opacity: 1; }
  40%  { opacity: 0.4; }
  100% { opacity: 0; }
}


/* ── Base ───────────────────────────────────────────────────── */
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  text-shadow: 0 0 4px rgba(255, 176, 0, 0.4);
}


/* ── Blink Cursor ───────────────────────────────────────────── */
.tt-blink {
  animation: tt-blink 1.1s step-end infinite;
}
@keyframes tt-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}


/* ── Header ─────────────────────────────────────────────────── */
.tt-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-bright);
  box-shadow: 0 1px 20px rgba(255, 176, 0, 0.1);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 44px;
  flex-shrink: 0;
  gap: 12px;
  z-index: 1000;
  position: relative;
}

.tt-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}

.tt-header-title {
  font-family: var(--font-crt);
  font-size: 27px;
  font-weight: 700;
  color: var(--amber, #ffb000);
  letter-spacing: 0.32em;
  text-shadow: 0 0 14px rgba(255, 176, 0, 0.85), 0 0 36px rgba(255, 176, 0, 0.28);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: center;
  flex: 1;
  justify-content: center;
}

.tt-header-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--amber-dim);
  text-shadow: none;
}

.tt-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  justify-content: flex-end;
}

.tt-clock {
  font-family: var(--font-crt);
  font-size: 18px;
  color: var(--amber-dim);
  letter-spacing: 0.1em;
}

.tt-led {
  color: var(--green);
  font-size: 10px;
  text-shadow: 0 0 6px var(--green);
  animation: led-pulse 2s ease-in-out infinite;
}
@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.tt-sys {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  letter-spacing: 0.15em;
  text-shadow: 0 0 6px rgba(68, 204, 102, 0.5);
}


/* ── Footer ─────────────────────────────────────────────────── */
.tt-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: rgba(255, 176, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 5px 20px;
  text-align: center;
  flex-shrink: 0;
}


/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }


/* ── Entity Graph-Link Button (Deep Link → Schattenatlas Graph) ── */
.entity-graph-link {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.graph-link-btn {
  background: none;
  cursor: pointer;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--amber-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 2px;
  transition: color .15s, border-color .15s;
}
.graph-link-btn:hover {
  color: var(--amber);
  border-color: var(--amber);
}


/* ════════════════════════════════════════════════════════════
   SCHMALE SCHIRME (≤ 768px) — nur der GETEILTE Teil
   ⚠ Dieser Block gilt fuer index.html, impressum.html UND entitaet/index.html.
     Der Atlas-Teil steht in css/atlas.css und darf hier NICHT wieder einziehen:
     am 2026-09-01 habe ich den Umbruchpunkt dieses Blocks auf 950 gesetzt, um die
     Tablet-Flotte einzufangen — und damit den drei anderen Seiten zwischen 769 und
     950 px Uhr, LED und Titelgroesse genommen. Der Atlas braucht eine andere Grenze
     als die Zeitung; deshalb haben sie jetzt getrennte Bloecke.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .tt-header { padding: 0 8px; height: 44px; gap: 6px; }
  .tt-header-title { font-size: 15px; letter-spacing: 0.08em; gap: 4px; flex-direction: column; line-height: 1; }
  .tt-header-sub, .tt-clock, .tt-sys, .tt-led { display: none; }
  .tt-header-left { min-width: auto; }
  .tt-header-right { min-width: auto; gap: 6px; }
  .tt-footer { font-size: 9px; letter-spacing: 0.08em; padding: 3px 8px; }
}

/* Extra-klein (≤ 380px) */
@media (max-width: 380px) {
  .tt-header-title { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════════════════
   #424 — Barrierefreiheit (a11y): Kontrast · Fokus · Touch · reduced-motion · Canvas-Alternative
   ════════════════════════════════════════════════════════════════════════ */

/* (5) Kontrast: NUR bei OS-Wunsch „mehr Kontrast" — Standard-CRT-Look bleibt unverändert (CHR-Vorgabe). */

@media (prefers-contrast: more) {
  :root { --amber-dim: rgba(255, 176, 0, 0.85); }
  .quelle-datum { color: rgba(255, 176, 0, 0.75) !important; }
  .rollen-hint  { color: rgba(255, 176, 0, 0.75); }
}


/* (1) Sichtbarer Fokus-Ring für alle bedienbaren Elemente (Tastatur-Navigation) */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
[tabindex]:focus-visible, .rolle-chip:focus-visible, .view-btn:focus-visible,
.tab-btn:focus-visible, .set-btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 2px;
  border-radius: 2px;
}
/* NUR :focus-visible (Tastatur) — bewusst KEIN :focus-Fallback/:focus-within, das würde bei Maus-Klick
   einen Rahmen zeigen und damit den Standard-Look verändern (CHR-Vorgabe). */



/* (4) prefers-reduced-motion: dekorative Animationen/Übergänge aus
   (Canvas-Bewegung autoRotate/Sternschnuppe/Puls wird zusätzlich in JS gegated) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  #crt-overlay, #crt-boot-overlay { display: none !important; }
  .tt-led { animation: none !important; }
}
