/* NetGain NOW PLAYING strip — shared across intranet pages */
.ambience {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0; padding: 3px 8px 3px 6px;
  border: none; border-top: 1px solid #444;
  background: #111; color: #0f0;
  font-family: "Courier New", Courier, monospace; font-size: 10px;
  line-height: 1.2; box-sizing: border-box; min-height: 0;
}
.ambience .np {
  flex: 1; min-width: 0; letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; white-space: nowrap;
}
.ambience .np .np-label { flex: 0 0 auto; color: #ffff00; font-weight: bold; }
.ambience .np .np-track { flex: 1; min-width: 0; overflow: hidden; }
.ambience .np .np-track marquee {
  display: block; width: 100%;
  font-family: "Courier New", Courier, monospace; font-size: 10px; color: #0f0;
}
.ambience .np .ch { color: #9f9; }
.mute-btn {
  flex: 0 0 auto;
  font-family: "Courier New", Courier, monospace; font-size: 13px; font-weight: bold;
  letter-spacing: 1.5px; background: #000; color: #0f0; border: 2px outset #666;
  padding: 6px 14px; cursor: pointer; white-space: nowrap; line-height: 1.2;
  min-width: 72px; box-shadow: 0 0 0 1px #222;
}
.mute-btn:active { border-style: inset; }
.mute-btn.is-muted { color: #f66; border-color: #a44; background: #1a0000; }
.ch-btn {
  flex: 0 0 auto;
  font-family: "Courier New", Courier, monospace; font-size: 12px; font-weight: bold;
  letter-spacing: 1px; background: #000; color: #ffff00; border: 2px outset #666;
  padding: 6px 10px; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.ch-btn:active, .ch-btn[aria-expanded="true"] { border-style: inset; color: #fff; }
.ch-panel {
  position: fixed; right: 6px; bottom: 40px; z-index: 9001;
  width: 300px; max-width: calc(100vw - 12px); box-sizing: border-box;
  background: #fff; border: 3px solid #b3121f; box-shadow: 3px 3px 0 #000;
  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #000;
}
.ch-panel[hidden] { display: none; }
.ch-head { background: #b3121f; color: #fff; font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 11px; letter-spacing: 1px; padding: 4px 6px; }
.ch-close { float: right; cursor: pointer; color: #ffff00; }
.ch-sub { background: #fdedee; padding: 3px 6px; font-size: 10px; border-bottom: 1px solid #b3121f; }
.ch-list { list-style: none; margin: 0; padding: 0; }
.ch-list li { margin: 0; border-bottom: 1px dotted #999; }
.ch-list button {
  display: block; width: 100%; text-align: left; background: #fff; border: none;
  padding: 6px 8px; cursor: pointer; font-family: "Courier New", Courier, monospace; font-size: 11px; color: #000;
}
.ch-list button:hover { background: #f5f5f5; }
.ch-list button .chn { color: #000080; font-weight: bold; }
.ch-list button .note { display: block; color: #666; font-size: 9px; margin-top: 1px; }
.ch-list button.active { background: #000; color: #0f0; }
.ch-list button.active .chn { color: #ffff00; }
.ch-list button.active .note { color: #9f9; }
.ch-foot { padding: 3px 6px; font-size: 9px; color: #666; text-align: center; background: #f0f0f0; }
body.ng-has-ambience { padding-bottom: 44px; }

/* Return-visit glitch overlay — full-page corruption */
#ng-glitch {
  position: fixed; inset: 0; z-index: 10050; pointer-events: none;
  display: none; overflow: hidden;
}
#ng-glitch.on { display: block; }
#ng-glitch .g-red {
  position: absolute; inset: 0;
  background: rgba(120,0,10,0.42);
  mix-blend-mode: multiply;
  animation: ngGFlicker 0.12s steps(2) infinite;
}
#ng-glitch .g-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.35) 3px,
    rgba(180,0,0,0.08) 4px
  );
  opacity: 0.85;
}
#ng-glitch .g-noise {
  position: absolute; inset: -10%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.35; mix-blend-mode: overlay;
  animation: ngGShake 0.08s steps(2) infinite;
}
#ng-glitch .g-tear {
  position: absolute; left: 0; right: 0; height: 18%;
  background: rgba(255,0,40,0.18);
  box-shadow: 0 0 0 2px rgba(0,255,80,0.25), 4px 0 0 rgba(255,0,0,0.4), -4px 0 0 rgba(0,80,255,0.35);
  animation: ngGTear 0.35s steps(3) infinite;
  transform: translateX(-6px);
}
#ng-glitch .g-rgb {
  position: absolute; inset: 0;
  box-shadow: inset 6px 0 0 rgba(255,0,0,0.25), inset -6px 0 0 rgba(0,120,255,0.25);
  animation: ngGRgb 0.15s steps(2) infinite;
}
#ng-glitch .g-copy {
  /* thin full-bleed status strip — not a centered popup card */
  position: absolute; left: 0; right: 0; top: 12%;
  width: 100%; max-width: none; box-sizing: border-box;
  background: rgba(0,0,0,0.82); border: none; border-top: 2px solid #b3121f; border-bottom: 2px solid #b3121f;
  color: #ff2222;
  font-family: "Courier New", Courier, monospace; font-size: 11px; font-weight: bold;
  letter-spacing: 1px; text-align: center; padding: 10px 14px;
  text-shadow: 2px 0 #0ff, -2px 0 #f00;
  animation: ngGFlicker 0.18s steps(2) infinite;
  transform: none;
}
#ng-glitch .g-copy .tag { color: #ffff00; display: block; margin-bottom: 6px; letter-spacing: 2px; }
#ng-glitch .g-copy .sub { color: #ccc; font-size: 10px; font-weight: normal; margin-top: 8px; display: block; }
@keyframes ngGFlicker { 50% { opacity: 0.72; } }
@keyframes ngGShake { 50% { transform: translate(3px, -2px); } }
/* t172: tear strips move with transform only (no 'top' animation -> no layout-shift entries, CLS ~ 0) */
#ng-glitch .g-tear { top: 0; will-change: transform; }
@keyframes ngGTear {
  0% { transform: translate(-10px, 18vh) skewX(-2deg); }
  50% { transform: translate(12px, 55vh) skewX(3deg); }
  100% { transform: translate(-4px, 72vh); }
}
@keyframes ngGRgb { 50% { box-shadow: inset -8px 0 0 rgba(255,0,0,0.3), inset 8px 0 0 rgba(0,120,255,0.3); } }
/* Player in error mode: question marks only, neutral (no red wash) */
body.ng-glitching .ambience,
body.ng-glitching .ambience .np .ch,
body.ng-glitching .ambience .np-label {
  color: #bbb !important;
  text-shadow: 1px 0 #0ff, -1px 0 #f0f;
}
body.ng-glitching .ambience { background: #0a0a0a; border-top-color: #444; }
body.ng-glitching .mute-btn, body.ng-glitching .ch-btn {
  color: #ccc; border-color: #555; background: #000;
}
body.ng-glitching .ch-list { display: none !important; }
.ch-q {
  padding: 18px 8px; text-align: center; background: #000; color: #bbb;
  font-family: "Courier New", Courier, monospace; font-size: 14px; font-weight: bold;
  letter-spacing: 6px; line-height: 1.6; text-shadow: 1px 0 #0ff, -1px 0 #f0f;
}
body.ng-glitching .ch-panel { border-color: #555; background: #000; }
body.ng-glitching .ch-head { background: #222; color: #ccc; }

/* RED bath — boot menu ONLY (#ng-enter / #boot visible: body.ng-glitch-boot) */
body.ng-glitching.ng-glitch-boot {
  background-color: #1a0508 !important;
}
/* t191: the boot tint used to be a `filter` on <body>. A filtered ancestor becomes the containing block for
   position:fixed descendants, so the gate, #boot, grain and player were laid out against the whole (tall) page instead
   of the viewport: boot content sat far down (off-screen on long pages / mobile) and the player dropped out of view.
   Same tint, now applied to each top-level layer instead of their common ancestor. */
body.ng-glitching.ng-glitch-boot > :not(script):not(style):not(audio):not(link):not(#ng-errmodal) {
  filter: saturate(1.35) contrast(1.08);
}
body.ng-glitching.ng-glitch-boot .page {
  background: #1a0808 !important;
  color: #e8d0d0;
  border-color: #882222 !important;
  box-shadow: inset 0 0 80px rgba(120,0,20,0.35);
}
#ng-glitch .g-red { background: rgba(140,0,12,0.55); }

/* After boot → site: drop every red layer from the live directory; keep only faint neutral grain/scan */
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-red,
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-tear,
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-rgb,
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-copy {
  display: none !important;
}
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-scan {
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.12) 3px, rgba(0,0,0,0) 4px);
  opacity: 0.25;
}
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-noise { opacity: 0.05; animation: none; }

/* CLICK TO ENTER stays prominent in error mode: gate sits ABOVE #ng-glitch (10050),
   carries its own red bath underneath the label, label is steady + glowing */
body.ng-glitching #ng-enter {
  z-index: 10100 !important;
  background: radial-gradient(ellipse at center, #2a0208 0%, #140106 55%, #050508 100%) !important;
}
body.ng-glitching #ng-enter::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.35) 3px, rgba(180,0,0,0.10) 4px),
    rgba(140,0,12,0.35);
  animation: ngGFlicker 0.12s steps(2) infinite;
}
body.ng-glitching #ng-enter > * { position: relative; z-index: 1; }
body.ng-glitching #ng-enter .enter-label {
  font-size: 17px !important; color: #ffff00 !important; letter-spacing: 4px;
  background: #000; border: 2px solid #ffff00; padding: 10px 18px;
  text-shadow: 0 0 6px #ff0, 0 0 14px rgba(255,255,0,0.6);
  box-shadow: 0 0 0 2px #000, 0 0 18px rgba(255,255,0,0.45);
  animation: ngEnterPulse 1.1s ease-in-out infinite !important;
  opacity: 1 !important; visibility: visible !important;
}
@keyframes ngEnterPulse { 50% { box-shadow: 0 0 0 2px #000, 0 0 28px rgba(255,255,0,0.8); } }

/* ===== t126/t129: post-boot error mode — ALL pages incl. Talent: whites -> glitchy red (legible) ===== */
html body.ng-glitching:not(.ng-glitch-boot) { background-color: #2a0306; }
html body.ng-glitching:not(.ng-glitch-boot) .page {
  background: #d8262e repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 3px, rgba(60,0,0,0.10) 3px 4px) !important;
  border-color: #5a0a0e !important; color: #0a0000;
  animation: ngPageJit 4.2s steps(1) infinite;
}
html body.ng-glitching:not(.ng-glitch-boot) .header-table,
html body.ng-glitching:not(.ng-glitch-boot) .sidenav,
html body.ng-glitching:not(.ng-glitch-boot) .form,
html body.ng-glitching:not(.ng-glitch-boot) .ch-foot { background: #c81f27 !important; }
html body.ng-glitching:not(.ng-glitch-boot) .dir td,
html body.ng-glitching:not(.ng-glitch-boot) .dir tr { background: #e0353c !important; border-color: #5a0a0e !important; }
html body.ng-glitching:not(.ng-glitch-boot) .dir tr:nth-child(even) td { background: #d42a31 !important; }
html body.ng-glitching:not(.ng-glitch-boot) .alert,
html body.ng-glitching:not(.ng-glitch-boot) .notice,
html body.ng-glitching:not(.ng-glitch-boot) .frag,
html body.ng-glitching:not(.ng-glitch-boot) .ch-sub { background: #ea5056 !important; border-color: #3a0004 !important; }
html body.ng-glitching:not(.ng-glitch-boot) .talent-card,
html body.ng-glitching:not(.ng-glitch-boot) .boiler,
html body.ng-glitching:not(.ng-glitch-boot) .cta.secondary,
html body.ng-glitching:not(.ng-glitch-boot) .form input,
html body.ng-glitching:not(.ng-glitch-boot) .form select,
html body.ng-glitching:not(.ng-glitch-boot) .form textarea,
html body.ng-glitching:not(.ng-glitch-boot) .sidenav a.here,
html body.ng-glitching:not(.ng-glitch-boot) .sidenav a:hover { background: #f06a6e !important; }
/* text: near-black on the red so nothing washes out (red-on-red accents flipped to black/white) */
html body.ng-glitching:not(.ng-glitch-boot) .page :is(h1,h2,h3,p,td,th,li,small,b,span,div,label,.sub,.section,.sidenav a):not(.redact):not(.cta):not(.cta *):not(.ng-sig-banner):not(.ng-sig-banner *):not(.ng-dossier-strip):not(.ng-liab):not(.channel-hero):not(.channel-hero *):not(.topbar):not(.topbar *):not(.marquee-wrap):not(.marquee-wrap *):not(.territories):not(.territories *):not(.dir th):not(.dir th *):not(.counter):not(.counter *):not(.bottombar):not(.bottombar *):not(.sn-head):not(.sn-head *):not(.feed):not(.feed *):not(.nate-reel-wrap):not(.nate-reel-wrap *):not(.ng-cf-head):not(.ng-vs thead th):not(.ng-vs td.v):not(.ng-vs td.v *):not(.ng-incident):not(.ng-incident *) {
  color: #0a0000 !important; text-shadow: none;
}
html body.ng-glitching:not(.ng-glitch-boot) .page a:not(.cta):not(.channel-hero a) { color: #000 !important; text-decoration: underline; }
html body.ng-glitching:not(.ng-glitch-boot) .page .redact { background: #000 !important; color: #000 !important; }
@keyframes ngPageJit {
  0%, 91%, 100% { transform: none; filter: none; }
  92% { transform: translateX(1px); filter: drop-shadow(1px 0 0 rgba(0,255,255,0.35)) drop-shadow(-1px 0 0 rgba(255,0,80,0.35)); }
  94% { transform: translateX(-1px); filter: none; }
}

/* faint full-page corruption hint post-boot (all pages): scan + moving noise + rare thin tear */
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-scan { opacity: 0.35; }
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-noise { opacity: 0.08; animation: ngGShake 0.12s steps(2) infinite; }
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-tear {
  display: block !important; height: 3px; background: rgba(255,255,255,0.10);
  box-shadow: 2px 0 0 rgba(0,255,255,0.18), -2px 0 0 rgba(255,0,60,0.18);
  animation: ngGTearSlow 7s linear infinite;
}
@keyframes ngGTearSlow { 0% { transform: translateY(-2vh); opacity: 0; } 4% { opacity: 1; } 30% { transform: translateY(102vh); opacity: 1; } 31%, 100% { transform: translateY(102vh); opacity: 0; } }

/* SIGNAL INTEGRITY banner — main page (index), error mode only, post-boot, in-flow under the top bar */
.ng-sig-banner { display: none; }
html[data-ng-page="index"] body.ng-glitching:not(.ng-glitch-boot) .ng-sig-banner {
  display: block; position: sticky; top: 0; z-index: 5;
  background: #000; color: #ffff00; border-top: 1px solid #5a0a0e; border-bottom: 2px solid #ffff00;
  font-family: "Courier New", Courier, monospace; font-size: 10px; font-weight: bold;
  letter-spacing: 3px; text-align: center; padding: 3px 8px; text-transform: uppercase;
}
.ng-sig-banner .dot { color: #ff2a2a; animation: ngGFlicker 0.9s steps(2) infinite; }

/* ===== t128: TALENT in error mode — original page + red (as on 6bbd2f01); cover-up breadcrumbs only ===== */
.ng-dossier-strip, .ng-liab, .ng-review, .ng-addrow, .ng-addendum { display: none; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .talent-card { position: relative; overflow: hidden; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .talent-card .badge:not(.ng-liab) { text-decoration: line-through; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .status-term { text-decoration: line-through !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-liab {
  display: inline-block; background: #000 !important; color: #fff !important; border: 2px outset #444 !important; margin-left: 4px;
}
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-review { display: inline; color: #b3121f; font-weight: bold; letter-spacing: 1px; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-addrow { display: table-row; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-addrow td { color: #b3121f; font-family: "Courier New", Courier, monospace; font-size: 11px; font-weight: bold; letter-spacing: 1px; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-dossier-strip {
  display: block; background: #000; color: #ff3b3b; border-top: 1px solid #b3121f; border-bottom: 1px solid #b3121f;
  font-family: "Courier New", Courier, monospace; font-size: 10px; font-weight: bold; letter-spacing: 2px;
  text-align: center; padding: 4px 8px; animation: ngGFlicker 2.4s steps(2) infinite;
}
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-addendum {
  display: block; margin-top: 6px; padding-top: 4px; border-top: 1px dashed #844; color: #b3121f; font-weight: bold;
}

/* t126: occasional error-mode page flicker (~150ms every 20–35s) */
#ng-glitch .g-flash { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
body.ng-glitching.ng-flick #ng-glitch .g-flash { opacity: 0.38; }
body.ng-glitching.ng-flick .page { filter: brightness(1.15) contrast(1.1); }
@media (prefers-reduced-motion: reduce) {
  body.ng-glitching.ng-flick #ng-glitch .g-flash { opacity: 0.12; }
  body.ng-glitching.ng-flick .page { filter: none; }
}

/* t128: error-mode mute label glitch — fixed width so scrambles never shift the bar */
body.ng-glitching .mute-btn.ng-mute-glitch {
  font-family: "Courier New", Courier, monospace; min-width: 8ch; text-align: center; white-space: pre;
}

/* t129: Talent breadcrumbs on the glitchy-red wash — black/yellow so they stay legible */
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-review { color: #000 !important; text-decoration: underline; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-addrow td { color: #000 !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-addrow th { color: #0a0000 !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-addendum { color: #000 !important; border-top-color: #3a0004 !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-dossier-strip { color: #ffff00 !important; border-color: #000 !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-liab { color: #fff !important; }

/* ===== t132: error-mode player — NO SOURCE (empty title + caret, stuck 00:00, dead channel control) ===== */
body.ng-glitching .ambience.ng-nosrc .np-label { color: #5c5c5c !important; letter-spacing: 2px; font-weight: bold; text-shadow: none; }
body.ng-glitching .ambience.ng-nosrc .np-track { flex: 0 1 auto; }
body.ng-glitching .ambience.ng-nosrc #npTitle { display: inline-block; min-width: 1ch; color: #8a8a8a !important; }
body.ng-glitching .ambience.ng-nosrc #npTitle::after { content: "\258C"; color: #8a8a8a; animation: ngNosrcCaret 1.06s steps(1) infinite; }
body.ng-glitching .ambience.ng-nosrc .np-time { flex: 0 0 auto; margin-left: 10px; color: #4a4a4a; letter-spacing: 1px; text-shadow: none; }
body.ng-glitching .ambience.ng-nosrc .ch-btn:disabled,
body.ng-glitching .ch-btn:disabled {
  color: #3d3d3d !important; background: #070707 !important; border: 2px solid #1e1e1e !important;
  cursor: not-allowed; text-shadow: none; opacity: 0.8;
}
body.ng-glitching .ch-panel { display: none !important; }
@keyframes ngNosrcCaret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  body.ng-glitching .ambience.ng-nosrc #npTitle::after { animation: none; opacity: 0.6; }
}

/* ===== t132: post-Start error — procedural canvas layer replaces the fixed steps() loops (error mode only) ===== */
#ng-glitch .g-proc { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
#ng-glitch.g-procedural .g-tear { display: none !important; }
#ng-glitch.g-procedural .g-red,
#ng-glitch.g-procedural .g-rgb,
#ng-glitch.g-procedural .g-noise,
#ng-glitch.g-procedural .g-copy { animation: none !important; }
#ng-glitch .g-copy.g-ghost { pointer-events: none; opacity: 0; color: #ff2222; background: rgba(40,0,6,0.9); }
#ng-glitch .g-copy.g-ghost .tag { color: #00ffff; }
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-proc,
body.ng-glitching:not(.ng-glitch-boot) #ng-glitch .g-ghost { display: none !important; }

/* ===== t172 ===== */
/* error player: static title holder (replaces the marquee) so "???" + caret are always in view */
.ambience .np .np-track .np-static {
  display: block; width: 100%; white-space: nowrap; overflow: hidden;
  font-family: "Courier New", Courier, monospace; font-size: 10px; color: #0f0;
}
/* SIGNAL INTEGRITY banner stays pinned at the top while scrolling on mobile. overflow-x:hidden on .outer/.page
   made them scroll containers, which silently disabled position:sticky; 'clip' keeps the clipping without that. */
html[data-ng-page="index"] body.ng-glitching:not(.ng-glitch-boot) .ng-sig-banner { top: env(safe-area-inset-top, 0px); z-index: 50; }
@supports (overflow: clip) {
  @media (max-width: 640px) {
    html[data-ng-page="index"] body.ng-glitching .outer,
    html[data-ng-page="index"] body.ng-glitching .page { overflow-x: clip; }
  }
}
/* header cells: width:100% + padding overflowed the 390/360px viewport (right edge clipped) */
@media (max-width: 640px) {
  html body .header-table td { box-sizing: border-box; max-width: 100%; }
}
/* mobile nav: ~44px tap targets (same look, more height) */
@media (max-width: 760px) {
  html body .sidenav a { min-height: 44px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding-top: 6px; padding-bottom: 6px; }
}

/* ===== t178: Talent error-mode leaked case file (error mode only, post-boot) ===== */
.ng-leak, .ng-casefile { display: none; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .talent-card p.subj:not(.ng-leak) { display: none; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .talent-card p.ng-leak { display: block; color: #000; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-casefile { display: block; margin: 10px 0 4px; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-cf-head {
  background: #000 !important; color: #ffff00 !important; border-top: 1px solid #000; border-bottom: 1px solid #000;
  font-family: "Courier New", Courier, monospace; font-size: 10px; font-weight: bold; letter-spacing: 2px;
  padding: 4px 8px; margin: 10px 0 0;
}
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs {
  width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0;
  font-family: "Courier New", Courier, monospace; font-size: 11px; color: #000;
}
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs th,
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs td {
  border: 1px solid #3a0004; padding: 4px 6px; vertical-align: top; text-align: left; word-break: break-word; background: transparent !important;
}
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs thead th { background: #000 !important; color: #fff !important; letter-spacing: 1px; font-size: 10px; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs tbody th { width: 24%; font-weight: bold; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs thead th:first-child { width: 24%; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs td:nth-child(2) { text-decoration: line-through; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs td.v { font-weight: bold; color: #fff !important; background: #000 !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) ul.ng-notes {
  list-style: none; margin: 0; padding: 6px 8px; border: 1px solid #3a0004; border-top: none;
  font-family: "Courier New", Courier, monospace; font-size: 11px; line-height: 1.5; color: #000;
}
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) ul.ng-notes li { padding: 2px 0; border-bottom: 1px dashed #844; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) ul.ng-notes li:last-child { border-bottom: none; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-incident {
  margin-top: 8px; padding: 6px 8px; background: #fff !important; color: #b3121f !important; border: 2px solid #000;
  font-family: "Courier New", Courier, monospace; font-size: 11px; line-height: 1.5;
}
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) .ng-incident b { color: #000 !important; }
@media (max-width: 480px) {
  html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs { font-size: 10px; }
  html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs th,
  html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs td { padding: 3px 4px; }
}
/* t178: the mobile `.layout tr { display:block }` rule must not flatten the discrepancy table */
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs { display: table !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs thead { display: table-header-group !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs tbody { display: table-row-group !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs tr { display: table-row !important; width: auto !important; }
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs th,
html[data-ng-page="talent"] body.ng-glitching:not(.ng-glitch-boot) table.ng-vs td { display: table-cell !important; }

/* ===== t174: voice-line glitch replay — the boot glitch layers at 50% opacity, fixed overlay, visual only ===== */
#ng-vglitch { position: fixed; inset: 0; z-index: 10045; pointer-events: none; display: none; overflow: hidden; opacity: 0.5; contain: strict; }
#ng-vglitch.on { display: block; }
#ng-vglitch > div { position: absolute; pointer-events: none; }
#ng-vglitch .g-red { inset: 0; background: rgba(140,0,12,0.55); mix-blend-mode: multiply; animation: ngGFlicker 0.12s steps(2) infinite; }
#ng-vglitch .g-scan { inset: 0; opacity: 0.85; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.35) 3px, rgba(180,0,0,0.08) 4px); }
#ng-vglitch .g-noise { inset: -10%; opacity: 0.35; mix-blend-mode: overlay; animation: ngGShake 0.08s steps(2) infinite;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E"); }
#ng-vglitch .g-tear { left: 0; right: 0; top: 0; height: 18%; will-change: transform;
  background: rgba(255,0,40,0.18); box-shadow: 0 0 0 2px rgba(0,255,80,0.25), 4px 0 0 rgba(255,0,0,0.4), -4px 0 0 rgba(0,80,255,0.35);
  animation: ngGTear 0.35s steps(3) infinite; }
#ng-vglitch .g-tear2 { height: 7%; animation-duration: 0.27s; animation-direction: reverse; }
#ng-vglitch .g-rgb { inset: 0; box-shadow: inset 6px 0 0 rgba(255,0,0,0.25), inset -6px 0 0 rgba(0,120,255,0.25); animation: ngGRgb 0.15s steps(2) infinite; }
@media (prefers-reduced-motion: reduce) {
  #ng-vglitch > div { animation: none !important; }
  #ng-vglitch .g-tear, #ng-vglitch .g-noise { display: none; }
}

/* ===== t185: master volume slider next to MUTE — white (standard) / red (error); 44px touch box, no strip growth ===== */
.ambience .vol-slider {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 104px; height: 44px; margin: -10px 0 -1px; padding: 0; /* t191: never past the screen's bottom edge */
  background: transparent; cursor: pointer; touch-action: none; --ng-vol: 100%; --ng-vt: #e6e6e6; --ng-vb: #3a3a3a; --ng-vk: #f2f2f2; --ng-vkb: #8a8a8a;
}
.ambience .vol-slider:focus { outline: none; }
.ambience .vol-slider:focus-visible { outline: 1px dotted var(--ng-vt); outline-offset: -10px; }
.ambience .vol-slider::-webkit-slider-runnable-track {
  height: 6px; border: 1px solid #666; border-style: inset;
  background: linear-gradient(to right, var(--ng-vt) 0, var(--ng-vt) var(--ng-vol), var(--ng-vb) var(--ng-vol), var(--ng-vb) 100%);
}
.ambience .vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 32px; height: 44px; margin-top: -20px;
  border: 0; background: transparent;
  background-image: linear-gradient(var(--ng-vk), var(--ng-vk));
  background-size: 12px 18px; background-position: center; background-repeat: no-repeat;
}
.ambience .vol-slider::-moz-range-track { height: 6px; border: 1px inset #666; background: var(--ng-vb); }
.ambience .vol-slider::-moz-range-progress { height: 6px; background: var(--ng-vt); }
.ambience .vol-slider::-moz-range-thumb { width: 12px; height: 18px; border: 2px outset var(--ng-vkb); border-radius: 0; background: var(--ng-vk); }
body.ng-glitching .ambience .vol-slider { --ng-vt: #c8101e; --ng-vb: #2a0004; --ng-vk: #ff2a36; --ng-vkb: #7a0008; }
body.ng-glitching .ambience .vol-slider::-webkit-slider-runnable-track { border-color: #5a0008; }
@media (max-width: 480px) {
  .ambience .vol-slider { width: 84px; }
}
@media (max-width: 360px) {
  .ambience .vol-slider { width: 72px; }
}

/* ===== t188: "AUTHORIZED EYES ONLY" is error-mode only (hidden from first paint in standard; unchanged in error) ===== */
body:not(.ng-glitching):not(.ng-errmode) .ng-eyes { display: none !important; } /* t191: ng-errmode = error decided at load (before the 280ms fire) */

/* ===== t191 #3: error boot sequence (#boot status lines) legible under the red layers (stays below grain/overlay) ===== */
body.ng-glitching.ng-glitch-boot #boot .status { color: #ff6a6a; font-weight: bold; text-shadow: 1px 0 #0ff, -1px 0 #f0f, 0 0 6px rgba(0,0,0,0.9); }
body.ng-glitching.ng-glitch-boot #boot .status b { color: #ffff00; }

/* ===== t191 #5: Directory text +12% on desktop only ===== */
@media (min-width: 1024px) {
  html[data-ng-page="index"] .page { width: 900px; }
  html[data-ng-page="index"] .layout td.main .content { zoom: 1.12; }
}

/* ===== t192: error mode grid background — black with dim red grid lines (standard unchanged) ===== */
html body.ng-glitching:not(.ng-glitch-boot) { background-color: #000 !important; background-image: url('bg-tile-err.png') !important; background-repeat: repeat !important; }

/* ===== t193: Directory purpose statement — current copy is error-only, friendlier copy is standard-only (same t188 mechanism) ===== */
body:not(.ng-glitching):not(.ng-errmode) .ng-err-only { display: none !important; }
body.ng-glitching .ng-std-only, body.ng-errmode .ng-std-only { display: none !important; }

/* t199: tab-hit error pop-up (carries the error boot screen's messaging); blocks the page until acknowledged */
html.ng-modal-lock, html.ng-modal-lock body { overflow: hidden !important; overscroll-behavior: none; }
/* t202: fixed full-viewport flex overlay, never offset by header/banner/scroll/body padding; box scrolls internally on short screens */
#ng-errmodal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; margin: 0; z-index: 10200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.72); padding: 12px; box-sizing: border-box; overscroll-behavior: contain; transform: none; filter: none; }
#ng-errmodal .em-box { width: min(460px, 92vw); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; margin: auto; flex: 0 1 auto; box-sizing: border-box; padding: 0; text-align: center; background: #0b0b0d; border: 1px solid #3a3a3a; box-shadow: none; font-family: "Courier New", Courier, monospace; }
#ng-errmodal .status { font-size: 12px; line-height: 1.6; letter-spacing: 1px; color: #ff6a6a; font-weight: bold; text-shadow: 0 0 6px rgba(255,40,40,0.7); }
#ng-errmodal .status b { color: #ffff00; }
#ng-errmodal .enter-eye { display: block; margin: 12px auto 0; width: min(110px, 30vw); height: auto; border: 2px inset #333; background: #0b0b0d; }
#ng-errmodal .enter-label { margin-top: 14px; background: #1a0004; border: 1px solid #ff3030; color: #ffff00; font: bold 13px "Courier New", Courier, monospace; letter-spacing: 3px; padding: 8px 16px; cursor: pointer; animation: ngEmBlink 1s step-start infinite; }
#ng-errmodal .enter-label:focus-visible { outline: 2px solid #ffff00; outline-offset: 3px; }
#ng-errmodal .enter-sub { margin-top: 8px; font-size: 10px; letter-spacing: 1px; color: #ff4040; }
#ng-errmodal .enter-memo { margin-top: 16px; font-size: 11px; line-height: 1.7; letter-spacing: 1px; color: #c89090; }
#ng-errmodal .enter-memo b { color: #ffd0d0; }
#ng-errmodal .enter-memo .redact { background: #c89090; color: #c89090; padding: 0 2px; }
#ng-errmodal .enter-quote { margin-top: 12px; padding-top: 8px; border-top: 1px dotted #5a0008; font-size: 10px; font-style: italic; letter-spacing: 1px; color: #b0a060; }
@keyframes ngEmBlink { 50% { color: #ff3030; } }
@media (prefers-reduced-motion: reduce) { #ng-errmodal .enter-label { animation: none; } }
#ng-errmodal .em-title { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 3px 3px 3px 6px; background: linear-gradient(90deg, #2b2b2e, #141416); border-bottom: 1px solid #333; color: #f0f0f0; font: bold 11px Arial, Helvetica, sans-serif; letter-spacing: 0.5px; text-align: left; user-select: none; }
#ng-errmodal .em-icon { flex: 0 0 auto; display: block; width: 14px; height: 14px; border: 0; outline: 0; box-shadow: none; }
#ng-errmodal .em-title-text { flex: 1 1 auto; min-width: 0; }
#ng-errmodal .em-x { flex: 0 0 auto; width: 20px; height: 18px; padding: 0; line-height: 14px; font: bold 11px Arial, Helvetica, sans-serif; color: #fff; background: #b3121f; border: 2px outset #ff5a5a; cursor: pointer; }
#ng-errmodal .em-x:active { border-style: inset; }
#ng-errmodal .em-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px 18px 18px; }
#ng-errmodal .em-box.em-shake { animation: ngEmShake 0.42s linear; }
@keyframes ngEmShake { 0%,100% { transform: translateX(0); } 12% { transform: translateX(-10px); } 25% { transform: translateX(9px); } 37% { transform: translateX(-8px); } 50% { transform: translateX(7px); } 62% { transform: translateX(-5px); } 75% { transform: translateX(4px); } 87% { transform: translateX(-2px); } }
@media (prefers-reduced-motion: reduce) { #ng-errmodal .em-box.em-shake { animation-duration: 0.2s; } }
/* t209: acknowledge disabled + greyed while the 7 s countdown runs on it; legal notice bold + underlined */
#ng-errmodal .enter-label.em-wait { background: #1a1a1a; border-color: #555; color: #8a8a8a; cursor: not-allowed; animation: none; }
/* t210: final pop-up spec */
#ng-errmodal .em-restricted { margin-top: 12px; font: bold 19px "Courier New", Courier, monospace; letter-spacing: 2px; color: #ff4a4a; line-height: 1.25; }
#ng-errmodal .em-sheet { margin: 16px auto 0; max-width: 400px; text-align: left; font-size: 10.5px; line-height: 1.5; color: #c8c8cc; border-top: 1px dotted #444; padding-top: 8px; }
/* t213: plain restricted-access notice replaces the visitor-file sheet */
#ng-errmodal .em-notice { margin: 16px auto 0; max-width: 400px; text-align: left; font-size: 12px; line-height: 1.55; color: #dcdce0; border-top: 1px dotted #444; padding-top: 10px; }
#ng-errmodal .em-notice p { margin: 0 0 8px; }
#ng-errmodal .em-notice p:last-child { margin-bottom: 0; }
/* t215: keywords in the error red, underlined, ~1.15em; line-height:1 keeps the 1.55 line box from growing */
#ng-errmodal .em-notice .em-kw { color: #ff4a4a; text-decoration: underline; text-underline-offset: 2px; font-size: 1.15em; line-height: 1; }
#ng-errmodal .em-sheet-h { color: #ff6a6a; font-weight: bold; letter-spacing: 1px; margin-bottom: 4px; }
#ng-errmodal .em-sheet table { border-collapse: collapse; width: 100%; }
#ng-errmodal .em-sheet th { text-align: left; vertical-align: top; white-space: nowrap; padding: 2px 8px 2px 0; color: #8a8a96; font-weight: bold; font-size: 9.5px; letter-spacing: 1px; }
#ng-errmodal .em-sheet td { padding: 2px 0; color: #dcdce0; }
#ng-errmodal .em-bu { font-weight: bold; text-decoration: underline; text-underline-offset: 2px; color: #fff; }
#ng-errmodal .em-tos { margin: 12px auto 0; max-width: 400px; text-align: left; }
#ng-errmodal .em-tos-tab { display: block; width: 100%; text-align: left; background: #151517; border: 1px solid #3a3a3a; color: #c8c8cc; font: bold 10.5px "Courier New", Courier, monospace; letter-spacing: 1px; padding: 6px 8px; cursor: pointer; }
#ng-errmodal .em-tos-tab::before { content: "\25B8  "; }
#ng-errmodal .em-tos-tab[aria-expanded="true"]::before { content: "\25BE  "; }
#ng-errmodal .em-tos-tab:disabled { cursor: default; opacity: 0.8; }
#ng-errmodal .em-tos-tab:focus-visible { outline: 2px solid #ffff00; outline-offset: 2px; }
#ng-errmodal .em-tos-body { border: 1px solid #3a3a3a; border-top: 0; padding: 8px 10px; font-size: 10px; line-height: 1.55; color: #bdbdc4; background: #0e0e10; }
#ng-errmodal .em-tos-body[hidden] { display: none; }
#ng-errmodal .em-tos-h { font-weight: bold; color: #e0e0e4; letter-spacing: 0.5px; margin-bottom: 6px; }
#ng-errmodal .em-tos-h span { font-weight: normal; color: #8a8a96; }
/* t247-t249: contract fine print with explicit section markers */
#ng-errmodal .em-tos-body { font-size: 10px; line-height: 1.4; }
#ng-errmodal .em-tos-body ol { margin: 0; padding: 0; list-style: none; }
#ng-errmodal .em-tos-body li { margin: 0 0 4px; padding-left: 2.6em; text-indent: -2.6em; }
#ng-errmodal .em-tos-body .em-sec { display: inline-block; min-width: 2.4em; text-indent: 0; font-weight: bold; color: #e0e0e4; }
#ng-errmodal .em-tos-body li.em-gp { margin-top: 6px; }
#ng-errmodal .em-tos-body ol.em-sub { margin: 4px 0 0; }
#ng-errmodal .em-tos-body ol.em-sub li { color: #9a9aa4; padding-left: 2.6em; text-indent: -2.6em; }
#ng-errmodal .em-tos-body ol.em-sub .em-sec { color: #a8a8b0; font-weight: normal; }

/* t212: the page-level mobile stack rule `.layout tbody, .layout tr { display:block }` (descendant selectors) also flattened
   every NESTED content table (.dir) at <=760px: rows became blocks, so cells collapsed (one character per line), text ran
   off the right edge, the header bar stopped spanning and row backgrounds had uneven widths. Nested tables keep real
   table display (Contacts keeps its own stacked-card layout); at <=600px they lay out automatically with the code/year/clause column (monospace) kept on one line. */
@media (max-width: 760px) {
  html:not([data-ng-page="contacts"]) .layout table:not(.layout):not(.form):not(.header-table) > tbody { display: table-row-group !important; width: auto !important; }
  html:not([data-ng-page="contacts"]) .layout table:not(.layout):not(.form):not(.header-table) > thead { display: table-header-group !important; width: auto !important; }
  html:not([data-ng-page="contacts"]) .layout table:not(.layout):not(.form):not(.header-table) > tbody > tr,
  html:not([data-ng-page="contacts"]) .layout table:not(.layout):not(.form):not(.header-table) > thead > tr { display: table-row !important; width: auto !important; }
}
@media (max-width: 600px) {
  html:not([data-ng-page="contacts"]) .layout table.dir { width: 100% !important; max-width: 100%; table-layout: auto !important; }
  /* t225: 'anywhere' let the min-content width drop to one letter, so auto layout squeezed the ACT column into
     letter-by-letter names ('SIL/VE/R/EC/HO/ES'). Break only between words; long words never split. */
  html:not([data-ng-page="contacts"]) .layout table.dir th, html:not([data-ng-page="contacts"]) .layout table.dir td { overflow-wrap: break-word !important; word-wrap: break-word !important; word-break: normal !important; hyphens: manual; }
  /* t225: a name cell (first column holding just a bold name: ACT / ARTIST / SUBJECT) stays on one line */
  html:not([data-ng-page="contacts"]) .layout table.dir td:first-child > b:only-child { white-space: nowrap; }
  html:not([data-ng-page="contacts"]) .layout table.dir td { font-size: 12px; line-height: 1.35; padding: 5px 6px; }
  html:not([data-ng-page="contacts"]) .layout table.dir th { white-space: nowrap; }
  html:not([data-ng-page="contacts"]) .layout table.dir td[style*="Courier"] { white-space: nowrap; overflow-wrap: normal; width: 1%; }
  html:not([data-ng-page="contacts"]) .layout table.dir th[style*="width"] { width: auto !important; }
}
@media (max-width: 400px) {
  /* t225: at 360-400px multi-word headers (LAST RELEASE / CURRENT STATUS / TERRITORY) may wrap between words so nowrap names + years fit */
  html:not([data-ng-page="contacts"]) .layout table.dir th { white-space: normal !important; padding: 5px 5px; }
  html:not([data-ng-page="contacts"]) .layout table.dir td { padding: 5px 5px; }
}
/* t212: nothing hides behind the fixed bottom player bar (height measured by ng-ambient.js, plus the safe area) */
html body.ng-has-ambience { padding-bottom: calc(var(--ng-player-h, 48px) + env(safe-area-inset-bottom, 0px) + 8px) !important; }

/* t216: post-Agree toast — bottom-centre above the player bar, never blocks input */
#ng-agree-toast { position: fixed; left: 50%; bottom: calc(var(--ng-player-h, 48px) + env(safe-area-inset-bottom, 0px) + 12px); transform: translateX(-50%) translateY(6px);
  z-index: 10100; pointer-events: none; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 8px 14px; background: #0b0b0d; border: 1px solid #3a3a3a;
  color: #dcdce0; font: 12px/1.4 "Courier New", Courier, monospace; letter-spacing: 0.5px; text-align: center; opacity: 0; transition: opacity .6s ease, transform .6s ease; }
#ng-agree-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#ng-agree-toast.off { opacity: 0; }
#ng-agree-toast .ngt-keep { margin-top: 2px; color: #8a8a96; font-size: 10.5px; }
#ng-agree-toast .ngt-ref { margin-top: 4px; color: #8a8a96; font-size: 11px; letter-spacing: 1px; }
@media (min-width: 601px){ #ng-agree-toast { width: max-content; max-width: min(560px, calc(100vw - 24px)); } }
@media (max-width: 600px){ #ng-agree-toast { width: min(360px, calc(100vw - 24px)); } }
