:root {
  --bg-0: #07090d;
  --bg-1: #0d1117;
  --bg-2: #121821;
  --panel: rgba(12, 16, 22, 0.94);
  --panel-strong: rgba(16, 20, 27, 0.98);
  --line: rgba(126, 139, 160, 0.18);
  --line-strong: rgba(126, 139, 160, 0.3);
  --text: #f2f5f8;
  --muted: #97a1af;
  --accent: #e34ba9;
  --accent-cool: #006adc;
  --danger: #ff6868;
  --warning: #d9b25f;
  --ok: #64e2ac;
  --idle: #8ab4ff;
  --standby: #7d8693;
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --sans: "Bahnschrift", "Segoe UI Variable", "IBM Plex Sans", sans-serif;
}

html[data-theme="midnight"] {
  color-scheme: dark;
}

html[data-theme="nord"] {
  color-scheme: dark;
  --bg-0: #0b1017;
  --bg-1: #121a24;
  --bg-2: #182230;
  --panel: rgba(20, 29, 40, 0.94);
  --panel-strong: rgba(22, 33, 47, 0.98);
  --line: rgba(163, 181, 203, 0.18);
  --line-strong: rgba(163, 181, 203, 0.34);
  --text: #edf3fb;
  --muted: #9fb0c3;
  --accent: #7fc6ff;
  --accent-cool: #88c0d0;
  --danger: #ff7b89;
  --warning: #f3bf74;
  --ok: #8fddb3;
  --idle: #9fbdfb;
  --standby: #93a1b4;
  --shadow: 0 22px 48px rgba(3, 7, 12, 0.34);
}

html[data-theme="mocha"] {
  color-scheme: dark;
  --bg-0: #11111b;
  --bg-1: #181825;
  --bg-2: #1e1e2e;
  --panel: rgba(30, 30, 46, 0.95);
  --panel-strong: rgba(36, 36, 58, 0.98);
  --line: rgba(205, 214, 244, 0.18);
  --line-strong: rgba(205, 214, 244, 0.28);
  --text: #f5e9ff;
  --muted: #b9bfd8;
  --accent: #f38ba8;
  --accent-cool: #89b4fa;
  --danger: #f38ba8;
  --warning: #f9e2af;
  --ok: #a6e3a1;
  --idle: #89dceb;
  --standby: #a6adc8;
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.backdrop,
.backdrop-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.backdrop {
  background: rgba(7, 9, 13, 0.98);
}

.backdrop-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
}

.app-shell {
  width: min(1640px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 56px;
  position: relative;
  z-index: 1;
}

.loader-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(7, 9, 13, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.loader-screen.is-visible {
  opacity: 1;
  visibility: visible;
}

.loader-shell {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 28px 32px;
  border: 1px solid rgba(126, 139, 160, 0.22);
  border-radius: 28px;
  background: rgba(12, 16, 22, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36);
}

.loader-shell strong {
  font-size: 1.1rem;
}

.loader-shell span {
  color: var(--muted);
  text-align: center;
}

.loader {
  --cloud-color: #4387f4;
  --arrows-color: #80b1ff;
  --time-animation: 1s;
  transform: scale(1);
}

.loader #cloud {
  width: 92px;
  height: 92px;
}

.loader #cloud rect {
  fill: var(--cloud-color);
}

.loader #cloud g:nth-child(3) {
  transform-origin: 50% 72.8938%;
  fill: var(--arrows-color);
  filter: drop-shadow(0 0 8px black);
  animation: loader-rotation var(--time-animation) linear infinite;
}

.loader #shapes g g circle {
  animation: loader-cloud calc(var(--time-animation) * 2) linear infinite;
}

.loader #shapes g g circle:nth-child(2) {
  animation-delay: calc((var(--time-animation) * 2) / -3);
}

.loader #shapes g g circle:nth-child(3) {
  animation-delay: calc((var(--time-animation) * 2) / -1.5);
}

.loader svg #lines g line {
  stroke-width: 5;
  transform-origin: 50% 50%;
  rotate: -65deg;
  animation: loader-lines calc(var(--time-animation) / 1.33) linear infinite;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 24px;
  padding: 24px 26px;
}

.masthead-copy {
  max-width: 860px;
}

.eyebrow,
.section-kicker,
.panel-kicker,
.snapshot-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
}

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

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.lead {
  margin-top: 14px;
  max-width: 72ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.terminal-card {
  margin-top: 16px;
  max-width: none;
}

.terminal-widget {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(127, 225, 207, 0.15);
  border-radius: 18px;
  background: rgba(3, 8, 14, 0.88);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.32);
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #202425;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9fb3c4;
}

.copy_toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border: 1px solid rgba(126, 139, 160, 0.28);
  border-radius: 8px;
  background: #202425;
  color: #8e8e8e;
  cursor: pointer;
}

.copy_toggle svg {
  width: 18px;
  height: 18px;
}

.terminal-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #006adc;
  box-shadow: 0 0 16px rgba(0, 106, 220, 0.28);
}

.refresh-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(127, 225, 207, 0.08);
  color: #a3cbc4;
  font-size: 0.76rem;
}

.refresh-indicator::before {
  content: none;
}

.terminal-body {
  min-height: 360px;
  padding: 16px;
  overflow: hidden;
  background: #000000;
}

.terminal-stream {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 100%;
  font-family: var(--mono);
}

.terminal-row {
  display: grid;
  grid-template-columns: 58px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.terminal-row[data-live="true"] {
  border-color: rgba(227, 75, 169, 0.28);
  background: rgba(227, 75, 169, 0.08);
}

.terminal-row[data-status="error"],
.terminal-row[data-status="warning"] {
  border-color: rgba(217, 178, 95, 0.24);
}

.terminal-row[data-status="active"],
.terminal-row[data-status="online"] {
  border-color: rgba(0, 106, 220, 0.24);
}

.terminal-time {
  color: #7f92a5;
  font-size: 0.78rem;
  line-height: 1.6;
}

.terminal-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(0, 106, 220, 0.14);
  color: #8ab4ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terminal-text {
  min-width: 0;
  color: #f3f6fa;
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.masthead-side {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.snapshot-strip {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
}

.snapshot-strip strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.snapshot-detail {
  display: block;
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.snapshot-meta {
  color: var(--muted);
  font-size: 0.86rem;
  display: block;
  margin-top: 10px;
}

.tool-links,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-link,
.nav-pill,
.chip,
.table-action {
  appearance: none;
  border: 1px solid rgba(126, 139, 160, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  padding: 11px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-link:hover,
.nav-pill:hover,
.chip:hover,
.table-action:hover,
.chip.is-active,
.nav-pill.is-active {
  transform: translateY(-1px);
  border-color: rgba(0, 106, 220, 0.42);
  background: rgba(0, 106, 220, 0.12);
}

.tool-link-block {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.section-nav {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  margin: 16px 0 18px;
  background: rgba(8, 16, 25, 0.84);
  backdrop-filter: blur(14px);
}

.hero-grid,
.section-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.hero-card {
  grid-column: span 3;
  padding: 20px;
  min-height: 150px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hero-card-wide {
  grid-column: span 6;
}

.hero-title {
  font-size: clamp(1.28rem, 2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: var(--accent);
}

.hero-card::before {
  content: none;
}

.hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 106, 220, 0.24);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.hero-card .metric-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-card .metric-value {
  margin-top: 16px;
  font-size: clamp(1.95rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.hero-card .metric-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.section-block {
  margin-top: 26px;
  scroll-margin-top: 110px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
}

.section-copy {
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  padding: 20px;
}

.panel-span-4 {
  grid-column: span 4;
}

.panel-span-5 {
  grid-column: span 5;
}

.panel-span-6 {
  grid-column: span 6;
}

.panel-span-7 {
  grid-column: span 7;
}

.panel-span-8 {
  grid-column: span 8;
}

.panel-span-12 {
  grid-column: span 12;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.panel-head.split {
  align-items: center;
}

.panel-head h3 {
  font-size: 1.24rem;
  letter-spacing: -0.03em;
}

.panel-disclosure {
  display: grid;
  gap: 14px;
}

.panel-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  list-style: none;
}

.panel-disclosure-summary::-webkit-details-marker {
  display: none;
}

.panel-disclosure-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.panel-disclosure-summary strong {
  font-size: 0.92rem;
}

.panel-disclosure[open] .panel-disclosure-summary {
  border-color: rgba(127, 225, 207, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.search-input {
  width: min(320px, 100%);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.search-input::placeholder {
  color: rgba(142, 164, 185, 0.78);
}

.stack-list,
.mission-grid,
.service-grid,
.mini-grid {
  display: grid;
  gap: 12px;
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mission-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mini-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stack-item,
.mission-card,
.service-card,
.mini-card,
.empty-state {
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.stack-item {
  cursor: pointer;
}

.stack-item:hover,
.mission-card:hover,
.service-card:hover,
.table-row-button:hover {
  border-color: rgba(127, 225, 207, 0.26);
}

.stack-item[data-tone="critical"] {
  border-left: 4px solid var(--danger);
}

.stack-item[data-tone="warning"] {
  border-left: 4px solid var(--warning);
}

.stack-item[data-tone="ok"] {
  border-left: 4px solid var(--ok);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.stack-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.stack-copy,
.service-copy,
.mission-copy {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.06);
}

.state-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.state-online,
.state-running,
.state-active {
  color: var(--ok);
}

.state-degraded,
.state-warning,
.state-silent,
.state-starting {
  color: var(--warning);
}

.state-offline,
.state-unhealthy,
.state-error,
.state-dead,
.state-exited {
  color: var(--danger);
}

.state-idle,
.state-completed {
  color: var(--idle);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

td {
  font-size: 0.95rem;
}

.mono {
  font-family: var(--mono);
  font-size: 0.88rem;
}

.subtle {
  color: var(--muted);
}

.table-row-button {
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.table-actions {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.table-action-buttons,
.table-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-action {
  padding: 8px 10px;
  font-size: 0.82rem;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.inline-link {
  color: var(--accent-cool);
  text-decoration: none;
  font-size: 0.9rem;
}

.inline-link:hover {
  text-decoration: underline;
}

.source-board {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.panel-head.compact {
  margin-bottom: 10px;
}

.source-health {
  display: grid;
  gap: 10px;
}

.source-pill {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.source-pill:hover {
  border-color: rgba(127, 225, 207, 0.26);
}

.source-pill.is-static {
  cursor: default;
}

.source-pill.is-static:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.source-copy {
  display: grid;
  gap: 4px;
}

.source-title-row strong {
  font-size: 0.98rem;
}

.source-meta {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.enterprise-roster {
  display: grid;
  gap: 18px;
}

.roster-group {
  display: grid;
  gap: 12px;
}

.roster-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.roster-group-head strong {
  font-size: 1rem;
}

.roster-group-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.roster-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(17, 22, 29, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.roster-card.is-clickable,
.activity-item.is-clickable {
  cursor: pointer;
}

.roster-card.is-clickable:hover,
.activity-item.is-clickable:hover {
  border-color: rgba(127, 225, 207, 0.26);
  transform: translateY(-1px);
}

.roster-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--card-accent, var(--accent));
  opacity: 0.92;
}

.roster-card[data-status="error"] {
  border-color: rgba(255, 104, 104, 0.26);
  box-shadow: 0 0 0 1px rgba(255, 104, 104, 0.12), 0 0 32px rgba(255, 104, 104, 0.12);
}

.roster-card[data-status="active"] {
  border-color: rgba(100, 226, 172, 0.22);
}

.roster-card[data-status="standby"] {
  opacity: 0.72;
}

.roster-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.roster-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 800;
  color: white;
  background: rgba(227, 75, 169, 0.12);
  box-shadow: none;
}

.roster-name strong {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}

.roster-name span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #b7c8d8;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.roster-summary {
  margin-top: 14px;
  color: var(--text);
  line-height: 1.45;
  min-height: 44px;
}

.roster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.roster-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.roster-stat {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.roster-stat strong {
  display: block;
  font-size: 1rem;
}

.roster-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.activity-feed {
  display: grid;
  gap: 12px;
}

.activity-item {
  position: relative;
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease, border-color 160ms ease;
}

.activity-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: rgba(127, 225, 207, 0.4);
}

.activity-item[data-status="error"]::before {
  background: rgba(255, 104, 104, 0.9);
}

.activity-item[data-status="success"]::before,
.activity-item[data-status="active"]::before {
  background: rgba(100, 226, 172, 0.9);
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.activity-head strong {
  font-size: 0.96rem;
}

.activity-time {
  color: var(--muted);
  font-size: 0.78rem;
}

.activity-copy {
  color: var(--muted);
  line-height: 1.5;
}

.activity-script {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #a7bdd0;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.advanced-hint {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.trend-shell {
  margin-top: auto;
  min-height: 54px;
  padding-top: 12px;
}

.trend-shell.compact {
  min-height: 44px;
  padding-top: 8px;
}

.sparkline {
  width: 100%;
  height: 48px;
  display: block;
}

.trend-empty {
  display: grid;
  place-items: center;
  min-height: 46px;
  color: var(--muted);
  font-size: 0.85rem;
}

.trend-empty-large {
  min-height: 124px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.business-trends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.business-trend-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.business-trend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.business-trend-head strong {
  font-size: 1.14rem;
  letter-spacing: -0.03em;
}

.business-trend-copy {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.business-trend-shell {
  min-height: 124px;
}

.trend-chart {
  width: 100%;
  height: 124px;
  display: block;
}

.trend-chart line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.business-rank-item {
  gap: 10px;
}

.business-rank-head,
.business-rank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.business-rank-head strong {
  font-size: 0.96rem;
}

.business-rank-head span,
.business-rank-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.business-rank-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(227, 75, 169, 0.12);
  overflow: hidden;
}

.business-rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.business-rank-bar-cool {
  background: rgba(0, 106, 220, 0.12);
}

.business-rank-bar-cool span {
  background: var(--accent-cool);
}

.drilldown-panel {
  min-height: 280px;
}

.global-drilldown-panel {
  margin-top: 24px;
}

.drilldown-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.drilldown-main {
  grid-column: span 8;
}

.drilldown-side {
  grid-column: span 4;
}

.code-block {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(4, 10, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.84rem;
  white-space: pre-wrap;
  line-height: 1.5;
  max-height: 360px;
  overflow: auto;
}

.code-block.compact {
  max-height: 180px;
  font-size: 0.8rem;
}

.section-spacer {
  margin-top: 18px;
}

.trend-grid {
  margin-top: 16px;
}

.root-cause-card {
  margin-top: 16px;
}

.trace-focus {
  margin-top: 18px;
}

.io-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.io-grid.nested {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.observation-list {
  display: grid;
  gap: 12px;
}

.observation-card,
.expert-card {
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.observation-card[data-tone="critical"] {
  border-left: 4px solid var(--danger);
}

.observation-card[data-tone="warning"] {
  border-left: 4px solid var(--warning);
}

.observation-card[data-tone="ok"] {
  border-left: 4px solid var(--ok);
}

.trace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 10px;
}

.expert-links {
  margin-top: 14px;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.pulse {
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 104, 104, 0.1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 104, 104, 0);
  }
}

@keyframes terminal-blinking {
  20%,
  80% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0);
  }
}

@keyframes terminal-cursor {
  50% {
    border-right-color: transparent;
  }
}

@keyframes terminal-inputs {
  0%,
  100% {
    width: 0;
  }
  12%,
  88% {
    width: 84px;
  }
  30%,
  70% {
    width: min(100%, 360px);
  }
}

@keyframes loader-rotation {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes loader-lines {
  0% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(8px);
  }
}

@keyframes loader-cloud {
  0% {
    cx: 20;
    cy: 60;
    r: 15;
  }
  50% {
    cx: 50;
    cy: 45;
    r: 20;
  }
  100% {
    cx: 80;
    cy: 60;
    r: 15;
  }
}

@media (max-width: 1180px) {
  .masthead {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-column: span 6;
  }

  .hero-card-wide {
    grid-column: span 12;
  }

  .panel-span-4,
  .panel-span-5,
  .panel-span-6,
  .panel-span-7,
  .panel-span-8 {
    grid-column: span 12;
  }

  .drilldown-main,
  .drilldown-side {
    grid-column: span 12;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100vw - 18px, 100%);
  }

  .section-head {
    flex-direction: column;
  }

  .hero-card {
    grid-column: span 12;
  }

  .hero-card-wide {
    grid-column: span 12;
  }

  .panel,
  .masthead {
    border-radius: 22px;
  }

  .roster-top {
    grid-template-columns: auto 1fr;
  }

  .badge-pill {
    grid-column: span 2;
    justify-self: start;
  }

  .io-grid,
  .io-grid.nested {
    grid-template-columns: 1fr;
  }

  .business-trends-grid {
    grid-template-columns: 1fr;
  }
}

.app-shell {
  width: min(1760px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0 40px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.workspace-sidebar,
.workspace-main {
  min-width: 0;
}

.workspace-sidebar {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.workspace-main {
  display: grid;
  gap: 18px;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.workspace-topbar-actions-only {
  justify-content: flex-end;
}

.dashboard-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.workspace-topbar.is-minimal {
  display: none;
}

.workspace-topbar.is-minimal .topbar-copy {
  display: none;
}

.workspace-topbar.is-minimal .focus-chip {
  display: none;
}

.topbar-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  letter-spacing: -0.05em;
}

.topbar-subtitle {
  margin-top: 8px;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.5;
}

.topbar-subtitle[hidden] {
  display: none;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.refresh-indicator-chip,
.focus-chip,
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.refresh-copy {
  display: grid;
  gap: 3px;
}

.refresh-indicator {
  font-size: 0.9rem;
}

.refresh-countdown {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.focus-chip {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.topbar-link {
  text-decoration: none;
  color: var(--text);
}

.theme-picker {
  position: relative;
}

.theme-btn {
  min-width: 164px;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 225, 207, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.theme-btn span {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.theme-btn strong {
  font-size: 0.95rem;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.theme-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-option:hover,
.theme-option.is-active {
  transform: translateY(-1px);
  border-color: rgba(127, 225, 207, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.theme-option-meta {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.focus-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 225, 207, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.focus-chip span {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.focus-chip strong {
  font-size: 0.95rem;
}

.status-orb {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-cool);
  box-shadow: 0 0 14px var(--accent-cool);
}

.refresh-indicator-chip[data-status="loading"] .status-orb,
.refresh-indicator-chip[data-status="active"] .status-orb {
  background: var(--accent-cool);
  box-shadow: 0 0 14px var(--accent-cool);
}

.refresh-indicator-chip[data-status="ok"] .status-orb {
  background: var(--ok);
  box-shadow: 0 0 14px var(--ok);
}

.dashboard-topbar .sys-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.dashboard-topbar .sys-pill-brand {
  font-weight: 700;
  border-color: rgba(127, 225, 207, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-topbar .sys-pill[data-level="ok"] {
  color: var(--ok);
  border-color: rgba(100, 226, 172, 0.22);
  background: rgba(100, 226, 172, 0.08);
}

.dashboard-topbar .sys-pill[data-level="active"] {
  color: var(--idle);
  border-color: rgba(138, 180, 255, 0.22);
  background: rgba(138, 180, 255, 0.08);
}

.dashboard-topbar .sys-pill[data-level="warning"] {
  color: var(--warning);
  border-color: rgba(217, 178, 95, 0.24);
  background: rgba(217, 178, 95, 0.08);
}

.dashboard-topbar .sys-pill[data-level="error"] {
  color: var(--danger);
  border-color: rgba(255, 104, 104, 0.24);
  background: rgba(255, 104, 104, 0.08);
}

.sidebar-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.sidebar-brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 800;
  color: white;
  background: #202425;
  border: 1px solid rgba(0, 106, 220, 0.45);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.brand-title {
  font-size: 1.6rem;
  letter-spacing: -0.05em;
}

.brand-copy {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.route-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.route-link span {
  font-weight: 650;
}

.route-link strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.route-link:hover,
.route-link.is-active {
  transform: translateY(-1px);
  border-color: rgba(0, 106, 220, 0.28);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.route-link.is-active strong {
  color: white;
  background: rgba(0, 106, 220, 0.26);
}

.sidebar-snapshot {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.page-view {
  display: none;
  gap: 18px;
}

.page-view.is-active {
  display: grid;
}

body[data-route="home"] .app-shell,
body[data-route="studio"] .app-shell {
  width: min(100vw, 100%);
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body[data-route="home"] .workspace-sidebar,
body[data-route="home"] .workspace-topbar,
body[data-route="home"] .global-drilldown-panel,
body[data-route="studio"] .workspace-sidebar,
body[data-route="studio"] .workspace-topbar,
body[data-route="studio"] .global-drilldown-panel {
  display: none !important;
}

body[data-route="home"] .workspace-main,
body[data-route="studio"] .workspace-main {
  gap: 0;
  min-height: 100vh;
}

body[data-route="home"] .backdrop {
  background:
    radial-gradient(circle at top left, rgba(73, 161, 255, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 197, 92, 0.1), transparent 34%),
    #07090d;
}

body[data-route="studio"] .backdrop {
  background:
    radial-gradient(circle at top left, rgba(255, 197, 92, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 238, 196, 0.08), transparent 26%),
    linear-gradient(180deg, #130e08 0%, #090806 100%);
}

body[data-route="home"] .backdrop-grid,
body[data-route="studio"] .backdrop-grid {
  opacity: 0.45;
}

body[data-route="home"] .page-view[data-view="home"].is-active {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 56px);
  place-items: center;
}

body[data-route="studio"] .page-view[data-view="studio"].is-active {
  min-height: 100vh;
  padding: clamp(24px, 4vw, 40px);
  align-content: start;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) 360px;
  gap: 16px;
  align-items: start;
}

.dashboard-home-shell {
  display: grid;
  gap: 24px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.dashboard-home-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(227, 75, 169, 0.10), transparent 34%),
    radial-gradient(circle at bottom right, rgba(0, 106, 220, 0.10), transparent 38%);
  pointer-events: none;
}

.dashboard-home-copy,
.dashboard-home-choice-grid {
  position: relative;
  z-index: 1;
}

.dashboard-home-copy {
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 70ch;
}

.dashboard-home-title {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.dashboard-home-summary {
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-home-choice-grid,
.dashboard-architecture-grid,
.studio-module-grid {
  display: grid;
  gap: 14px;
}

.dashboard-choice-grid,
.architecture-card,
.studio-module-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  padding: 18px;
}

.dashboard-home-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-home-choice-grid-immersive {
  width: min(1180px, 100%);
  margin: 0 auto;
  gap: clamp(18px, 2vw, 28px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-choice-card {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 21, 31, 0.92), rgba(11, 16, 24, 0.96));
  color: var(--text);
  min-height: min(72vh, 640px);
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 20px;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dashboard-choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(127, 225, 207, 0.32);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.dashboard-choice-card-monitoring {
  background:
    radial-gradient(circle at top left, rgba(73, 161, 255, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(138, 180, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(15, 21, 31, 0.92), rgba(11, 16, 24, 0.96));
}

.dashboard-choice-card-studio {
  background:
    radial-gradient(circle at top left, rgba(255, 197, 92, 0.24), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 238, 196, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(26, 18, 11, 0.96), rgba(15, 11, 8, 0.98));
}

.dashboard-choice-title {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  max-width: 8ch;
}

.dashboard-choice-arrow {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  justify-self: end;
}

.dashboard-architecture-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.architecture-card {
  display: grid;
  gap: 12px;
}

.studio-module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.studio-shell {
  width: min(1560px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(24px, 4vw, 34px);
  border-radius: 34px;
  border: 1px solid rgba(255, 197, 92, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 197, 92, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(28, 20, 12, 0.96), rgba(16, 12, 8, 0.98));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}

.studio-brand {
  display: grid;
  gap: 8px;
}

.studio-brand-kicker {
  color: #f3bf74;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.studio-brand-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.studio-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.studio-topbar .nav-pill {
  min-width: 140px;
  justify-content: center;
  border-color: rgba(255, 197, 92, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.studio-summary-grid .hero-card,
.studio-panel,
.studio-module-card,
.studio-role-card {
  border-color: rgba(255, 197, 92, 0.14);
  background:
    linear-gradient(180deg, rgba(25, 18, 11, 0.96), rgba(15, 11, 8, 0.98));
}

.studio-module-card {
  display: grid;
  gap: 14px;
}

.studio-module-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.studio-role-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 9, 13, 0.28);
}

.studio-role-card strong {
  font-size: 0.95rem;
  line-height: 1.5;
}

.static-stack-item {
  cursor: default;
}

.static-stack-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
}

.hero-copy {
  min-width: 0;
}

.hero-copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.overview-rail {
  display: grid;
  gap: 16px;
}

.focus-card {
  display: grid;
  gap: 16px;
  align-self: start;
}

.focus-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.focus-kicker-stack,
.focus-main {
  display: grid;
  gap: 8px;
}

.focus-kicker {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-title {
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.focus-summary {
  color: var(--muted);
  line-height: 1.55;
}

.focus-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.focus-actions .nav-pill {
  width: 100%;
  justify-content: center;
}

.overview-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.analytics-host {
  min-width: 0;
}

.motion-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(0, 106, 220, 0.22);
  background: rgba(14, 18, 24, 0.98);
  overflow: hidden;
}

.motion-copy strong {
  display: block;
  margin-top: 6px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.motion-copy p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-motion {
  width: 100%;
  height: auto;
  overflow: visible;
}

#cursor,
#box,
#text {
  cursor: pointer;
}

#cursor {
  overflow: visible;
  transform: translate3d(300px, 0, 0) scale(1);
  transform-origin: center center;
  transform-box: fill-box;
  animation: cursor 5s ease infinite alternate;
}

#box {
  opacity: 0;
  animation: box 5s ease infinite alternate;
}

@keyframes cursor {
  0% {
    opacity: 0;
    transform: translate3d(300px, 0, 0) scale(1);
  }
  30% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  60% {
    opacity: 1;
    transform: translate3d(-200px, -160px, 0) scale(1);
  }
  65% {
    opacity: 1;
    transform: translate3d(-200px, -160px, 0) scale(0.95);
  }
  70% {
    opacity: 1;
    transform: translate3d(-200px, -160px, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate3d(-300px, -50px, 0) scale(1);
  }
}

@keyframes box {
  0%,
  60% {
    opacity: 0;
  }
  65%,
  100% {
    opacity: 1;
  }
}

.overview-roster-preview {
  display: grid;
  gap: 10px;
}

.preview-roster-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.preview-roster-card:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 225, 207, 0.24);
}

.preview-roster-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-roster-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 800;
  color: white;
}

.preview-roster-head strong {
  display: block;
}

.preview-roster-head span,
.preview-roster-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.preview-roster-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(10, 14, 19, 0.98);
  border: 1px solid rgba(126, 139, 160, 0.18);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.analytics-card::before {
  content: none;
}

.analytics-inner {
  position: relative;
  display: grid;
  gap: 16px;
}

.analytics-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.analytics-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analytics-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 106, 220, 0.16);
  color: white;
}

.analytics-brand strong {
  display: block;
}

.analytics-brand span,
.analytics-live {
  color: var(--muted);
  font-size: 0.82rem;
}

.analytics-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.analytics-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-stat {
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-stat p {
  color: var(--muted);
  font-size: 0.78rem;
}

.analytics-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.analytics-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 132px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-bar-track {
  flex: 1;
  height: 100%;
  border-radius: 999px;
  background: rgba(0, 106, 220, 0.12);
  display: flex;
  align-items: end;
  overflow: hidden;
}

.analytics-bar-fill {
  width: 100%;
  border-radius: inherit;
  background: #006adc;
  transition: height 300ms ease;
}

.analytics-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.analytics-foot span {
  color: var(--muted);
  font-size: 0.82rem;
}

.folder-card {
  display: grid;
  gap: 12px;
}

.folder-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.folder-tree {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.folder-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.folder-tree .depth-1 {
  padding-left: 18px;
}

.folder-tree .depth-2 {
  padding-left: 36px;
}

.access-card {
  width: 100%;
  background: rgba(17, 22, 29, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.access-card .separator {
  border-top: 1.5px solid #42434a;
}

.access-list {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px;
  margin: 0;
}

.access-item {
  display: flex;
  align-items: center;
  color: #7e8590;
  gap: 10px;
  transition: all 0.3s ease-out;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.access-item svg {
  width: 19px;
  height: 19px;
  transition: all 0.3s ease-out;
}

.access-item .label {
  font-weight: 600;
}

.access-item:hover {
  background-color: rgba(0, 106, 220, 0.22);
  color: #ffffff;
  transform: translate(1px, -1px);
}

.access-item.delete:hover {
  background-color: rgba(142, 42, 42, 0.42);
}

.access-list:last-child .access-item {
  color: #bd89ff;
}

.access-list:last-child .access-item svg {
  stroke: #bd89ff;
}

.copy_toggle.is-copied {
  border-color: rgba(127, 225, 207, 0.5);
  color: white;
}

.copy_toggle.is-copied svg {
  color: white;
}

.section-panel {
  padding: 18px;
}

.operator-lanes,
.ops-summary-grid,
.hotspot-summary,
.hotspot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.operator-lane,
.ops-summary-card,
.source-row,
.hotspot-summary-line,
.hotspot-card {
  display: grid;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.source-row.is-clickable {
  cursor: pointer;
}

.source-row.is-clickable:hover {
  border-color: rgba(127, 225, 207, 0.26);
  transform: translateY(-1px);
}

.operator-lane[data-state="blocked"] {
  border-color: rgba(255, 104, 104, 0.26);
}

.operator-lane[data-state="silent"] {
  border-color: rgba(217, 178, 95, 0.24);
}

.operator-lane[data-state="working"] {
  border-color: rgba(100, 226, 172, 0.22);
}

.operator-lane[data-state="waiting"] {
  border-color: rgba(138, 180, 255, 0.22);
}

.operator-lane-head,
.source-row-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.operator-lane-head strong {
  font-size: 1.6rem;
}

.operator-lane-body,
.source-row-copy,
.reconciliation-day-meta,
.hotspot-board {
  display: grid;
  gap: 8px;
}

.operator-chip {
  appearance: none;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(8, 12, 18, 0.56);
  color: var(--text);
  text-align: left;
}

.operator-chip strong,
.operator-chip span {
  display: block;
}

.operator-chip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.operator-chip.is-clickable {
  cursor: pointer;
}

.operator-chip.is-clickable:hover {
  border-color: rgba(127, 225, 207, 0.26);
}

.impact-pill,
.delta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.impact-high {
  background: rgba(255, 104, 104, 0.14);
  color: #ff9a9a;
}

.impact-medium {
  background: rgba(217, 178, 95, 0.14);
  color: #f0c978;
}

.impact-low {
  background: rgba(100, 226, 172, 0.14);
  color: #84efbe;
}

.source-row .links-row {
  margin-top: 2px;
}

.source-row-default .source-title-row {
  display: grid;
  gap: 4px;
}

.source-row-default .source-title-row span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.source-row-service {
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(19, 27, 38, 0.88), rgba(8, 12, 18, 0.78)),
    rgba(255, 255, 255, 0.04);
}

.source-row-service[open] {
  border-color: rgba(127, 225, 207, 0.22);
}

.source-row-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  cursor: pointer;
  list-style: none;
}

.source-row-summary::-webkit-details-marker {
  display: none;
}

.source-row-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-row-service[open] .source-row-toggle {
  color: var(--text);
  border-color: rgba(127, 225, 207, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.source-row-body {
  display: grid;
  gap: 12px;
}

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

.source-row-service .source-title-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.source-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.source-row-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.source-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.48);
}

.source-stat-label {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-stat-value {
  font-size: 1rem;
  line-height: 1.2;
}

.source-stat-hint {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.source-row-service .source-meta {
  line-height: 1.45;
}

.reconciliation-chart {
  display: grid;
  gap: 14px;
}

.reconciliation-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
}

.legend-shopify {
  background: #e34ba9;
}

.legend-odoo {
  background: #d2a444;
}

.legend-delta {
  background: #79e0cf;
}

.reconciliation-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.reconciliation-day {
  display: grid;
  gap: 10px;
}

.reconciliation-bars {
  height: 164px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 12, 18, 0.62);
}

.reconciliation-bar {
  flex: 1;
  min-height: 0;
  border-radius: 999px 999px 10px 10px;
}

.reconciliation-bar.is-shopify {
  background: linear-gradient(180deg, rgba(227, 75, 169, 0.96), rgba(227, 75, 169, 0.3));
}

.reconciliation-bar.is-odoo {
  background: linear-gradient(180deg, rgba(210, 164, 68, 0.96), rgba(210, 164, 68, 0.3));
}

.delta-pill {
  background: rgba(121, 224, 207, 0.12);
  color: #93f0e0;
}

.delta-pill.negative {
  background: rgba(255, 104, 104, 0.12);
  color: #ff9a9a;
}

.delta-pill.positive {
  background: rgba(100, 226, 172, 0.12);
  color: #84efbe;
}

.delta-pill.neutral {
  background: rgba(138, 180, 255, 0.12);
  color: #a8c8ff;
}

.hotspot-board {
  gap: 14px;
}

.hotspot-summary-line,
.hotspot-card {
  background: rgba(8, 12, 18, 0.62);
}

.empty-state.compact {
  padding: 10px 12px;
  font-size: 0.9rem;
}

body.is-refreshing .status-orb {
  animation: pulse 1.2s infinite;
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
  }

  .sidebar-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-architecture-grid,
  .studio-module-grid,
  .overview-layout,
  .overview-metrics,
  .hero-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .workspace-topbar {
    flex-direction: column;
    align-items: start;
  }

  .dashboard-topbar {
    justify-content: flex-start;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-grid,
  .dashboard-home-choice-grid,
  .dashboard-architecture-grid,
  .studio-module-grid,
  .studio-module-roles,
  .hero-stage,
  .overview-layout {
    grid-template-columns: 1fr;
  }

  .focus-actions,
  .source-row-metrics {
    grid-template-columns: 1fr;
  }

  .studio-topbar {
    flex-direction: column;
    align-items: start;
  }

  .studio-topbar-actions {
    width: 100%;
  }

  .studio-topbar .nav-pill {
    flex: 1 1 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 14px, 100%);
  }

  .workspace-sidebar,
  .workspace-topbar,
  .hero-stage,
  .panel {
    border-radius: 22px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .route-link,
  .focus-chip,
  .refresh-indicator-chip,
  .theme-btn {
    width: 100%;
    justify-content: space-between;
  }

  .theme-picker,
  .theme-menu {
    width: 100%;
  }

  .theme-menu {
    left: 0;
    right: auto;
    min-width: 0;
  }

  .dashboard-topbar .sys-pill {
    width: 100%;
    justify-content: space-between;
  }

  .panel-disclosure-summary,
  .source-row-summary {
    grid-template-columns: 1fr;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .focus-head {
    flex-direction: column;
  }

  .focus-actions,
  .source-row-metrics {
    grid-template-columns: 1fr;
  }

  .terminal-body {
    min-height: 300px;
  }

  .terminal-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dashboard-home-choice-grid,
  .dashboard-home-choice-grid-immersive {
    grid-template-columns: 1fr;
  }

  .dashboard-choice-card {
    min-height: 42vh;
    padding: 24px;
  }

  .dashboard-choice-arrow {
    width: 60px;
    height: 60px;
  }

  body[data-route="home"] .page-view[data-view="home"].is-active,
  body[data-route="studio"] .page-view[data-view="studio"].is-active {
    padding: 18px 14px;
  }
}
