/* Supply Chain Intelligence — page + homepage teaser (Applied Agentic theme) */

.sc-page {
  --text: #e8f4ff;
  --text-muted: #8aaabb;
  --text-dim: #5a7a8a;
  --accent: #00e5ff;
  --accent-dim: rgba(0, 229, 255, 0.15);
  --border: rgba(0, 229, 255, 0.15);
  --bg: #050810;
  --bg-panel: rgba(5, 8, 16, 0.92);
  --bg-panel-deep: rgba(3, 6, 12, 0.96);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --sc-highlight: #f59e0b;
  min-height: 100vh;
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.sc-page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.sc-back {
  display: inline-block;
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.sc-back:hover {
  text-decoration: underline;
}

.sc-page-inner > header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  font-weight: 600;
}

.sc-page-inner > header .sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 46rem;
  line-height: 1.55;
}

.sc-updated {
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* Explorer card */
.sc-explorer {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(0, 229, 255, 0.05) 0%, transparent 55%),
    var(--bg-panel);
}

.sc-domain-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: rgba(0, 229, 255, 0.03);
}

.sc-domain-bar .sc-brand {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.sc-domain-bar .sc-lbl {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sc-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-panel-deep);
}

.sc-pill.active {
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
}

.sc-legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 16, 0.6);
}

.sc-legend-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
}

.sc-legend .sc-lbl {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.sc-legend-item {
  font-size: 0.62rem;
  font-weight: 500;
}

.sc-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.2rem;
  vertical-align: middle;
}

.sc-body-grid {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  height: 520px;
  overflow: hidden;
}

.sc-panel-left {
  border-right: 1px solid var(--border);
  background: var(--bg-panel-deep);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sc-panel-hdr {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.sc-panel-hdr-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
}

.sc-panel-hdr-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
}

.sc-panel-hdr--split {
  border-top: 1px solid var(--border);
}

#sc-events-list {
  overflow-y: auto;
  flex: 1;
}

.sc-event-item {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.06);
  font-size: 0.68rem;
  line-height: 1.45;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, opacity 0.2s, color 0.15s;
}

.sc-event-item:hover,
.sc-event-item.active {
  background: rgba(0, 229, 255, 0.06);
  color: var(--text);
}

.sc-event-item.faded {
  opacity: 0.28;
}

.sc-panel-center {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
}

#sc-net-stats {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  line-height: 1.85;
  z-index: 2;
  pointer-events: none;
}

#sc-net-stats .sc-stat-title {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#sc-net-stats .sc-stat-val {
  color: var(--accent);
}

#sc-net-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  background: rgba(5, 8, 16, 0.92);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

#sc-net-hint.is-active {
  color: var(--accent);
  border-color: rgba(0, 229, 255, 0.45);
}

#sc-network-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sc-panel-right {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-panel-deep);
}

#sc-map-svg {
  width: 100%;
  height: 210px;
  display: block;
}

#sc-wordcloud {
  flex: 1;
  overflow: hidden;
  padding: 0.5rem 0.65rem;
  line-height: 1.75;
}

.sc-timeline-wrap {
  padding: 0.55rem 0.85rem 0.65rem;
  border-top: 1px solid var(--border);
  background: rgba(3, 6, 12, 0.5);
}

.sc-timeline-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.sc-timeline-title span {
  font-weight: 400;
  color: var(--text-dim);
}

#sc-timeline-bars {
  display: flex;
  align-items: flex-end;
  height: 40px;
  gap: 1px;
}

.sc-tl-bar {
  flex: 1;
  min-width: 1px;
  border-radius: 1px 1px 0 0;
  background: rgba(0, 229, 255, 0.35);
}

.sc-tl-bar.is-shock {
  background: rgba(245, 158, 11, 0.75);
}

.sc-timeline-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.sc-powered {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

.sc-powered strong {
  color: var(--accent);
  font-weight: 500;
}

/* Homepage teaser (#market-sentiments) */
.sc-block {
  margin-bottom: 1.25rem;
}

.sc-block--embed {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.sc-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.45rem;
}

.sc-block-head .alt-data-subhead {
  margin: 0;
}

.sc-teaser-updated {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.68rem;
  color: var(--text-dim, #5a7a8a);
  letter-spacing: 0.02em;
}

.sc-teaser-intro {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted, #8aaabb);
  max-width: 52rem;
}

.sc-teaser {
  border: 1px solid var(--border, rgba(0, 229, 255, 0.15));
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(0, 229, 255, 0.05) 0%, transparent 55%),
    rgba(5, 8, 16, 0.92);
  overflow: hidden;
}

.sc-teaser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 0;
  min-height: 320px;
}

.sc-teaser-layout--live {
  min-height: 340px;
}

.sc-teaser-network-wrap {
  position: relative;
  min-height: 320px;
  border-right: 1px solid var(--border, rgba(0, 229, 255, 0.12));
  background: rgba(3, 6, 12, 0.45);
}

.sc-teaser-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.58rem;
  color: var(--text-dim, #5a7a8a);
  white-space: nowrap;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--border, rgba(0, 229, 255, 0.12));
  background: rgba(5, 8, 16, 0.92);
  transition: color 0.2s, border-color 0.2s;
}

.sc-teaser-hint.is-active {
  color: var(--accent, #00e5ff);
  border-color: rgba(0, 229, 255, 0.4);
}

#sc-teaser-network-svg {
  width: 100%;
  height: 320px;
  display: block;
}

.sc-teaser-side {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: 320px;
  overflow: hidden;
  background: rgba(5, 8, 16, 0.5);
}

.sc-teaser-events-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.65rem;
  border-top: 1px solid var(--border, rgba(0, 229, 255, 0.12));
  border-bottom: 1px solid var(--border, rgba(0, 229, 255, 0.12));
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text, #e8f4ff);
}

.sc-teaser-events-hdr span:last-child {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.58rem;
  font-weight: 400;
  color: var(--text-dim, #5a7a8a);
}

.sc-teaser-events {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0;
}

.sc-teaser-event-item {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.06);
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--text-muted, #8aaabb);
  cursor: pointer;
  transition: opacity 0.2s, color 0.15s, background 0.15s;
}

.sc-teaser-event-item.is-active {
  background: rgba(0, 229, 255, 0.05);
  color: var(--text, #e8f4ff);
}

.sc-teaser-event-item:hover {
  background: rgba(0, 229, 255, 0.06);
  color: var(--text, #e8f4ff);
}

.sc-teaser-event-item.faded {
  opacity: 0.22;
}

.sc-teaser-side .sc-teaser-stats {
  padding: 0.55rem 0.65rem 0.45rem;
  border-bottom: none;
}

.sc-teaser-loading,
.sc-teaser-empty {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim, #5a7a8a);
}

.sc-teaser-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sc-teaser-chip {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim, #5a7a8a);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border, rgba(0, 229, 255, 0.12));
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.04);
}

.sc-teaser-chip strong {
  color: var(--accent, #00e5ff);
  font-weight: 600;
}

.sc-teaser-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sc-teaser-event-list li {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted, #8aaabb);
  padding-left: 0.55rem;
  border-left: 2px solid rgba(0, 229, 255, 0.25);
}

.sc-teaser-cta {
  margin: 0.65rem 0 0;
}

.sc-teaser-cta a {
  font-size: 0.82rem;
  color: var(--accent, #00e5ff);
  text-decoration: none;
}

.sc-teaser-cta a:hover {
  text-decoration: underline;
}

.sc-teaser-legal {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-dim, #5a7a99);
}

.sc-teaser-legal a {
  color: var(--accent, #00e5ff);
}

@media (max-width: 900px) {
  .sc-teaser-layout,
  .sc-teaser-layout--live {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sc-teaser-network-wrap {
    border-right: none;
    border-bottom: 1px solid var(--border, rgba(0, 229, 255, 0.12));
    min-height: 280px;
  }

  #sc-teaser-network-svg {
    height: 280px;
  }

  .sc-teaser-side {
    max-height: 220px;
    min-height: 180px;
  }
}

@media (max-width: 900px) {
  .sc-body-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sc-panel-left,
  .sc-panel-right {
    max-height: 220px;
  }

  .sc-panel-center {
    min-height: 360px;
  }

  #sc-map-svg {
    height: 180px;
  }
}
