:root {
  --bg: #f5f1e9;
  --surface: rgba(255, 252, 248, 0.78);
  --surface-strong: rgba(255, 255, 253, 0.94);
  --ink: #132030;
  --muted: #5f6874;
  --border: rgba(19, 32, 48, 0.09);
  --border-strong: rgba(19, 32, 48, 0.18);
  --primary: #a66139;
  --primary-deep: #7f4422;
  --secondary: #2f7b77;
  --accent: #7a93bc;
  --accent-soft: #dfe7f4;
  --positive: #1f8c58;
  --neutral: #676055;
  --negative: #bb4736;
  --shadow-sm: 0 18px 32px rgba(34, 56, 90, 0.06);
  --shadow-md: 0 28px 56px rgba(34, 56, 90, 0.08);
  --shadow-lg: 0 44px 94px rgba(34, 56, 90, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --space-1: 0.45rem;
  --space-2: 0.8rem;
  --space-3: 1.1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 2.8rem;
  --font-display: "STZhongsong", "Songti SC", "Noto Serif SC", "SimSun", serif;
  --font-body: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  color-scheme: light;
}

body {
  background:
    radial-gradient(circle at 10% 12%, rgba(166, 97, 57, 0.12), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(47, 123, 119, 0.09), transparent 24%),
    radial-gradient(circle at 80% 78%, rgba(122, 147, 188, 0.11), transparent 24%),
    repeating-linear-gradient(
      90deg,
      rgba(19, 32, 48, 0.02) 0,
      rgba(19, 32, 48, 0.02) 1px,
      transparent 1px,
      transparent 112px
    ),
    linear-gradient(180deg, #fcfbf8 0%, var(--bg) 26%, #ece6dc 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 18%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.18), transparent 26%);
}

.app-shell {
  position: relative;
  max-width: 1520px;
  margin: 0 auto;
  padding: var(--space-6);
}

.hero-panel,
.panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero-panel::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 35%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.16));
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
}

.hero-copy,
.control-panel,
.panel > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.eyebrow,
.section-tag,
.mini-head,
.cluster-topline,
.control-foot {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow,
.section-tag {
  margin: 0 0 var(--space-2);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 8ch;
  font-size: clamp(2.9rem, 5vw, 5.7rem);
  line-height: 0.94;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  line-height: 1.06;
}

h3 {
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  line-height: 1.15;
}

.hero-text,
.control-text,
.tracked-statement,
.cluster-summary,
.cluster-representative,
.article-summary,
.note-list,
.metric-label,
.source-meta,
.status-pill,
.focus-mood,
.control-foot {
  color: var(--muted);
  line-height: 1.68;
}

.hero-text {
  max-width: 60ch;
  margin: var(--space-3) 0 0;
  font-size: 1.03rem;
}

.headline-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero-stat {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow-sm);
}

.hero-stat-value {
  font-size: clamp(1.7rem, 2.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
}

.hero-stat-label {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: 0.88rem;
}

.control-panel {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  max-width: 860px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 238, 229, 0.78));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.control-header {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field span {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
}

select,
button {
  min-height: 48px;
  border-radius: 999px;
  font: inherit;
}

select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

select:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(15, 111, 103, 0.26);
  outline-offset: 2px;
}

.action-button,
.follow-button {
  width: 100%;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--ink), #223549);
  color: #fffaf3;
  cursor: pointer;
  transition:
    transform 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    background 220ms ease;
  box-shadow: 0 18px 36px rgba(24, 33, 44, 0.18);
}

.action-button:hover,
.follow-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
}

.action-button:disabled,
.follow-button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.control-foot {
  display: grid;
  gap: 0.35rem;
  font-size: 0.76rem;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.board-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.panel {
  border-radius: var(--radius-xl);
  padding: var(--space-4);
}

.map-panel {
  min-height: 640px;
}

.cluster-panel,
.tracked-panel {
  grid-column: 1 / -1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.panel-head.compact {
  margin-bottom: var(--space-2);
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
}

.canvas-shell {
  display: grid;
  gap: var(--space-2);
}

.canvas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.canvas-legend span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 0.88rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 119, 158, 0.16);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 18px rgba(96, 119, 158, 0.08);
}

.legend-dot,
.legend-line {
  display: inline-block;
  margin-right: 0.45rem;
  vertical-align: middle;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-center {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(161, 74, 42, 0.18);
}

.legend-article {
  background: rgba(77, 111, 154, 0.82);
}

.legend-source {
  background: rgba(15, 111, 103, 0.78);
  box-shadow: 0 0 0 4px rgba(15, 111, 103, 0.12);
}

.legend-line {
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, rgba(109, 139, 185, 0.78), rgba(109, 139, 185, 0.16));
}

.constellation-canvas {
  position: relative;
  min-height: 560px;
  border-radius: calc(var(--radius-xl) - 8px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 50%, rgba(122, 147, 188, 0.08), transparent 34%),
    radial-gradient(circle at 20% 18%, rgba(47, 123, 119, 0.05), transparent 18%),
    radial-gradient(circle at 84% 76%, rgba(166, 97, 57, 0.06), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 249, 252, 0.97));
}

#constellationSvg,
#timelineSvg {
  display: block;
  width: 100%;
  height: 100%;
}

.insight-panel {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: var(--space-3);
}

.insight-block {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--border);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.metric-card {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.metric-value {
  font-size: clamp(1.4rem, 2vw, 2.15rem);
  font-weight: 700;
  line-height: 1;
}

.metric-label {
  margin-top: var(--space-1);
  font-size: 0.85rem;
}

.source-library {
  display: grid;
  gap: 0.7rem;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  min-width: 0;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
}

.source-row > div {
  min-width: 0;
}

.source-row-main,
.source-row-side {
  display: grid;
  gap: 0.65rem;
}

.source-row-side {
  justify-items: end;
}

.source-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.source-name-link {
  color: inherit;
  text-decoration: none;
}

.source-name-link:hover,
.source-name-link:focus-visible {
  color: var(--primary);
}

.source-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 111, 103, 0.16);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.source-link-button:hover,
.source-link-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 111, 103, 0.28);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.source-link-button.external {
  border-color: rgba(161, 74, 42, 0.18);
  color: var(--primary-deep);
}

.source-row-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.source-row-link:hover,
.source-row-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(15, 111, 103, 0.24);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.92);
}

.source-name {
  font-weight: 600;
  word-break: break-word;
}

.source-meta {
  font-size: 0.85rem;
  word-break: break-word;
}

.source-count {
  min-width: 44px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(15, 111, 103, 0.18);
  background: rgba(15, 111, 103, 0.08);
  color: var(--secondary);
  font-weight: 700;
}

.note-list {
  margin: 0;
  padding-left: 1.1rem;
}

.note-list li + li {
  margin-top: 0.55rem;
}

.cluster-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}

.cluster-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 233, 223, 0.88));
  box-shadow: var(--shadow-md);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.cluster-card:hover {
  transform: translateY(-4px);
  border-color: rgba(161, 74, 42, 0.28);
}

.cluster-card.active {
  border-color: rgba(161, 74, 42, 0.42);
  box-shadow: 0 22px 42px rgba(161, 74, 42, 0.12);
}

.cluster-topline {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.cluster-title {
  font-size: 1.5rem;
}

.chip-row,
.sentiment-row,
.sentiment-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 0.84rem;
}

.chip-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.chip-link:hover,
.chip-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 111, 103, 0.28);
  background: rgba(255, 255, 255, 0.98);
}

.chip.soft {
  background: rgba(15, 111, 103, 0.07);
  color: var(--secondary);
  border-color: rgba(15, 111, 103, 0.14);
}

.chip.highlight {
  background: rgba(161, 74, 42, 0.08);
  color: var(--primary-deep);
  border-color: rgba(161, 74, 42, 0.16);
}

.sentiment-pill.positive {
  color: var(--positive);
  border-color: rgba(31, 140, 88, 0.22);
}

.sentiment-pill.neutral {
  color: var(--neutral);
  border-color: rgba(103, 96, 85, 0.22);
}

.sentiment-pill.negative {
  color: var(--negative);
  border-color: rgba(187, 71, 54, 0.22);
}

.cluster-representative {
  margin: 0;
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.inline-link {
  color: var(--primary-deep);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(161, 74, 42, 0.24);
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--primary);
  border-bottom-color: rgba(161, 74, 42, 0.52);
}

.follow-button {
  margin-top: var(--space-1);
}

.tracked-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.tracked-main,
.tracked-feed {
  display: grid;
  gap: var(--space-3);
}

.topic-intro {
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.focus-mood {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
  font-size: 0.85rem;
}

.dual-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.subpanel {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.timeline-panel {
  min-height: 310px;
}

.mini-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: 0.8rem;
}

.bar-card {
  flex: 1;
  min-width: 120px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.bar-card.positive {
  box-shadow: inset 0 3px 0 rgba(31, 140, 88, 0.85);
}

.bar-card.neutral {
  box-shadow: inset 0 3px 0 rgba(103, 96, 85, 0.7);
}

.bar-card.negative {
  box-shadow: inset 0 3px 0 rgba(187, 71, 54, 0.8);
}

.bar-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.bar-value {
  margin-top: 0.4rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.bar-desc {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.article-list {
  display: grid;
  gap: var(--space-2);
}

.article-card {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 233, 223, 0.84));
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.article-card:hover,
.article-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(161, 74, 42, 0.22);
  box-shadow: var(--shadow-sm);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: 0.82rem;
}

.article-title {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
}

.article-link {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.article-link:hover,
.article-link:focus-visible {
  color: var(--primary-deep);
}

.article-summary {
  margin: 0 0 var(--space-2);
}

.article-score {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.empty-state {
  padding: var(--space-4);
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
}

.constellation-label {
  fill: #233245;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}

.constellation-label.small {
  fill: #617184;
  font-size: 11px;
}

.constellation-label.source {
  fill: #4d6278;
  font-size: 11px;
  font-weight: 600;
}

.constellation-label.hint {
  fill: #718197;
  font-size: 11px;
  font-weight: 500;
}

.graph-stage {
  position: relative;
  isolation: isolate;
}

.graph-stage::before {
  content: "";
  position: absolute;
  inset: 18px 14px 18px 14px;
  z-index: 0;
  pointer-events: none;
  border-radius: calc(var(--radius-xl) - 10px);
  background:
    radial-gradient(
      420px circle at var(--spotlight-x, 52%) var(--spotlight-y, 38%),
      rgba(122, 147, 188, 0.14),
      transparent 58%
    ),
    radial-gradient(
      320px circle at 18% 20%,
      rgba(47, 123, 119, 0.09),
      transparent 60%
    );
}

.graph-chrome,
.graph-tools,
.graph-focus-card {
  position: absolute;
  z-index: 2;
}

.graph-chrome {
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.graph-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(112, 133, 166, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: #304055;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(61, 85, 122, 0.08);
  backdrop-filter: blur(14px);
}

.graph-badge.soft {
  color: var(--muted);
}

.graph-tools {
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.55rem;
}

.graph-tool {
  min-width: 48px;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(112, 133, 166, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(61, 85, 122, 0.08);
  backdrop-filter: blur(14px);
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background 180ms ease,
    border-color 180ms ease;
}

.graph-tool:hover,
.graph-tool:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(47, 123, 119, 0.24);
  box-shadow: 0 16px 34px rgba(61, 85, 122, 0.12);
}

.graph-tool:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

.graph-tool.accent {
  background: linear-gradient(135deg, rgba(47, 123, 119, 0.12), rgba(122, 147, 188, 0.12));
}

.graph-focus-card {
  left: 1rem;
  bottom: 1rem;
  width: min(360px, calc(100% - 2rem));
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(112, 133, 166, 0.14);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 22px 42px rgba(61, 85, 122, 0.12);
  backdrop-filter: blur(16px);
}

.graph-focus-kicker {
  margin: 0;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.graph-focus-title {
  font-size: 1.28rem;
  line-height: 1.2;
}

.graph-focus-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.93rem;
}

.graph-focus-meta {
  gap: 0.5rem;
}

.constellation-canvas.is-dragging {
  cursor: grabbing;
}

.detail-shell {
  max-width: 1220px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: var(--space-3);
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.back-link::before {
  content: "←";
  font-size: 1rem;
}

.back-link:hover,
.back-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(15, 111, 103, 0.24);
  box-shadow: var(--shadow-md);
}

.detail-hero {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
}

.detail-kicker {
  margin: 0 0 var(--space-2);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-title {
  max-width: none;
  font-size: clamp(2.2rem, 4.1vw, 4.4rem);
  line-height: 1.03;
}

.detail-lead,
.detail-copy,
.detail-caption,
.detail-empty {
  color: var(--muted);
  line-height: 1.72;
}

.detail-lead {
  max-width: 72ch;
  margin: var(--space-3) 0 0;
  font-size: 1.02rem;
}

.detail-meta {
  margin-top: var(--space-3);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: var(--space-3);
}

.detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.2rem;
  font: inherit;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background 180ms ease;
}

.detail-action.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--ink), #223549);
  color: #fffaf3;
  box-shadow: 0 18px 36px rgba(24, 33, 44, 0.18);
}

.detail-action:hover,
.detail-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.detail-action.primary:hover,
.detail-action.primary:focus-visible {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
}

.detail-action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.detail-layout {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.detail-section {
  display: grid;
  gap: var(--space-3);
}

.detail-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}

.detail-stat {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
}

.detail-stat-value {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}

.detail-stat-label {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: 0.84rem;
}

.detail-list {
  display: grid;
  gap: var(--space-2);
}

.detail-list-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
}

.detail-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.detail-section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.detail-anchor {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.5;
}

.detail-anchor:hover,
.detail-anchor:focus-visible {
  color: var(--primary-deep);
}

.detail-empty {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.58);
}

.reveal {
  animation: rise-in 640ms var(--ease-out) both;
}

.reveal:nth-child(2) {
  animation-delay: 90ms;
}

.reveal:nth-child(3) {
  animation-delay: 150ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@media (max-width: 1260px) {
  .headline-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: var(--space-3);
  }

  .hero-panel,
  .panel {
    padding: var(--space-3);
  }

  .detail-hero {
    padding: var(--space-3);
  }

  .dual-block,
  .metric-grid,
  .headline-stats,
  .detail-card-grid {
    grid-template-columns: 1fr;
  }

  .constellation-canvas {
    min-height: 420px;
  }

  .graph-stage {
    display: grid;
    gap: 0.9rem;
  }

  .graph-chrome,
  .graph-tools {
    position: static;
  }

  .graph-tools {
    justify-content: flex-start;
  }

  .graph-focus-card {
    position: static;
    width: 100%;
  }

  .detail-actions,
  .detail-section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Dramatic redesign overrides */

:root {
  --bg: #05060d;
  --bg-secondary: #0b1020;
  --surface: rgba(9, 13, 29, 0.76);
  --surface-strong: rgba(15, 20, 42, 0.92);
  --surface-soft: rgba(12, 17, 36, 0.68);
  --ink: #f6f2e9;
  --muted: #a8b5d1;
  --border: rgba(209, 223, 255, 0.09);
  --border-strong: rgba(209, 223, 255, 0.18);
  --primary: #d9ff2f;
  --primary-deep: #9fca00;
  --secondary: #ff5e3d;
  --accent: #34d6ff;
  --accent-soft: rgba(52, 214, 255, 0.18);
  --accent-2: #ff53cf;
  --accent-warm: #ffe27a;
  --positive: #7cff95;
  --neutral: #d4d8eb;
  --negative: #ff8a72;
  --shadow-sm: 0 24px 40px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 34px 70px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 48px 120px rgba(0, 0, 0, 0.42);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --ease-out: cubic-bezier(0.2, 0.82, 0.2, 1);
  --ease-burst: cubic-bezier(0.18, 0.9, 0.24, 1.18);
}

html {
  color-scheme: dark;
  overflow-x: clip;
  scrollbar-gutter: stable both-edges;
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 83, 207, 0.18), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(217, 255, 47, 0.12), transparent 22%),
    radial-gradient(circle at 82% 72%, rgba(52, 214, 255, 0.14), transparent 24%),
    radial-gradient(circle at 18% 82%, rgba(255, 94, 61, 0.12), transparent 22%),
    linear-gradient(180deg, #070811 0%, #090d19 36%, #05060d 100%);
  color: var(--ink);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -18vmax;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle, rgba(217, 255, 47, 0.12), transparent 45%) 8% 14% / 28rem 28rem no-repeat,
    radial-gradient(circle, rgba(255, 83, 207, 0.1), transparent 48%) 88% 18% / 22rem 22rem no-repeat,
    radial-gradient(circle, rgba(52, 214, 255, 0.09), transparent 52%) 76% 74% / 30rem 30rem no-repeat;
  filter: blur(32px);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}

body::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 120px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 120px);
  opacity: 0.28;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 10%, rgba(0, 0, 0, 0.95) 100%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1560px, calc(100vw - clamp(1.5rem, 4vw, 4rem)));
  max-width: 1680px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.75rem);
  overflow-x: clip;
}

.ui-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.hero-panel,
.panel {
  background:
    linear-gradient(180deg, rgba(12, 17, 36, 0.94), rgba(8, 11, 24, 0.76)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 38%);
  border: 1px solid rgba(209, 223, 255, 0.11);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
}

.hero-panel::before,
.panel::before {
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.06), transparent 26%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015));
}

.hero-panel::after,
.detail-hero::after {
  content: attr(data-ghost);
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  top: 1rem;
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 15rem);
  line-height: 0.88;
  letter-spacing: -0.12em;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.04);
  animation: ghost-shift 10s ease-in-out infinite alternate;
}

.panel {
  padding: 1.45rem;
}

.hero-panel {
  gap: 1.6rem;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  border-radius: 40px;
  overflow: hidden;
}

.hero-copy,
.control-panel,
.panel > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
}

.hero-topline > *,
.hero-pill-row,
.hero-marquee,
.control-header,
.field,
.headline-stats,
.hero-signal-grid,
.control-grid {
  min-width: 0;
}

.hero-copy > *,
.control-panel > *,
.hero-signal-card > *,
.control-note-card > * {
  min-width: 0;
}

.eyebrow,
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--primary);
  text-shadow: 0 0 16px rgba(217, 255, 47, 0.22);
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 255, 47, 0.2);
  background: rgba(217, 255, 47, 0.09);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-pill.secondary {
  border-color: rgba(255, 83, 207, 0.24);
  background: rgba(255, 83, 207, 0.11);
}

h1,
h2,
h3 {
  color: var(--ink);
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.7rem, 8vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-shadow:
    0 0 28px rgba(255, 255, 255, 0.12),
    0 0 72px rgba(255, 255, 255, 0.06);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.85rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
}

.hero-text {
  max-width: 64ch;
  color: #dde3f5;
  font-size: 1.04rem;
  overflow-wrap: anywhere;
}

.hero-marquee {
  position: relative;
  overflow: hidden;
  margin-top: 1.2rem;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(209, 223, 255, 0.11);
  border-bottom: 1px solid rgba(209, 223, 255, 0.11);
}

.hero-marquee::before,
.hero-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4rem;
  z-index: 1;
  pointer-events: none;
}

.hero-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(10, 14, 30, 0.98), transparent);
}

.hero-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(10, 14, 30, 0.98), transparent);
}

.hero-marquee-track {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  width: max-content;
  padding-right: 1.4rem;
  color: #eff3ff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: marquee-run 18s linear infinite;
}

.hero-marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(209, 223, 255, 0.08);
}

.headline-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.hero-stat,
.hero-signal-card,
.control-note-card,
.metric-card,
.source-row,
.cluster-card,
.subpanel,
.article-card,
.detail-stat,
.detail-list-item,
.detail-action,
.detail-hero,
.detail-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tilt-surface {
  --tilt-glow-x: 50%;
  --tilt-glow-y: 50%;
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translate3d(0, 0, 0);
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-surface::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--tilt-glow-x) var(--tilt-glow-y), rgba(255, 255, 255, 0.15), transparent 44%);
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
}

.tilt-surface:hover::after,
.tilt-surface:focus-within::after {
  opacity: 1;
}

.hero-stat {
  min-height: 10.5rem;
  padding: 1.2rem;
  border-radius: 24px;
  border: 1px solid rgba(209, 223, 255, 0.11);
  background:
    linear-gradient(160deg, rgba(16, 24, 50, 0.96), rgba(9, 13, 29, 0.82)),
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.08), transparent 48%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), var(--shadow-sm);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.hero-stat:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-8px);
}

.hero-stat::before,
.metric-card::before,
.cluster-card::before,
.article-card::before,
.detail-stat::before,
.detail-list-item::before,
.source-row::before,
.control-note-card::before,
.hero-signal-card::before {
  content: "";
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.78;
  transform-origin: left center;
  animation: pulse-strip 2.4s ease-in-out infinite;
}

.hero-stat[data-tone="orange"]::before,
.metric-card[data-tone="orange"]::before,
.source-row[data-tone="orange"]::before,
.article-card[data-tone="orange"]::before {
  background: linear-gradient(90deg, var(--secondary), transparent);
}

.hero-stat[data-tone="cyan"]::before,
.metric-card[data-tone="cyan"]::before,
.source-row[data-tone="cyan"]::before,
.article-card[data-tone="cyan"]::before {
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-stat[data-tone="magenta"]::before,
.metric-card[data-tone="magenta"]::before,
.source-row[data-tone="magenta"]::before,
.article-card[data-tone="magenta"]::before {
  background: linear-gradient(90deg, var(--accent-2), transparent);
}

.hero-stat-value {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.92;
  color: #fffceb;
}

.hero-stat-label {
  color: #c6d2ef;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.hero-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.hero-signal-grid > *,
.control-grid > * {
  min-width: 0;
}

.hero-signal-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 1.2rem 1.35rem;
  border-radius: 24px;
  border: 1px solid rgba(209, 223, 255, 0.1);
  background: linear-gradient(145deg, rgba(13, 18, 37, 0.96), rgba(8, 11, 24, 0.84));
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.hero-signal-card:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-9px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.hero-signal-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.hero-signal-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(217, 255, 47, 0.2), rgba(255, 83, 207, 0.16)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-signal-icon .ui-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.control-panel {
  gap: 1rem;
  max-width: none;
  padding: 1.4rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(11, 16, 34, 0.94), rgba(10, 14, 30, 0.84)),
    radial-gradient(circle at 100% 0, rgba(217, 255, 47, 0.12), transparent 42%);
  border: 1px solid rgba(209, 223, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.control-header {
  border-bottom-color: rgba(209, 223, 255, 0.08);
}

.control-text,
.control-foot,
.tracked-statement,
.cluster-summary,
.cluster-representative,
.article-summary,
.note-list,
.metric-label,
.source-meta,
.status-pill,
.focus-mood,
.detail-lead,
.detail-copy,
.detail-caption,
.detail-empty {
  color: var(--muted);
}

.panel-head > div,
.graph-focus-card,
.graph-focus-title,
.graph-focus-desc,
.topic-intro,
.tracked-feed,
.source-row > div {
  min-width: 0;
}

.source-name,
.cluster-title,
.article-link,
.graph-focus-title {
  word-break: break-word;
}

.field span {
  color: #f0f4ff;
}

select {
  appearance: none;
  -webkit-appearance: none;
  border-color: rgba(209, 223, 255, 0.14);
  background-color: #101935;
  background-image:
    linear-gradient(180deg, rgba(19, 26, 53, 0.96), rgba(12, 17, 36, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.5L7 9.5L11 5.5' stroke='%23f6f2e9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, calc(100% - 1rem) 50%;
  background-size: auto, 0.95rem 0.95rem;
  color: var(--ink);
  color-scheme: dark;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  padding-right: 3rem;
}

select option,
select optgroup {
  background: #0d1328;
  color: #eef4ff;
  color-scheme: dark;
}

select option:checked,
select option:hover {
  background: #1a2850;
  color: #f6f2e9;
}

select:focus-visible,
button:focus-visible,
.chip-link:focus-visible,
.detail-anchor:focus-visible,
.back-link:focus-visible,
.article-link:focus-visible,
.source-row-link:focus-visible,
.detail-action:focus-visible,
.inline-link:focus-visible {
  outline: 2px solid rgba(217, 255, 47, 0.45);
  outline-offset: 2px;
}

.action-button,
.follow-button {
  background:
    linear-gradient(135deg, var(--primary), var(--accent)),
    #101420;
  color: #051018;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow:
    0 22px 44px rgba(217, 255, 47, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.action-button:hover,
.follow-button:hover {
  transform: translateY(-4px) scale(1.01);
  background:
    linear-gradient(135deg, var(--secondary), var(--accent-2)),
    #101420;
  box-shadow: 0 26px 50px rgba(255, 83, 207, 0.16);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  width: 100%;
}

.control-note-card {
  padding: 1rem 1rem 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(209, 223, 255, 0.1);
  background: linear-gradient(145deg, rgba(15, 20, 42, 0.9), rgba(10, 14, 30, 0.84));
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.control-note-card:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-8px);
  border-color: rgba(217, 255, 47, 0.18);
  box-shadow: var(--shadow-md);
}

.control-note-top {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent-warm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.control-note-card p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.66;
  font-size: 0.9rem;
}

.control-foot {
  border-top-color: rgba(209, 223, 255, 0.08);
}

.board-grid {
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.panel-head {
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.status-meta {
  gap: 0.65rem;
}

.status-pill,
.focus-mood {
  border-color: rgba(209, 223, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
  color: #ecf2ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.canvas-shell {
  gap: 1rem;
}

.canvas-legend {
  gap: 0.85rem;
}

.canvas-legend span {
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-color: rgba(209, 223, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #eef3ff;
  box-shadow: none;
}

.legend-dot {
  width: 0.82rem;
  height: 0.82rem;
}

.legend-center {
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(217, 255, 47, 0.18);
}

.legend-article {
  background: var(--accent-2);
}

.legend-source {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(52, 214, 255, 0.16);
}

.legend-line {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.08));
}

.map-panel {
  min-height: 720px;
}

.graph-stage {
  padding: 0.4rem;
  overflow: hidden;
  contain: layout paint;
}

.graph-stage::before {
  inset: 0;
  border-radius: 30px;
  background:
    radial-gradient(460px circle at var(--spotlight-x, 52%) var(--spotlight-y, 38%), rgba(217, 255, 47, 0.16), transparent 58%),
    radial-gradient(340px circle at 20% 18%, rgba(255, 83, 207, 0.14), transparent 56%),
    radial-gradient(300px circle at 78% 82%, rgba(52, 214, 255, 0.18), transparent 58%);
  opacity: 0.98;
}

.graph-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 28%, rgba(255, 255, 255, 0.08) 46%, transparent 60%);
  mix-blend-mode: screen;
  animation: spotlight-sweep 6.5s linear infinite;
  opacity: 0.4;
}

.constellation-canvas {
  min-height: 640px;
  border-radius: 30px;
  border-color: rgba(209, 223, 255, 0.12);
  background:
    radial-gradient(circle at 50% 50%, rgba(7, 12, 27, 0.98), rgba(4, 6, 13, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 32px 72px rgba(0, 0, 0, 0.3);
  contain: layout paint;
  will-change: transform;
  backface-visibility: hidden;
}

#constellationViewport {
  will-change: transform;
}

#constellationSvg {
  transform: translateZ(0);
}

.constellation-canvas.is-zoomed #constellationViewport,
.constellation-canvas.is-dragging #constellationViewport {
  transition: none;
}

.graph-chrome {
  top: 1.2rem;
  left: 1.2rem;
}

.graph-tools {
  top: 1.2rem;
  right: 1.2rem;
}

.graph-badge,
.graph-tool,
.graph-focus-card {
  border-color: rgba(209, 223, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 25, 52, 0.86), rgba(10, 14, 30, 0.82));
  color: var(--ink);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.graph-badge {
  color: #eef4ff;
}

.graph-badge.soft {
  color: #cad5ef;
}

.graph-tool {
  color: #f8fbff;
  min-width: 3.2rem;
  min-height: 3.2rem;
}

.graph-tool.accent {
  background:
    linear-gradient(135deg, rgba(217, 255, 47, 0.18), rgba(52, 214, 255, 0.16)),
    rgba(10, 14, 30, 0.92);
}

.graph-tool:hover,
.graph-tool:focus-visible {
  transform: translateY(-3px) scale(1.04);
  border-color: rgba(217, 255, 47, 0.22);
}

.graph-focus-card {
  gap: 0.75rem;
  width: min(390px, calc(100% - 2rem));
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: 26px;
  animation: card-breathe 5.8s ease-in-out infinite alternate;
  will-change: transform;
}

.graph-focus-kicker {
  color: var(--accent-warm);
}

.graph-focus-title {
  font-size: 1.42rem;
}

.graph-focus-desc {
  color: var(--muted);
}

.graph-bubble {
  filter: blur(22px);
  animation: blob-glow 6.4s ease-in-out infinite alternate;
}

.graph-orbit-ring {
  animation: ring-pulse 3.8s ease-in-out infinite;
}

.graph-star {
  animation: star-glimmer 2.9s ease-in-out infinite;
  animation-delay: var(--star-delay, 0s);
}

.constellation-node {
  animation: none;
}

.node-halo {
  filter: blur(3px);
  animation: halo-bloom 3s ease-in-out infinite;
}

.node-orbit {
  animation: orbit-pulse 2.8s ease-in-out infinite;
}

.node-core {
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.12))
    drop-shadow(0 0 24px rgba(255, 255, 255, 0.08));
}

.constellation-canvas.is-navigating .graph-bubble,
.constellation-canvas.is-navigating .graph-orbit-ring,
.constellation-canvas.is-navigating .graph-star,
.constellation-canvas.is-navigating .node-halo,
.constellation-canvas.is-navigating .node-orbit,
.constellation-canvas.is-zoomed .graph-bubble,
.constellation-canvas.is-zoomed .graph-orbit-ring,
.constellation-canvas.is-zoomed .graph-star,
.constellation-canvas.is-zoomed .node-halo,
.constellation-canvas.is-zoomed .node-orbit {
  animation: none;
}

.constellation-canvas.is-navigating .graph-bubble,
.constellation-canvas.is-navigating .node-halo,
.constellation-canvas.is-navigating .node-core {
  filter: none;
}

.graph-stage.is-navigating::before {
  opacity: 0.78;
}

.graph-stage.is-navigating::after {
  animation: none;
  opacity: 0.14;
}

.graph-stage.is-navigating .graph-focus-card {
  animation: none;
}

.constellation-label {
  fill: #f3f7ff;
  font-weight: 700;
}

.constellation-label-group {
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.28));
}

.constellation-label-frame {
  fill: rgba(8, 12, 29, 0.88);
  stroke: rgba(146, 169, 209, 0.18);
}

.constellation-label.small {
  fill: #c2cee9;
}

.constellation-label.hint {
  fill: rgba(229, 236, 255, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.constellation-canvas.is-entering .graph-link {
  opacity: 0;
  stroke-dasharray: 18 20;
  stroke-dashoffset: 180;
  animation: graph-link-ignite 1.05s var(--ease-out) both;
  animation-delay: var(--activate-delay, 0ms);
}

.constellation-canvas.is-entering .graph-node-shell {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: graph-node-ignite 920ms var(--ease-burst) both;
  animation-delay: var(--activate-delay, 0ms);
}

.constellation-canvas.is-entering .graph-node-shell .node-halo {
  animation: graph-halo-ignite 1.1s var(--ease-out) both;
  animation-delay: var(--activate-delay, 0ms);
}

.insight-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.insight-block,
.subpanel {
  padding: 1.15rem;
  border-radius: 24px;
  border: 1px solid rgba(209, 223, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(14, 19, 41, 0.9), rgba(9, 13, 29, 0.78));
  box-shadow: var(--shadow-sm);
}

.metric-grid {
  gap: 0.85rem;
}

.metric-card {
  border-radius: 22px;
  border-color: rgba(209, 223, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.84));
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.metric-card:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-8px);
  box-shadow: var(--shadow-md);
}

.metric-value {
  color: #fffceb;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
}

.source-row {
  border-color: rgba(209, 223, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(14, 19, 41, 0.9), rgba(9, 13, 29, 0.82));
  box-shadow: none;
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
  animation: source-row-rise 720ms var(--ease-out) both;
  animation-delay: calc(var(--row-index, 0) * 48ms);
}

.source-row:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-6px);
  border-color: rgba(52, 214, 255, 0.22);
  background: linear-gradient(145deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.86));
  box-shadow: var(--shadow-sm);
}

.source-row-link:hover,
.source-row-link:focus-visible {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-6px);
  border-color: rgba(52, 214, 255, 0.22);
  background: linear-gradient(145deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.86));
  box-shadow: var(--shadow-sm);
}

.source-count {
  border-color: rgba(52, 214, 255, 0.18);
  background: rgba(52, 214, 255, 0.12);
  color: #dffaff;
}

.source-name-link {
  color: #f4f7ff;
}

.source-name-link:hover,
.source-name-link:focus-visible {
  color: var(--primary);
}

.source-link-button {
  border-color: rgba(209, 223, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eef4ff;
}

.source-link-button:hover,
.source-link-button:focus-visible {
  border-color: rgba(217, 255, 47, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.source-link-button.external {
  border-color: rgba(255, 94, 61, 0.24);
  color: #fff4df;
}

.source-library-shell {
  position: relative;
}

.source-library {
  max-height: clamp(18rem, 34vh, 25rem);
  overflow-y: auto;
  padding-right: 0.3rem;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 214, 255, 0.38) rgba(255, 255, 255, 0.04);
}

.source-library::-webkit-scrollbar {
  width: 0.55rem;
}

.source-library::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.source-library::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(52, 214, 255, 0.62), rgba(255, 83, 207, 0.56));
  border-radius: 999px;
}

.source-library-shell::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3rem;
  pointer-events: none;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, rgba(9, 13, 29, 0), rgba(9, 13, 29, 0.98));
}

.note-list {
  color: var(--muted);
}

.cluster-cards {
  gap: 1rem;
}

.cluster-card {
  gap: 1rem;
  padding: 1.2rem 1.2rem 1.35rem;
  border-radius: 28px;
  border: 1px solid rgba(209, 223, 255, 0.12);
  background:
    linear-gradient(160deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.82)),
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--cluster-accent, var(--primary)) 18%, transparent), transparent 46%);
  box-shadow: var(--shadow-md);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.cluster-card::before {
  background: linear-gradient(90deg, var(--cluster-accent, var(--primary)), transparent);
}

.cluster-card:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-10px);
  border-color: color-mix(in srgb, var(--cluster-accent, var(--primary)) 32%, rgba(255, 255, 255, 0.12));
  box-shadow: 0 36px 82px rgba(0, 0, 0, 0.32);
}

.cluster-card.active {
  border-color: color-mix(in srgb, var(--cluster-accent, var(--primary)) 36%, rgba(255, 255, 255, 0.14));
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--cluster-accent, var(--primary)) 28%, transparent);
}

.cluster-topline {
  color: var(--accent-warm);
}

.cluster-title {
  font-size: clamp(1.55rem, 2vw, 2rem);
}

.chip {
  border-color: rgba(209, 223, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
  color: #eef4ff;
  backdrop-filter: blur(10px);
}

.chip-link:hover,
.chip-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(217, 255, 47, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.chip.soft {
  background: rgba(52, 214, 255, 0.12);
  color: #dffaff;
  border-color: rgba(52, 214, 255, 0.2);
}

.chip.highlight {
  background: rgba(217, 255, 47, 0.14);
  color: #f5ffbf;
  border-color: rgba(217, 255, 47, 0.24);
}

.sentiment-pill.positive {
  color: var(--positive);
  border-color: rgba(124, 255, 149, 0.22);
}

.sentiment-pill.neutral {
  color: #d9deef;
  border-color: rgba(212, 216, 235, 0.18);
}

.sentiment-pill.negative {
  color: var(--negative);
  border-color: rgba(255, 138, 114, 0.22);
}

.inline-link,
.article-link,
.detail-anchor {
  color: #fffceb;
}

.inline-link:hover,
.inline-link:focus-visible,
.article-link:hover,
.article-link:focus-visible,
.detail-anchor:hover,
.detail-anchor:focus-visible {
  color: var(--primary);
}

.tracked-layout {
  gap: 1rem;
}

.topic-intro {
  border-bottom-color: rgba(209, 223, 255, 0.08);
}

.mini-head {
  color: #c8d3ef;
}

.bar-card {
  border-color: rgba(209, 223, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.82));
  border-radius: 24px;
}

.bar-label,
.bar-desc {
  color: var(--muted);
}

.bar-value {
  font-size: clamp(2rem, 3vw, 3rem);
}

#timelineSvg {
  overflow: visible;
}

.timeline-axis {
  stroke: rgba(209, 223, 255, 0.18);
  stroke-width: 1.3;
}

.timeline-grid-line {
  stroke: rgba(209, 223, 255, 0.1);
  stroke-width: 1;
  stroke-dasharray: 6 10;
}

.timeline-axis-label,
.timeline-date-label,
.timeline-empty-label,
.timeline-value-label,
.timeline-legend-label {
  font-family: var(--font-body);
}

.timeline-axis-label,
.timeline-date-label {
  fill: #c2cee9;
  font-size: 11px;
}

.timeline-legend-label {
  fill: #eef4ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.timeline-empty-label {
  fill: var(--muted);
  font-size: 13px;
}

.timeline-area {
  opacity: 0;
}

.timeline-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.2;
  filter: drop-shadow(0 0 18px currentColor);
}

.timeline-dot,
.timeline-value-label,
.timeline-date-label {
  opacity: 0;
}

.timeline-dot,
.timeline-value-label {
  transform-box: fill-box;
  transform-origin: center;
}

.timeline-value-label {
  font-size: 11px;
  font-weight: 700;
}

.timeline-value-label.positive {
  fill: var(--positive);
}

.timeline-value-label.neutral {
  fill: #e8edff;
}

.timeline-value-label.negative {
  fill: var(--negative);
}

.timeline-panel.is-visible .timeline-area {
  animation: timeline-area-in 1520ms var(--ease-out) both;
  animation-delay: var(--timeline-delay, 0ms);
}

.timeline-panel.is-visible .timeline-line {
  animation: timeline-draw 3.35s var(--ease-out) both;
  animation-delay: var(--timeline-delay, 0ms);
}

.timeline-panel.is-visible .timeline-dot {
  animation: timeline-dot-pop 880ms var(--ease-burst) both;
  animation-delay: var(--timeline-delay, 0ms);
}

.timeline-panel.is-visible .timeline-value-label,
.timeline-panel.is-visible .timeline-date-label {
  animation: timeline-label-in 980ms var(--ease-out) both;
  animation-delay: var(--timeline-delay, 0ms);
}

.article-card {
  border-radius: 24px;
  border-color: rgba(209, 223, 255, 0.11);
  background:
    linear-gradient(160deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.82));
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.article-card:hover,
.article-card:focus-within {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-8px);
  border-color: rgba(217, 255, 47, 0.2);
  box-shadow: var(--shadow-md);
}

.article-score {
  color: var(--accent-warm);
}

.empty-state {
  border-color: rgba(209, 223, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.detail-shell {
  max-width: 1380px;
}

.back-link {
  gap: 0.7rem;
  margin-bottom: 1rem;
  border-color: rgba(209, 223, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(16, 22, 48, 0.88), rgba(10, 14, 30, 0.8));
  color: #f0f5ff;
}

.back-link::before {
  content: none;
}

.back-link:hover,
.back-link:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(217, 255, 47, 0.24);
}

.detail-hero {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(13, 18, 37, 0.96), rgba(9, 13, 29, 0.84)),
    radial-gradient(circle at 100% 0, rgba(217, 255, 47, 0.12), transparent 38%);
}

.detail-kicker {
  color: var(--accent-warm);
}

.detail-title {
  font-size: clamp(2.7rem, 5vw, 5.2rem);
}

.detail-meta {
  gap: 0.65rem;
}

.detail-actions {
  gap: 0.8rem;
}

.detail-action {
  border-color: rgba(209, 223, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(16, 22, 48, 0.92), rgba(10, 14, 30, 0.82));
  color: #eef3ff;
  box-shadow: var(--shadow-sm);
}

.detail-action.primary {
  background:
    linear-gradient(135deg, var(--primary), var(--accent)),
    rgba(10, 14, 30, 0.92);
  color: #051018;
  box-shadow: 0 24px 48px rgba(217, 255, 47, 0.14);
}

.detail-action:hover,
.detail-action:focus-visible {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-7px);
}

.detail-layout {
  margin-top: 1.2rem;
}

.detail-section {
  gap: 1rem;
  padding: 1.3rem;
  border-radius: 28px;
  border: 1px solid rgba(209, 223, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(14, 19, 41, 0.92), rgba(9, 13, 29, 0.82));
}

.detail-card-grid {
  gap: 1rem;
}

.detail-stat {
  border-radius: 24px;
  border-color: rgba(209, 223, 255, 0.11);
  background:
    linear-gradient(160deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.84));
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.detail-stat:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-8px);
  box-shadow: var(--shadow-md);
}

.detail-stat-value {
  color: #fffceb;
}

.detail-list-item {
  padding: 1.1rem;
  border-radius: 24px;
  border-color: rgba(209, 223, 255, 0.11);
  background:
    linear-gradient(160deg, rgba(16, 22, 48, 0.94), rgba(10, 14, 30, 0.82));
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms var(--ease-out),
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.detail-list-item:hover {
  transform:
    perspective(1400px)
    rotateX(var(--tilt-rotate-x, 0deg))
    rotateY(var(--tilt-rotate-y, 0deg))
    translateY(-8px);
  box-shadow: var(--shadow-md);
}

.detail-empty {
  border-color: rgba(209, 223, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.reveal {
  opacity: 0;
  transform: translateY(2rem) scale(0.96);
  filter: blur(12px);
  animation: none;
  will-change: transform, opacity, filter;
}

.reveal.is-visible {
  animation: section-rise 900ms var(--ease-burst) both;
  animation-delay: var(--reveal-delay, 0ms);
}

.hero-signal-grid,
.control-grid,
.control-foot {
  display: none !important;
}

.reveal[data-reveal-style="hero"] {
  transform: translateY(2.6rem) scale(0.94);
  filter: blur(18px);
}

.reveal[data-reveal-style="stage"] {
  transform: translateY(2.5rem) scale(0.97) rotateX(7deg);
  transform-origin: center top;
}

.reveal[data-reveal-style="metrics"] {
  --reveal-prism-x: -1rem;
  transform: translateY(1.9rem) translateX(-1rem) scale(0.97);
}

.reveal[data-reveal-style="source"] {
  --reveal-prism-x: 1rem;
  transform: translateY(1.9rem) translateX(1rem) scale(0.97);
}

.reveal[data-reveal-style="notes"] {
  --reveal-prism-x: 0.15rem;
  transform: translateY(2rem) scale(0.95) rotate(-0.8deg);
}

.reveal[data-reveal-style="grid"] {
  transform: translateY(2.2rem) scale(0.94) skewY(-1deg);
}

.reveal[data-reveal-style="story"] {
  --reveal-sway-x: -0.9rem;
  transform: translateY(2.3rem) translateX(-0.9rem) scale(0.97);
}

.reveal[data-reveal-style="headline"] {
  transform: translateY(1.4rem) scale(0.98);
}

.reveal[data-reveal-style="sweep"] {
  transform: translateY(1.5rem) translateX(-1rem) scale(0.97);
}

.reveal[data-reveal-style="sweep-alt"] {
  transform: translateY(1.5rem) translateX(1rem) scale(0.97);
}

.reveal[data-reveal-style="lift"] {
  transform: translateY(1.7rem) scale(0.95) rotateX(6deg);
  transform-origin: center top;
}

.reveal[data-reveal-style="trace"] {
  transform: translateY(1.8rem) scale(0.96);
  filter: blur(10px);
}

.reveal[data-reveal-style="feed"] {
  --reveal-sway-x: 1rem;
  transform: translateY(2rem) translateX(1rem) scale(0.97);
}

.reveal.is-visible[data-reveal-style="stage"] {
  animation-name: section-stage;
}

.reveal.is-visible[data-reveal-style="metrics"],
.reveal.is-visible[data-reveal-style="source"],
.reveal.is-visible[data-reveal-style="notes"] {
  animation-name: section-prism;
}

.reveal.is-visible[data-reveal-style="grid"],
.reveal.is-visible[data-reveal-style="lift"] {
  animation-name: section-lattice;
}

.reveal.is-visible[data-reveal-style="story"],
.reveal.is-visible[data-reveal-style="feed"] {
  animation-name: section-sway;
}

.reveal.is-visible[data-reveal-style="trace"] {
  animation-name: section-trace;
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(4vmax, -3vmax, 0) scale(1.08);
  }
}

@keyframes ghost-shift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(1rem, 1.2rem, 0) rotate(-2deg);
  }
}

@keyframes marquee-run {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes pulse-strip {
  0%,
  100% {
    transform: scaleX(0.48);
    opacity: 0.38;
  }
  50% {
    transform: scaleX(1);
    opacity: 0.92;
  }
}

@keyframes spotlight-sweep {
  0% {
    transform: translateX(-36%);
  }
  100% {
    transform: translateX(36%);
  }
}

@keyframes card-breathe {
  0%,
  100% {
    box-shadow:
      0 20px 40px rgba(0, 0, 0, 0.22),
      inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  }
  50% {
    box-shadow:
      0 28px 54px rgba(0, 0, 0, 0.32),
      0 0 24px rgba(217, 255, 47, 0.08),
      inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}

@keyframes blob-glow {
  0% {
    opacity: 0.22;
    filter: blur(18px);
  }
  100% {
    opacity: 0.48;
    filter: blur(26px);
  }
}

@keyframes ring-pulse {
  0%,
  100% {
    opacity: 0.24;
    stroke-width: 1.1;
  }
  50% {
    opacity: 0.68;
    stroke-width: 1.8;
  }
}

@keyframes star-glimmer {
  0%,
  100% {
    opacity: 0.28;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.08));
  }
  50% {
    opacity: 0.95;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.22));
  }
}

@keyframes halo-bloom {
  0%,
  100% {
    opacity: 0.18;
    filter: blur(3px);
  }
  50% {
    opacity: 0.42;
    filter: blur(5px);
  }
}

@keyframes orbit-pulse {
  0%,
  100% {
    opacity: 0.16;
  }
  50% {
    opacity: 0.4;
    stroke-width: 1.7;
  }
}

@keyframes source-row-rise {
  0% {
    opacity: 0;
    transform: translateY(1rem) scale(0.98);
  }
  65% {
    opacity: 1;
    transform: translateY(-0.16rem) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes section-rise {
  0% {
    opacity: 0;
    transform: translateY(2rem) scale(0.96);
    filter: blur(12px);
  }
  65% {
    opacity: 1;
    transform: translateY(-0.3rem) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes section-stage {
  0% {
    opacity: 0;
    transform: translateY(2.8rem) scale(0.95) rotateX(9deg);
    filter: blur(16px);
  }
  70% {
    opacity: 1;
    transform: translateY(-0.35rem) scale(1.01) rotateX(0deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
  }
}

@keyframes section-prism {
  0% {
    opacity: 0;
    transform: translateY(2rem) translateX(var(--reveal-prism-x, 0)) scale(0.96) rotate(-1deg);
    filter: blur(14px);
  }
  68% {
    opacity: 1;
    transform: translateY(-0.22rem) translateX(0) scale(1.01) rotate(0.2deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes section-lattice {
  0% {
    opacity: 0;
    transform: translateY(2.2rem) scale(0.94) skewY(-2deg);
    filter: blur(16px);
  }
  72% {
    opacity: 1;
    transform: translateY(-0.26rem) scale(1.015) skewY(0deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) skewY(0deg);
    filter: blur(0);
  }
}

@keyframes section-sway {
  0% {
    opacity: 0;
    transform: translateY(2rem) translateX(var(--reveal-sway-x, 0)) scale(0.97);
    filter: blur(12px);
  }
  70% {
    opacity: 1;
    transform: translateY(-0.2rem) translateX(0) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes section-trace {
  0% {
    opacity: 0;
    transform: translateY(1.8rem) scale(0.97);
    filter: blur(12px);
  }
  65% {
    opacity: 1;
    transform: translateY(-0.18rem) scale(1.005);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes timeline-area-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes timeline-draw {
  from {
    stroke-dashoffset: 1;
    opacity: 0.18;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes timeline-dot-pop {
  0% {
    opacity: 0;
    transform: scale(0.25);
  }
  70% {
    opacity: 1;
    transform: scale(1.14);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes timeline-label-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes graph-link-ignite {
  0% {
    opacity: 0;
    stroke-dashoffset: 180;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
  52% {
    opacity: 1;
    stroke-dashoffset: 40;
    filter: drop-shadow(0 0 12px rgba(217, 255, 47, 0.28));
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
}

@keyframes graph-node-ignite {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.26);
  }
  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.12);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes graph-halo-ignite {
  0% {
    opacity: 0;
    transform: scale(0.25);
  }
  55% {
    opacity: 0.3;
    transform: scale(1.24);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1420px) {
  .app-shell {
    width: min(1520px, calc(100vw - 2rem));
  }

  .hero-panel {
    padding: clamp(1.25rem, 2.5vw, 2rem);
  }

  .hero-signal-grid,
  .control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1540px) {
  .headline-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-signal-grid,
  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1320px) {
  .hero-signal-grid,
  .control-grid,
  .headline-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .headline-stats {
    grid-template-columns: 1fr;
  }

  .insight-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(1680px, calc(100% - 2rem));
    padding: 1rem;
  }

  .hero-topline,
  .panel-head,
  .detail-section-title,
  .mini-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-marquee-track {
    animation-duration: 22s;
  }

  .source-library {
    max-height: 18rem;
  }

  .source-row {
    grid-template-columns: 1fr;
  }

  .source-row-side,
  .source-action-row {
    justify-items: start;
    justify-content: flex-start;
  }

  .headline-stats,
  .hero-signal-grid,
  .control-grid,
  .detail-card-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .constellation-canvas {
    min-height: 520px;
  }

  .graph-stage::after {
    display: none;
  }

  .graph-chrome,
  .graph-tools,
  .graph-focus-card {
    position: static;
    width: 100%;
  }

  .graph-focus-card {
    animation: none;
  }

  .detail-action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-marquee-track,
  .graph-bubble,
  .graph-orbit-ring,
  .graph-star,
  .constellation-node,
  .node-halo,
  .node-orbit,
  .graph-focus-card,
  body::before,
  .hero-panel::after,
  .detail-hero::after {
    animation: none !important;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
