:root {
  --simba-pink: #ff008a;
  --simba-pink-rgb: 255, 0, 138;
  --simba-pink-fill: #e6007d;
  --simba-blue: #05aff2;
  --simba-purple: #260259;
  --simba-green: #71d98a;
  --bg-core: #05040a;
  --bg-panel: rgba(10, 10, 12, 0.56);
  --bg-panel-strong: rgba(8, 8, 10, 0.68);
  --text-white: #f5f3ff;
  --text-title: #ded9ea;
  --text-muted: #928da8;
  --text-dim: #5d586c;
  --line: rgba(255, 255, 255, 0.08);
  --line-blue: rgba(5, 175, 242, 0.34);
  --line-pink: rgba(var(--simba-pink-rgb), 0.34);
  --danger: #ff2255;
  --warning: #ffc857;
  --shadow-deep: 0 26px 80px rgba(0, 0, 0, 0.72);
}

* {
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

html {
  height: 100%;
  scrollbar-color: var(--simba-pink) var(--bg-core);
  scrollbar-width: thin;
}

body {
  height: 100dvh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(5, 4, 10, 0.5), rgba(5, 4, 10, 0.72)),
    linear-gradient(115deg, rgba(var(--simba-pink-rgb), 0.06), transparent 42%),
    linear-gradient(245deg, rgba(5, 175, 242, 0.08), transparent 48%),
    url("/frontend/fallbacks/bg.png") center / cover fixed no-repeat,
    var(--bg-core);
  color: var(--text-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

button,
select,
a {
  font: inherit;
}

button {
  letter-spacing: 0;
}

h1,
h2,
h3,
.brand-mark,
.segment,
.type-chip,
.news-type {
  font-family: Oswald, ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
}

.console-log,
.brand-system,
.metric-panel span,
.source-filter span,
.status-line,
.term-title,
.stream-topline,
.source-domain,
.source-method {
  font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

#signal-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  pointer-events: none;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    transparent 50%,
    rgba(0, 0, 0, 0.14) 50%,
    rgba(0, 0, 0, 0.14)
  );
  background-size: 100% 4px;
  opacity: 0.38;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 31;
  pointer-events: none;
  background: radial-gradient(circle, transparent 46%, rgba(0, 0, 0, 0.68) 100%);
}

.app-shell {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.topbar::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 120px;
  height: 2px;
  content: "";
  background: var(--simba-blue);
  box-shadow: 0 0 16px var(--simba-blue);
  animation: traverseLine 5s linear infinite alternate;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  color: var(--simba-pink);
  font-size: 1.45rem;
  line-height: 0.78;
  text-shadow: 2px 0 var(--simba-blue), 0 0 10px rgba(var(--simba-pink-rgb), 0.34);
}

.brand-mark span {
  color: var(--simba-blue);
  font-size: 0.78rem;
  text-transform: none;
  text-shadow: 0 0 10px rgba(5, 175, 242, 0.55);
}

.brand-divider {
  width: 1px;
  height: 34px;
  background: var(--line);
}

.brand-system {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(var(--simba-pink-rgb), 0.24);
  border-radius: 4px;
  background: rgba(38, 2, 89, 0.2);
  color: var(--simba-blue);
  padding: 0 12px;
  font-size: 0.78rem;
}

.topbar-tools {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff41;
  box-shadow: 0 0 10px #00ff41;
  animation: blink 1.5s infinite;
}

.hud-button {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text-white);
  padding: 0 12px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.hud-button::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-120%);
  transition: transform 280ms ease;
}

.hud-button:hover,
.hud-button:focus-visible {
  border-color: var(--simba-blue);
  box-shadow: 0 0 18px rgba(5, 175, 242, 0.38);
  outline: none;
  transform: translateY(-1px);
}

.hud-button:hover::before,
.hud-button:focus-visible::before {
  transform: translateX(120%);
}

.hud-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.hud-button svg {
  width: 17px;
  height: 17px;
}

.hud-button.primary {
  border-color: var(--simba-pink);
  background: var(--simba-pink-fill);
  color: #fff;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.source-action {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.source-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.llm-actions {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, 36px);
  gap: 7px;
}

.llm-action {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(5, 5, 8, 0.72);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.llm-action:hover,
.llm-action:focus-visible {
  border-color: var(--simba-blue);
  box-shadow: 0 0 16px rgba(5, 175, 242, 0.34);
  outline: none;
  transform: translateY(-1px);
}

.llm-action img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.command-strip {
  display: grid;
  gap: 10px;
  margin: 18px 0 8px;
}

.console-log {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.console-log--placeholder {
  min-height: 1.1em;
}

.metrics-grid {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  justify-content: center;
}

.metric-panel {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(13, 13, 13, 0.42);
  box-shadow: none;
  padding: 0 10px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.metric-panel::after {
  display: none;
}

.metric-panel span {
  display: block;
  color: var(--text-muted);
  font-size: 0.66rem;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.metric-panel strong {
  display: block;
  margin: 0;
  color: var(--simba-pink);
  font-family: Oswald, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  line-height: 1;
  text-shadow: 0 0 9px rgba(var(--simba-pink-rgb), 0.36);
}

.control-deck {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(5, 175, 242, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
  padding: 8px;
}

.section-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
}

.segment {
  display: inline-flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  padding: 0 10px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.segment small {
  color: var(--simba-blue);
  font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

.segment:hover,
.segment:focus-visible {
  border-color: var(--simba-pink);
  color: var(--text-white);
  box-shadow: 0 0 11px rgba(var(--simba-pink-rgb), 0.22);
  outline: none;
}

.segment.is-active {
  border-color: var(--simba-pink);
  background: var(--simba-pink-fill);
  color: #fff;
  box-shadow: 0 0 14px rgba(var(--simba-pink-rgb), 0.28);
}

.segment.is-active small {
  color: #fff;
}

.source-filter {
  position: relative;
  display: flex;
  width: min(290px, 100%);
  min-width: 0;
  flex: 0 1 290px;
  gap: 8px;
  align-items: center;
  align-self: center;
}

.source-filter > span {
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.source-select {
  display: inline-flex;
  width: 100%;
  min-height: 38px;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 8, 10, 0.58);
  color: var(--text-white);
  cursor: pointer;
  font-family: Oswald, ui-sans-serif, system-ui, sans-serif;
  padding: 0 34px 0 10px;
  text-align: left;
  text-transform: uppercase;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.source-select span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-select svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--simba-pink);
  transition: transform 160ms ease;
}

.source-filter.is-open .source-select svg {
  transform: rotate(180deg);
}

.source-select:hover,
.source-select:focus-visible,
.source-filter.is-active .source-select,
.source-filter.is-open .source-select {
  border-color: var(--simba-pink);
  outline: none;
  box-shadow: 0 0 12px rgba(var(--simba-pink-rgb), 0.22);
}

.source-filter.is-active > span,
.source-filter.is-open > span {
  color: var(--simba-pink);
}

.source-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  display: grid;
  width: min(360px, calc(100vw - 24px));
  min-width: 100%;
  max-height: min(360px, calc(100vh - 180px));
  gap: 4px;
  overflow-y: auto;
  border: 1px solid var(--line-pink);
  border-radius: 8px;
  background: rgba(8, 8, 10, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.65), 0 0 18px rgba(var(--simba-pink-rgb), 0.16);
  padding: 6px;
}

.source-option {
  display: grid;
  width: 100%;
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: Oswald, ui-sans-serif, system-ui, sans-serif;
  padding: 0 9px;
  text-align: left;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.source-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-option small {
  color: var(--simba-blue);
  font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
}

.source-option:hover,
.source-option:focus-visible {
  border-color: var(--line-pink);
  background: rgba(var(--simba-pink-rgb), 0.12);
  color: var(--text-white);
  box-shadow: inset 3px 0 0 var(--simba-pink);
  outline: none;
}

.source-option.is-selected {
  border-color: var(--simba-pink);
  background: var(--simba-pink-fill);
  color: #fff;
  box-shadow: 0 0 14px rgba(var(--simba-pink-rgb), 0.26);
}

.source-option.is-selected small {
  color: #fff;
}

.status-line,
.empty-state {
  margin: 10px 0;
  color: var(--text-muted);
}

.status-line.error {
  color: var(--danger);
  font-weight: 800;
}

.feed-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(440px, 1.05fr) minmax(340px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.feature-card,
.scanner-panel,
.stream-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(10px);
}

.feature-card {
  position: relative;
  --feature-copy-height: 0px;
  display: block;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  cursor: default;
  isolation: isolate;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.feature-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(145deg, rgba(38, 2, 89, 0.42), transparent 42%),
    linear-gradient(30deg, rgba(5, 175, 242, 0.14), transparent 52%);
  opacity: 0.82;
  pointer-events: none;
}

.feature-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 32%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 48%);
  pointer-events: none;
}

.feature-card:hover,
.feature-card:focus-visible {
  border-color: var(--line);
  box-shadow: var(--shadow-deep);
  outline: none;
  transform: none;
}

.feature-media {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: max(0px, calc(100% - var(--feature-copy-height)));
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(5, 175, 242, 0.12), transparent 42%),
    #07070b;
  transition: height 220ms ease;
}

.feature-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.92) contrast(1.05);
}

.detail-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: saturate(0.92) contrast(1.05);
}

.media-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(var(--simba-pink-rgb), 0.16), transparent 52%),
    linear-gradient(235deg, rgba(5, 175, 242, 0.2), transparent 52%),
    #09090d;
  text-align: center;
}

.media-fallback span {
  color: var(--simba-pink);
  font-family: Oswald, ui-sans-serif, system-ui, sans-serif;
  font-size: 4rem;
  line-height: 1;
  text-shadow: 0 0 14px rgba(var(--simba-pink-rgb), 0.38);
}

.media-fallback strong {
  max-width: 80%;
  color: var(--text-white);
  font-size: 0.86rem;
}

.feature-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: grid;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  gap: 10px;
  overflow-y: auto;
  border-top: 1px solid rgba(var(--simba-pink-rgb), 0.24);
  background:
    linear-gradient(180deg, rgba(12, 10, 18, 0.72), rgba(5, 5, 8, 0.94) 34%),
    rgba(5, 5, 8, 0.9);
  box-shadow: 0 -22px 54px rgba(0, 0, 0, 0.68), 0 -1px 0 rgba(255, 255, 255, 0.04);
  padding: 16px 18px 18px;
  scrollbar-color: var(--simba-pink) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  backdrop-filter: blur(12px);
  animation: detailSheetIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-card,
.scanner-panel {
  backdrop-filter: blur(7px);
}

.meta-row,
.source-row,
.stream-topline,
.stream-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.type-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(var(--simba-pink-rgb), 0.28);
  border-radius: 4px;
  background: rgba(var(--simba-pink-rgb), 0.09);
  color: var(--simba-pink);
  padding: 0 8px;
  font-size: 0.78rem;
}

.feature-card h1,
.stream-item h2,
.detail h2 {
  margin: 0;
  color: var(--text-title);
  font-family: Oswald, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow: 0 0 5px rgba(222, 217, 234, 0.12);
}

.feature-card h1 {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  font-size: clamp(1.42rem, 2.35vw, 2.05rem);
}

.scramble-target {
  display: block;
  max-width: 100%;
  min-width: 0;
  cursor: default;
  transition: color 120ms ease, text-shadow 120ms ease;
}

.scramble-target.is-scrambling {
  color: var(--simba-pink);
  text-shadow:
    1px 0 var(--simba-blue),
    0 0 8px rgba(var(--simba-pink-rgb), 0.24);
}

.scramble-line {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
}

.scramble-cell {
  display: inline-block;
  white-space: pre;
  text-align: left;
  vertical-align: top;
}

.feature-card p,
.stream-item p,
.detail-copy {
  margin: 0;
  color: #c9c4da;
  line-height: 1.55;
}

.detail-copy {
  hyphens: auto;
  text-align: justify;
  text-indent: 1.6em;
  text-wrap: pretty;
}

.tldr-copy {
  font-weight: 800;
}

.source-row {
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  font-weight: 800;
}

.source-identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--text-white);
}

.source-identity span,
.source-domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-separator {
  color: var(--text-dim);
  font-weight: 400;
}

.source-domain {
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.favicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.source-method {
  margin-left: auto;
  color: var(--simba-blue);
  font-size: 0.74rem;
  font-weight: 400;
}

.scanner-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.48);
  backdrop-filter: blur(10px);
  padding: 0 14px;
}

.term-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.red {
  background: var(--danger);
}

.yellow {
  background: var(--warning);
}

.green {
  background: var(--simba-green);
}

.term-title {
  margin-left: 8px;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.terminal-refresh {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border: 1px solid rgba(5, 175, 242, 0.34);
  border-radius: 6px;
  background: rgba(5, 175, 242, 0.08);
  color: var(--simba-blue);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 13px rgba(5, 175, 242, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.terminal-refresh::before {
  position: absolute;
  inset: 3px;
  border-radius: 4px;
  content: "";
  opacity: 0;
  box-shadow: 0 0 16px rgba(5, 175, 242, 0.44);
  transition: opacity 160ms ease;
}

.terminal-refresh:hover,
.terminal-refresh:focus-visible {
  border-color: var(--simba-blue);
  color: var(--text-white);
  box-shadow: 0 0 18px rgba(5, 175, 242, 0.44);
  outline: none;
  transform: translateY(-1px);
}

.terminal-refresh:hover::before,
.terminal-refresh:focus-visible::before {
  opacity: 1;
}

.terminal-refresh:disabled {
  cursor: wait;
  opacity: 0.7;
}

.terminal-refresh svg {
  width: 17px;
  height: 17px;
}

.news-stream {
  display: grid;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  scrollbar-color: var(--simba-pink) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.stream-item {
  position: relative;
  display: grid;
  grid-template-columns: 10px 1fr 20px;
  gap: 14px;
  align-items: center;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  padding: 15px 14px;
  scroll-margin-top: 0;
  backdrop-filter: blur(5px);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stream-item:last-child {
  border-bottom: 0;
}

.stream-item:hover,
.stream-item:focus-visible,
.stream-item.is-active {
  border-color: rgba(5, 175, 242, 0.28);
  background: rgba(38, 2, 89, 0.34);
  outline: none;
}

.stream-item.is-active {
  box-shadow: inset 3px 0 0 var(--simba-pink);
}

.stream-item.is-active h2 {
  color: var(--simba-pink);
}

.stream-marker {
  width: 5px;
  height: 5px;
  background: var(--simba-green);
  box-shadow: 0 0 8px var(--simba-green);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.stream-item.is-read .stream-marker {
  background: var(--simba-pink);
  box-shadow: 0 0 8px var(--simba-pink);
}

.stream-main {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.stream-source,
.stream-source span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
}

.stream-source span:first-child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-type {
  color: var(--simba-pink);
  font-size: 0.78rem;
}

.stream-item h2 {
  font-size: 1.12rem;
  line-height: 1.12;
}

.stream-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

.mobile-inline-detail {
  display: none;
}

.empty-state {
  border: 1px dashed rgba(5, 175, 242, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.36);
  padding: 18px;
  font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wide {
  width: 100%;
}

.reveal-element {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeInUp 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.16s;
}

.delay-3 {
  animation-delay: 0.24s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes traverseLine {
  0% {
    left: 0;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 120px);
    opacity: 0;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes detailSheetIn {
  from {
    opacity: 0.7;
    transform: translateY(min(42%, 220px));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-tools {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
    width: min(100% - 20px, 1200px);
    padding-top: 24px;
    overflow: visible;
  }

  .topbar,
  .brand-lockup,
  .topbar-tools,
  .control-deck {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-lockup {
    display: flex;
  }

  .brand-divider {
    display: none;
  }

  .feed-layout,
  .control-deck {
    grid-template-columns: 1fr;
  }

  .topbar-tools,
  .source-filter {
    width: 100%;
  }

  .source-filter {
    flex: none;
  }

  .metrics-grid {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .feature-card {
    display: none;
  }

  .feed-layout {
    display: block;
  }

  .scanner-panel {
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .terminal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 10px;
  }

  .news-stream {
    display: grid;
    gap: 10px;
    overflow: visible;
  }

  .stream-item {
    grid-template-columns: 8px 1fr 18px;
    align-items: start;
    border-width: 1px;
    border-radius: 8px;
    background: var(--bg-panel);
    box-shadow: var(--shadow-deep);
    padding: 14px 12px;
  }

  .stream-item svg {
    margin-top: 24px;
  }

  .stream-marker {
    height: 100%;
    min-height: 42px;
    width: 3px;
    border-radius: 999px;
  }

  .stream-item.is-active {
    background: rgba(38, 2, 89, 0.34);
    border-color: var(--line-pink);
  }

  .mobile-inline-detail {
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }

  .mobile-detail-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #07070b;
  }

  .mobile-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.05);
  }

  .mobile-detail-copy {
    display: grid;
    gap: 10px;
  }

  .stream-source {
    align-items: flex-start;
    gap: 8px;
    font-size: 0.72rem;
  }

  .stream-source span:first-child {
    flex: 1;
  }

  .stream-item h2 {
    color: var(--text-title);
    font-size: 1.05rem;
    line-height: 1.16;
  }

  .stream-item.is-active h2 {
    color: var(--simba-pink);
  }

  .mobile-detail-copy .hud-button {
    min-height: 40px;
  }

  .detail-actions {
    gap: 6px;
  }

  .llm-actions {
    grid-template-columns: repeat(4, 34px);
    gap: 6px;
  }

  .llm-action {
    width: 34px;
    height: 34px;
  }

  .section-segments {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .segment {
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .metrics-grid {
    gap: 6px;
  }

  .metric-panel {
    min-height: 34px;
    padding: 0 8px;
  }

  .metric-panel span {
    font-size: 0.6rem;
  }

  .metric-panel strong {
    font-size: 1.08rem;
  }

  .stream-item {
    grid-template-columns: 8px 1fr;
  }

  .stream-item svg {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
