/* ==========================================================================
   Weekly Briefing — Editorial Overrides
   Inherits ../shared/{tokens,auth,briefing-base}.css
   ========================================================================== */

:root {
  --accent: var(--weekly-accent);
  --accent-soft: var(--weekly-accent-soft);
}

/* Quote / Idea of the Week callout */
.quote-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.quote-card-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.quote-card blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  line-height: 1.48;
  color: var(--ink);
}

.quote-card-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.quote-card-author {
  font-weight: 600;
  color: var(--ink);
}

.quote-card-context {
  color: var(--ink-muted);
}

/* Discipline & reading-time tags on weekly cards */
.discipline-tag,
.reading-time-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}

.weekly-card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* This Week in History timeline */
.history-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.history-milestone {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}

.milestone-year-col {
  flex-shrink: 0;
  min-width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 8px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: var(--radius-sm);
  text-align: center;
}

.milestone-year {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.15;
}

.milestone-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.milestone-body {
  min-width: 0;
  flex: 1;
}

.milestone-title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.milestone-summary {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Week in Brief panel */
.pulse-panel {
  border-top-width: 1px;
  border-top-color: var(--border);
}

/* ==========================================================================
   Around the World — Interactive Geological Map
   ========================================================================== */

:root {
  --geo-ocean: #f2f5f7;
  --geo-land: #e2dfd7;
  --geo-land-stroke: #c9c3b6;
  --geo-grid: rgba(44, 93, 107, 0.12);
}

[data-theme="dark"] {
  --geo-ocean: #151c26;
  --geo-land: #283345;
  --geo-land-stroke: #3c4b63;
  --geo-grid: rgba(106, 183, 204, 0.13);
}

.world-map-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.world-map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 440;
  background: var(--geo-ocean);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: visible;
}

.world-map-canvas {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.world-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.world-map-graticule {
  fill: none;
  stroke: var(--geo-grid);
  stroke-width: 0.75;
  stroke-dasharray: 3 4;
}

.world-map-equator {
  fill: none;
  stroke: var(--geo-grid);
  stroke-width: 1;
}

.world-map-land {
  fill: var(--geo-land);
  stroke: var(--geo-land-stroke);
  stroke-width: 0.65;
  stroke-linejoin: round;
}

.world-map-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.geo-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.geo-pin:focus-visible {
  outline: none;
}

.geo-pin-halo {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--geo-pin-ring);
  transition: transform 0.2s ease, opacity 0.2s ease;
  animation: geoPulse 2.8s ease-in-out infinite;
}

.geo-pin-core {
  position: relative;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--geo-pin);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 0.16s ease, background 0.16s ease;
}

.geo-pin.is-cuisine .geo-pin-core {
  background: var(--cuisine-pin);
  border-radius: 3px;
  transform: rotate(45deg);
}

.geo-pin.is-cuisine .geo-pin-halo {
  background: var(--cuisine-pin-ring);
}

.geo-pin.is-cuisine:hover .geo-pin-core,
.geo-pin.is-cuisine:focus-visible .geo-pin-core,
.geo-pin.is-cuisine.is-active .geo-pin-core {
  transform: rotate(45deg) scale(1.28);
  background: var(--accent);
}

.geo-fact-popover.is-cuisine {
  border-top-color: var(--cuisine-pin);
}

.geo-mobile-card.is-cuisine {
  border-left-color: var(--cuisine-pin);
}

.geo-fact-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.geo-kind-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--geo-pin-ring);
  color: var(--geo-pin);
}

.geo-kind-badge.is-cuisine {
  background: var(--cuisine-pin-ring);
  color: var(--cuisine-pin);
}

.geo-chip-dot.is-cuisine {
  background: var(--cuisine-pin);
  border-radius: 1.5px;
  transform: rotate(45deg);
}

.geo-pin:hover,
.geo-pin:focus-visible,
.geo-pin.is-active {
  z-index: 5;
}

.geo-pin:hover .geo-pin-core,
.geo-pin:focus-visible .geo-pin-core,
.geo-pin.is-active .geo-pin-core {
  transform: scale(1.3);
  background: var(--accent);
}

.geo-pin:hover .geo-pin-halo,
.geo-pin:focus-visible .geo-pin-halo,
.geo-pin.is-active .geo-pin-halo {
  animation: none;
  transform: scale(1.35);
  background: var(--accent-soft);
}

@keyframes geoPulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.28;
  }
}

/* Hover / Tap Geological Fun Fact Popover */
.geo-fact-popover {
  position: absolute;
  overflow: hidden;
  z-index: 20;
  width: min(340px, calc(100% - 20px));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 15px 12px;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}

.geo-fact-popover > .bookmark-btn,
.geo-mobile-card > .bookmark-btn {
  right: 46px;
}

.geo-fact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.geo-fact-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.geo-fact-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-subtle);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.geo-fact-close:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.geo-fact-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink);
}

.geo-fact-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.52;
  color: var(--ink-secondary);
}

.geo-fact-foot {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Mobile docked fun-fact card below map */
.geo-mobile-card {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 14px 13px;
}

/* Quick-jump location chips below map */
.world-map-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.geo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.geo-chip:hover,
.geo-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.geo-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--geo-pin);
  flex-shrink: 0;
}

.geo-chip.is-active .geo-chip-dot {
  background: var(--accent);
}

@media (max-width: 640px) {
  .world-map-card {
    padding: 10px;
  }

  .geo-fact-popover,
  .world-map-legend {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .geo-mobile-card {
    display: none !important;
  }
}

/* Keep section-narrative hidden cleanly when empty */
.section-narrative:empty {
  display: none;
}

@media (max-width: 780px) {
  .history-timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .quote-card {
    padding: 14px 16px;
  }

  .quote-card blockquote {
    font-size: 16.5px;
  }

  .history-milestone {
    padding: 12px 13px;
    gap: 10px;
  }
}
