/* News Globe — standalone page, uses theme.css tokens */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
}

.ng-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

/* --- top bar --- */
.ng-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: linear-gradient(var(--bg-page), rgba(0,0,0,0));
  pointer-events: none;
}
.ng-bar > * { pointer-events: auto; }

.ng-home img { display: block; max-width: 190px; width: 100%; height: auto; }
.ng-home .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ng-home .logo-light { display: none; }
  :root:not([data-theme="light"]) .ng-home .logo-dark  { display: block; }
}
[data-theme="dark"]  .ng-home .logo-light { display: none; }
[data-theme="dark"]  .ng-home .logo-dark  { display: block; }
[data-theme="light"] .ng-home .logo-light { display: block; }
[data-theme="light"] .ng-home .logo-dark  { display: none; }

.ng-bar-right { display: flex; align-items: center; gap: 14px; }
.ng-count {
  font-size: 13px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- globe canvas --- */
.ng-globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* --- status / errors --- */
.ng-status {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  font-size: 14px;
  color: var(--text-muted);
}
.ng-status.is-error { color: var(--accent-red); }

/* --- hover tooltip (rendered by globe.gl) --- */
.ng-tip {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 290px;
  padding: 8px 12px 8px 9px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 6px 20px var(--shadow);
}
.ng-tip-mascot {
  width: 30px;
  height: auto;
  flex: none;
}
.ng-tip-text { min-width: 0; }
/* While the story card is open, suppress globe.gl's hover tooltip —
   otherwise the small preview and the full card sit on screen together. */
.ng-card-open .scene-tooltip { display: none !important; }

.ng-tip-place {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 1px;
}

/* --- story card --- */
.ng-card {
  position: fixed;          /* positioned at the clicked pin by JS */
  z-index: 25;
  left: 22px;
  top: 50%;
  width: min(360px, calc(100% - 44px));
  padding: 20px 22px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 40px var(--shadow);
}
.ng-card[hidden] { display: none; }

.ng-card-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}
.ng-card-close:hover { color: var(--accent-blue); }

.ng-card-place {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-blue);
}
.ng-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--text-primary);
}
/* The whole headline is a tap target; it must not read as a blue link
   sitting inside a card that already has a link button. */
.ng-card-title-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.ng-card-title-link[href]:hover,
.ng-card-title-link[href]:focus-visible {
  color: var(--accent-blue);
}

.ng-card-summary {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 21px;
  color: var(--text-body);
}
.ng-card-link {
  display: inline-block;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: all .2s ease;
}
.ng-card-link:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}
.ng-card-link[hidden] { display: none; }

/* Nibbles — sits left of the text, vertically centred against it */
.ng-card-body {
  display: flex;
  align-items: center;
  gap: 15px;
}
.ng-card-text { min-width: 0; }
.ng-card-mascot {
  width: 62px;
  height: auto;
  flex: none;
  align-self: center;
  pointer-events: none;
}
@media (max-width: 767px) {
  .ng-card-mascot { width: 48px; }
  .ng-card-body { gap: 12px; }
}

/* --- noscript fallback --- */
.ng-noscript {
  position: relative;
  z-index: 30;
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px;
  color: var(--text-body);
}
.ng-noscript h1 { color: var(--text-primary); }

@media (max-width: 767px) {
  .ng-bar { padding: 10px 14px; }
  .ng-home img { max-width: 140px; }
  /* on touch, anchoring to the tap point is cramped — dock it instead */
  .ng-card {
    left: 14px !important;
    right: 14px !important;
    top: auto !important;
    bottom: 14px !important;
    width: auto;
  }
}
