/* CogniBoard — Obsidian Mission Control
   Local-only UI: system fonts, CSS geometry, no remote assets. */

:root {
  color-scheme: dark;
  --bg-0: #040912;
  --bg-1: #07111f;
  --bg-2: #0a1726;
  --panel: rgba(11, 24, 39, 0.82);
  --panel-strong: rgba(13, 29, 47, 0.96);
  --panel-soft: rgba(19, 38, 58, 0.55);
  --line: rgba(157, 196, 226, 0.16);
  --line-strong: rgba(157, 207, 239, 0.3);
  --text: #f3f8fc;
  --text-soft: #c8d7e4;
  --muted: #97abba;
  --dim: #6f8596;
  --cyan: #63e6ff;
  --cyan-strong: #19c9ee;
  --cyan-soft: rgba(99, 230, 255, 0.12);
  --violet: #9d8cff;
  --violet-soft: rgba(157, 140, 255, 0.13);
  --mint: #67edb0;
  --mint-soft: rgba(103, 237, 176, 0.12);
  --amber: #f4c56b;
  --amber-soft: rgba(244, 197, 107, 0.13);
  --plan: #d3a7ff;
  --plan-soft: rgba(211, 167, 255, 0.13);
  --danger: #ff8b98;
  --danger-soft: rgba(255, 139, 152, 0.12);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.22);
  --radius-xl: 22px;
  --radius-lg: 17px;
  --radius-md: 12px;
  --topbar: 72px;
  --sidebar: 112px;
  --rail: 296px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-0);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% -12%, rgba(43, 125, 171, 0.19), transparent 37%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1) 47%, #06101c);
  color: var(--text);
  font-family:
    Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
  margin: 0;
}

button:not(:disabled),
[href] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(99, 230, 255, 0.28);
  color: #fff;
}

:focus-visible {
  outline: 3px solid #b8f4ff;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 16px;
  padding: 10px 16px;
  transform: translateY(-150%);
  border: 1px solid var(--cyan);
  border-radius: 10px;
  background: #071725;
  color: #fff;
  font-weight: 800;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient,
.noise {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.ambient {
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.09;
}

.ambient-one {
  top: -24vw;
  right: 4vw;
  background: var(--cyan);
}

.ambient-two {
  bottom: -30vw;
  left: 18vw;
  background: var(--violet);
}

.noise {
  inset: 0;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.009) 1px, transparent 1px);
  background-size: 4px 4px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template:
    var(--topbar) minmax(0, 1fr)
    / var(--sidebar) minmax(0, 1fr) var(--rail);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

/* Shared surfaces and typography */

.surface {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow-soft), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px) saturate(120%);
}

.surface::before {
  position: absolute;
  top: -1px;
  right: 11%;
  left: 11%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(130, 222, 255, 0.42), transparent);
  content: "";
  pointer-events: none;
}

.section-kicker,
.mini-kicker,
.eyebrow,
.segment-index,
.story-index,
.tour-count {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.card-heading h2 {
  margin-top: 5px;
  color: var(--text);
  font-size: clamp(1.03rem, 1.18vw, 1.32rem);
  line-height: 1.28;
}

.card-heading.compact {
  align-items: center;
}

.positive {
  color: var(--mint) !important;
}

.negative {
  color: var(--danger) !important;
}

.neutral {
  color: var(--text-soft) !important;
}

/* Evidence taxonomy: label and color are always paired. */
.evidence-badge,
.ledger-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1;
}

.evidence-badge.large {
  min-height: 34px;
  padding-inline: 13px;
}

.evidence-badge.measured,
.ledger-status.measured {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.evidence-badge.verified,
.ledger-status.verified {
  background: var(--mint-soft);
  color: var(--mint);
}

.evidence-badge.target,
.ledger-status.target {
  border-style: dashed;
  background: var(--amber-soft);
  color: var(--amber);
}

.evidence-badge.planned,
.ledger-status.plan,
.ledger-status.planned {
  border-style: dashed;
  background: var(--plan-soft);
  color: var(--plan);
}

/* Header */

.topbar {
  z-index: 30;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(420px, 1fr) auto;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 12, 22, 0.85);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(24px) saturate(135%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 100%;
  padding: 0 18px;
  border-right: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  filter: drop-shadow(0 0 12px rgba(99, 230, 255, 0.28));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.mark-frame {
  fill: rgba(99, 230, 255, 0.04);
  stroke: var(--cyan);
  stroke-width: 1.8;
}

.mark-core {
  fill: rgba(157, 140, 255, 0.14);
  stroke: var(--violet);
  stroke-width: 1.8;
}

.mark-node {
  fill: #d8fbff;
}

.brand-copy {
  display: none;
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  overflow: hidden;
  margin-top: 1px;
  color: var(--dim);
  font-size: 0.48rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 31, 47, 0.7);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.status-pill b {
  color: var(--text);
  font-size: 0.69rem;
}

.status-label {
  color: var(--dim);
}

.status-pill > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.status-local,
.status-runtime {
  color: var(--mint);
}

.status-runtime.is-running,
.status-runtime.running,
.status-runtime[data-state="starting"],
.status-runtime[data-state="running"],
.status-runtime[data-state="cancelling"] {
  color: var(--cyan);
}

.status-runtime.is-error,
.status-runtime.error,
.status-runtime[data-state="failed"] {
  color: var(--danger);
}

.status-runtime[data-state="succeeded"] {
  color: var(--mint);
}

.status-runtime[data-state="cancelled"] {
  color: var(--amber);
}

.status-runtime[data-state="offline"] {
  color: var(--danger);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 18px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(16, 32, 49, 0.72);
  color: var(--text-soft);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms var(--ease);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(27, 52, 73, 0.8);
  color: #fff;
  transform: translateY(-1px);
}

.icon-button[aria-pressed="true"] {
  border-color: rgba(99, 230, 255, 0.48);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button.text-button {
  width: auto;
  min-width: 112px;
  gap: 7px;
  padding: 0 13px;
  font-size: 0.76rem;
  font-weight: 800;
}

/* Sidebar */

.sidebar {
  z-index: 20;
  grid-row: 2;
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: rgba(6, 14, 25, 0.72);
  backdrop-filter: blur(18px);
}

.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 10px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--dim);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms var(--ease);
}

.nav-item::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: -11px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(99, 230, 255, 0.7);
  content: "";
  opacity: 0;
  transform: scaleY(0.4);
  transition: 180ms var(--ease);
}

.nav-item:hover {
  border-color: var(--line);
  background: rgba(99, 230, 255, 0.05);
  color: var(--text-soft);
  transform: translateX(2px);
}

.nav-item.is-active,
.nav-item[aria-current="page"] {
  border-color: rgba(99, 230, 255, 0.19);
  background: linear-gradient(135deg, rgba(99, 230, 255, 0.13), rgba(157, 140, 255, 0.05));
  color: var(--cyan);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.nav-item.is-active::before,
.nav-item[aria-current="page"]::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.nav-item span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.58rem;
  line-height: 1.35;
}

.sidebar-foot strong {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.sidebar-foot .mini-kicker {
  font-size: 0.52rem;
}

/* Main view */

.main-stage {
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px clamp(20px, 2vw, 36px) 64px;
  scrollbar-color: rgba(99, 230, 255, 0.25) transparent;
  scrollbar-width: thin;
}

.main-stage::-webkit-scrollbar,
.evidence-rail::-webkit-scrollbar {
  width: 8px;
}

.main-stage::-webkit-scrollbar-thumb,
.evidence-rail::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 99px;
  background: rgba(99, 230, 255, 0.22);
  background-clip: padding-box;
}

.main-stage:focus-visible {
  outline-offset: -4px;
}

.view {
  width: min(100%, 1500px);
  margin: 0 auto;
  animation: view-enter 380ms var(--ease) both;
}

.view > * + * {
  margin-top: 18px;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  min-height: 94px;
  margin-bottom: 24px;
}

.view-heading > div:first-child {
  max-width: 820px;
}

.view-heading h1 {
  margin-top: 5px;
  font-size: clamp(2rem, 2.7vw, 3.15rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.view-heading h1 em,
.business-heading h1 em {
  color: var(--cyan);
  font-style: normal;
}

.view-heading p {
  max-width: 760px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.view-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.rail-button,
.tour-actions button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  overflow: hidden;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition:
    transform 180ms var(--ease),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.primary-button {
  gap: 8px;
  border: 1px solid rgba(157, 242, 255, 0.65);
  background: linear-gradient(135deg, #40d9ef, #667bf6);
  box-shadow: 0 9px 26px rgba(42, 192, 230, 0.23), inset 0 1px rgba(255, 255, 255, 0.42);
  color: #03111b;
}

.primary-button:hover:not(:disabled) {
  box-shadow: 0 12px 32px rgba(42, 192, 230, 0.34), inset 0 1px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.rail-button:active:not(:disabled) {
  transform: translateY(0);
}

.primary-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.button-glow {
  position: absolute;
  inset: -80% auto -80% -40%;
  width: 38%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: transform 600ms ease;
}

.primary-button:hover .button-glow {
  transform: translateX(440%) rotate(20deg);
}

.secondary-button,
.tour-actions button {
  border: 1px solid var(--line-strong);
  background: rgba(16, 34, 52, 0.72);
  color: var(--text-soft);
}

.secondary-button:hover:not(:disabled),
.tour-actions button:hover:not(:disabled) {
  border-color: rgba(99, 230, 255, 0.45);
  background: rgba(24, 49, 70, 0.9);
  color: #fff;
  transform: translateY(-1px);
}

.secondary-button.danger {
  border-color: rgba(255, 139, 152, 0.32);
  color: var(--danger);
}

.compact-button {
  min-height: 40px;
  padding: 8px 14px;
}

/* AI workspace */

.assistant-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.assistant-heading > div:first-child {
  min-width: 0;
  max-width: 850px;
}

.assistant-heading h1 {
  margin-top: 7px;
  font-size: clamp(2.35rem, 3.4vw, 4.2rem);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.assistant-heading h1 em {
  background: linear-gradient(100deg, #9af2ff 5%, var(--cyan) 35%, #a99cff 92%);
  background-clip: text;
  color: transparent;
  font-style: normal;
}

.assistant-heading p {
  max-width: 780px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.agent-heading-state {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  min-width: 150px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(11, 27, 44, 0.78);
}

.agent-heading-state > i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 12px currentColor;
}

.agent-heading-state small,
.agent-heading-state strong {
  display: block;
}

.agent-heading-state small {
  color: var(--dim);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.agent-heading-state strong {
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.agent-heading-state[data-state="ready"] > i,
.agent-heading-state[data-state="succeeded"] > i {
  background: var(--mint);
  color: var(--mint);
}

.agent-heading-state[data-state="starting"] > i,
.agent-heading-state[data-state="loading"] > i,
.agent-heading-state[data-state="generating"] > i,
.agent-heading-state[data-state="executing"] > i {
  background: var(--cyan);
  color: var(--cyan);
  animation: status-pulse 1.1s ease-in-out infinite;
}

.agent-heading-state[data-state="cancelling"] > i,
.agent-heading-state[data-state="cancelled"] > i {
  background: var(--amber);
  color: var(--amber);
}

.agent-heading-state[data-state="cancelling"] > i {
  animation: status-pulse 1.1s ease-in-out infinite;
}

.agent-heading-state[data-state="failed"] > i,
.agent-heading-state[data-state="offline"] > i {
  background: var(--danger);
  color: var(--danger);
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.58fr);
  align-items: stretch;
  gap: 16px;
}

.chat-workspace {
  display: flex;
  min-width: 0;
  min-height: 650px;
  padding: 20px;
  flex-direction: column;
  overflow: hidden;
}

.chat-toolbar,
.chat-toolbar-actions,
.composer-foot,
.agent-mode-switch {
  display: flex;
  align-items: center;
}

.chat-toolbar {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.chat-toolbar h2 {
  margin-top: 3px;
  font-size: 1.25rem;
}

.chat-toolbar-actions {
  gap: 7px;
}

.micro-button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 32, 49, 0.76);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
}

.micro-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.micro-button.danger {
  color: var(--danger);
}

.chat-transcript {
  flex: 1 1 auto;
  min-height: 320px;
  max-height: 520px;
  padding: 18px 3px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-padding-block: 18px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(99, 230, 255, 0.25) transparent;
  scrollbar-width: thin;
}

.chat-transcript:focus-visible {
  border-radius: 10px;
  outline-offset: -2px;
}

.chat-empty {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.chat-empty .brand-mark.large {
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
}

.chat-empty strong {
  color: var(--text);
  font-size: 1.12rem;
}

.chat-empty p {
  max-width: 430px;
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.6;
}

.chat-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
  contain: layout style;
}

.chat-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 850;
  place-items: center;
}

.chat-message[data-role="user"] .chat-avatar {
  background: var(--violet-soft);
  color: var(--violet);
}

.chat-message[data-role="tool"] .chat-avatar {
  background: var(--amber-soft);
  color: var(--amber);
}

.chat-bubble {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(157, 196, 226, 0.12);
  border-radius: 4px 13px 13px;
  background: rgba(10, 24, 39, 0.82);
}

.chat-message[data-role="user"] .chat-bubble {
  border-color: rgba(157, 140, 255, 0.2);
  background: rgba(35, 30, 68, 0.44);
}

.chat-message[data-role="tool"] .chat-bubble {
  border-color: rgba(244, 197, 107, 0.2);
  background: rgba(58, 43, 20, 0.36);
}

.chat-bubble header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.chat-bubble header strong {
  color: var(--text-soft);
  font-size: 0.66rem;
}

.chat-bubble header time {
  color: var(--dim);
  font-size: 0.55rem;
  font-variant-numeric: tabular-nums;
}

.chat-message-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.chat-completion-status {
  padding: 2px 7px;
  border: 1px solid rgba(115, 242, 174, 0.24);
  border-radius: 999px;
  background: rgba(115, 242, 174, 0.08);
  color: var(--mint);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.chat-message.is-streaming .chat-completion-status {
  border-color: rgba(93, 230, 255, 0.26);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.chat-message.is-truncated .chat-bubble {
  border-color: rgba(244, 197, 107, 0.34);
}

.chat-message.is-truncated .chat-completion-status {
  border-color: rgba(244, 197, 107, 0.38);
  background: rgba(244, 197, 107, 0.1);
  color: var(--amber);
}

.chat-bubble p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
  line-height: 1.66;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-message.is-streaming .chat-bubble p::after {
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 3px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  content: "";
  animation: status-pulse 0.9s ease-in-out infinite;
}

.chat-continue-button {
  margin-top: 9px;
  padding: 5px 9px;
  border: 1px solid rgba(244, 197, 107, 0.34);
  border-radius: 7px;
  background: rgba(244, 197, 107, 0.08);
  color: var(--amber);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-continue-button:hover,
.chat-continue-button:focus-visible {
  border-color: var(--amber);
  background: rgba(244, 197, 107, 0.15);
  outline: none;
}

.agent-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.agent-quick-prompts button {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 27, 43, 0.7);
  color: var(--muted);
  font-size: 0.61rem;
}

.agent-quick-prompts button:hover:not(:disabled) {
  border-color: rgba(99, 230, 255, 0.36);
  color: var(--cyan);
}

.agent-quick-prompts button:disabled,
.agent-mode-switch button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.chat-composer {
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(6, 16, 28, 0.86);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.agent-mode-switch {
  gap: 4px;
  margin-bottom: 7px;
}

.agent-mode-switch button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--dim);
  font-size: 0.6rem;
  font-weight: 750;
}

.agent-mode-switch button i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.agent-mode-switch button.is-selected {
  border-color: var(--line-strong);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.knowledge-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 7px;
  padding: 7px 9px;
  border: 1px solid rgba(93, 230, 255, 0.14);
  border-radius: 9px;
  background: rgba(8, 23, 38, 0.58);
}

.knowledge-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--cyan);
  font-size: 0.61rem;
  font-weight: 800;
  cursor: pointer;
}

.knowledge-upload-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.knowledge-upload-button[aria-disabled="true"] {
  color: var(--dim);
  cursor: not-allowed;
  opacity: 0.58;
}

.knowledge-status {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-strip[data-state="ready"] .knowledge-status {
  color: var(--mint);
}

.knowledge-strip[data-state="failed"] .knowledge-status {
  color: var(--danger);
}

.knowledge-capability-note {
  margin: -2px 2px 7px;
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.45;
}

.knowledge-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 7px;
}

.knowledge-sources strong,
.knowledge-sources span {
  padding: 3px 7px;
  border: 1px solid rgba(115, 242, 174, 0.2);
  border-radius: 999px;
  background: rgba(115, 242, 174, 0.06);
  color: var(--mint);
  font-size: 0.55rem;
}

.knowledge-sources strong {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.chat-composer textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.55;
}

.chat-composer textarea::placeholder {
  color: var(--dim);
}

.chat-composer textarea:disabled {
  cursor: progress;
  opacity: 0.72;
}

.composer-foot {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}

.composer-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-size: 0.58rem;
}

.composer-foot > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.agent-side-stack {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
}

.agent-runtime-card,
.task-policy-card,
.evolution-card {
  padding: 16px;
}

.core-route {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.core-route > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(8, 20, 34, 0.68);
}

.core-route > div.is-active {
  border-color: rgba(99, 230, 255, 0.42);
  background: var(--cyan-soft);
}

.core-route > div > span {
  display: grid;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(99, 230, 255, 0.09);
  color: var(--cyan);
  font-size: 0.55rem;
  font-weight: 850;
  place-items: center;
}

.core-route p,
.core-route strong,
.core-route small {
  display: block;
  min-width: 0;
}

.core-route strong {
  color: var(--text-soft);
  font-size: 0.68rem;
}

.core-route strong,
.core-route small,
.policy-grid b,
.evolution-facts dd {
  overflow-wrap: anywhere;
}

.core-route small {
  color: var(--dim);
  font-size: 0.54rem;
}

.core-route b {
  color: var(--mint);
  font-size: 0.49rem;
  letter-spacing: 0.06em;
}

.agent-core-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 0.55rem;
}

.policy-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 10px;
  margin-top: 13px;
  font-size: 0.59rem;
}

.policy-grid span {
  color: var(--dim);
}

.policy-grid b {
  color: var(--text-soft);
  text-align: right;
}

.task-policy-card > p,
.evolution-card > p {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.56rem;
  line-height: 1.5;
}

.evolution-cycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 13px;
}

.evolution-cycle span {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.51rem;
}

.evolution-cycle i {
  color: var(--dim);
  font-size: 0.55rem;
  font-style: normal;
}

.evolution-facts {
  margin: 11px 0;
}

.evolution-facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(157, 196, 226, 0.08);
  font-size: 0.57rem;
}

.evolution-facts dt {
  color: var(--dim);
}

.evolution-facts dd {
  color: var(--text-soft);
  text-align: right;
}

.full-width {
  width: 100%;
}

/* Mission control */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.82fr);
  gap: 18px;
}

.hero-card {
  min-height: 370px;
  padding: clamp(30px, 3vw, 48px);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(99, 230, 255, 0.09), transparent 31%),
    linear-gradient(135deg, rgba(13, 30, 48, 0.97), rgba(8, 19, 32, 0.92));
}

.hero-card::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(99, 230, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(99, 230, 255, 0.018),
    0 0 0 86px rgba(157, 140, 255, 0.014);
  content: "";
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow-line {
  width: 28px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.hero-card h1 {
  position: relative;
  z-index: 1;
  max-width: 870px;
  margin-top: 21px;
  font-size: clamp(2.25rem, 3.25vw, 4rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero-card h1 em {
  background: linear-gradient(100deg, #9af2ff 5%, var(--cyan) 35%, #a99cff 92%);
  background-clip: text;
  color: transparent;
  font-style: normal;
}

.hero-lead {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: clamp(0.93rem, 1vw, 1.06rem);
  line-height: 1.72;
}

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  margin-bottom: 28px;
}

.hero-actions .primary-button {
  min-height: 44px;
  padding-inline: 21px;
}

.trust-row {
  position: absolute;
  z-index: 2;
  right: clamp(30px, 3vw, 48px);
  bottom: 18px;
  left: clamp(30px, 3vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-row svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--mint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.proof-orbit {
  min-height: 370px;
  padding: 23px;
  overflow: hidden;
}

.orbit-visual {
  position: relative;
  height: 238px;
  margin-top: 2px;
}

.orbit,
.orbit-core,
.orbit-label {
  position: absolute;
  top: 50%;
  left: 50%;
}

.orbit {
  border: 1px solid rgba(99, 230, 255, 0.17);
  border-radius: 50%;
}

.orbit-a {
  width: 226px;
  height: 226px;
  margin: -113px;
  animation: orbit-spin 24s linear infinite;
}

.orbit-b {
  width: 166px;
  height: 166px;
  margin: -83px;
  border-color: rgba(157, 140, 255, 0.24);
  animation: orbit-spin-reverse 19s linear infinite;
}

.orbit i {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 13px var(--cyan);
}

.orbit i:nth-child(1) {
  top: 15%;
  left: 14%;
}

.orbit i:nth-child(2) {
  top: 48%;
  right: -4px;
}

.orbit i:nth-child(3) {
  bottom: 7%;
  left: 25%;
}

.orbit-b i {
  background: var(--violet);
  box-shadow: 0 0 13px var(--violet);
}

.orbit-core {
  display: flex;
  width: 105px;
  height: 105px;
  margin: -52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 230, 255, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 123, 151, 0.27), rgba(8, 21, 35, 0.95) 68%);
  box-shadow: 0 0 42px rgba(52, 200, 231, 0.15), inset 0 0 24px rgba(99, 230, 255, 0.08);
}

.orbit-core span,
.orbit-core small,
.orbit-label {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.orbit-core span {
  color: var(--cyan);
}

.orbit-core b {
  margin: 1px 0 -1px;
  font-size: 2.2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  line-height: 1;
}

.orbit-core small {
  color: var(--dim);
}

.orbit-label {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 18, 30, 0.92);
  color: var(--muted);
  line-height: 1.35;
}

.label-gemma {
  margin: -91px 0 0 -154px;
}

.label-deq {
  margin: -8px 0 0 83px;
}

.label-cfire {
  margin: 65px 0 0 -139px;
}

.hardware-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.hardware-row div {
  min-width: 0;
  padding: 10px 12px;
  background: rgba(8, 20, 33, 0.95);
}

.hardware-row span,
.hardware-row strong {
  display: block;
}

.hardware-row span {
  color: var(--dim);
  font-size: 0.61rem;
}

.hardware-row strong {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

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

.metric-card {
  min-height: 166px;
  padding: 18px;
  overflow: hidden;
  transition:
    border-color 180ms ease,
    transform 180ms var(--ease);
}

.metric-card:hover {
  border-color: rgba(99, 230, 255, 0.27);
  transform: translateY(-2px);
}

.metric-top,
.metric-foot,
.metric-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-top > span:first-child {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  justify-content: flex-start;
  margin-top: 13px;
}

.metric-value b {
  font-size: clamp(1.8rem, 2.25vw, 2.65rem);
  font-variant-numeric: tabular-nums;
  font-weight: 710;
  letter-spacing: -0.055em;
  line-height: 1;
}

.metric-value small {
  align-self: flex-end;
  padding-bottom: 3px;
  color: var(--dim);
  font-size: 0.68rem;
}

.meter {
  position: relative;
  height: 6px;
  margin-top: 17px;
  overflow: visible;
  border-radius: 99px;
  background: rgba(151, 171, 186, 0.12);
}

.meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-strong), var(--cyan));
  box-shadow: 0 0 12px rgba(99, 230, 255, 0.42);
}

.meter > span {
  position: absolute;
  top: -4px;
  width: 1px;
  height: 14px;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(244, 197, 107, 0.45);
}

.meter progress[value] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  appearance: none;
  background: transparent;
  accent-color: var(--cyan);
}

.meter progress[value]::-webkit-progress-bar {
  border-radius: inherit;
  background: rgba(151, 171, 186, 0.12);
}

.meter progress[value]::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-strong), var(--cyan));
  box-shadow: 0 0 12px rgba(99, 230, 255, 0.42);
}

.meter progress[value]::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-strong), var(--cyan));
  box-shadow: 0 0 12px rgba(99, 230, 255, 0.42);
}

.metric-foot {
  margin-top: 15px;
  color: var(--dim);
  font-size: 0.65rem;
}

.metric-foot strong {
  color: var(--text-soft);
  font-size: 0.67rem;
}

.depth-dots,
.test-stack {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  margin-top: 12px;
}

.depth-dots i {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--cyan-strong), var(--violet));
  box-shadow: 0 0 7px rgba(99, 230, 255, 0.2);
}

.test-stack i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(103, 237, 176, 0.35);
}

.threshold-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--dim);
  font-size: 0.62rem;
}

.threshold-line i {
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, var(--mint), var(--amber));
  box-shadow: 0 0 8px rgba(103, 237, 176, 0.24);
}

.story-rail {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(440px, 1.75fr) minmax(250px, 0.85fr);
  align-items: stretch;
  gap: 20px;
  padding: 20px;
}

.story-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 7px;
}

.story-step {
  position: relative;
  display: flex;
  min-height: 92px;
  padding: 12px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(13, 28, 44, 0.66);
  text-align: left;
  transition: 180ms var(--ease);
}

.story-step:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.story-step.is-active {
  border-color: rgba(99, 230, 255, 0.45);
  background: var(--cyan-soft);
  box-shadow: inset 0 0 22px rgba(99, 230, 255, 0.035);
}

.story-step > span {
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.story-step strong {
  margin-top: 7px;
  font-size: 0.79rem;
}

.story-step small {
  margin-top: 5px;
  color: var(--dim);
  font-size: 0.59rem;
  line-height: 1.45;
}

.story-detail {
  display: flex;
  min-height: 92px;
  padding: 13px 16px;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line-strong);
}

.story-detail p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.75rem;
  line-height: 1.65;
}

/* Inference view */

.inference-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.82fr) minmax(390px, 1.55fr) minmax(215px, 0.72fr);
  gap: 16px;
  align-items: stretch;
}

.pipeline-card,
.reactor-card,
.telemetry-card {
  min-height: 550px;
  padding: 20px;
}

.phase-status,
.phase-status.is-running,
.phase-status.running {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.65rem;
}

.phase-status.is-error,
.phase-status.error {
  color: var(--danger);
}

.phase-list {
  position: relative;
  display: flex;
  margin-top: 22px;
  padding: 0;
  flex-direction: column;
  list-style: none;
}

.phase-list::before {
  position: absolute;
  top: 21px;
  bottom: 21px;
  left: 14px;
  width: 1px;
  background: var(--line);
  content: "";
}

.phase-list li {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 61px;
  color: var(--dim);
}

.phase-list li > span {
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-2);
  place-items: center;
}

.phase-list li > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.phase-list li strong,
.phase-list li small {
  display: block;
}

.phase-list li strong {
  color: var(--text-soft);
  font-size: 0.77rem;
}

.phase-list li small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.61rem;
  line-height: 1.35;
}

.phase-list li > b {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.phase-list li.is-active,
.phase-list li.running {
  color: var(--cyan);
}

.phase-list li.is-active > span,
.phase-list li.running > span {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(99, 230, 255, 0.24);
}

.phase-list li.is-complete,
.phase-list li.complete {
  color: var(--mint);
}

.phase-list li.is-error,
.phase-list li.error,
.phase-list li.is-failed {
  color: var(--danger);
}

.scenario-picker {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.scenario-picker > span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}

.scenario-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 9px;
}

.scenario-buttons button {
  min-height: 38px;
  padding: 6px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 31, 49, 0.7);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
}

.scenario-buttons button:hover,
.scenario-buttons button.is-selected {
  border-color: rgba(99, 230, 255, 0.4);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.scenario-picker p {
  margin-top: 11px;
  color: var(--dim);
  font-size: 0.65rem;
  line-height: 1.55;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.live-indicator.is-running,
.live-indicator.running,
.live-indicator.is-live {
  color: var(--cyan);
}

.live-indicator.is-running i,
.live-indicator.running i,
.live-indicator.is-live i {
  box-shadow: 0 0 11px var(--cyan);
  animation: status-pulse 1.6s ease-in-out infinite;
}

.live-indicator.is-success {
  color: var(--mint);
}

.live-indicator.is-success i {
  box-shadow: 0 0 11px var(--mint);
}

.reactor {
  position: relative;
  display: grid;
  min-height: 430px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(99, 230, 255, 0.13);
  border-radius: 16px;
  background:
    radial-gradient(circle at center, rgba(26, 116, 150, 0.09), transparent 44%),
    linear-gradient(rgba(99, 230, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 230, 255, 0.018) 1px, transparent 1px),
    rgba(5, 15, 26, 0.78);
  background-size: auto, 30px 30px, 30px 30px, auto;
  place-items: center;
}

.reactor-svg {
  width: min(100%, 620px);
  height: auto;
}

.grid-lines {
  fill: none;
  stroke: rgba(111, 164, 193, 0.12);
  stroke-width: 1;
}

.core-glow {
  opacity: 0.88;
}

.beam-lines {
  fill: none;
  stroke: rgba(99, 230, 255, 0.62);
  stroke-dasharray: 6 8;
  stroke-width: 1.5;
}

.tree-nodes circle {
  fill: var(--violet);
  filter: drop-shadow(0 0 6px rgba(157, 140, 255, 0.7));
}

.core-ring {
  fill: none;
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
}

.ring-one {
  stroke: rgba(99, 230, 255, 0.68);
  stroke-dasharray: 10 8;
  animation: orbit-spin 18s linear infinite;
}

.ring-two {
  stroke: rgba(157, 140, 255, 0.7);
  stroke-dasharray: 3 8;
  animation: orbit-spin-reverse 12s linear infinite;
}

.equilibrium-wave {
  fill: none;
  stroke: #c1f9ff;
  stroke-linecap: round;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(99, 230, 255, 0.7));
}

.core-dot {
  fill: #ddfbff;
  filter: drop-shadow(0 0 12px rgba(99, 230, 255, 0.9));
}

.reactor.is-running .equilibrium-wave,
.reactor.running .equilibrium-wave {
  animation: wave-pulse 1.3s ease-in-out infinite;
}

.reactor.is-success .core-dot {
  fill: var(--mint);
  filter: drop-shadow(0 0 12px rgba(103, 237, 176, 0.9));
}

.reactor-readout {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.reactor-readout span,
.reactor-readout small,
.reactor-chip span {
  color: var(--dim);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.reactor-readout strong {
  margin: 4px 0 -1px;
  font-size: clamp(2.5rem, 4.4vw, 4.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.reactor-chip {
  position: absolute;
  min-width: 75px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 18, 30, 0.9);
  box-shadow: var(--shadow-soft);
}

.reactor-chip span,
.reactor-chip b {
  display: block;
}

.reactor-chip b {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.chip-left {
  top: 24%;
  left: 5%;
}

.chip-right {
  top: 24%;
  right: 5%;
  text-align: right;
}

.chip-bottom {
  bottom: 5%;
  left: 50%;
  min-width: 115px;
  transform: translateX(-50%);
  text-align: center;
}

.visual-disclaimer {
  margin-top: 12px;
  color: var(--dim);
  font-size: 0.64rem;
  line-height: 1.5;
}

.visual-disclaimer span {
  margin-right: 5px;
  color: var(--amber);
  font-weight: 800;
}

.telemetry-block {
  margin-top: 25px;
}

.telemetry-label {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim);
  font-size: 0.59rem;
}

.telemetry-label b {
  color: var(--text-soft);
  font-size: 0.65rem;
  white-space: nowrap;
}

.telemetry-label em {
  color: var(--cyan);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.vram-visual {
  position: relative;
  height: 192px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(5, 15, 25, 0.78);
}

.vram-fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(to top, rgba(27, 174, 216, 0.82), rgba(99, 230, 255, 0.25));
  box-shadow: 0 -8px 24px rgba(99, 230, 255, 0.18);
}

.vram-visual progress[value] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  appearance: none;
  background: transparent;
  accent-color: var(--cyan);
  direction: rtl;
  writing-mode: vertical-rl;
}

.vram-visual progress[value]::-webkit-progress-bar {
  background: transparent;
}

.vram-visual progress[value]::-webkit-progress-value {
  background: linear-gradient(to top, rgba(27, 174, 216, 0.82), rgba(99, 230, 255, 0.25));
  box-shadow: 0 -8px 24px rgba(99, 230, 255, 0.18);
}

.vram-visual progress[value]::-moz-progress-bar {
  background: linear-gradient(to top, rgba(27, 174, 216, 0.82), rgba(99, 230, 255, 0.25));
  box-shadow: 0 -8px 24px rgba(99, 230, 255, 0.18);
}

.vram-limit {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 8px;
  padding: 2px 5px;
  border: 1px solid var(--amber);
  border-radius: 4px;
  background: rgba(22, 21, 20, 0.84);
  color: var(--amber);
  font-size: 0.5rem;
  font-weight: 800;
}

.vram-grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: repeating-linear-gradient(to top, transparent 0 31px, rgba(255, 255, 255, 0.06) 32px);
  pointer-events: none;
}

.telemetry-list {
  margin-top: 18px;
}

.telemetry-list > div,
.rail-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(157, 196, 226, 0.09);
  font-size: 0.67rem;
}

.telemetry-list dt,
.rail-details dt {
  color: var(--dim);
}

.telemetry-list dd,
.rail-details dd {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-align: right;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(99, 230, 255, 0.3);
  background: transparent;
  color: var(--cyan);
  font-size: 0.67rem;
  font-weight: 800;
}

.text-link:hover {
  border-color: var(--cyan);
}

.event-log {
  padding: 20px;
}

.event-log .card-heading > span {
  color: var(--dim);
  font-size: 0.64rem;
}

.event-log ol {
  display: grid;
  gap: 6px;
  max-height: 220px;
  margin-top: 15px;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.event-log li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 15px;
  padding: 9px 11px;
  border: 1px solid rgba(157, 196, 226, 0.09);
  border-radius: 8px;
  background: rgba(6, 16, 27, 0.56);
  color: var(--text-soft);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
}

.event-log time {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

/* Architecture */

.architecture-map {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(150px, 0.42fr) minmax(300px, 1fr);
  gap: 20px;
  min-height: 540px;
  padding: 26px;
  overflow: hidden;
}

.arch-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.flow-column .node-icon {
  color: var(--cyan);
}

.core-column .node-icon {
  color: var(--violet);
}

.arch-column-title {
  margin-bottom: 7px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.arch-column-title > span {
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.arch-column-title h2 {
  margin-top: 3px;
  font-size: 1.6rem;
  letter-spacing: -0.035em;
}

.arch-column-title p {
  color: var(--dim);
  font-size: 0.68rem;
}

.arch-node {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 69px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(12, 27, 43, 0.76);
  text-align: left;
  transition: 180ms var(--ease);
}

.arch-node:hover,
.arch-node.is-active,
.arch-node.is-selected {
  border-color: rgba(99, 230, 255, 0.44);
  background: rgba(23, 48, 68, 0.82);
  transform: translateX(3px);
}

.arch-node .node-icon {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 850;
  place-items: center;
}

.arch-node span,
.arch-node strong,
.arch-node small {
  display: block;
  min-width: 0;
}

.arch-node strong {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.arch-node small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--dim);
  font-size: 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arch-node > b {
  color: var(--dim);
  font-size: 0.54rem;
  letter-spacing: 0.09em;
}

.accent-node {
  border-color: rgba(157, 140, 255, 0.3);
  background: linear-gradient(135deg, rgba(99, 230, 255, 0.08), rgba(157, 140, 255, 0.11));
}

.arch-boundary {
  position: relative;
  display: flex;
  padding: 17px 12px;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: linear-gradient(to bottom, transparent, rgba(99, 230, 255, 0.035), transparent);
}

.boundary-label {
  color: var(--cyan);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-align: center;
}

.tensor-stream {
  position: relative;
  width: calc(100% + 24px);
  height: 62px;
  margin: 20px -12px 16px;
}

.tensor-stream::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  content: "";
  opacity: 0.48;
}

.tensor-stream i {
  position: absolute;
  top: calc(50% - 4px);
  left: -8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 11px var(--cyan);
  animation: tensor-flow 3.2s linear infinite;
}

.tensor-stream i:nth-child(2) {
  animation-delay: -0.8s;
}

.tensor-stream i:nth-child(3) {
  animation-delay: -1.6s;
}

.tensor-stream i:nth-child(4) {
  animation-delay: -2.4s;
}

.protocol-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
}

.protocol-stack span {
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(8, 22, 35, 0.9);
  color: var(--muted);
  font-size: 0.49rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: center;
}

.boundary-note {
  width: 100%;
  margin-top: 17px;
  padding: 11px 8px;
  border: 1px solid rgba(99, 230, 255, 0.17);
  border-radius: 8px;
  background: var(--cyan-soft);
  text-align: center;
}

.boundary-note strong,
.boundary-note small {
  display: block;
}

.boundary-note strong {
  color: var(--cyan);
  font-size: 0.72rem;
}

.boundary-note small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.52rem;
  line-height: 1.45;
}

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

.core-cluster button {
  min-height: 69px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 29, 47, 0.76);
  text-align: left;
  transition: 180ms var(--ease);
}

.core-cluster button:hover,
.core-cluster button.is-active,
.core-cluster button.is-selected {
  border-color: rgba(157, 140, 255, 0.48);
  background: var(--violet-soft);
  transform: translateY(-2px);
}

.core-cluster strong,
.core-cluster small {
  display: block;
}

.core-cluster strong {
  color: var(--text-soft);
  font-size: 0.75rem;
}

.core-cluster small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 0.56rem;
}

.core-safety {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 11px 13px;
  border: 1px solid rgba(103, 237, 176, 0.26);
  border-radius: 10px;
  background: var(--mint-soft);
}

.core-safety span,
.core-safety strong {
  color: var(--mint);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.core-safety small {
  color: var(--muted);
  font-size: 0.56rem;
  text-align: right;
}

.architecture-foot-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 16px;
}

.rhythm-card,
.node-detail {
  min-height: 155px;
  padding: 20px;
}

.rhythm-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: thin;
}

.rhythm-track span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 27, 43, 0.76);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
}

.rhythm-track span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.rhythm-track span.is-active {
  border-color: rgba(99, 230, 255, 0.4);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.rhythm-track span.night {
  color: var(--violet);
}

.rhythm-track > b {
  color: var(--dim);
  font-weight: 400;
}

.node-detail h2 {
  margin-top: 5px;
  font-size: 1.1rem;
}

.node-detail p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.node-detail > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.61rem;
}

.node-detail > div strong {
  color: var(--mint);
  font-size: 0.6rem;
}

/* Business */

.business-heading {
  align-items: center;
}

.market-badge {
  display: flex;
  min-width: 210px;
  padding: 16px 18px;
  flex-direction: column;
  border: 1px dashed rgba(211, 167, 255, 0.48);
  border-radius: 14px;
  background: var(--plan-soft);
}

.market-badge span {
  color: var(--plan);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.market-badge strong {
  margin-top: 3px;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.market-badge small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.segment-card {
  min-height: 290px;
  padding: 22px;
  overflow: hidden;
  transition: 200ms var(--ease);
}

.segment-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.defense-segment {
  border-color: rgba(99, 230, 255, 0.27);
  background:
    radial-gradient(circle at 90% 0, rgba(99, 230, 255, 0.1), transparent 35%),
    var(--panel);
}

.segment-index {
  color: var(--dim);
}

.segment-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-top: 18px;
  border: 1px solid rgba(99, 230, 255, 0.24);
  border-radius: 13px;
  background: var(--cyan-soft);
  color: var(--cyan);
  place-items: center;
}

.segment-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.segment-card h2 {
  margin-top: 15px;
  font-size: 1.25rem;
}

.segment-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.62;
}

.segment-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.segment-card li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 23, 37, 0.7);
  color: var(--text-soft);
  font-size: 0.59rem;
}

.business-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.82fr);
  gap: 15px;
}

.comparison-card,
.revenue-card {
  min-height: 395px;
  padding: 22px;
}

.comparison-table {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 1fr);
  min-height: 44px;
  border-top: 1px solid rgba(157, 196, 226, 0.1);
}

.comparison-row:first-child {
  border-top: 0;
}

.comparison-row > * {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-left: 1px solid rgba(157, 196, 226, 0.08);
  color: var(--muted);
  font-size: 0.65rem;
}

.comparison-row > *:first-child {
  border-left: 0;
}

.comparison-row strong {
  color: var(--text-soft);
}

.comparison-row.header {
  background: rgba(99, 230, 255, 0.055);
}

.comparison-row.header span {
  color: var(--text-soft);
  font-size: 0.59rem;
  font-weight: 800;
}

.table-note {
  margin-top: 12px;
  color: var(--dim);
  font-size: 0.6rem;
  line-height: 1.5;
}

.revenue-curve {
  position: relative;
  height: 252px;
  margin-top: 13px;
}

.revenue-curve svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.revenue-curve .axis {
  fill: none;
  stroke: rgba(157, 196, 226, 0.18);
  stroke-width: 1;
}

.revenue-curve .curve-line {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 5px rgba(99, 230, 255, 0.45));
}

.revenue-curve .curve-area {
  opacity: 0.88;
}

.revenue-curve circle {
  fill: var(--bg-2);
  stroke: var(--cyan);
  stroke-width: 2;
}

.curve-label {
  position: absolute;
  color: var(--muted);
  font-size: 0.57rem;
  line-height: 1.42;
}

.curve-label b {
  display: block;
  color: var(--cyan);
  font-size: 0.52rem;
}

.label-appliance {
  bottom: 8px;
  left: 15%;
}

.label-plugin {
  bottom: 48px;
  left: 48%;
}

.label-global {
  top: 3px;
  right: 2%;
}

.plugin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.plugin-list span {
  padding: 5px 8px;
  border: 1px solid rgba(211, 167, 255, 0.22);
  border-radius: 999px;
  background: var(--plan-soft);
  color: var(--plan);
  font-size: 0.56rem;
}

.buying-proof {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(520px, 1.2fr);
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.buying-proof h2 {
  margin-top: 5px;
  font-size: 1.23rem;
}

.buying-proof h2 em {
  color: var(--cyan);
  font-style: normal;
}

.proof-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.proof-items span {
  display: flex;
  min-height: 56px;
  padding: 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(12, 27, 43, 0.7);
  color: var(--text-soft);
  font-size: 0.65rem;
}

.proof-items b {
  color: var(--cyan);
  font-size: 0.56rem;
}

/* Evidence and roadmap */

.evidence-summary {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 15px;
}

.evidence-score,
.evidence-legend {
  min-height: 170px;
  padding: 21px;
}

.evidence-score {
  display: flex;
  align-items: center;
  gap: 22px;
}

.score-ring {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) 0 25%, var(--mint) 25% 50%, var(--amber) 50% 75%, var(--plan) 75%);
  place-items: center;
}

.score-ring::before {
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--bg-2);
  content: "";
}

.score-ring strong,
.score-ring span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.score-ring strong {
  font-size: 2.2rem;
  line-height: 1;
}

.score-ring span {
  color: var(--dim);
  font-size: 0.58rem;
}

.evidence-score h2 {
  margin-top: 5px;
  font-size: 1.2rem;
}

.evidence-score p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.7rem;
}

.evidence-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.evidence-legend > span {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  align-content: center;
  column-gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(10, 24, 39, 0.68);
}

.evidence-legend i {
  grid-row: 1 / 3;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.legend-measured {
  color: var(--cyan);
}

.legend-verified {
  color: var(--mint);
}

.legend-target {
  color: var(--amber);
}

.legend-plan {
  color: var(--plan);
}

.evidence-legend strong,
.evidence-legend small {
  display: block;
}

.evidence-legend strong {
  color: var(--text-soft);
  font-size: 0.69rem;
}

.evidence-legend small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.56rem;
}

.operations-live {
  margin-bottom: 15px;
  padding: 22px;
  border-color: rgba(76, 221, 255, 0.22);
}

.operations-copy {
  margin-top: 8px;
  color: var(--dim);
  font-size: 0.68rem;
  line-height: 1.6;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 17px;
}

.operations-grid > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(157, 196, 226, 0.12);
  border-radius: 10px;
  background: rgba(5, 17, 29, 0.48);
}

.operations-grid dt,
.operations-grid dd,
.operations-grid small {
  display: block;
}

.operations-grid dt {
  color: var(--dim);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operations-grid dd {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-grid small {
  margin-top: 5px;
  color: var(--dim);
  font-size: 0.55rem;
  line-height: 1.45;
}

.ledger-roadmap-grid,
.evidence-bottom-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 15px;
}

.evidence-ledger,
.roadmap-card,
.budget-card,
.moat-card {
  padding: 22px;
}

.ledger-list {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.ledger-list > div {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 11px;
  border-top: 1px solid rgba(157, 196, 226, 0.1);
}

.ledger-list > div:first-child {
  border-top: 0;
}

.ledger-status {
  min-height: 23px;
  padding-inline: 7px;
  font-size: 0.58rem;
}

.ledger-list p strong,
.ledger-list p small {
  display: block;
}

.ledger-list p strong {
  color: var(--text-soft);
  font-size: 0.7rem;
}

.ledger-list p small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.57rem;
}

.ledger-list > div > b {
  color: var(--text-soft);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.roadmap {
  position: relative;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.roadmap::before {
  position: absolute;
  top: 9px;
  bottom: 17px;
  left: 35px;
  width: 1px;
  background: linear-gradient(var(--cyan), rgba(157, 140, 255, 0.18));
  content: "";
}

.roadmap li {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  min-height: 75px;
}

.roadmap li > span {
  z-index: 1;
  align-self: start;
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--dim);
  font-size: 0.56rem;
  font-weight: 800;
  text-align: center;
}

.roadmap li.is-current > span {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(99, 230, 255, 0.18);
}

.roadmap strong {
  display: block;
  color: var(--text-soft);
  font-size: 0.74rem;
}

.roadmap p {
  margin-top: 4px;
  color: var(--dim);
  font-size: 0.6rem;
  line-height: 1.45;
}

.budget-content {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
}

.budget-donut {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) 0 39.1%, var(--violet) 39.1% 50.8%, var(--amber) 50.8% 86.9%, #4ade80 86.9%);
  box-shadow: 0 0 30px rgba(99, 230, 255, 0.09);
  place-items: center;
}

.budget-donut::before {
  position: absolute;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--bg-2);
  content: "";
}

.budget-donut span {
  z-index: 1;
  text-align: center;
}

.budget-donut strong,
.budget-donut small {
  display: block;
}

.budget-donut strong {
  font-size: 1.8rem;
  line-height: 1;
}

.budget-donut small {
  color: var(--dim);
  font-size: 0.62rem;
}

.budget-legend {
  display: grid;
  gap: 7px;
}

.budget-legend > span {
  display: grid;
  grid-template-columns: 8px 78px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.61rem;
}

.budget-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.budget-a {
  background: var(--cyan);
}

.budget-b {
  background: var(--violet);
}

.budget-c {
  background: var(--amber);
}

.budget-d {
  background: #4ade80;
}

.budget-legend b {
  color: var(--text-soft);
  font-size: 0.63rem;
}

.moat-stack {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.moat-stack > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 3px 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(11, 25, 41, 0.72);
}

.moat-stack span {
  grid-row: 1 / 3;
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 850;
}

.moat-stack strong {
  color: var(--text-soft);
  font-size: 0.68rem;
}

.moat-stack small {
  color: var(--dim);
  font-size: 0.56rem;
}

/* Evidence rail */

.evidence-rail {
  z-index: 20;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 24px 20px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(to bottom, rgba(99, 230, 255, 0.035), transparent 22%),
    rgba(6, 15, 26, 0.78);
  backdrop-filter: blur(18px);
}

.rail-heading h2 {
  margin-top: 4px;
  font-size: 1.25rem;
}

.rail-seal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 21px;
  padding: 13px;
  border: 1px solid rgba(244, 197, 107, 0.28);
  border-radius: 12px;
  background: var(--amber-soft);
}

.rail-seal[data-state="verified"] {
  border-color: rgba(103, 237, 176, 0.34);
  background: var(--mint-soft);
}

.rail-seal[data-state="verified"] svg,
.rail-seal[data-state="verified"] strong {
  color: var(--mint);
  stroke: var(--mint);
}

.rail-seal[data-state="verified"] .seal-check {
  display: block;
}

.rail-seal[data-state="verified"] .seal-stop {
  display: none;
}

.rail-seal[data-state="starting"],
.rail-seal[data-state="running"],
.rail-seal[data-state="cancelling"] {
  border-color: rgba(99, 230, 255, 0.34);
  background: var(--cyan-soft);
}

.rail-seal[data-state="starting"] svg,
.rail-seal[data-state="running"] svg,
.rail-seal[data-state="cancelling"] svg {
  stroke: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(99, 230, 255, 0.34));
}

.rail-seal[data-state="starting"] .seal-check,
.rail-seal[data-state="running"] .seal-check,
.rail-seal[data-state="cancelling"] .seal-check {
  opacity: 0;
}

.rail-seal[data-state="starting"] .seal-stop,
.rail-seal[data-state="running"] .seal-stop,
.rail-seal[data-state="cancelling"] .seal-stop {
  display: none;
}

.rail-seal[data-state="starting"] circle,
.rail-seal[data-state="running"] circle,
.rail-seal[data-state="cancelling"] circle {
  transform-origin: center;
  stroke-dasharray: 54 173;
  animation: rail-seal-spin 1.15s linear infinite;
}

.rail-seal[data-state="starting"] strong,
.rail-seal[data-state="running"] strong,
.rail-seal[data-state="cancelling"] strong {
  color: var(--cyan);
}

.rail-seal[data-state="failed"] {
  border-color: rgba(255, 139, 152, 0.34);
  background: var(--danger-soft);
}

.rail-seal[data-state="failed"] svg,
.rail-seal[data-state="failed"] strong {
  color: var(--danger);
  stroke: var(--danger);
}

.rail-seal[data-state="failed"] .seal-check {
  display: none;
}

.rail-seal[data-state="failed"] .seal-stop {
  display: none;
}

.rail-seal[data-state="failed"] .seal-fail {
  display: block;
}

.rail-seal[data-state="cancelled"] {
  border-color: rgba(244, 197, 107, 0.34);
  background: var(--amber-soft);
}

.rail-seal[data-state="cancelled"] svg,
.rail-seal[data-state="cancelled"] strong {
  color: var(--amber);
  stroke: var(--amber);
}

.rail-seal[data-state="cancelled"] .seal-check {
  display: none;
}

.rail-seal[data-state="cancelled"] .seal-stop {
  display: block;
}

.rail-seal svg {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(244, 197, 107, 0.28));
}

.rail-seal .seal-check,
.rail-seal .seal-fail {
  display: none;
}

.rail-seal .seal-stop {
  display: block;
}

.rail-seal strong,
.rail-seal small {
  display: block;
}

.rail-seal strong {
  color: var(--amber);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.rail-seal small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.58rem;
}

.rail-details {
  margin-top: 17px;
}

.rail-divider {
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.rail-proof + .rail-proof {
  margin-top: 18px;
}

.rail-proof span,
.rail-proof strong,
.rail-proof small {
  display: block;
}

.rail-proof span {
  color: var(--dim);
  font-size: 0.58rem;
  font-weight: 750;
}

.rail-proof strong {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.73rem;
}

.rail-proof small {
  margin-top: 5px;
  color: var(--dim);
  font-size: 0.58rem;
  line-height: 1.52;
}

.rail-button {
  width: 100%;
  margin-top: 22px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 37, 55, 0.78);
  color: var(--text-soft);
}

.rail-button:hover {
  border-color: rgba(99, 230, 255, 0.45);
  background: var(--cyan-soft);
  color: var(--cyan);
  transform: translateY(-1px);
}

.rail-button span {
  margin-left: auto;
}

/* Tour, toast, shutdown */

.tour-panel {
  position: fixed;
  z-index: 100;
  right: 28px;
  bottom: 28px;
  width: min(520px, calc(100vw - 32px));
  padding: 25px;
  overflow: hidden;
  border: 1px solid rgba(99, 230, 255, 0.38);
  border-radius: 18px;
  background: rgba(8, 20, 34, 0.97);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(26px);
  animation: panel-enter 300ms var(--ease) both;
}

.tour-progress {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgba(99, 230, 255, 0.08);
}

.tour-progress progress[value] {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  appearance: none;
  background: transparent;
  accent-color: var(--cyan);
}

.tour-progress progress[value]::-webkit-progress-bar {
  background: rgba(99, 230, 255, 0.08);
}

.tour-progress progress[value]::-webkit-progress-value {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 10px var(--cyan);
  transition: width 400ms var(--ease);
}

.tour-progress progress[value]::-moz-progress-bar {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 10px var(--cyan);
}

.tour-count {
  color: var(--dim);
}

.tour-panel h2 {
  margin-top: 6px;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.tour-panel p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.62;
}

.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.tour-actions button {
  min-height: 40px;
  padding: 8px 13px;
}

.toast {
  position: fixed;
  z-index: 120;
  bottom: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(520px, calc(100vw - 32px));
  min-height: 46px;
  padding: 10px 16px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(8, 20, 34, 0.96);
  box-shadow: var(--shadow);
  color: var(--text-soft);
  font-size: 0.75rem;
  animation: toast-enter 240ms var(--ease) both;
}

.toast i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.toast.is-error i,
.toast.error i,
.toast[data-tone="error"] i {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}

.toast[data-tone="warning"] i {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.toast[data-tone="success"] i {
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.shutdown-screen {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(41, 128, 161, 0.14), transparent 32%),
    #040b14;
  place-items: center;
  text-align: center;
}

.shutdown-screen > div {
  animation: panel-enter 450ms var(--ease) both;
}

.brand-mark.large {
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
}

.shutdown-screen h1 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.shutdown-screen p {
  margin-top: 8px;
  color: var(--muted);
}

/* Motion */

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit-spin-reverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes tensor-flow {
  0% {
    opacity: 0;
    transform: translateX(0) rotate(45deg);
  }
  12%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(180px) rotate(405deg);
  }
}

@keyframes status-pulse {
  50% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

@keyframes wave-pulse {
  50% {
    opacity: 0.55;
    stroke-width: 3.2;
  }
}

@keyframes rail-seal-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 1366×768 and compact desktop */

@media (min-width: 1560px) {
  :root {
    --sidebar: 194px;
    --rail: 310px;
  }

  .topbar {
    grid-template-columns: var(--sidebar) minmax(420px, 1fr) auto;
  }

  .brand-copy {
    display: block;
  }

  .nav-item {
    min-height: 48px;
    padding: 9px 12px;
    justify-content: flex-start;
    gap: 11px;
  }

  .nav-item span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    color: inherit;
    font-size: 0.7rem;
    font-weight: 750;
    white-space: normal;
  }
}

@media (max-width: 1480px) {
  :root {
    --sidebar: 84px;
    --rail: 244px;
  }

  .main-stage {
    padding: 22px 20px 52px;
  }

  .evidence-rail {
    padding: 20px 16px;
  }

  .hero-card,
  .proof-orbit {
    min-height: 350px;
  }

  .hero-card {
    padding: 31px;
  }

  .trust-row {
    right: 28px;
    left: 28px;
  }

  .metric-card {
    padding: 15px;
  }

  .story-rail {
    grid-template-columns: 190px minmax(390px, 1.6fr) minmax(215px, 0.8fr);
    gap: 14px;
    padding: 17px;
  }

  .story-step {
    padding: 9px;
  }

  .inference-layout {
    grid-template-columns: minmax(215px, 0.78fr) minmax(360px, 1.35fr) minmax(200px, 0.7fr);
    gap: 12px;
  }

  .pipeline-card,
  .reactor-card,
  .telemetry-card {
    min-height: 520px;
    padding: 16px;
  }

  .reactor {
    min-height: 390px;
  }

  .architecture-map {
    gap: 14px;
    padding: 20px;
  }

  .business-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  }
}

@media (min-width: 1181px) and (max-width: 1559px) {
  :root {
    --sidebar: 172px;
  }

  .brand {
    gap: 8px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy {
    display: block;
  }

  .brand-copy small {
    font-size: 0.44rem;
    letter-spacing: 0.075em;
  }

  .nav-item {
    min-height: 48px;
    padding: 9px 11px;
    justify-content: flex-start;
    gap: 10px;
  }

  .nav-item span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    color: inherit;
    font-size: 0.68rem;
    font-weight: 750;
    white-space: normal;
  }
}

@media (min-width: 1181px) and (max-height: 820px) {
  :root {
    --topbar: 64px;
  }

  .main-stage {
    padding: 12px 18px 28px;
  }

  .view > * + * {
    margin-top: 12px;
  }

  .hero-card,
  .proof-orbit {
    min-height: 300px;
  }

  .hero-card {
    padding: 22px 24px;
  }

  .hero-card h1 {
    margin-top: 12px;
    font-size: clamp(2rem, 2.6vw, 2.35rem);
  }

  .hero-lead {
    margin-top: 10px;
    font-size: 0.79rem;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .hero-actions .primary-button {
    min-height: 42px;
  }

  .trust-row {
    right: 24px;
    bottom: 12px;
    left: 24px;
    padding-top: 9px;
    font-size: 0.62rem;
  }

  .proof-orbit {
    padding: 17px;
  }

  .orbit-visual {
    height: 162px;
    margin-bottom: -3px;
    transform: scale(0.72);
    transform-origin: center;
  }

  .hardware-row div {
    padding: 7px 9px;
  }

  .hardware-row strong {
    font-size: 0.64rem;
  }

  .metric-card {
    min-height: 126px;
    padding: 12px;
  }

  .metric-value {
    margin-top: 8px;
  }

  .metric-value b {
    font-size: 1.72rem;
  }

  .meter,
  .threshold-line {
    margin-top: 10px;
  }

  .metric-foot {
    margin-top: 9px;
  }

  .story-rail {
    padding: 13px;
  }

  .story-step {
    min-height: 82px;
  }

  .assistant-heading {
    margin-bottom: 13px;
  }

  .assistant-heading h1 {
    font-size: 2.45rem;
  }

  .assistant-heading p {
    margin-top: 7px;
    font-size: 0.72rem;
  }

  .chat-workspace {
    min-height: 590px;
  }

  .chat-transcript {
    max-height: 385px;
  }

  .chat-composer textarea {
    min-height: 54px;
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 80px;
  }

  .app-shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }

  .evidence-rail {
    display: none;
  }

  .topbar {
    grid-template-columns: var(--sidebar) minmax(360px, 1fr) auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  }

  .story-rail {
    grid-template-columns: 190px 1fr;
  }

  .story-detail {
    grid-column: 1 / -1;
    min-height: 72px;
  }

  .inference-layout {
    grid-template-columns: minmax(240px, 0.78fr) minmax(430px, 1.4fr);
  }

  .telemetry-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 22px;
    min-height: 275px;
  }

  .telemetry-card .card-heading {
    grid-column: 1 / -1;
  }

  .telemetry-card .telemetry-block {
    margin-top: 0;
  }

  .vram-visual {
    height: 170px;
  }

  .architecture-map {
    grid-template-columns: 1fr 155px 1fr;
  }

  .buying-proof {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar: 64px;
  }

  body {
    overflow: hidden;
  }

  .app-shell {
    grid-template:
      var(--topbar) minmax(0, 1fr) 70px
      / minmax(0, 1fr);
  }

  .topbar {
    grid-column: 1;
    grid-template-columns: 70px minmax(0, 1fr) auto;
  }

  .brand {
    justify-content: center;
    padding: 0 12px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .topbar-status {
    padding-left: 12px;
  }

  .status-pill:not(.status-local):not(.status-runtime) {
    display: none;
  }

  .sidebar {
    grid-row: 3;
    grid-column: 1;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .primary-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
    height: 100%;
    padding: 6px 8px;
  }

  .nav-item {
    min-width: 0;
    min-height: 56px;
    padding: 4px;
    flex-direction: column;
    gap: 2px;
  }

  .nav-item::before {
    top: auto;
    right: 24%;
    bottom: -7px;
    left: 24%;
    width: auto;
    height: 3px;
    border-radius: 4px 4px 0 0;
    transform: scaleX(0.4);
  }

  .nav-item.is-active::before,
  .nav-item[aria-current="page"]::before {
    transform: scaleX(1);
  }

  .nav-item svg {
    width: 19px;
    height: 19px;
  }

  .nav-item span {
    position: static;
    width: auto;
    height: auto;
    max-width: 100%;
    overflow: hidden;
    clip: auto;
    clip-path: none;
    font-size: 0.53rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-foot {
    display: none;
  }

  .main-stage {
    grid-row: 2;
    grid-column: 1;
    padding: 20px 18px 46px;
  }

  .view-heading {
    min-height: 0;
    align-items: flex-start;
  }

  .hero-grid,
  .assistant-layout,
  .business-grid,
  .ledger-roadmap-grid,
  .evidence-bottom-grid {
    grid-template-columns: 1fr;
  }

  .assistant-heading {
    align-items: flex-start;
  }

  .assistant-heading h1 {
    font-size: clamp(2.15rem, 7vw, 3.2rem);
  }

  .agent-heading-state {
    display: none;
  }

  .chat-workspace {
    min-height: 620px;
  }

  .agent-side-stack {
    grid-template-columns: 1fr 1fr;
  }

  .agent-runtime-card {
    grid-row: span 2;
  }

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

  .story-rail {
    grid-template-columns: 1fr;
  }

  .story-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-detail {
    grid-column: auto;
  }

  .inference-layout {
    grid-template-columns: 1fr;
  }

  .pipeline-card,
  .reactor-card,
  .telemetry-card {
    min-height: auto;
  }

  .telemetry-card {
    grid-column: auto;
    display: block;
  }

  .telemetry-card .telemetry-block {
    margin-top: 22px;
  }

  .architecture-map {
    grid-template-columns: 1fr;
  }

  .arch-boundary {
    min-height: 220px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .tensor-stream {
    width: min(100%, 380px);
  }

  .architecture-foot-grid,
  .evidence-summary {
    grid-template-columns: 1fr;
  }

  .comparison-card {
    overflow-x: auto;
  }

  .comparison-table {
    min-width: 660px;
  }

  .buying-proof {
    grid-template-columns: 1fr;
  }

  .tour-panel {
    right: 16px;
    bottom: 86px;
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }

  .topbar-status {
    gap: 5px;
    padding-left: 7px;
  }

  .status-pill {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 0.57rem;
  }

  .status-runtime {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
    padding-right: 8px;
  }

  .icon-button.text-button {
    min-width: 38px;
    padding: 0;
  }

  .icon-button.text-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .main-stage {
    padding: 16px 12px 38px;
  }

  .assistant-heading h1 {
    font-size: 2.05rem;
  }

  .assistant-heading p {
    font-size: 0.74rem;
  }

  .chat-workspace {
    min-height: 570px;
    padding: 14px;
  }

  .chat-toolbar,
  .composer-foot {
    align-items: stretch;
  }

  .micro-button,
  .agent-quick-prompts button,
  .agent-mode-switch button {
    min-height: 40px;
  }

  .chat-transcript {
    min-height: 280px;
  }

  .agent-side-stack {
    grid-template-columns: 1fr;
  }

  .agent-runtime-card {
    grid-row: auto;
  }

  .agent-quick-prompts button:nth-child(n + 3) {
    display: none;
  }

  .view-heading {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .view-heading h1 {
    font-size: 1.9rem;
  }

  .view-actions {
    width: 100%;
  }

  .view-actions > * {
    flex: 1;
  }

  .hero-grid,
  .metric-grid,
  .segment-grid,
  .evidence-legend {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 470px;
    padding: 26px 21px;
  }

  .hero-card h1 {
    font-size: clamp(2rem, 10.5vw, 3rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions > * {
    width: 100%;
  }

  .trust-row {
    right: 21px;
    bottom: 20px;
    left: 21px;
  }

  .proof-orbit {
    min-height: 370px;
  }

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

  .story-steps {
    grid-template-columns: 1fr;
  }

  .scenario-buttons {
    grid-template-columns: 1fr;
  }

  .reactor {
    min-height: 350px;
  }

  .reactor-chip {
    min-width: 65px;
    padding: 6px 8px;
  }

  .chip-left {
    left: 2%;
  }

  .chip-right {
    right: 2%;
  }

  .architecture-map {
    padding: 14px;
  }

  .core-cluster {
    grid-template-columns: 1fr;
  }

  .architecture-foot-grid {
    grid-template-columns: 1fr;
  }

  .business-heading {
    align-items: stretch;
  }

  .market-badge {
    width: 100%;
  }

  .proof-items {
    grid-template-columns: 1fr;
  }

  .evidence-score {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-list > div {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .ledger-list > div > b {
    grid-column: 2;
  }

  .budget-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .budget-donut {
    margin-inline: auto;
  }

  .tour-panel {
    right: 8px;
    bottom: 78px;
    width: calc(100vw - 16px);
    padding: 20px;
  }

  .tour-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
  }

  .tour-actions button {
    padding-inline: 8px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  :root {
    --topbar: 64px;
  }

  .main-stage {
    padding-top: 18px;
  }

  .hero-card,
  .proof-orbit {
    min-height: 330px;
  }

  .hero-card {
    padding-top: 27px;
  }

  .orbit-visual {
    height: 211px;
    transform: scale(0.92);
  }

  .metric-card {
    min-height: 150px;
  }

  .pipeline-card,
  .reactor-card,
  .telemetry-card {
    min-height: 480px;
  }

  .reactor {
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .surface,
  .status-pill,
  .nav-item,
  .primary-button,
  .secondary-button,
  .evidence-badge,
  .ledger-status {
    border: 1px solid CanvasText;
  }

}

/* ==========================================================================
   AJOO 3D CAD ENGINE, COGNI-FLOW PIPELINE & VOICE CONTROLLER STYLES
   ========================================================================== */

/* Voice Controls in Composer & Header */
.composer-foot-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.voice-mic-button {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-mic-button:hover:not(:disabled) {
  background: rgba(93, 230, 255, 0.15);
  border-color: var(--cyan);
  transform: scale(1.05);
}

.voice-mic-button.is-listening {
  background: rgba(255, 75, 110, 0.25);
  border-color: #ff4b6e;
  color: #ff4b6e;
  animation: mic-pulse 1.2s ease-in-out infinite;
}

@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 75, 110, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 75, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 75, 110, 0); }
}

.voice-tts-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}

.voice-tts-toggle-wrap input[type="checkbox"] {
  accent-color: var(--cyan);
  cursor: pointer;
}

.voice-wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}

.voice-wave-bars i {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--cyan);
  border-radius: 1px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.voice-tts-toggle-wrap.is-speaking .voice-wave-bars i:nth-child(1) {
  animation: wave-bar-anim 0.6s ease-in-out infinite alternate;
}
.voice-tts-toggle-wrap.is-speaking .voice-wave-bars i:nth-child(2) {
  animation: wave-bar-anim 0.8s ease-in-out infinite alternate 0.2s;
}
.voice-tts-toggle-wrap.is-speaking .voice-wave-bars i:nth-child(3) {
  animation: wave-bar-anim 0.5s ease-in-out infinite alternate 0.4s;
}

@keyframes wave-bar-anim {
  0% { height: 4px; opacity: 0.4; }
  100% { height: 14px; opacity: 1; }
}

/* 3D Drawing Layout */
.drawing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .drawing-layout {
    grid-template-columns: 1fr;
  }
}

.drawing-stage-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}

.viewport-presets {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.preset-btn {
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.preset-btn.is-active {
  background: var(--cyan);
  color: #07111f;
  box-shadow: 0 0 10px rgba(93, 230, 255, 0.3);
}

.drawing-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 460px;
  background: radial-gradient(circle at center, #0c1c33 0%, #050b14 100%);
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  outline: none;
}

.drawing-canvas-wrapper:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(93, 230, 255, 0.25);
}

#drawing-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#drawing-canvas:active {
  cursor: grabbing;
}

.viewport-overlay-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.section-cut-bar {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(7, 17, 31, 0.85);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  z-index: 5;
}

.section-cut-bar input[type="range"] {
  accent-color: var(--cyan);
  cursor: pointer;
}

.canvas-watermark {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: monospace;
  pointer-events: none;
  z-index: 4;
}

.model-selector-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .model-selector-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.model-card-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.model-card-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(93, 230, 255, 0.05);
}

.model-card-btn.is-active {
  border-color: var(--cyan);
  background: rgba(93, 230, 255, 0.12);
  box-shadow: 0 0 12px rgba(93, 230, 255, 0.15);
}

.model-card-btn strong {
  font-size: 0.84rem;
  color: var(--text-main);
}

.model-card-btn small {
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-top: 2px;
}

.drawing-inspection-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inspection-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.8rem;
}

.inspection-specs div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.inspection-specs dt {
  color: var(--text-soft);
}

.inspection-specs dd {
  font-weight: 600;
  color: var(--text-main);
}

.security-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-block: 14px;
  font-size: 0.78rem;
}

.security-checklist div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Cogni-Flow Pipeline Layout - Fullscreen, Inline Title & Compact Vertical Layout */
#view-flow {
  width: 100%;
  max-width: none;
}

#view-flow .view-heading {
  min-height: auto;
  margin-bottom: 8px;
  gap: 16px;
  align-items: center;
}

#view-flow .view-heading h1 {
  font-size: 1.35rem;
  font-weight: 750;
  margin: 2px 0;
  line-height: 1.25;
  white-space: normal;
}

#view-flow .view-heading p {
  font-size: 0.78rem;
  margin-top: 2px;
  line-height: 1.3;
  color: var(--text-soft);
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  margin-top: 6px;
  width: 100%;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .flow-layout {
    grid-template-columns: 1fr;
  }
}

.flow-canvas-card {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
}

.flow-canvas-card .card-heading.compact {
  margin-bottom: 0;
  padding-bottom: 0;
}

.flow-canvas-stage {
  position: relative;
  width: 100%;
  min-height: 300px;
  height: calc(100vh - 280px);
  max-height: calc(100vh - 270px);
  background: radial-gradient(circle at center, #091526 0%, #040912 100%);
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.flow-connections-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.flow-nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px;
  box-sizing: border-box;
}

.flow-node {
  width: clamp(140px, 11vw, 185px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.flow-node:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.flow-node.is-selected {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(93, 230, 255, 0.3);
}

.flow-node.is-running {
  border-color: #5de6ff;
  box-shadow: 0 0 20px rgba(93, 230, 255, 0.6);
  animation: node-glow 1s ease-in-out infinite alternate;
}

.flow-node.is-succeeded {
  border-color: var(--mint);
  box-shadow: 0 0 10px rgba(78, 217, 180, 0.3);
}

.flow-node.is-failed {
  border-color: var(--danger);
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

@keyframes node-glow {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

.flow-node-step {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

.flow-node-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.flow-node-status {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  align-self: flex-start;
}

.flow-presets-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-soft);
  flex-wrap: wrap;
  margin-top: 2px;
}

.flow-presets-bar .micro-button {
  padding: 4px 10px;
  font-size: 0.74rem;
}

.flow-side-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.node-inspector-card {
  flex-shrink: 0;
  padding: 12px 16px;
}

.node-inspector-card .card-heading.compact {
  margin-bottom: 0;
}

.flow-log-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
}

.flow-log-card .card-heading.compact {
  margin-bottom: 0;
}

.node-inspector-content {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.node-inspector-content strong {
  font-size: 0.88rem;
  color: var(--text-main);
}

.node-inspector-content p {
  font-size: 0.76rem;
  color: var(--text-soft);
  line-height: 1.4;
}

.node-params {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.74rem;
}

.node-params div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.flow-log-stream {
  flex: 1;
  height: 100%;
  min-height: 140px;
  max-height: calc(100vh - 470px);
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding-right: 4px;
}

.log-line {
  color: var(--text-soft);
  line-height: 1.4;
}

.log-line span {
  color: var(--muted);
  margin-right: 6px;
}

.icon-sm {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* ==========================================================================
   ISO 10816 MULTI-MODAL AI PHM ENGINE STYLES (2_Multy_260731)
   ========================================================================== */

.pdm-patent-pipeline-card {
  margin-top: 16px;
  padding: 20px;
  background: var(--surface-1);
}

.patent-pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.patent-step {
  flex: 1;
  min-width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-num {
  font-size: 0.7rem;
  color: var(--cyan);
  font-family: monospace;
  font-weight: 700;
}

.patent-step strong {
  font-size: 0.84rem;
  color: var(--text-main);
}

.patent-step small {
  font-size: 0.72rem;
  color: var(--text-soft);
}

.patent-arrow {
  color: var(--cyan);
  font-weight: 900;
  font-size: 1.2rem;
}

.pdm-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 1100px) {
  .pdm-main-grid {
    grid-template-columns: 1fr;
  }
}

.pdm-left-stack, .pdm-right-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdm-kinetic-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface-1);
}

.phm-sim-mode-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.kinetic-canvas-wrap {
  position: relative;
  width: 100%;
  background: #040914;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
}

#phm-kinetic-canvas {
  display: block;
  width: 100%;
  height: 240px;
}

.phm-metrics-strip {
  display: flex;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 12px 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 12px;
}

.phm-metrics-strip div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.phm-metrics-strip span {
  color: var(--text-soft);
}

.phm-metrics-strip strong {
  font-size: 1.05rem;
  font-family: monospace;
  color: var(--text-main);
}

.pdm-signals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .pdm-signals-grid {
    grid-template-columns: 1fr;
  }
}

.pdm-signal-card {
  padding: 16px;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signal-canvas-wrap {
  width: 100%;
  background: #040914;
  border-radius: 6px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.signal-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 150px;
}

.pdm-fft-card canvas {
  height: 170px;
}

.pdm-ai-diag-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface-1);
}

.phm-ae-rul-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.phm-score-box, .phm-rul-box {
  background: var(--bg-card);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
}

.phm-score-box strong {
  font-size: 1.2rem;
  color: #ff4b6e;
  font-family: monospace;
}

.phm-rul-box strong {
  font-size: 1.2rem;
  color: var(--cyan);
  font-family: monospace;
}

.fault-prob-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.78rem;
  margin-top: 4px;
}

.fault-prob-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fault-prob-item span {
  min-width: 130px;
  color: var(--text-soft);
}

.fault-bar {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}

.fault-prob-item strong {
  font-family: monospace;
  min-width: 45px;
  text-align: right;
}

.phm-bar-bent { width: 91.5%; background: #ff4b6e; }
.phm-bar-unbal { width: 4.2%; background: #ffd166; }
.phm-bar-bear { width: 3.4%; background: #5de6ff; }

.pdm-history-log-card {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface-1);
}

.pdm-log-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

.pdm-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.pdm-log-table th {
  background: var(--surface-2);
  color: var(--text-soft);
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.pdm-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-main);
  font-family: monospace;
}

.text-danger { color: #ff4b6e; }
.text-warning { color: #ffd166; }
.text-success { color: #5de6ff; }

/* ==========================================================================
   UNREAL ENGINE DIGITAL TWIN & PREDICTIVE MAINTENANCE STYLES
   ========================================================================== */

.unreal-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .unreal-layout {
    grid-template-columns: 1fr;
  }
}

.unreal-viewport-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  background: var(--surface-1);
  width: 100%;
  box-sizing: border-box;
}

.unreal-canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 680px;
  height: calc(100vh - 330px);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #060c18;
}

#unreal-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 680px;
}

#unreal-stream-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.unreal-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 16px;
}

.hud-top-bar {
  display: flex;
  gap: 10px;
}

.hud-badge {
  font-size: 0.72rem;
  font-family: monospace;
  background: rgba(6, 12, 24, 0.75);
  color: var(--cyan);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(93, 230, 255, 0.3);
  backdrop-filter: blur(4px);
}

.hud-bot-bar {
  font-size: 0.76rem;
  color: var(--text-soft);
  background: rgba(6, 12, 24, 0.75);
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
  border: 1px solid var(--line);
}

.unreal-camera-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.unreal-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sensor-gauges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

/* ==========================================================================
   EPIC GAMES LAUNCHER / UNREAL ENGINE TELEMETRY DASHBOARD STYLE
   ========================================================================== */

.epic-launcher-style {
  background: rgba(18, 22, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.epic-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.epic-status-pill {
  font-size: 0.7rem;
  font-family: monospace;
  background: rgba(93, 230, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(93, 230, 255, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
}

.epic-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-soft);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.epic-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.epic-progress-container {
  background: rgba(10, 14, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.epic-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.epic-proj-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.epic-app-icon {
  font-size: 1.1rem;
  background: rgba(93, 230, 255, 0.15);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.epic-proj-info div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.epic-proj-info strong {
  font-size: 0.82rem;
  color: var(--text-main);
}

.epic-proj-info small {
  font-size: 0.72rem;
  color: var(--text-soft);
}

.epic-progress-percent {
  font-size: 0.85rem;
  font-family: monospace;
  font-weight: 700;
  color: var(--cyan);
}

.epic-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.epic-progress-fill {
  height: 100%;
  width: 84.2%;
  background: linear-gradient(90deg, #4ed9f8 0%, #8c7cff 100%);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(78, 217, 248, 0.5);
  transition: width 0.4s ease;
}

.epic-grid {
  gap: 14px;
  margin-top: 14px;
}

.epic-sensor-card {
  background: rgba(10, 14, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.epic-sensor-card:hover {
  border-color: rgba(93, 230, 255, 0.3);
  transform: translateY(-2px);
}

.epic-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
}

.epic-card-top span {
  color: var(--text-soft);
  font-weight: 600;
}

.epic-card-top small {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.epic-card-top small.danger {
  background: rgba(255, 75, 110, 0.18);
  color: #ff4b6e;
}

.epic-card-top small.warning {
  background: rgba(255, 209, 102, 0.18);
  color: #ffd166;
}

.epic-card-top small.positive {
  background: rgba(93, 230, 255, 0.18);
  color: #5de6ff;
}

.sparkline-wrap {
  width: 100%;
  height: 36px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  overflow: hidden;
}

.sparkline-wrap canvas {
  display: block;
  width: 100%;
  height: 36px;
}

.sensor-card {
  background: var(--bg-card);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
}

.sensor-card strong {
  font-size: 1.05rem;
  color: var(--text-main);
  font-family: monospace;
}

.sensor-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.sensor-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.bar-vib-fill { width: 82%; background: #ff4b6e; }
.bar-temp-fill { width: 78%; background: #ffd166; }
.bar-hum-fill { width: 98%; background: #4ed9f8; }
.bar-torque-fill { width: 65%; background: #5de6ff; }

.pdm-alert-box {
  margin-top: 12px;
  background: rgba(255, 75, 110, 0.08);
  border: 1px solid rgba(255, 75, 110, 0.3);
  padding: 14px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.78rem;
}

.pdm-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ff4b6e;
}

.time-left {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 75, 110, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.pdm-action-box {
  background: var(--bg-card);
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--cyan);
  border: 1px solid var(--line);
  font-size: 0.74rem;
}

.gemini-report-btn {
  margin-top: 8px;
}

/* ==========================================================================
   ELECTRONIC TAX INVOICE AGENT STYLES
   ========================================================================== */

.taxinvoice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .taxinvoice-layout {
    grid-template-columns: 1fr;
  }
}

.tax-sheet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
  background: var(--surface-1);
}

.tax-sheet-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
  flex-wrap: wrap;
  gap: 10px;
}

.tax-nts-approval {
  display: flex;
  flex-direction: column;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.tax-nts-approval strong {
  font-size: 0.95rem;
  color: var(--cyan);
  font-family: monospace;
  letter-spacing: 0.05em;
}

.tax-sheet-type-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff4b6e;
  background: rgba(255, 75, 110, 0.12);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 75, 110, 0.3);
}

.tax-party-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .tax-party-grid {
    grid-template-columns: 1fr;
  }
}

.tax-party-box {
  padding: 14px;
  border-radius: 8px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.party-supplier {
  border: 1.5px solid rgba(255, 75, 110, 0.5);
  box-shadow: inset 0 0 12px rgba(255, 75, 110, 0.05);
}

.party-buyer {
  border: 1.5px solid rgba(93, 230, 255, 0.5);
  box-shadow: inset 0 0 12px rgba(93, 230, 255, 0.05);
}

.party-tag {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  align-self: flex-start;
}

.party-supplier .party-tag {
  background: rgba(255, 75, 110, 0.2);
  color: #ff4b6e;
}

.party-buyer .party-tag {
  background: rgba(93, 230, 255, 0.2);
  color: #5de6ff;
}

.party-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
}

.party-fields div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 4px;
}

.party-fields dt {
  color: var(--text-soft);
  min-width: 80px;
}

.party-fields dd {
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
}

.buyer-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.buyer-selector-wrap select,
.tax-items-table select {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-main);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  outline: none;
  cursor: pointer;
}

.tax-items-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.tax-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.tax-items-table th {
  background: var(--surface-2);
  color: var(--text-soft);
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.tax-items-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text-main);
}

.tax-input-sm {
  width: 100px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-main);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.76rem;
}

.tax-input-num {
  width: 100px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-main);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.76rem;
  text-align: right;
}

.tax-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

.tax-grand-total {
  font-size: 0.95rem;
  color: var(--cyan);
}

.tax-seal-overlay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: monospace;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.seal-mark {
  border: 1px solid rgba(255, 75, 110, 0.4);
  color: #ff4b6e;
  padding: 4px 8px;
  border-radius: 50%;
  font-size: 0.65rem;
  text-align: center;
  font-family: sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

.tax-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tax-log-stream {
  height: 180px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.tax-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.78rem;
}

.history-item strong {
  display: block;
  color: var(--text-main);
}

.history-item small {
  color: var(--text-soft);
}

.history-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.history-amount b {
  color: var(--cyan);
}

/* ==========================================================================
   GOOGLE STITCH INDUSTRIAL AI PREDICTIVE DESIGN SYSTEM TOKENS & UTILITIES
   ========================================================================== */

.stitch-container {
  background: #121212;
  color: #e5e2e1;
  font-family: 'Inter', system-ui, sans-serif;
}

.stitch-card {
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stitch-card:hover {
  border-color: #424754;
}

.stitch-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stitch-status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
  animation: stitchPulse 1.5s infinite;
}

@keyframes stitchPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.status-glow-error {
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.3);
  border-color: rgba(244, 63, 94, 0.4);
}

.status-glow-primary {
  box-shadow: 0 0 18px rgba(77, 142, 255, 0.3);
  border-color: rgba(77, 142, 255, 0.4);
}

.status-glow-warning {
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.4);
}

.stitch-radial-gauge {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stitch-radial-gauge svg {
  transform: rotate(-90deg);
}

.stitch-radial-bg {
  stroke: #2a2a2a;
}

.stitch-radial-fill {
  stroke: #f43f5e;
  stroke-dasharray: 283;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset 1s ease;
}

.stitch-radial-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stitch-radial-text strong {
  font-size: 1.1rem;
  font-family: monospace;
  color: #ffb4ab;
}

.stitch-radial-text small {
  font-size: 0.68rem;
  color: #8c909f;
}

/* ==========================================================================
   STITCH ANALYTICAL REPORT HERO BANNER & TREND CARD STYLES (refined_2)
   ========================================================================== */

.stitch-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 14px;
  padding: 24px;
  margin-top: 14px;
  gap: 20px;
  flex-wrap: wrap;
}

.stitch-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stitch-tag-text {
  font-size: 0.72rem;
  font-family: monospace;
  font-weight: 700;
  color: #adc6ff;
  letter-spacing: 0.08em;
}

.stitch-hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #e5e2e1;
  margin: 0;
  letter-spacing: -0.02em;
}

.stitch-hero-sub {
  font-size: 0.84rem;
  color: #8c909f;
  margin-top: 4px;
}

.stitch-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stitch-health-card {
  background: #181818;
  border: 1px solid #2d2d2d;
  padding: 10px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stitch-health-info {
  display: flex;
  flex-direction: column;
}

.stitch-health-info span {
  font-size: 0.68rem;
  color: #8c909f;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.stitch-health-info strong {
  font-size: 1.5rem;
  font-family: monospace;
  color: #adc6ff;
}

.stitch-health-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(77, 142, 255, 0.15);
  color: #4d8eff;
  border: 1px solid rgba(77, 142, 255, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
}

.stitch-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stitch-trend-card {
  margin-top: 18px;
  padding: 20px;
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 14px;
}

.stitch-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-primary { background: #4d8eff; box-shadow: 0 0 8px #4d8eff; }
.dot-gray { background: #424754; }

.stitch-legend small {
  font-size: 0.76rem;
  color: #8c909f;
}

.stitch-trend-canvas-wrap {
  position: relative;
  width: 100%;
  background: #121212;
  border-radius: 10px;
  border: 1px solid #2d2d2d;
  overflow: hidden;
  margin-top: 12px;
}

#phm-trend-canvas {
  display: block;
  width: 100%;
  height: 180px;
}

.stitch-trend-metrics {
  display: flex;
  gap: 24px;
  background: rgba(20, 20, 20, 0.85);
  border-top: 1px solid #2d2d2d;
  padding: 10px 16px;
  font-size: 0.78rem;
}

.stitch-trend-metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stitch-trend-metrics span {
  font-size: 0.68rem;
  color: #8c909f;
  font-weight: 700;
}

.stitch-trend-metrics strong {
  font-size: 0.95rem;
  font-family: monospace;
}

@media print {
  body {
    overflow: visible;
    background: #fff;
    color: #111;
  }

  .topbar,
  .sidebar,
  .evidence-rail,
  .ambient,
  .noise,
  .tour-panel,
  .toast,
  .shutdown-screen,
  button {
    display: none !important;
  }

  .app-shell,
  .main-stage {
    display: block;
    height: auto;
    overflow: visible;
  }

  .main-stage {
    padding: 0;
  }

  .surface {
    break-inside: avoid;
    border-color: #bbb;
    background: #fff;
    box-shadow: none;
    color: #111;
  }
}

/* ==========================================================================
   2_MULTY_260731 FULL INTERACTIVE PHM ENGINE DASHBOARD STYLES
   ========================================================================== */

.multy-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(18, 22, 34, 0.95);
  border: 1px solid rgba(77, 142, 255, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 10px;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.multy-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.multy-brand-icon {
  background: rgba(77, 142, 255, 0.2);
  color: #4d8eff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.multy-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #e5e2e1;
  margin: 0;
}

.multy-sub {
  font-size: 0.74rem;
  color: #8c909f;
}

.multy-header-telemetry {
  display: flex;
  align-items: center;
  gap: 12px;
}

.telemetry-chip {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.telemetry-chip span {
  font-size: 0.65rem;
  color: #8c909f;
  font-weight: 700;
}

.telemetry-chip strong {
  font-size: 0.9rem;
  font-family: monospace;
  color: #5de6ff;
}

.iso-zone-badge {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: monospace;
  padding: 4px 10px;
  border-radius: 6px;
}

.iso-zone-badge.zone-d {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.multy-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.multy-pill-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e2e1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.multy-risk-badge {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
}

.multy-workspace-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  margin-top: 16px;
}

.multy-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.multy-side-group {
  background: #1a1a24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-group-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: #adc6ff;
  letter-spacing: 0.05em;
}

.multy-ctrl-btn {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-icon-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

.channel-btn-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ch-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #c8c6c5;
  cursor: pointer;
  font-size: 0.75rem;
}

.ch-btn.is-active {
  background: rgba(77, 142, 255, 0.2);
  border-color: #4d8eff;
  color: #5de6ff;
}

.sim-cond-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cond-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  cursor: pointer;
}

.cond-btn.is-active {
  background: rgba(77, 142, 255, 0.18);
  border-color: #4d8eff;
}

.cond-btn-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #e5e2e1;
}

.cond-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-normal { background: #10b981; }
.dot-warning { background: #f59e0b; }
.dot-danger { background: #f43f5e; }

.cond-btn small {
  font-size: 0.68rem;
  color: #8c909f;
}

.side-select-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
}

.multy-select {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e2e1;
  padding: 6px;
  border-radius: 6px;
  font-size: 0.74rem;
}

.side-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
}

.foundation-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.f-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8c909f;
  padding: 5px;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
}

.f-btn.is-active {
  background: rgba(77, 142, 255, 0.2);
  border-color: #4d8eff;
  color: #5de6ff;
}

.side-slider-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-hdr {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #8c909f;
}

.multy-range {
  width: 100%;
  accent-color: #4d8eff;
}

.multy-main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.multy-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.multy-card {
  background: #1a1a24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.multy-speed-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #5de6ff;
  font-family: monospace;
}

.speed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5de6ff;
  box-shadow: 0 0 6px #5de6ff;
}

.multy-alert-banner {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.76rem;
}

.alert-icon {
  font-size: 1rem;
}

.multy-alert-banner strong {
  color: #f43f5e;
  display: block;
}

.multy-alert-banner small {
  color: #ffdad6;
}

.multy-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.m-chip {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-chip span {
  font-size: 0.65rem;
  color: #8c909f;
}

.m-chip strong {
  font-size: 0.95rem;
  font-family: monospace;
  color: #e5e2e1;
}

.danger-chip strong {
  color: #f43f5e;
}

.diag-triple-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.diag-sub-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.sub-box-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: #adc6ff;
}

.radial-ring-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-val-center {
  position: absolute;
  display: flex;
  flex-direction: column;
}

.radial-val-center strong {
  font-size: 0.95rem;
  font-family: monospace;
  color: #ffb4ab;
}

.radial-val-center small {
  font-size: 0.6rem;
  color: #8c909f;
}

.rul-val {
  font-size: 1.1rem;
  font-family: monospace;
}

.rul-val small {
  font-size: 0.7rem;
  color: #8c909f;
}

.rul-canvas-wrap canvas,
.cluster-canvas-wrap canvas {
  display: block;
}

.sub-label {
  font-size: 0.7rem;
  color: #e5e2e1;
  font-weight: 600;
}

.sub-desc {
  font-size: 0.65rem;
  color: #8c909f;
}

.ai-recommendation-box {
  background: rgba(77, 142, 255, 0.1);
  border: 1px solid rgba(77, 142, 255, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
}

.ai-recommendation-box strong {
  color: #4d8eff;
}

.ai-recommendation-box p {
  color: #c2c6d6;
  margin: 2px 0 0 0;
}

.multy-signals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.sig-header-stats span {
  font-size: 0.7rem;
  color: #8c909f;
  margin-left: 8px;
}

.sig-header-stats b {
  color: #5de6ff;
  font-family: monospace;
}

.fft-unit-toggles,
.stft-color-toggles {
  display: flex;
  gap: 4px;
}

.unit-btn,
.cmap-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #8c909f;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  cursor: pointer;
}

.unit-btn.is-active,
.cmap-btn.is-active {
  background: rgba(77, 142, 255, 0.2);
  border-color: #4d8eff;
  color: #5de6ff;
}

.stft-footer-note {
  font-size: 0.68rem;
  color: #8c909f;
  margin-top: 4px;
}

.live-web-btn {
  background: rgba(77, 142, 255, 0.15);
  border: 1px solid rgba(77, 142, 255, 0.35);
  color: #4d8eff;
  font-weight: 700;
}

.live-web-btn:hover {
  background: rgba(77, 142, 255, 0.3);
  color: #ffffff;
}

.pdm-live-iframe-wrap {
  width: 100%;
  height: 820px;
  border-radius: 12px;
  border: 1px solid rgba(77, 142, 255, 0.3);
  overflow: hidden;
  margin-top: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

#pdm-live-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.npu-row { margin-top: 8px; }
.npu-active-label { color: #10b981; }
.npu-runtime-pill { border-color: rgba(16, 185, 129, 0.4); }
.npu-runtime-pill i { background: #10b981; }
.npu-label-text { color: #10b981; }


/* ==========================================================================
   PRO DSP CANVAS STYLES (Matching Attached Image 2)
   ========================================================================== */

.pro-dsp-card {
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.sig-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sig-icon {
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fft-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fft-marker-toggles {
  display: flex;
  gap: 4px;
}

.marker-chip {
  font-size: 0.65rem;
  font-family: monospace;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.marker-chip.m-1x {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.marker-chip.m-2x {
  background: rgba(77, 142, 255, 0.2);
  color: #4d8eff;
  border: 1px solid rgba(77, 142, 255, 0.4);
}

.pro-canvas-border {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #090d16;
  margin-top: 10px;
}

.text-cyan { color: #00e5ff; }
.text-danger { color: #ff4b6e; }
.text-purple { color: #b794f4; }

.unreal-stream-iframe {
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: none;
  border-radius: 8px;
  background: #000;
  display: block;
}

.ue5-direct-stream-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.ue5-direct-stream-btn {
  background: #2563eb;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ue5-direct-stream-hint {
  font-size: 12px;
  color: #94a3b8;
}

#unreal-stream-video[hidden] {
  display: none !important;
}


.ue5-btn-start {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.ue5-btn-stop {
  display: none;
  font-weight: 700;
}


/* ATOM Intro Topbar Button & Modal Dialog */
.atom-intro-button {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: #e0fdff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
  transition: all 0.2s ease;
}

.atom-intro-button:hover {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(168, 85, 247, 0.25));
  border-color: #00f2fe;
  box-shadow: 0 0 18px rgba(0, 242, 254, 0.35);
  transform: translateY(-1px);
}

.atom-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.atom-modal-backdrop[hidden] {
  display: none !important;
}

.atom-modal-card {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0d121f;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0, 242, 254, 0.2), 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: atomModalFadeIn 0.25s ease-out;
}

@keyframes atomModalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.atom-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(22, 30, 48, 0.6);
  border-bottom: 1px solid rgba(0, 242, 254, 0.15);
}

.atom-modal-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.atom-brand-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.atom-brand-mark svg {
  width: 100%;
  height: 100%;
}

.atom-core-dot {
  fill: #00f2fe;
  filter: drop-shadow(0 0 6px #00f2fe);
}

.atom-orbit-ring {
  stroke: rgba(0, 242, 254, 0.5);
  stroke-width: 1.5;
  fill: none;
}

.atom-modal-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: #e0fdff;
  margin: 0;
  letter-spacing: -0.01em;
}

.atom-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.atom-hero-banner {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.08), rgba(0, 83, 219, 0.1));
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
}

.atom-lead-text {
  font-size: 14px;
  line-height: 1.6;
  color: #cdd7ff;
  margin: 0;
}

.atom-lead-text strong {
  color: #00f2fe;
}

.atom-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .atom-specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.atom-spec-card {
  background: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.atom-spec-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #849495;
  font-family: monospace;
}

.atom-spec-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cyan-glow { color: #00f2fe; text-shadow: 0 0 10px rgba(0, 242, 254, 0.4); }
.green-glow { color: #34ff8c; text-shadow: 0 0 10px rgba(52, 255, 140, 0.4); }
.purple-glow { color: #b4c5ff; text-shadow: 0 0 10px rgba(180, 197, 255, 0.4); }
.amber-glow { color: #f59e0b; text-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }

.atom-spec-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.atom-subheading {
  font-size: 14px;
  font-weight: 600;
  color: #e0fdff;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.atom-section-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.atom-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 16px;
}

.atom-item-num {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.atom-item strong {
  display: block;
  font-size: 13px;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.atom-item p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

.atom-modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(18, 24, 38, 0.8);
  border-top: 1px solid rgba(0, 242, 254, 0.15);
}

.atom-foot-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.atom-repo-tag {
  font-size: 12px;
  font-family: monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.atom-foot-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Compact styling for Unreal View to maximize viewport visibility without scrolling */
#view-unreal .view-heading {
  min-height: auto;
  margin-bottom: 6px;
  gap: 16px;
  align-items: center;
}

#view-unreal .view-heading h1 {
  font-size: 1.35rem;
  font-weight: 750;
  margin: 2px 0;
  line-height: 1.25;
  white-space: normal;
}

#view-unreal .view-heading p {
  font-size: 0.78rem;
  margin-top: 2px;
  line-height: 1.3;
  color: var(--text-soft);
}

#view-unreal .unreal-layout {
  margin-top: 4px;
}

#view-unreal .unreal-viewport-card {
  padding: 10px 14px;
  gap: 6px;
}

#view-unreal .card-heading.compact {
  margin-bottom: 0;
  padding-bottom: 0;
}

#view-unreal .card-heading h2 {
  font-size: 0.95rem;
  margin: 1px 0;
}

#view-unreal .ue5-direct-stream-bar {
  margin-bottom: 4px;
  gap: 8px;
}

#view-unreal .ue5-direct-stream-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
}

#view-unreal .ue5-direct-stream-hint {
  font-size: 0.72rem;
}

#view-unreal .unreal-canvas-wrap {
  min-height: 440px;
  height: calc(100vh - 240px);
  max-height: calc(100vh - 230px);
}

#view-unreal .unreal-stream-iframe,
#view-unreal #unreal-canvas {
  min-height: 440px;
  height: 100%;
}

#view-unreal .unreal-camera-toolbar {
  margin-top: 4px;
  gap: 6px;
  font-size: 0.76rem;
}

#view-unreal .unreal-camera-toolbar .preset-button {
  padding: 3px 8px;
  font-size: 0.74rem;
}
