/* republic/atlas/atlas.css  -  ATLAS globe v3 (three-globe)
   OSINT terminal aesthetic: small mono type, hairline borders, glass surfaces.
   #globe canvas is full-viewport; three.js renderer appended inside it.
   Mobile: panel → bottom sheet, legend → horizontal compact strip. */

@import url('/republic/assets/css/tokens.css?v=20260612');

:root {
  --atl-bg:     #030810;
  --atl-glass:  rgba(5, 9, 16, 0.76);
  --atl-glass2: rgba(6, 11, 19, 0.91);
  --atl-line:   rgba(100, 140, 180, 0.14);
  --atl-line2:  rgba(100, 140, 180, 0.28);
  --atl-txt:    #c4d4e4;
  --atl-dim:    #607080;
  --atl-accent: #57e7ff;
  --atl-mono:   "Geist Mono", "GeistMono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html, body { height: 100%; }
body { margin: 0; background: var(--atl-bg); overflow: hidden; }

/* globe container  -  three.js appends its canvas here */
#globe {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #070e1c 0%, #030810 60%, #010205 100%);
}
#globe canvas { display: block; outline: none; }

/* overlay root */
#atlas-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  font-family: var(--atl-mono);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--atl-txt);
}
#atlas-root > * { pointer-events: auto; }

/* global reset: prevent site h1/h2/p rules leaking into overlay */
#atlas-root h1, #atlas-root h2, #atlas-root h3, #atlas-root h4, #atlas-root p {
  font-family: var(--atl-mono);
  margin: 0;
}
#atlas-root h2.atl-panel__title { font-size: 12.5px; line-height: 1.35; }
#atlas-root h4.atl-h            { font-size: 8.5px; }

/* ----------------------------------------------------------------- badge */
/* minimal 1-line status badge  -  replaces old ATLAS brand block */
.atl-badge {
  position: absolute;
  top: 72px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 8px;
  background: var(--atl-glass);
  border: 1px solid var(--atl-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--atl-dim);
  white-space: nowrap;
}
.atl-badge__name {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(200, 225, 245, 0.75);
}
.atl-badge__sep { color: var(--atl-line2); }
.atl-badge__status { color: var(--atl-dim); }

/* pulse dot */
.atl-pulse {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--atl-accent);
  box-shadow: 0 0 6px var(--atl-accent);
  flex: none;
  animation: atl-pulse 2.2s ease-in-out infinite;
}
@keyframes atl-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }

/* ----------------------------------------------------------------- legend */
/* compact pill grid  -  bottom-left, horizontal wrap */
.atl-legend {
  position: absolute;
  left: 16px;
  bottom: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 320px;
  background: var(--atl-glass);
  border: 1px solid var(--atl-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 5px 6px;
}
.atl-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: none;
  border: 1px solid transparent;
  color: rgba(160, 185, 210, 0.7);
  font: inherit;
  font-size: 8px;
  letter-spacing: 0.12em;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.atl-legend__item:hover {
  border-color: var(--atl-line2);
  color: rgba(200, 225, 245, 0.9);
}
.atl-legend__item.is-off { opacity: 0.28; }
.atl-legend__item.is-off .atl-legend__abbr { text-decoration: line-through; }
.atl-legend__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex: none;
}
.atl-legend__abbr {
  font-family: var(--atl-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}
.atl-legend__works { border-top: 0; }
.atl-legend__works .atl-legend__abbr { color: var(--atl-dim); }
.atl-legend__works:hover .atl-legend__abbr { color: var(--atl-txt); }

/* ----------------------------------------------------------------- panel */
.atl-panel {
  position: absolute;
  top: 0; right: 0; bottom: 28px;
  width: min(420px, 92vw);
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.3, 1);
  background: var(--atl-glass2);
  border-left: 1px solid var(--atl-line2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
}
.atl-panel.is-open { transform: translateX(0); }

.atl-panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 0;
}
.atl-panel__kicker {
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.atl-panel__close {
  background: none;
  border: 1px solid var(--atl-line);
  color: var(--atl-dim);
  width: 22px; height: 22px;
  line-height: 1;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--atl-mono);
}
.atl-panel__close:hover { color: #fff; border-color: var(--atl-line2); }
.atl-panel__title {
  margin: 6px 14px 8px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #e8f2ff;
  letter-spacing: 0.01em;
}
.atl-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 18px;
  overscroll-behavior: contain;
}
.atl-panel__body::-webkit-scrollbar { width: 3px; }
.atl-panel__body::-webkit-scrollbar-thumb { background: var(--atl-line2); }

/* section headers */
.atl-h {
  margin: 14px 0 5px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--atl-dim);
  border-bottom: 1px solid var(--atl-line);
  padding-bottom: 3px;
}
.atl-p { margin: 0 0 8px; font-size: 10.5px; color: var(--atl-txt); }
.atl-p--dim { color: var(--atl-dim); font-style: italic; }

/* meta chips */
.atl-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.atl-chip {
  font-size: 8px;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border: 1px solid var(--atl-line);
  color: var(--atl-dim);
  text-transform: uppercase;
}
.atl-chip--high   { color: #6fe3a5; border-color: rgba(111,227,165,0.32); }
.atl-chip--medium { color: #ffc857; border-color: rgba(255,200,87,0.32); }
.atl-chip--low    { color: #ff8a8a; border-color: rgba(255,138,138,0.32); }

/* action button */
.atl-btn {
  display: block; width: 100%; margin: 8px 0 2px;
  padding: 6px 10px;
  background: rgba(87,231,255,0.05);
  border: 1px solid rgba(87,231,255,0.22);
  color: var(--atl-accent);
  font: inherit; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; text-align: center;
}
.atl-btn:hover { background: rgba(87,231,255,0.11); }

/* news rows */
.atl-news {
  display: flex; gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--atl-line);
  text-decoration: none; color: inherit;
}
.atl-news:hover { background: rgba(100,140,180,0.05); }
.atl-news__thumb {
  flex: 0 0 50px; height: 36px;
  overflow: hidden;
  border: 1px solid var(--atl-line);
  background: #050c15;
}
.atl-news__thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: saturate(0.7) contrast(1.06);
}
.atl-news__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.atl-news__title {
  font-size: 10px; line-height: 1.4; color: #cfe3f5;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.atl-news:hover .atl-news__title { color: #fff; }
.atl-news__meta {
  display: flex; flex-wrap: wrap; gap: 5px;
  font-size: 8px; color: var(--atl-dim); letter-spacing: 0.04em;
}
.atl-news__outlet { color: #7a9ab8; }
.atl-news__exc    { font-size: 9px; color: var(--atl-dim); }
.atl-news__tag--west  { color: #57e7ff; }
.atl-news__tag--east  { color: #ff5470; }
.atl-news__tag--south { color: #6fe3a5; }
.atl-news__tag--mena  { color: #ffc857; }
.atl-news__tag--local { color: #e17bff; }
.atl-news--doc .atl-news__title { color: #fff; }
.atl-news--doc { border-left: 2px solid rgba(255,255,255,0.3); padding-left: 8px; }

/* perspective bars */
.atl-persps { display: flex; flex-direction: column; gap: 7px; }
.atl-persp__head { display: flex; align-items: center; gap: 6px; font-size: 9px; }
.atl-persp__dot  { width: 5px; height: 5px; border-radius: 50%; }
.atl-persp__name { letter-spacing: 0.1em; text-transform: uppercase; }
.atl-persp__n    { color: var(--atl-dim); margin-left: auto; }
.atl-persp__bar  { height: 2px; background: rgba(100,140,180,0.1); margin-top: 3px; }
.atl-persp__bar span { display: block; height: 100%; }
.atl-persp__frame { margin-top: 4px; font-size: 9.5px; color: var(--atl-txt); opacity: 0.82; }

/* republic reading */
.atl-reading {
  border-left: 2px solid #e17bff;
  padding: 5px 10px;
  background: rgba(225,123,255,0.04);
}
.atl-reading p { margin: 0; font-size: 10px; font-style: italic; color: #dfd0f0; }

/* investigative threads */
.atl-thread {
  display: flex; align-items: flex-start; gap: 8px;
  width: 100%; padding: 6px 4px; margin: 0 0 1px;
  background: none; border: 0;
  border-bottom: 1px solid var(--atl-line);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.atl-thread:hover { background: rgba(100,140,180,0.06); }
.atl-thread__icon {
  flex: 0 0 16px; height: 16px;
  display: grid; place-items: center;
  border: 1px solid var(--atl-line);
}
.atl-thread__dot  { width: 6px; height: 6px; border-radius: 50%; }
.atl-thread__txt  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.atl-thread__title { font-size: 10px; color: #cfe3f5; line-height: 1.35; }
.atl-thread__rel   { font-size: 8px; color: var(--atl-dim); letter-spacing: 0.05em; }

/* vessel entries */
.atl-vessel {
  border: 1px solid var(--atl-line);
  padding: 6px 9px; margin-bottom: 5px;
}
.atl-vessel__name  { font-size: 10px; color: #fff; margin-right: 7px; }
.atl-vessel__label {
  font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #ffc857; border: 1px solid rgba(255,200,87,0.28); padding: 1px 4px;
}
.atl-vessel__note { margin-top: 4px; font-size: 9px; color: var(--atl-dim); }

/* footer disclaimer */
.atl-foot {
  margin-top: 16px; padding-top: 7px;
  border-top: 1px solid var(--atl-line);
  font-size: 8px; color: var(--atl-dim); line-height: 1.6;
}

/* ----------------------------------------------------------------- ticker */
.atl-ticker {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  overflow: hidden;
  background: var(--atl-glass2);
  border-top: 1px solid var(--atl-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center;
}
.atl-ticker__track {
  display: inline-flex; align-items: center; gap: 24px;
  white-space: nowrap; padding-left: 100vw;
  animation: atl-scroll linear infinite;
  will-change: transform;
}
.atl-ticker:hover .atl-ticker__track { animation-play-state: paused; }
@keyframes atl-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.atl-ticker__item {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--atl-txt); font: inherit;
  font-size: 9px; cursor: pointer; padding: 0;
}
.atl-ticker__item:hover .atl-ticker__title { color: #fff; }
.atl-ticker__dot   { width: 4px; height: 4px; border-radius: 50%; flex: none; }
.atl-ticker__time  { color: var(--atl-dim); font-size: 8px; flex: none; }
.atl-ticker__title { letter-spacing: 0.02em; }

/* ----------------------------------------------------------------- hover */
.atl-hover {
  position: fixed;
  left: 0;
  top: 0;
  width: min(260px, calc(100vw - 32px));
  padding: 8px 10px;
  background: rgba(3, 8, 16, 0.88);
  border: 1px solid rgba(120, 170, 220, 0.22);
  color: var(--atl-txt);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 640;
}
.atl-hover.is-open {
  opacity: 1;
  visibility: visible;
}
.atl-hover__meta {
  font-size: 7.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--atl-accent);
  margin-bottom: 4px;
}
.atl-hover__title {
  font-size: 10.5px;
  color: #eef7ff;
  line-height: 1.35;
}
.atl-hover__body {
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.45;
  color: var(--atl-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----------------------------------------------------------------- mobile */
@media (max-width: 760px) {
  #atlas-root { font-size: 10px; }

  .atl-badge { top: 62px; left: 10px; }

  /* legend: single-row horizontal scroll above ticker */
  .atl-legend {
    left: 0; right: 0; bottom: 28px;
    flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    max-width: none;
    padding: 4px 8px;
    border-left: 0; border-right: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 1px;
  }
  .atl-legend::-webkit-scrollbar { display: none; }
  .atl-legend__item { flex: none; padding: 3px 6px; }

  /* panel: bottom sheet */
  .atl-panel {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; max-height: 72vh;
    transform: translateY(104%);
    border-left: 0; border-top: 1px solid var(--atl-line2);
  }
  .atl-panel.is-open { transform: translateY(0); }
  body.atl-panel-open .atl-legend,
  body.atl-panel-open .atl-ticker { display: none; }
  .atl-hover { display: none; }
}

@media (min-width: 761px) {
  .atl-panel { box-shadow: -20px 0 56px rgba(0,0,0,0.5); }
}
