:root {
  color-scheme: dark;
  --bg: #030706;
  --glass: rgba(10, 20, 16, 0.62);
  --glass-strong: rgba(13, 28, 23, 0.82);
  --line: rgba(0, 250, 154, 0.18);
  --line-cyan: rgba(0, 229, 255, 0.28);
  --green: #00fa9a;
  --cyan: #00e5ff;
  --amber: #ffd166;
  --coral: #ff6b6b;
  --ink: #e8fff7;
  --muted: rgba(232, 255, 247, 0.62);
  --faint: rgba(232, 255, 247, 0.34);
  --mono: "Fira Code", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --left-panel-width: 300px;
  --right-panel-width: 360px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(0, 229, 255, 0.08), transparent 34rem),
    linear-gradient(135deg, #030706 0%, #07110e 48%, #050708 100%);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}

button {
  font: inherit;
}

#topicField {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.42;
  pointer-events: none;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: screen;
  opacity: 0.16;
}

.shell {
  position: relative;
  z-index: 2;
  width: min(1560px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
}

.topbar,
.panel {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.04), 0 26px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 180px;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 14px 18px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-mark {
  width: 120px;
  height: 54px;
  flex: 0 0 auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 250, 154, 0.42));
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand-mark path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chaos-line {
  stroke: rgba(0, 229, 255, 0.72);
  stroke-width: 2.4;
}

.arc-line {
  stroke: var(--cyan);
  stroke-width: 4;
}

.arc-line.muted {
  stroke: rgba(0, 229, 255, 0.32);
  stroke-width: 2.8;
}

.stem {
  stroke: var(--green);
  stroke-width: 4.2;
}

.facet {
  stroke: #37ff62;
  stroke-width: 3.4;
}

.leaf-line {
  stroke-width: 2;
}

.kicker,
.metric-label,
.clock,
.section-title,
.focus-meta,
.source-list,
.keywords,
.source-links {
  font-family: var(--mono);
}

.kicker {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 11px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 650;
  line-height: 1;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(0, 0, 0, 0.22);
}

.mode-btn,
.icon-btn {
  min-height: 38px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.mode-btn {
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 12px;
}

.mode-btn.active {
  color: #00120c;
  background: var(--green);
  box-shadow: 0 0 20px rgba(0, 250, 154, 0.32);
}

.clock {
  justify-self: end;
  text-align: right;
}

.clock span {
  display: block;
  color: var(--cyan);
  font-size: 21px;
}

.clock small {
  color: var(--faint);
  font-size: 10px;
}

.dashboard {
  display: grid;
  grid-template-columns: var(--left-panel-width) minmax(0, 1fr) var(--right-panel-width);
  gap: 16px;
  margin-top: 16px;
  transition: grid-template-columns 220ms ease;
}

body.left-collapsed {
  --left-panel-width: 0px;
}

body.right-collapsed {
  --right-panel-width: 0px;
}

.panel {
  min-height: calc(100vh - 122px);
  padding: 18px;
}

.rail,
.insight {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gear-panel {
  position: relative;
  overflow: hidden;
  padding-left: 16px;
}

body.left-collapsed .gear-panel,
body.right-collapsed .insight {
  min-width: 0;
  padding: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
}

body.left-collapsed .gear-panel > *,
body.right-collapsed .insight > * {
  display: none;
}

.panel-toggle,
.edge-toggle {
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 229, 255, 0.24);
  background: rgba(3, 7, 6, 0.86);
  color: var(--cyan);
  font-family: var(--mono);
  cursor: pointer;
  z-index: 10;
}

.panel-toggle {
  position: absolute;
  top: 12px;
  width: 30px;
  height: 30px;
}

.panel-toggle-left {
  left: 12px;
  right: auto;
}

.panel-toggle-right {
  right: 12px;
  left: auto;
}

.edge-toggle {
  position: fixed;
  top: 50%;
  width: 34px;
  height: 74px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.edge-toggle-left {
  left: 0;
  border-left: 0;
}

.edge-toggle-right {
  right: 0;
  border-right: 0;
}

body.left-collapsed .edge-toggle-left,
body.right-collapsed .edge-toggle-right {
  opacity: 0.28;
  pointer-events: auto;
}

body.left-collapsed .edge-toggle-left:hover,
body.right-collapsed .edge-toggle-right:hover {
  opacity: 1;
}

.panel-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  z-index: 9;
}

.left-resizer {
  right: -4px;
}

.right-resizer {
  left: -4px;
}

.panel-resizer::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 3px;
  width: 1px;
  background: rgba(0, 250, 154, 0.22);
}

.panel-resizer:hover::before,
body.resizing-panels .panel-resizer::before {
  background: rgba(0, 250, 154, 0.72);
  box-shadow: 0 0 16px rgba(0, 250, 154, 0.4);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.section-title strong {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
}

.gear-panel .section-title {
  padding-left: 42px;
}

.insight .section-title {
  padding-right: 42px;
}

/* ========== DIAL / WHEEL ========== */

.dial-dock {
  --dial-size: 360px;
  --dial-offset: -210px;
  --active-angle: -25deg;
  position: relative;
  height: 330px;
  margin: 8px -18px 0 -18px;
  overflow: hidden;
}

.module-dial {
  position: absolute;
  left: var(--dial-offset);
  top: 4px;
  width: var(--dial-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 250, 154, 0.12) 0 16%, rgba(0, 0, 0, 0.28) 16% 38%, transparent 38%),
    radial-gradient(circle at 62% 38%, rgba(0, 229, 255, 0.08), transparent 55%);
  box-shadow:
    inset 0 0 72px rgba(0, 0, 0, 0.52),
    0 0 48px rgba(0, 250, 154, 0.1),
    0 0 2px rgba(0, 250, 154, 0.25);
}

/* Outer border ring */
.dial-outer-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(0, 250, 154, 0.28);
  box-shadow: inset 0 0 20px rgba(0, 250, 154, 0.06), 0 0 14px rgba(0, 250, 154, 0.1);
  pointer-events: none;
}

/* Tick mark ring — continuously rotates */
.dial-tick-ring {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(0, 229, 255, 0.5) 0deg 1.2deg,
    transparent 1.2deg 7.2deg
  );
  mask: radial-gradient(circle, transparent 0 40%, #000 41% 43%, transparent 44%);
  animation: tickSpin 28s linear infinite;
  pointer-events: none;
}

/* Middle decorative ring */
.dial-mid-ring {
  position: absolute;
  inset: 50px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 229, 255, 0.18);
  pointer-events: none;
}

.dial-items-layer {
  position: absolute;
  left: 226px;
  top: 58px;
  z-index: 8;
  display: grid;
  gap: 10px;
  width: 178px;
}

.dial-item {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(3, 7, 6, 0.78);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    background 200ms ease,
    transform 200ms ease;
  backface-visibility: hidden;
}

.dial-item span,
.dial-item small,
.dial-core {
  font-family: var(--mono);
}

.dial-item span {
  color: var(--ink);
  font-size: 14px;
  transition: color 200ms ease;
}

.dial-item small {
  color: var(--faint);
  font-size: 10px;
  line-height: 1.35;
  transition: color 200ms ease;
}

.dial-item.active {
  opacity: 1;
  border-color: rgba(0, 250, 154, 0.9);
  background: rgba(0, 250, 154, 0.12);
  box-shadow:
    0 0 22px rgba(0, 250, 154, 0.32),
    inset 0 0 18px rgba(0, 250, 154, 0.06);
  z-index: 2;
  transform: translateX(6px);
}

.dial-item.active span {
  color: #fff;
}

.dial-item:hover {
  border-color: rgba(0, 250, 154, 0.7);
  background: rgba(0, 250, 154, 0.08);
  box-shadow: 0 0 20px rgba(0, 250, 154, 0.2);
}

.dial-item.muted {
  opacity: 0.48;
}

.dial-item.muted:hover {
  opacity: 0.72;
}

/* Fixed pointer at the active reading position */
.dial-pointer {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 112px;
  height: 2px;
  margin-top: -1px;
  transform-origin: left center;
  transform: rotate(var(--active-angle)) translateX(58px);
  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 250, 154, 0.5) 15%,
    var(--green) 100%
  );
  pointer-events: none;
}

.dial-pointer::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 10px var(--green),
    0 0 26px rgba(0, 250, 154, 0.7),
    0 0 48px rgba(0, 250, 154, 0.35);
}

/* Central hub */
.dial-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 94px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(0, 250, 154, 0.55);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.7), rgba(0, 10, 6, 0.85));
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 28px rgba(0, 229, 255, 0.16),
    inset 0 0 14px rgba(0, 250, 154, 0.06);
}

.dial-core strong {
  color: var(--green);
  font-size: 18px;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(0, 250, 154, 0.5);
}

.dial-core span {
  color: var(--faint);
  font-size: 10px;
}

/* ========== DIAL KEYFRAMES ========== */

@keyframes tickSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.module-readout {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  background: rgba(0, 0, 0, 0.2);
}

.metric-label {
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
}

.module-readout strong {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 8px;
}

.module-readout span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.pulse-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  height: 32px;
  align-items: end;
}

.pulse-strip span {
  display: block;
  height: 28%;
  background: linear-gradient(to top, var(--green), var(--cyan));
  animation: barPulse 1.8s infinite ease-in-out;
}

.pulse-strip span:nth-child(2) {
  animation-delay: 0.18s;
}

.pulse-strip span:nth-child(3) {
  animation-delay: 0.33s;
}

.pulse-strip span:nth-child(4) {
  animation-delay: 0.48s;
}

.pulse-strip span:nth-child(5) {
  animation-delay: 0.63s;
}

.stage {
  position: relative;
  overflow: hidden;
}

.stage::before {
  content: none;
}

.stage-head {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.stage-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 560;
}

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

.icon-btn {
  width: 38px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.2);
  font-family: var(--mono);
  font-size: 22px;
}

.icon-btn:hover,
.feed-row:hover,
.feed-row.active {
  border-color: rgba(0, 250, 154, 0.76);
  color: var(--ink);
  box-shadow: 0 0 26px rgba(0, 250, 154, 0.26);
}

.stage-body {
  display: none;
}

.stage-body.active {
  display: block;
}

.feed-head {
  position: absolute;
  left: 28px;
  right: 36px;
  top: 138px;
  display: grid;
  grid-template-columns: 58px minmax(210px, 0.94fr) minmax(260px, 1.46fr) 58px 58px;
  gap: 12px;
  padding: 0 12px 10px;
  border-bottom: 1px solid rgba(0, 250, 154, 0.16);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.topic-feed-head {
  top: 138px;
}

.live-feed-head {
  grid-template-columns: 72px minmax(230px, 0.96fr) minmax(280px, 1.42fr) 30px 52px;
  gap: 10px;
}

.vault-feed-head {
  top: 138px;
}

.feed-stream {
  position: absolute;
  inset: 170px 28px 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: rgba(0, 250, 154, 0.42) rgba(0, 0, 0, 0.18);
}

.feed-stream::before {
  content: "";
  flex: 0 0 1px;
  background: linear-gradient(to right, transparent, rgba(0, 250, 154, 0.35), transparent);
}

.feed-row {
  display: grid;
  grid-template-columns: 58px minmax(210px, 0.94fr) minmax(260px, 1.46fr) 58px 58px;
  align-items: start;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(3, 7, 6, 0.72);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.feed-row:hover,
.feed-row.active {
  background: rgba(0, 250, 154, 0.08);
  transform: translateX(4px);
}

.feed-time,
.feed-source,
.feed-score,
.feed-signal {
  font-family: var(--mono);
}

#digestStream .feed-row {
  grid-template-columns: 72px minmax(230px, 0.96fr) minmax(280px, 1.42fr) 30px 52px;
  gap: 10px;
}

.feed-time {
  color: var(--cyan);
  font-size: 11px;
}

.feed-stamp {
  display: block;
}

.feed-stamp small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--faint);
}

.feed-stamp em {
  max-width: 74px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 209, 102, 0.54);
  background: rgba(255, 209, 102, 0.12);
  color: var(--amber);
  font-style: normal;
  font-size: 9px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-stamp em:nth-child(2) {
  border-color: rgba(255, 107, 167, 0.56);
  background: rgba(255, 107, 167, 0.12);
  color: #ff8fc3;
}

.feed-stamp em:nth-child(3) {
  border-color: rgba(0, 229, 255, 0.52);
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
}

.feed-stamp em.source-label {
  border-color: rgba(0, 229, 255, 0.58);
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
}

.feed-source {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
}

.feed-row strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 560;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.feed-summary {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.feed-score {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid rgba(0, 250, 154, 0.36);
  color: var(--green);
  font-size: 18px;
}

.feed-signal {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 3px 2px;
  border: 1px solid rgba(0, 250, 154, 0.3);
  background: rgba(0, 0, 0, 0.14);
}

.feed-signal strong {
  color: var(--green);
  font-size: 15px;
  line-height: 1;
}

.feed-signal small {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 9px;
  line-height: 1;
}

.feed-timebox {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(0, 0, 0, 0.16);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
}

.diamond-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 5px;
  justify-self: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.diamond-pin span {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(148, 163, 184, 0.72);
  background: rgba(3, 7, 6, 0.84);
  transform: rotate(45deg);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.diamond-pin::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(0, 250, 154, 0.18);
  transform: rotate(45deg) scale(0.72);
  opacity: 0;
}

.diamond-pin:hover span,
.diamond-pin.active span {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 18px rgba(0, 250, 154, 0.48);
}

.diamond-pin.active::after {
  animation: diamondPulse 1.5s ease-in-out infinite;
}

.company-filter {
  position: absolute;
  z-index: 4;
  left: 28px;
  right: 28px;
  top: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-filter button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

.company-filter button.active,
.company-filter button:hover {
  border-color: var(--green);
  color: #00120c;
  background: var(--green);
}

.company-filter.entity-filter button {
  position: relative;
  min-width: 64px;
}

.company-filter.entity-filter .entity-token {
  padding-right: 18px;
}

.entity-delete {
  position: absolute;
  right: 3px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 107, 107, 0.72);
  background: rgba(3, 7, 6, 0.9);
  color: var(--coral);
  font-size: 10px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.company-filter.entity-filter .entity-token:hover .entity-delete {
  opacity: 1;
  pointer-events: auto;
}

.company-filter.entity-filter .entity-add {
  min-width: 34px;
  padding: 0;
  color: var(--cyan);
  font-size: 18px;
}

.company-filter.entity-filter .entity-add.locked {
  color: var(--amber);
}

.company-filter.entity-filter .entity-add:hover {
  color: #00120c;
}

.entity-add-input {
  width: 118px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--green);
  background: rgba(3, 7, 6, 0.9);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  outline: 0;
  box-shadow: 0 0 20px rgba(0, 250, 154, 0.18);
}

.topic-stream {
  position: absolute;
  inset: 170px 28px 34px;
}

.topic-stream.graph-mode {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(0, 229, 255, 0.12);
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 250, 154, 0.05), transparent 24rem),
    rgba(0, 0, 0, 0.12);
  cursor: grab;
}

.topic-stream.graph-mode:active {
  cursor: grabbing;
}

.topic-stream.graph-mode canvas {
  display: block;
}

.topic-stream.graph-mode::before {
  content: none;
}

.graph-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.vault-stream::before {
  content: none;
}

.vault-empty {
  display: grid;
  align-content: center;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed rgba(0, 250, 154, 0.26);
  background: rgba(0, 0, 0, 0.14);
  color: var(--muted);
  font-family: var(--mono);
}

.vault-empty strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 560;
}

.vault-empty span {
  margin-top: 10px;
  max-width: 520px;
  font-size: 12px;
  line-height: 1.6;
}

.vault-row .feed-score {
  font-size: 11px;
  letter-spacing: 0.06em;
}

.pin-btn {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  margin-left: 10px;
  padding: 0 9px;
  border: 1px solid rgba(0, 250, 154, 0.34);
  background: rgba(0, 0, 0, 0.32);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.pin-btn:hover,
.pin-btn.active {
  border-color: var(--green);
  background: rgba(0, 250, 154, 0.14);
  color: var(--green);
  box-shadow: 0 0 18px rgba(0, 250, 154, 0.24);
}

.focus-node {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: min(38vw, 360px);
  aspect-ratio: 1;
  padding: 46px;
  transform: translate(-50%, -42%);
  text-align: center;
  display: none;
}

.focus-rings,
.focus-rings::before,
.focus-rings::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 250, 154, 0.25);
  border-radius: 50%;
  animation: breathe 4s infinite ease-in-out;
}

.focus-rings::before,
.focus-rings::after {
  content: "";
}

.focus-rings::before {
  inset: 24px;
  border-color: rgba(0, 229, 255, 0.28);
  animation-delay: 0.6s;
}

.focus-rings::after {
  inset: 58px;
  border-style: dashed;
  animation-delay: 1.2s;
}

.focus-node p,
.focus-node h3,
.focus-meta {
  position: relative;
  z-index: 2;
}

.focus-node p {
  margin-bottom: 10px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
}

.focus-node h3 {
  max-width: 260px;
  margin-bottom: 18px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 560;
  line-height: 1.16;
}

.focus-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.focus-meta span,
.keywords span {
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
}

.focus-meta span {
  padding: 6px 8px;
}

.summary-block h2 {
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 560;
  line-height: 1.2;
}

.summary-block p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.index-grid div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  background: rgba(0, 0, 0, 0.2);
}

.index-grid span,
.index-grid strong {
  display: block;
  font-family: var(--mono);
}

.index-grid span {
  color: var(--faint);
  font-size: 11px;
}

.index-grid strong {
  margin-top: 12px;
  color: var(--green);
  font-size: 28px;
  font-weight: 500;
}

.pathway ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.pathway li {
  padding-left: 8px;
  line-height: 1.55;
}

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

.keywords span {
  padding: 7px 9px;
  color: var(--cyan);
  font-size: 11px;
}

.source-links {
  margin-top: auto;
}

.source-links a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 250, 154, 0.12);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.source-links a:hover {
  color: var(--green);
}

.detail-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.detail-modal-backdrop.open {
  display: grid;
}

.detail-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.04), 0 26px 80px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(22px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  color: var(--cyan);
  font-size: 21px;
  cursor: pointer;
}

.detail-modal h2 {
  margin: 0 44px 12px 0;
  font-size: 26px;
  font-weight: 560;
  line-height: 1.25;
}

.detail-modal p {
  color: var(--muted);
  line-height: 1.75;
}

.modal-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.modal-facts div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  background: rgba(0, 0, 0, 0.2);
}

.modal-facts span,
.modal-facts strong {
  display: block;
  font-family: var(--mono);
}

.modal-facts span {
  color: var(--faint);
  font-size: 11px;
}

.modal-facts strong {
  margin-top: 10px;
  color: var(--green);
  font-size: 16px;
  font-weight: 500;
  word-break: break-word;
}

.flash {
  animation: flash 520ms ease;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.52;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes barPulse {
  0%,
  100% {
    height: 24%;
    opacity: 0.38;
  }
  50% {
    height: 100%;
    opacity: 1;
  }
}

@keyframes flash {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.85);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes diamondPulse {
  0%,
  100% {
    opacity: 0;
    transform: rotate(45deg) scale(0.72);
  }
  45% {
    opacity: 0.86;
    transform: rotate(45deg) scale(1.08);
  }
}

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .insight {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .stage {
    min-height: 680px;
  }

  .dial-dock {
    --dial-size: 330px;
    --dial-offset: -205px;
    height: 320px;
  }

  .dial-item {
    min-height: 56px;
  }

  .dial-core {
    width: 96px;
  }

  .dial-pointer {
    width: 110px;
    transform: rotate(var(--active-angle)) translateX(58px);
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 720px);
    padding: 10px 0;
  }

  .topbar,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 98px;
    height: 44px;
  }

  body.left-collapsed,
  body.right-collapsed {
    --left-panel-width: 1fr;
    --right-panel-width: 1fr;
  }

  .panel-toggle,
  .edge-toggle,
  .panel-resizer {
    display: none;
  }

  body.left-collapsed .gear-panel,
  body.right-collapsed .insight {
    padding: 18px;
    border-width: 1px;
    opacity: 1;
    pointer-events: auto;
  }

  body.left-collapsed .gear-panel > *,
  body.right-collapsed .insight > * {
    display: revert;
  }

  .clock {
    justify-self: start;
    text-align: left;
  }

  .panel,
  .stage {
    min-height: auto;
  }

  .gear-panel {
    min-height: 500px;
  }

  .dial-dock {
    --dial-size: 300px;
    --dial-offset: -170px;
    height: 300px;
    margin: 0 -18px;
  }

  .dial-items-layer {
    left: 158px;
    top: 48px;
    width: calc(100% - 174px);
    min-width: 148px;
  }

  .dial-item {
    min-height: 64px;
  }

  .dial-core {
    width: 88px;
  }

  .dial-core strong {
    font-size: 15px;
  }

  .dial-pointer {
    width: 96px;
    transform: rotate(var(--active-angle)) translateX(52px);
  }

  .stage {
    min-height: 760px;
  }

  .feed-stream {
    inset: 170px 16px 24px;
  }

  .feed-head {
    left: 16px;
    right: 24px;
    top: 138px;
    grid-template-columns: 28px 1fr 52px;
  }

  .feed-head span:nth-child(2),
  .feed-head span:nth-child(4) {
    display: none;
  }

  .feed-row {
    grid-template-columns: 28px 1fr 52px;
    gap: 8px;
  }

  .feed-stamp {
    display: none;
  }

  .feed-summary {
    grid-column: 2 / 3;
  }

  .feed-signal,
  .feed-timebox {
    grid-column: 3 / 4;
  }

  .company-filter {
    left: 16px;
    right: 16px;
  }

  .topic-stream {
    inset: 170px 16px 24px;
  }

  .topic-feed-head {
    top: 138px;
  }

  .focus-node {
    width: min(82vw, 320px);
    padding: 38px;
  }
}
