:root {
  color-scheme: dark;
  --bg: #071015;
  --panel: rgba(255, 255, 255, 0.058);
  --panel-strong: rgba(12, 26, 34, 0.9);
  --line: rgba(230, 244, 247, 0.16);
  --text: #f4f0e8;
  --muted: #a9bac0;
  --cyan: #72d2db;
  --gold: #f2b84b;
  --alert: #f05d5d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(114, 210, 219, 0.11), transparent 28%),
    linear-gradient(180deg, #0e1a22 0%, var(--bg) 42%, #050b0f 100%);
  color: var(--text);
}

button,
a {
  font: inherit;
}

.story-shell {
  width: min(1380px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 28px;
}

.story-topbar {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 17, 0.78);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.story-topbar a,
.story-actions a,
.story-actions button,
.briefing-controls button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(114, 210, 219, 0.3);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(114, 210, 219, 0.1);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.story-topbar a:hover,
.story-actions a:hover,
.story-actions button:hover,
.briefing-controls button:hover {
  border-color: rgba(114, 210, 219, 0.54);
  background: rgba(114, 210, 219, 0.17);
  transform: translateY(-1px);
}

.story-topbar span,
.eyebrow,
.section-heading span {
  display: block;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.story-topbar strong,
.section-heading strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  gap: 12px;
  align-items: stretch;
  padding: 18px 0 12px;
}

.story-copy,
.briefing-panel,
.source-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}

.story-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 430px;
  padding: clamp(18px, 3vw, 32px);
}

.story-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.story-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.45;
}

.story-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.story-meta b {
  min-width: 0;
  padding: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: #d7e8ec;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-actions a {
  border-color: rgba(242, 184, 75, 0.4);
  background: rgba(242, 184, 75, 0.13);
}

.briefing-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 430px;
  overflow: hidden;
  background: #050b0f;
}

#briefing-canvas,
.video-slot iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.video-slot {
  min-height: 360px;
}

.briefing-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(5, 12, 17, 0.84);
}

.briefing-controls span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
}

.source-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
}

.primary-source h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.05;
}

.primary-source p,
.source-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 740;
  line-height: 1.4;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  text-decoration: none;
  animation: source-in 170ms ease both;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.source-item:hover {
  border-color: rgba(114, 210, 219, 0.52);
  background: rgba(114, 210, 219, 0.11);
  transform: translateY(-1px);
}

.source-item b {
  color: var(--gold);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.source-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.02rem;
  line-height: 1.15;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.source-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-item.video b::after {
  content: " video";
  color: var(--cyan);
}

.source-empty {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 850;
}

@keyframes source-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .story-hero,
  .source-layout {
    grid-template-columns: 1fr;
  }

  .story-copy,
  .briefing-panel {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .story-shell {
    width: min(100% - 16px, 1380px);
    padding-top: 8px;
  }

  .story-topbar {
    top: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }

  .story-topbar a:last-child {
    grid-column: 1 / -1;
  }

  .story-copy {
    padding: 14px;
  }

  .story-copy h1 {
    font-size: clamp(1.8rem, 12vw, 3.2rem);
  }

  .story-meta {
    grid-template-columns: 1fr;
  }

  .story-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #briefing-canvas,
  .video-slot,
  .video-slot iframe {
    min-height: 260px;
  }
}
