/* ============================================================
   CASE FILE 001 — THE SILENCED SCIENTISTS
   Cold War Dossier Aesthetic
   Loads AFTER brand.css — overrides & extends the site shell
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600;700&family=Share+Tech+Mono&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

/* ── CASE PAGE ROOT OVERRIDES ── */
.case-page {
  --case-bg:        #0b0f1a;
  --case-bg-deep:   #070a11;
  --case-paper:     #1a1f2e;
  --case-gold:      #c9a84c;
  --case-gold-dim:  #8a6e2a;
  --case-gold-glow: rgba(201,168,76,0.12);
  --case-red:       #8b1a14;
  --case-red-bright:#cc2222;
  --case-text:      #f0e8d8;
  --case-text-dim:  #c0b09e;
  --case-text-muted:#8a8076;
  --case-border:    rgba(201,168,76,0.12);
  --case-border-dim:rgba(201,168,76,0.06);
  --case-font-head: 'Oswald', sans-serif;
  --case-font-body: 'Courier Prime', 'Courier New', monospace;
  --case-font-mono: 'Share Tech Mono', monospace;
}

.case-page body,
.case-page {
  background-color: var(--case-bg);
}

/* ── CASE FILE HEADER — COMPACT TWO-COLUMN ── */
.case-header {
  background: linear-gradient(180deg, var(--case-bg-deep) 0%, var(--case-bg) 100%);
  border-bottom: 1px solid var(--case-border);
  padding: 20px var(--gutter) 20px;
  position: relative;
  overflow: hidden;
}

/* Background halftone grid */
.case-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(201,168,76,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, transparent 0%, black 40%, black 70%, transparent 100%);
}

/* Gold line at bottom */
.case-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--case-gold) 30%, var(--case-gold) 70%, transparent 100%);
  opacity: 0.25;
}

.case-header__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Top meta row */
.case-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.case-header__number {
  font-family: var(--case-font-mono);
  font-size: 0.7rem;
  color: var(--case-gold);
  letter-spacing: 0.12em;
}

.case-classification-inline {
  font-family: var(--case-font-mono);
  font-size: 0.65rem;
  color: var(--case-text-muted);
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid rgba(139,26,20,0.2);
  border-left: 2px solid var(--case-red-bright);
  background: rgba(139,26,20,0.06);
}

.case-classification-inline strong {
  color: var(--case-red-bright);
  font-family: var(--case-font-mono);
}

.case-header__date {
  font-family: var(--case-font-mono);
  font-size: 0.65rem;
  color: var(--case-text-muted);
  letter-spacing: 0.1em;
}

/* Main body: two columns */
.case-header__body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}

/* Left column */
.case-header__left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-stamp {
  font-family: var(--case-font-head);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--case-red-bright);
  border: 1.5px solid var(--case-red-bright);
  padding: 3px 10px;
  display: inline-block;
  transform: rotate(-1deg);
  opacity: 0.85;
  width: fit-content;
}

.case-header__title {
  font-family: var(--case-font-head);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--case-text);
  line-height: 1.0;
  margin: 0;
}

.case-header__title span {
  color: var(--case-gold);
}

.case-header__subtitle {
  font-family: var(--case-font-mono);
  font-size: 0.72rem;
  color: var(--case-text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

/* Right column: stats */
.case-header__right {
  flex-shrink: 0;
}

.case-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  padding: 16px 20px;
  background: rgba(201,168,76,0.04);
  border: 1px solid var(--case-border);
  border-left: 3px solid var(--case-gold-dim);
  min-width: 220px;
}

.case-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-stat__label {
  font-family: var(--case-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--case-text-muted);
}

.case-stat__value {
  font-family: var(--case-font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--case-gold);
  letter-spacing: 0.04em;
  line-height: 1;
}

.case-stat__value--red    { color: var(--case-red-bright); }
.case-stat__value--active { color: #00b894; }

/* Responsive: stack on narrow screens */
@media (max-width: 700px) {
  .case-header__body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .case-header__title {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }
  .case-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .case-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── DASHBOARD WRAPPER ── */
.case-dashboard {
  background: var(--case-bg-deep);
  min-height: 80vh;
  position: relative;
}

/* Override brand.css footer in case context */
.case-page .footer {
  background: var(--case-bg-deep);
  border-top-color: var(--case-border);
}

/* ── BACK TO SITE BREADCRUMB ── */
.case-breadcrumb {
  padding: var(--space-sm) var(--gutter);
  background: var(--case-bg-deep);
  border-bottom: 1px solid var(--case-border-dim);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--case-font-mono);
  font-size: 0.65rem;
  color: var(--case-text-muted);
  letter-spacing: 0.08em;
}

.case-breadcrumb a {
  color: var(--case-text-muted);
  text-decoration: none;
  transition: color var(--duration);
}

.case-breadcrumb a:hover {
  color: var(--case-gold);
  text-decoration: none;
}

.case-breadcrumb__sep {
  color: var(--case-border);
}

/* ── SCANLINES OVERLAY ── */
.case-scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
}

/* ── DASHBOARD INTERNAL STYLES ── */
/* These scope the existing dashboard CSS to avoid brand.css conflicts */

.dash * { box-sizing: border-box; }

.dash {
  font-family: var(--case-font-mono);
  color: #c8c8c0;
  background: #080808;
}

.dash .header {
  border-bottom: 1px solid #2a1a1a;
  padding: 20px 32px 16px;
  background: linear-gradient(180deg,#0f0808,#080808);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.dash .classified-stamp {
  font-family: var(--case-font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #cc2222;
  border: 2px solid #cc2222;
  padding: 2px 10px;
  display: inline-block;
  text-transform: uppercase;
}

.dash .htitle {
  font-family: var(--case-font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #e8e8e0;
  text-transform: uppercase;
  margin-top: 4px;
}

.dash .hsub {
  font-size: 14px;
  color: #bbb;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

.dash .hright {
  text-align: right;
  font-size: 14px;
  color: #999;
  line-height: 1.8;
}

.dash .hright span { color: #cc4444; }

.dash .tabs {
  display: flex;
  border-bottom: 1px solid #1a1a1a;
  background: #0a0a0a;
  padding: 0 32px;
  gap: 2px;
  overflow-x: auto;
}

.dash .tab {
  padding: 12px 18px;
  font-family: var(--case-font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #999;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .2s;
}

.dash .tab:hover { color: #999; }
.dash .tab.active { color: #cc4444; border-bottom-color: #cc4444; background: #0f0808; }

.dash .main { padding: 24px 32px; }

.dash .legend {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dash .legend-label {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #999;
}

.dash .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #bbb;
}

.dash .ldot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.dash .hint {
  margin-left: auto;
  font-size: 13px;
  color: #999;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.dash .cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media(max-width:700px) { .dash .cases-grid { grid-template-columns: 1fr; } }

.dash .era-col h3 {
  font-family: var(--case-font-head);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
}

.dash .case-card {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-left: 3px solid #333;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.dash .case-card:hover { background: #111; border-left-color: #cc4444; }
.dash .case-card.expanded { background: #111; }

.dash .card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash .initials-btn {
  width: 38px; height: 38px;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--case-font-head);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  position: relative;
  transition: opacity .2s;
}

.dash .initials-btn:hover { opacity: 0.8; }

.dash .initials-i {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #333;
  color: #888;
  font-size: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: serif;
  font-style: italic;
}

.dash .card-name {
  font-family: var(--case-font-head);
  font-size: 13px;
  font-weight: 600;
  color: #c8c8c0;
  letter-spacing: 1px;
}

.dash .card-role {
  font-size: 13px;
  color: #aaa;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

.dash .badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 1px;
  margin-left: auto;
  flex-shrink: 0;
}

.dash .badge.dead { background: rgba(139,0,0,.25); color: #cc4444; border: 1px solid #cc444433; }
.dash .badge.missing { background: rgba(139,100,0,.2); color: #cc8800; border: 1px solid #cc880033; }
.dash .badge.unknown { background: rgba(0,60,100,.2); color: #4488aa; border: 1px solid #4488aa33; }

.dash .card-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1a1a1a;
  font-size: 14px;
  color: #bbb;
  line-height: 1.7;
}

.dash .card-detail strong { color: #cc6644; font-family: var(--case-font-mono); }

.dash .detail-tags {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}

.dash .detail-tag {
  font-size: 8px; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 7px;
  background: rgba(255,255,255,.03);
  border: 1px solid #2a2a2a;
  color: #aaa;
}

/* Timeline */
.dash .timeline { display: flex; flex-direction: column; gap: 0; }

.dash .tl-item {
  display: flex; gap: 20px; cursor: pointer;
  padding: 14px 0; border-bottom: 1px solid #111;
  transition: background .15s;
}

.dash .tl-item:hover { background: rgba(255,255,255,.02); }

.dash .tl-year {
  font-family: var(--case-font-head);
  font-size: 13px; color: #999; width: 44px;
  flex-shrink: 0; padding-top: 2px;
}

.dash .tl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
}

.dash .tl-content { flex: 1; }
.dash .tl-name { font-size: 14px; color: #bbb; font-family: var(--case-font-head); letter-spacing: 1px; }
.dash .tl-info { font-size: 13px; color: #aaa; margin-top: 2px; }

/* Pattern Analysis */
.dash .pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media(max-width:600px){ .dash .pa-grid { grid-template-columns: 1fr; } }

.dash .pa-section h4 {
  font-family: var(--case-font-head);
  font-size: 13px; letter-spacing: 3px; color: #aaa;
  text-transform: uppercase; margin-bottom: 16px;
}

.dash .bar-row { margin-bottom: 14px; }
.dash .bar-label { font-size: 13px; color: #bbb; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; display: flex; justify-content: space-between; }
.dash .bar-track { background: #111; height: 6px; position: relative; }
.dash .bar-fill { height: 100%; transition: width .6s ease; }

.dash .quote-block {
  background: #0d0d0d; border-left: 3px solid #333;
  padding: 14px 16px; margin-bottom: 12px; font-size: 13px;
  color: #ccc; line-height: 1.6; font-style: italic;
  font-family: 'Courier Prime', monospace;
}

.dash .quote-attr { font-size: 13px; color: #999; margin-top: 6px; font-style: normal; letter-spacing: 1px; text-transform: uppercase; }

.dash .verdict {
  background: rgba(139,0,0,.08); border: 1px solid rgba(204,34,34,.15);
  padding: 20px; margin-top: 24px; font-size: 13px; color: #999; line-height: 1.8;
  font-family: 'Courier Prime', monospace;
}
.dash .verdict h4 { font-family: var(--case-font-head); font-size: 14px; letter-spacing: 3px; color: #cc4444; margin-bottom: 10px; }

/* Watch List */
.dash .watch-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media(max-width:800px){ .dash .watch-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px){ .dash .watch-grid { grid-template-columns: 1fr; } }

.dash .watch-card {
  background: #0d0d0d; border: 1px solid #1a1a1a;
  padding: 14px; cursor: pointer; transition: all .2s;
}
.dash .watch-card:hover { background: #111; }

.dash .watch-score-bar { height: 3px; margin-bottom: 10px; }

.dash .w-initials {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--case-font-head);
  font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; flex-shrink: 0;
  position: relative;
}

.dash .watch-expand {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid #1a1a1a;
  font-size: 14px; color: #bbb; line-height: 1.7;
}

/* Network Map */
.dash .net-wrap { overflow-x: auto; }
.dash .net-svg { width: 100%; min-height: 340px; }

.dash .conn-panel {
  margin-top: 12px; padding: 14px 16px;
  border: 1px solid #1a1a1a; border-left: 3px solid #cc4444;
  background: #0d0d0d; font-size: 14px; color: #888; line-height: 1.8;
}
.dash .conn-panel strong { color: #cc6644; font-family: var(--case-font-mono); }
.dash .conn-panel .fbi-flag { color: #cc2222; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }

.dash .no-sel-tip { font-size: 13px; color: #888; letter-spacing: 2px; text-transform: uppercase; text-align: center; padding: 12px; }

/* Popup */
.dash-popup-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.75); z-index: 200;
  display: flex; align-items: center; justify-content: center;
}

.dash-popup-box {
  background: #0f0f0f; border: 1px solid #333;
  border-left: 4px solid #cc4444; padding: 24px;
  max-width: 400px; width: 90%; position: relative;
}

.dash-popup-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; color: #bbb; font-size: 18px; cursor: pointer;
}
.dash-popup-close:hover { color: #cc4444; }

.dash-popup-initials {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  font-family: var(--case-font-head); font-size: 20px; font-weight: 700;
  border-radius: 2px; margin-bottom: 12px;
}

.dash-popup-name { font-family: var(--case-font-head); font-size: 20px; color: #e8e8e0; font-weight: 700; margin-bottom: 4px; }
.dash-popup-role { font-size: 14px; color: #888; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 2px; }
.dash-popup-org { font-size: 14px; color: #aaa; letter-spacing: 1px; margin-bottom: 12px; }
.dash-popup-cause { font-size: 13px; color: #ccc; line-height: 1.7; font-family: 'Courier Prime', monospace; }

/* ── RESPONSIVE & FONT SIZE IMPROVEMENTS ── */

/* Base font size bumps for readability */
.dash { font-size: 14px; }
.dash .card-name    { font-size: 15px !important; }
.dash .card-role    { font-size: 12px !important; }
.dash .tl-name      { font-size: 15px !important; }
.dash .tl-info      { font-size: 13px !important; }
.dash .bar-label    { font-size: 12px !important; }
.dash .quote-block  { font-size: 13px !important; }
.dash .htitle       { font-size: clamp(20px, 3vw, 28px) !important; }
.dash .classified-stamp { font-size: 12px !important; letter-spacing: 6px !important; }
.dash .tab          { font-size: 12px !important; }
.dash .legend-label, .dash .legend-item { font-size: 12px !important; }
.dash .badge        { font-size: 11px !important; }

/* Watch list expand grid — stack on narrow screens */
.watch-expand-grid {
  grid-template-columns: 1fr 1fr;
}

/* Network side-by-side — needs responsive handling */
@media (max-width: 900px) {
  .dash .cases-grid    { grid-template-columns: 1fr !important; }
  .dash .pa-grid       { grid-template-columns: 1fr !important; }
  .watch-expand-grid   { grid-template-columns: 1fr !important; }
  .dash .main          { padding: 16px !important; }
  .dash .tabs          { padding: 0 12px !important; }
  .dash .header        { padding: 14px 16px !important; }
  .dash .hright        { display: none; }
}

@media (max-width: 700px) {
  /* Network map — stack SVG above info panel */
  .net-split-grid {
    grid-template-columns: 1fr !important;
  }
  .net-panel-right {
    border-left: none !important;
    border-top: 1px solid #1a1a1a;
    min-height: 120px !important;
  }
}

/* Site-level responsive — brand.css supplement */
@media (max-width: 768px) {
  .case-header__title  { font-size: clamp(2rem, 8vw, 3.2rem) !important; }
  .case-header__stats  { gap: 20px !important; }
  .case-stat__value    { font-size: 1.1rem !important; }
}

/* Watch list two-column split — stack on narrow screens */
@media (max-width: 900px) {
  .watchlist-split {
    grid-template-columns: 1fr !important;
  }
  .watchlist-split > div:last-child {
    position: static !important;
  }
}
