:root {
  --bg-0: #f4efe5;
  --bg-1: #e7ddcb;
  --ink: #182127;
  --muted: #5a6772;
  --panel: rgba(255, 252, 245, 0.78);
  --panel-strong: rgba(255, 249, 240, 0.92);
  --line: rgba(24, 33, 39, 0.1);
  --accent: #bc5c2d;
  --accent-soft: rgba(188, 92, 45, 0.12);
  --teal: #1f6f78;
  --teal-soft: rgba(31, 111, 120, 0.12);
  --warn: #c6841e;
  --shadow: 0 24px 80px rgba(42, 49, 56, 0.12);
  --radius: 5px;
  --ui-corner-radius: 5px;
  --terminal-bg: #091318;
  --terminal-bg-soft: #0f1f28;
  --terminal-ink: #d9f1eb;
  --terminal-muted: #8fb3af;
  --terminal-accent: #f0b45a;
  --mono: "IBM Plex Mono", "Consolas", monospace;
  --sans: "Aptos", "IBM Plex Sans", "Trebuchet MS", sans-serif;
  /* 调整面板高度以适应新的横向布局 */
  --pipeline-panel-height: 320px;
  --timeline-panel-height: 320px;
  --events-panel-height: 280px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at top left, rgba(188, 92, 45, 0.2), transparent 30%),
    radial-gradient(circle at bottom right, rgba(31, 111, 120, 0.16), transparent 32%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
}

.background-layer {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(24, 33, 39, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 39, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  pointer-events: none;
}

.app-shell {
  position: relative;
  padding: 0;
  display: grid;
  gap: 0;
}

.console-layout {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr) minmax(300px, 360px);
  gap: 0;
  align-items: start;
}

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

.console-sidebar,
.console-guide {
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.console-sidebar::-webkit-scrollbar,
.console-guide::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.console-sidebar {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 0;
  border: 1px solid rgba(255, 248, 241, 0.12);
  background:
    radial-gradient(circle at top left, rgba(240, 180, 90, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(18, 31, 35, 0.98), rgba(9, 19, 24, 0.98));
  color: #fff8f1;
  box-shadow: 0 28px 90px rgba(9, 19, 24, 0.28);
}

.console-sidebar__brand {
  display: grid;
  gap: 4px;
  padding: 4px 4px 8px;
}

.console-sidebar__brand span,
.demo-workspace__navigator-head span,
.control-group__title,
.guide-panel__head span,
.guide-card span,
.demo-workspace__brief-card > span,
.demo-workspace__lane-head span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.console-sidebar__brand span,
.demo-workspace__navigator-head span {
  color: var(--terminal-accent);
}

.console-sidebar__brand strong {
  font-size: 24px;
  line-height: 1;
}

.console-sidebar__brand p {
  margin: 6px 0 0;
  color: rgba(255, 248, 241, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.console-sidebar__workspace {
  display: grid;
  gap: 14px;
}

.console-main {
  display: grid;
  gap: 14px;
  padding: 8px;
}

.console-main,
.console-guide {
  font-size: 0.92rem;
}

.console-main .panel,
.console-main .terminal-window,
.console-guide {
  line-height: 1.48;
}

.console-main :where(h2, h3, strong),
.console-guide :where(h2, h3, strong) {
  line-height: 1.22;
}

.console-main :where(.panel-header h2, .workload-panel__hero h3, .ai-tiny-model__intro strong),
.console-guide .guide-panel__head strong {
  font-size: 0.92em;
}

.console-main :where(.terminal-buffer, .terminal-collapsed-preview__body) {
  font-size: 13px;
  line-height: 1.55;
}

.console-main :where(
  .panel-copy,
  .workload-callout p,
  .terminal-hint,
  .kv-row,
  .event-detail,
  .vector-register-card__lanes,
  .guide-card p
) {
  line-height: 1.45;
}

.console-guide {
  padding: 16px;
  border-radius: 0;
  border: 1px solid rgba(24, 33, 39, 0.1);
  background: rgba(255, 250, 241, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero,
.control-bar,
.notice,
.panel {
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(135deg, rgba(255, 252, 245, 0.88), rgba(250, 240, 225, 0.72));
}

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

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.95;
}

.hero-copy {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy code,
.panel-copy code {
  padding: 2px 6px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.08);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92em;
}

.status-card {
  padding: 20px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.92);
  color: #fff6ea;
  display: grid;
  align-content: center;
  gap: 8px;
}

.hero-status-grid {
  display: grid;
  gap: 14px;
  align-content: stretch;
}

.status-card-primary {
  min-height: 150px;
}

.status-card-secondary {
  background: linear-gradient(180deg, rgba(31, 111, 120, 0.92), rgba(24, 33, 39, 0.92));
}

.status-note {
  color: rgba(255, 246, 234, 0.72);
  font-size: 13px;
}

.status-label,
.muted,
.panel-header h2 + span,
.kv-row span,
.summary-grid span,
.stage-label {
  color: var(--muted);
}

.status-card strong {
  font-size: 42px;
  line-height: 1;
}

.control-bar {
  display: grid;
  gap: 12px;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.control-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(255, 248, 241, 0.1);
  background: rgba(255, 248, 241, 0.06);
}

.control-group__title {
  margin: 0;
  color: var(--terminal-accent);
}

.control-group__body {
  min-width: 0;
}

.control-group__body-fields {
  display: grid;
  gap: 12px;
}

.control-bar label {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: rgba(255, 248, 241, 0.68);
}

select,
button,
input {
  border: 1px solid rgba(24, 33, 39, 0.14);
  border-radius: var(--ui-corner-radius);
  font: inherit;
}

select,
input {
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.85);
}

input {
  color: var(--ink);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  align-items: end;
}

.control-group-auth .control-group__body {
  display: grid;
  align-content: start;
}

.auth-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.auth-panel--disabled,
.auth-panel--active {
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(255, 248, 241, 0.1);
  background: rgba(255, 248, 241, 0.06);
}

.auth-panel--disabled strong,
.auth-panel__status strong {
  font-size: 16px;
}

.auth-panel--disabled span,
.auth-panel__hint,
.auth-panel__status span,
.auth-panel__status em {
  color: rgba(255, 248, 241, 0.62);
  font-size: 12px;
  font-style: normal;
}

.auth-panel--login {
  grid-template-columns: minmax(0, 1fr);
}

.auth-panel--login button {
  width: 100%;
}

.auth-panel__status {
  display: grid;
  gap: 4px;
}

.auth-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-panel__actions button {
  flex: 1 1 120px;
}

.auth-panel__error {
  padding: 10px 12px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(188, 92, 45, 0.25);
  background: rgba(188, 92, 45, 0.12);
  color: #7d3615;
  font-size: 13px;
}

.button-row-primary button:first-child,
.button-row-primary button:nth-child(2) {
  background: linear-gradient(180deg, rgba(240, 180, 90, 0.98), rgba(188, 92, 45, 0.92));
  color: #211409;
}

.button-row-primary button:nth-child(5) {
  background: rgba(255, 248, 241, 0.08);
  color: #fff8f1;
}

.button-row-secondary button {
  background: rgba(255, 248, 241, 0.08);
  color: #fff8f1;
}

button {
  padding: 10px 13px;
  background: linear-gradient(180deg, rgba(24, 33, 39, 0.98), rgba(35, 48, 56, 0.94));
  color: #fff8f1;
  cursor: pointer;
}

button:hover {
  transform: translateY(-1px);
}

.notice {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--ui-corner-radius);
  background: var(--panel-strong);
  color: var(--ink);
}

.notice[data-kind="success"] {
  border-color: rgba(31, 111, 120, 0.3);
  background: rgba(31, 111, 120, 0.12);
}

.notice[data-kind="error"] {
  border-color: rgba(188, 92, 45, 0.35);
  background: rgba(188, 92, 45, 0.12);
}

.demo-workspace__session-metric {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(24, 33, 39, 0.08);
  border-radius: var(--ui-corner-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 252, 245, 0.44));
}

.demo-workspace__intro {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
}

.demo-workspace__intro span {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-workspace__intro strong {
  color: var(--ink);
  font-weight: 600;
}

.demo-workspace__session-metric span {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-workspace__session-metric strong {
  font-family: var(--mono);
  line-height: 1.4;
}

.demo-workspace__session-metric em {
  padding: 5px 9px;
  border-radius: var(--ui-corner-radius);
  background: var(--teal-soft);
  color: var(--teal);
  font-style: normal;
  font-size: 12px;
  justify-self: start;
}

.demo-workspace__boot-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid rgba(240, 180, 90, 0.32);
  border-radius: var(--ui-corner-radius);
  background: rgba(240, 180, 90, 0.1);
}

.demo-workspace__boot-progress span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.demo-workspace__boot-progress strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.demo-workspace__boot-progress em,
.demo-workspace__boot-progress code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
}

.demo-workspace__boot-progress code {
  grid-column: 1 / -1;
}

.demo-workspace__navigator {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.demo-workspace__navigator-head {
  display: grid;
  gap: 4px;
  padding: 8px 4px 4px;
  border: 0;
  background: transparent;
}

.demo-workspace__brief-card span {
  color: var(--accent);
}

.demo-workspace__navigator-head strong,
.demo-workspace__brief-card strong {
  font-size: 16px;
}

.demo-workspace__brief-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.demo-workspace__navigator-groups {
  display: grid;
  gap: 10px;
}

.demo-workspace__brief-card,
.demo-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 250, 243, 0.38));
}

.demo-workspace__focus-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  line-height: 1.55;
}

.demo-workspace__brief-card code {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.08);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}

.demo-workspace__brief-card--contract {
  border-color: rgba(31, 111, 120, 0.18);
  background:
    linear-gradient(180deg, rgba(31, 111, 120, 0.1), rgba(255, 255, 255, 0.48)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 250, 243, 0.38));
}

.demo-workspace__brief-card--observation {
  border-color: rgba(198, 132, 30, 0.2);
  background:
    linear-gradient(180deg, rgba(240, 180, 90, 0.12), rgba(255, 255, 255, 0.48)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 250, 243, 0.38));
}

.demo-workspace__brief-card--evidence {
  border-color: rgba(188, 92, 45, 0.2);
}

.demo-workspace__brief-card--actions {
  border-color: rgba(24, 33, 39, 0.12);
  background:
    linear-gradient(180deg, rgba(24, 33, 39, 0.04), rgba(255, 255, 255, 0.46)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 250, 243, 0.38));
}

.demo-workspace__brief-card--runtime {
  border-color: rgba(31, 111, 120, 0.2);
  background:
    linear-gradient(180deg, rgba(31, 111, 120, 0.08), rgba(255, 255, 255, 0.46)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 250, 243, 0.38));
}

.demo-workspace__brief-card--runtime.is-pending {
  border-style: dashed;
}

.demo-workspace__brief-card--runtime.is-error {
  border-color: rgba(188, 92, 45, 0.28);
  background:
    linear-gradient(180deg, rgba(188, 92, 45, 0.08), rgba(255, 255, 255, 0.46)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 250, 243, 0.38));
}

.demo-workspace__action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-workspace__action-button {
  padding: 10px 14px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.demo-workspace__action-button--accent {
  background: rgba(188, 92, 45, 0.12);
  color: #7d3615;
}

.demo-workspace__action-button--teal {
  background: rgba(31, 111, 120, 0.12);
  color: var(--teal);
}

.demo-workspace__action-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.demo-workspace__lane {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 249, 239, 0.8), rgba(244, 236, 219, 0.6)),
    linear-gradient(90deg, rgba(188, 92, 45, 0.08), transparent 42%);
}

.demo-workspace__lane-head {
  display: grid;
  gap: 6px;
}

.demo-workspace__lane-head span {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-workspace__lane-head strong {
  font-size: 22px;
}

.demo-workspace__lane-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.demo-workspace__brief-card--linux {
  border-color: rgba(188, 92, 45, 0.22);
  background:
    linear-gradient(180deg, rgba(188, 92, 45, 0.08), rgba(255, 255, 255, 0.48)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 250, 243, 0.38));
}

.demo-workspace__lane--runtime {
  background:
    linear-gradient(135deg, rgba(240, 249, 247, 0.84), rgba(232, 244, 241, 0.62)),
    linear-gradient(90deg, rgba(31, 111, 120, 0.08), transparent 42%);
}

.demo-group__header h3 {
  margin: 0;
  font-size: 14px;
}

.demo-group__header p {
  margin: 6px 0 0;
  color: rgba(255, 248, 241, 0.54);
  line-height: 1.45;
  font-size: 12px;
}

.demo-group__cards {
  display: grid;
  gap: 12px;
}

.demo-card {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 10px 11px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(255, 248, 241, 0.1);
  background: rgba(255, 248, 241, 0.055);
  color: #fff8f1;
}

.demo-card.is-available {
  cursor: pointer;
}

.demo-card.is-available:hover,
.demo-card.is-available:focus {
  outline: none;
  border-color: rgba(240, 180, 90, 0.36);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.demo-card.is-selected {
  border-color: rgba(240, 180, 90, 0.46);
  background: rgba(240, 180, 90, 0.1);
}

.demo-card.is-soon {
  opacity: 0.72;
}

.demo-card__title-row,
.demo-card__meta,
.demo-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.demo-card__title-row {
  justify-content: space-between;
}

.demo-card__status,
.demo-card__meta span,
.demo-card__chips span {
  padding: 5px 9px;
  border-radius: var(--ui-corner-radius);
  font-size: 11px;
}

.demo-card__status {
  background: rgba(24, 33, 39, 0.08);
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.demo-card.is-selected .demo-card__status {
  background: var(--accent-soft);
  color: var(--accent);
}

.demo-card.is-ready .demo-card__status {
  background: rgba(31, 111, 120, 0.12);
  color: var(--teal);
}

.demo-card.is-local-tool .demo-card__status {
  background: rgba(31, 111, 120, 0.12);
  color: var(--teal);
}

.demo-card.is-gated .demo-card__status {
  background: rgba(198, 132, 30, 0.14);
  color: #6d4a11;
}

.demo-card h4 {
  margin: 0;
  font-size: 14px;
}

.demo-card p {
  margin: 0;
  color: rgba(255, 248, 241, 0.62);
  line-height: 1.45;
  font-size: 12px;
}

.demo-card--compact .demo-card__details {
  display: grid;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 160ms ease, opacity 120ms ease;
}

.demo-card--compact:hover .demo-card__details,
.demo-card--compact:focus .demo-card__details,
.demo-card--compact.is-selected .demo-card__details {
  max-height: 260px;
  opacity: 1;
}

.demo-card__meta span {
  background: rgba(255, 248, 241, 0.08);
  color: rgba(255, 248, 241, 0.74);
  font-family: var(--mono);
}

.demo-card__chips span {
  background: rgba(31, 111, 120, 0.2);
  color: #bde2dc;
}

.demo-card__gate {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--ui-corner-radius);
  background: rgba(198, 132, 30, 0.12);
  color: #ffe2a8;
  font-size: 12px;
  line-height: 1.5;
}

.demo-card__gate code,
.workload-callout code {
  font-family: var(--mono);
}

.ai-tiny-model {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(31, 111, 120, 0.16);
  border-radius: var(--ui-corner-radius);
  background:
    linear-gradient(135deg, rgba(9, 19, 24, 0.94), rgba(18, 45, 50, 0.9)),
    linear-gradient(90deg, rgba(240, 180, 90, 0.18), transparent 44%);
  color: #fff8f1;
}

.ai-tiny-model__intro {
  display: grid;
  gap: 6px;
}

.ai-tiny-model__intro span,
.ai-tiny-model__result-head span,
.ai-tiny-model__ops span {
  color: var(--terminal-accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-tiny-model__intro strong {
  font-size: 22px;
}

.ai-tiny-model__intro p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 248, 241, 0.72);
  line-height: 1.55;
}

.ai-tiny-model__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px)) auto;
  gap: 12px;
  align-items: end;
}

.ai-tiny-model__field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ai-tiny-model__field span {
  color: rgba(255, 248, 241, 0.72);
  font-size: 12px;
}

.ai-tiny-model__field select {
  border-color: rgba(255, 248, 241, 0.18);
  background: rgba(255, 248, 241, 0.92);
}

.ai-tiny-model__controls button {
  border-color: rgba(240, 180, 90, 0.38);
  background: linear-gradient(180deg, rgba(240, 180, 90, 0.95), rgba(188, 92, 45, 0.95));
  color: #23170c;
}

.ai-tiny-model__controls button:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

.ai-tiny-model__guide-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 248, 241, 0.12);
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 248, 241, 0.06);
}

.ai-tiny-model__guide-card span {
  color: var(--terminal-accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-tiny-model__guide-card strong {
  font-size: 16px;
  line-height: 1.45;
  color: #fff8f1;
}

.ai-tiny-model__guide-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: rgba(255, 248, 241, 0.82);
}

.ai-tiny-model__guide-card li {
  line-height: 1.5;
}

.ai-tiny-model__guide-card--evidence {
  border-color: rgba(255, 248, 241, 0.18);
}

.ai-tiny-model__guide-card--evidence.is-matched {
  background: rgba(31, 111, 120, 0.18);
  border-color: rgba(31, 111, 120, 0.34);
}

.ai-tiny-model__guide-card--evidence.is-mismatch {
  background: rgba(188, 92, 45, 0.18);
  border-color: rgba(188, 92, 45, 0.34);
}

.ai-tiny-model__guide-card--evidence.is-pending {
  background: rgba(255, 248, 241, 0.08);
}

.ai-tiny-model__evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-tiny-model__evidence-strip code {
  padding: 6px 8px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 248, 241, 0.12);
  color: #fff8f1;
  font-family: var(--mono);
  font-size: 12px;
}

.ai-tiny-model__evidence-lines {
  display: grid;
  gap: 5px;
  color: rgba(255, 248, 241, 0.76);
  font-size: 12px;
}

.ai-tiny-model__evidence-lines span {
  font-family: var(--mono);
}

.ai-tiny-model__chips,
.ai-tiny-model__metrics,
.ai-tiny-model__ops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-tiny-model__chips span {
  padding: 6px 9px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 248, 241, 0.1);
  color: rgba(255, 248, 241, 0.78);
  font-size: 12px;
}

.ai-tiny-model__error {
  padding: 10px 12px;
  border: 1px solid rgba(240, 180, 90, 0.3);
  border-radius: var(--ui-corner-radius);
  background: rgba(240, 180, 90, 0.14);
  color: #ffe1ad;
}

.ai-tiny-model__result {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 248, 241, 0.12);
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 248, 241, 0.06);
}

.ai-tiny-model__result-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ai-tiny-model__metrics span {
  display: grid;
  gap: 3px;
  min-width: 112px;
  padding: 9px 10px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 248, 241, 0.08);
}

.ai-tiny-model__metrics em,
.ai-tiny-model__output span,
.ai-tiny-model__output em {
  color: rgba(255, 248, 241, 0.62);
  font-size: 11px;
  font-style: normal;
}

.ai-tiny-model__metrics strong,
.ai-tiny-model__output strong {
  font-family: var(--mono);
  overflow-wrap: break-word;
  word-break: break-word;
}

.ai-tiny-model__output {
  display: grid;
  gap: 5px;
}

.ai-tiny-model__output code,
.ai-tiny-model__ops code {
  font-family: var(--mono);
}

.ai-tiny-model__ops code {
  padding: 6px 8px;
  border-radius: var(--ui-corner-radius);
  background: rgba(31, 111, 120, 0.24);
  color: #d9f1eb;
  font-size: 12px;
}

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

.desktop-stage {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.terminal-stage,
.stage-sidebar,
.debug-inspector,
.debug-inspector-grid {
  min-width: 0;
}

.stage-sidebar {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.stage-sidebar > div:not(:empty) {
  min-width: 0;
}

.terminal-stage,
#workload-slot,
#ai-lab-slot {
  grid-column: 1 / -1;
}

.hero,
.console-sidebar,
.console-guide {
  border-radius: 0;
}

:where(
  .status-card,
  .control-group,
  select,
  button,
  input,
  .auth-panel--disabled,
  .auth-panel--active,
  .auth-panel__error,
  .notice,
  .demo-workspace__session-metric,
  .demo-workspace__boot-progress,
  .demo-workspace__brief-card,
  .demo-group,
  .demo-workspace__lane,
  .demo-card,
  .demo-card__gate,
  .ai-tiny-model,
  .ai-tiny-model__guide-card,
  .ai-tiny-model__error,
  .ai-tiny-model__result,
  .ai-tiny-model__metrics span,
  .ai-tiny-model__ops code,
  .terminal-window,
  .terminal-toggle,
  .linux-boot-progress,
  .terminal-scrollport,
  .terminal-collapsed-preview,
  .panel,
  .ai-accelerator-status,
  .ooo-metric,
  .workload-progress__item,
  .workload-callout,
  .vector-boundary,
  .vector-cnn-card,
  .metric-pill,
  .stat-box,
  .predictor-last,
  .predictor-mispredict,
  .stage-card,
  .timeline-row,
  .timeline-stage-chip,
  .guide-card,
  .guide-panel .demo-workspace__brief-card,
  .guide-panel .demo-workspace__lane,
  .guide-panel__chips span,
  .event-item,
  .device-list article,
  .register-cell,
  .summary-grid div,
  .vector-stage-pill,
  .vector-register-card,
  .vector-alert,
  .lane-strip,
  .lane-strip__values strong,
  .workload-tag,
  .flag-chip,
  .pipeline-meta-chip,
  .ooo-flag,
  .vector-chip,
  .hero-copy code,
  .panel-copy code,
  .ai-tiny-model__evidence-strip code,
  .ai-tiny-model__chips span
) {
  border-radius: var(--ui-corner-radius);
}

.console-main :where(
  .notice,
  .panel,
  .terminal-window,
  .terminal-toggle,
  .linux-boot-progress,
  .terminal-scrollport,
  .terminal-collapsed-preview,
  .ai-tiny-model,
  .ai-tiny-model__guide-card,
  .ai-tiny-model__error,
  .ai-tiny-model__result,
  .ai-tiny-model__metrics span,
  .ai-tiny-model__ops code,
  .ai-accelerator-status,
  .ooo-metric,
  .workload-progress__item,
  .workload-callout,
  .vector-boundary,
  .vector-cnn-card,
  .metric-pill,
  .stat-box,
  .predictor-last,
  .predictor-mispredict,
  .stage-card,
  .timeline-row,
  .timeline-stage-chip,
  .event-item,
  .device-list article,
  .register-cell,
  .summary-grid div,
  .vector-stage-pill,
  .vector-register-card,
  .vector-alert,
  .lane-strip,
  .lane-strip__values strong,
  .workload-tag,
  .flag-chip,
  .pipeline-meta-chip,
  .ooo-flag,
  .vector-chip,
  .panel-copy code,
  .ai-tiny-model__evidence-strip code,
  .ai-tiny-model__chips span
) {
  border-radius: var(--ui-corner-radius);
}

.debug-inspector[data-open="false"] {
  display: none;
}

.debug-inspector {
  width: 100%;
  margin-top: 0;
}

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

.debug-inspector-grid > div:empty,
.stage-sidebar > div:empty {
  display: none;
}

.debug-inspector-grid > div:not(:empty) {
  min-width: 0;
}

#pipeline-slot {
  grid-column: 1 / -1;
}

#vector-slot {
  grid-column: span 1;
}

#events-slot {
  grid-column: span 1;
}

#devices-slot,
#registers-slot {
  grid-column: 1 / -1;
}

.terminal-window {
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--ui-corner-radius);
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(240, 180, 90, 0.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(31, 111, 120, 0.22), transparent 34%),
    linear-gradient(160deg, var(--terminal-bg), var(--terminal-bg-soft));
  box-shadow: 0 32px 120px rgba(9, 19, 24, 0.3);
  border: 1px solid rgba(12, 27, 35, 0.28);
}

.terminal-window.is-focused {
  box-shadow: 0 32px 120px rgba(9, 19, 24, 0.34), 0 0 0 1px rgba(240, 180, 90, 0.22);
}

.terminal-window.is-collapsed {
  min-height: 0;
}

.terminal-window__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(217, 241, 235, 0.08);
  background: rgba(4, 9, 12, 0.34);
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 12px;
  height: 12px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 255, 255, 0.18);
}

.window-dots span:nth-child(1) {
  background: rgba(225, 107, 76, 0.92);
}

.window-dots span:nth-child(2) {
  background: rgba(240, 180, 90, 0.92);
}

.window-dots span:nth-child(3) {
  background: rgba(31, 111, 120, 0.92);
}

.terminal-window__title,
.terminal-window__status,
.terminal-window__actions {
  display: grid;
  gap: 4px;
}

.terminal-window__title strong,
.terminal-window__status strong {
  color: #fff4dc;
}

.terminal-window__title span,
.terminal-window__status span {
  color: var(--terminal-muted);
  font-size: 13px;
}

.terminal-window__actions {
  justify-items: end;
  align-items: center;
  gap: 10px;
}

.terminal-window__status {
  justify-items: end;
  text-align: right;
}

.terminal-toggle {
  padding: 10px 14px;
  border: 1px solid rgba(217, 241, 235, 0.18);
  border-radius: var(--ui-corner-radius);
  background: rgba(217, 241, 235, 0.08);
  color: #fff4dc;
}

.terminal-toggle:hover {
  background: rgba(217, 241, 235, 0.14);
}

.terminal-window__screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  min-height: 0;
  padding: 18px;
}

.linux-boot-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(240, 180, 90, 0.28);
  border-radius: var(--ui-corner-radius);
  background: rgba(240, 180, 90, 0.1);
}

.linux-boot-progress span {
  color: var(--terminal-ink);
  font-size: 13px;
  font-weight: 700;
}

.linux-boot-progress strong {
  color: var(--terminal-accent);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.linux-boot-progress em,
.linux-boot-progress code {
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
}

.linux-boot-progress code {
  grid-column: 1 / -1;
}

.terminal-scrollport {
  min-height: 0;
  max-height: 72vh;
  overflow: auto;
  padding: 24px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(217, 241, 235, 0.08);
  background:
    linear-gradient(180deg, rgba(3, 8, 11, 0.88), rgba(10, 18, 24, 0.94)),
    linear-gradient(90deg, rgba(240, 180, 90, 0.06), transparent 28%);
}

.terminal-window.is-collapsed .terminal-scrollport {
  display: none;
}

.terminal-buffer {
  margin: 0;
  min-height: 100%;
  color: var(--terminal-ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-collapsed-preview {
  display: none;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(217, 241, 235, 0.08);
  background: linear-gradient(180deg, rgba(3, 8, 11, 0.7), rgba(10, 18, 24, 0.82));
}

.terminal-window.is-collapsed .terminal-collapsed-preview {
  display: grid;
}

.terminal-collapsed-preview__label {
  color: var(--terminal-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-collapsed-preview__body {
  margin: 0;
  color: var(--terminal-ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-caret {
  display: inline-block;
  width: 0.62em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--terminal-accent);
  animation: terminal-blink 1s steps(1) infinite;
}

.terminal-hint {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 6px 0;
  color: var(--terminal-muted);
  font-size: 13px;
}

.terminal-hint.is-live {
  color: #fff0ce;
}

@keyframes terminal-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 250, 241, 0.82);
  box-shadow: 0 18px 60px rgba(42, 49, 56, 0.08);
  min-width: 0;
  overflow: hidden;
}

.panel-pipeline,
.panel-timeline,
.panel-events {
  display: flex;
  flex-direction: column;
}

.panel-pipeline {
  min-height: 300px;
  height: auto;
}

.panel-timeline {
  min-height: 240px;
  height: auto;
  margin-top: 12px;
}

.panel-events {
  max-height: 360px;
  height: auto;
}

.panel-predictor {
  display: flex;
  flex-direction: column;
}

.panel-workload,
.panel-vector {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-ooo {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-ai-accelerator,
.panel-l1-data-cache {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-accelerator-panel,
.l1-data-cache-panel {
  display: grid;
  gap: 14px;
}

.ai-accelerator-panel__topline {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 0.75fr) minmax(220px, 1.25fr);
  align-items: stretch;
}

.ai-accelerator-status {
  min-height: 82px;
  padding: 14px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: rgba(255, 255, 255, 0.76);
  display: grid;
  align-content: center;
  gap: 8px;
}

.ai-accelerator-status span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-accelerator-status strong {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 20px;
}

.ai-accelerator-status.is-busy {
  border-color: rgba(198, 132, 30, 0.3);
  background: rgba(198, 132, 30, 0.12);
}

.ai-accelerator-status.is-busy strong {
  color: #9a6610;
}

.ai-accelerator-grid,
.l1-data-cache-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.panel-section {
  display: grid;
  gap: 12px;
}

.panel-section > .panel-header {
  margin-bottom: 0;
}

.panel-section__grid {
  display: grid;
  gap: 12px;
}

.panel-section__grid--architecture {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel-section__grid--platform {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platform-device-stack {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  min-width: 0;
  align-content: start;
}

.panel-section .panel {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.58);
}

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

.ooo-metric {
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.ooo-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ooo-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-family: var(--mono);
  overflow-wrap: break-word;
  word-break: break-word;
}

.ooo-flag-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.predictor-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.panel-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.panel-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.workload-panel,
.vector-panel {
  display: grid;
  gap: 16px;
}

.workload-panel__hero,
.vector-panel__topline {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  align-items: start;
}

.workload-panel__hero h3 {
  margin: 0;
  font-size: 22px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.workload-tag-row,
.metric-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.workload-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.workload-tag-accent {
  border-color: rgba(188, 92, 45, 0.3);
  background: rgba(188, 92, 45, 0.12);
  color: var(--accent);
}

.workload-tag-teal {
  border-color: rgba(31, 111, 120, 0.3);
  background: rgba(31, 111, 120, 0.12);
  color: var(--teal);
}

.workload-tag-warn {
  border-color: rgba(198, 132, 30, 0.3);
  background: rgba(198, 132, 30, 0.12);
  color: #9a6610;
}

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

.workload-progress__item,
.workload-callout,
.vector-boundary,
.vector-cnn-card {
  padding: 14px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.workload-progress__item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workload-progress__item strong {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.workload-callout strong,
.vector-alert {
  color: var(--accent);
}

.workload-callout-secondary {
  background: rgba(198, 132, 30, 0.1);
}

.workload-callout p {
  margin: 8px 0 0;
}

.workload-active {
  display: grid;
  gap: 10px;
}

.metric-pill {
  min-width: 88px;
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.92);
  color: #fff6ea;
}

.metric-pill span {
  display: block;
  color: rgba(255, 246, 234, 0.72);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-pill strong {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  overflow-wrap: break-word;
  word-break: break-word;
}

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

.stat-box {
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: break-word;
}

.stat-correct {
  color: var(--teal);
}

.stat-mispredict {
  color: var(--accent);
}

.stat-accuracy {
  color: var(--warn);
  font-weight: 700;
}

.predictor-last,
.predictor-mispredict {
  padding: 14px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 39, 0.08);
}

.predictor-last.pred-correct {
  border-color: rgba(31, 111, 120, 0.35);
  background: rgba(31, 111, 120, 0.08);
}

.predictor-last.pred-mispredict {
  border-color: rgba(188, 92, 45, 0.35);
  background: rgba(188, 92, 45, 0.08);
}

.predictor-mispredict {
  border-color: rgba(188, 92, 45, 0.25);
  background: rgba(188, 92, 45, 0.05);
}

.predictor-section-title {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.pred-result {
  font-weight: 600;
}

.pred-correct .pred-result {
  color: var(--teal);
}

.pred-mispredict .pred-result {
  color: var(--accent);
}

.predictor-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-toggle {
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--ui-corner-radius);
  font-family: var(--mono);
}

.panel-toggle:hover {
  background: rgba(24, 33, 39, 0.08);
  color: var(--ink);
}

.panel[data-collapsed="true"] .panel-body {
  display: none;
}

.panel[data-collapsed="true"] .panel-toggle {
  color: var(--accent);
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

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

.pipeline-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.flag-chip {
  padding: 6px 10px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.08);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flag-chip.is-hot {
  background: var(--accent-soft);
  color: var(--accent);
}

.pipeline-meta-chip,
.ooo-flag {
  padding: 7px 10px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}

.pipeline-meta-chip.is-hot,
.ooo-flag.is-hot {
  background: var(--accent-soft);
  color: var(--accent);
}

.pipeline-meta-chip.is-warm {
  background: rgba(198, 132, 30, 0.14);
  color: #9a6610;
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  flex: 1;
  min-height: 0;
}

/* 中等屏幕：5个阶段可能太挤，改为滚动或保持5列但缩小间距 */
@media (max-width: 1200px) {
  .stages-grid {
    gap: 10px;
  }
  
  .stage-card {
    padding: 10px;
  }
  
  .stage-text {
    font-size: 13px;
  }
}

.stage-card {
  height: 100%;
  padding: 14px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.1);
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage-card.is-valid {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 236, 224, 0.78));
}

.stage-card.stage-card-vector {
  position: relative;
}

.stage-card.stage-card-vector::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--ui-corner-radius);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(31, 111, 120, 0.2);
}

.stage-card-vector-config::after {
  box-shadow: inset 0 0 0 1px rgba(188, 92, 45, 0.24);
}

.stage-card-vector-memory::after {
  box-shadow: inset 0 0 0 1px rgba(198, 132, 30, 0.28);
}

.stage-card.is-empty {
  opacity: 0.64;
}

.stage-pc,
.stage-raw,
.register-cell strong,
.kv-row strong,
.timeline-row span,
.event-cycle,
.summary-grid strong {
  font-family: var(--mono);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.stage-pc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--teal);
  overflow-wrap: break-word;
  word-break: break-word;
}

.vector-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: var(--ui-corner-radius);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(31, 111, 120, 0.12);
  color: var(--teal);
}

.vector-chip-config {
  background: rgba(188, 92, 45, 0.12);
  color: var(--accent);
}

.vector-chip-memory,
.timeline-stage-vector-memory .timeline-stage-chip {
  background: rgba(198, 132, 30, 0.16);
  color: #9a6610;
}

.vector-chip-dot,
.timeline-stage-vector-dot .timeline-stage-chip {
  background: rgba(31, 111, 120, 0.18);
  color: var(--teal);
}

.vector-chip-relu,
.timeline-stage-vector-relu .timeline-stage-chip {
  background: rgba(31, 111, 120, 0.12);
  color: #0b5b63;
}

.stage-text {
  margin-top: 12px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.stage-raw {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: break-word;
  word-break: break-word;
}

.timeline-table {
  display: grid;
  gap: 6px;
  min-height: 0;
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.timeline-head,
.timeline-row {
  display: grid;
  grid-template-columns: 64px minmax(140px, 1.5fr) repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.timeline-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 6px;
  background: linear-gradient(180deg, rgba(244, 239, 229, 0.96), rgba(244, 239, 229, 0.8));
}

.timeline-row {
  padding: 10px 12px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 39, 0.06);
}

.timeline-stage {
  display: grid;
  gap: 6px;
  align-content: start;
}

.timeline-stage-text {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.timeline-stage-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.08);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-stage-vector .timeline-stage-text {
  color: var(--ink);
  font-weight: 600;
}

.timeline-stage-vector-config .timeline-stage-chip {
  background: rgba(188, 92, 45, 0.14);
  color: var(--accent);
}

.timeline-row.is-stall {
  background: rgba(198, 132, 30, 0.12);
}

.timeline-row.is-redirect,
.timeline-row.is-commit {
  background: rgba(31, 111, 120, 0.12);
}

.event-list,
.device-list,
.kv-list {
  display: grid;
  gap: 10px;
}

.guide-panel {
  display: grid;
  gap: 12px;
}

.guide-panel__head {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(24, 33, 39, 0.08);
}

.guide-panel__head span,
.guide-card span,
.demo-workspace__brief-card > span {
  color: var(--accent);
}

.guide-panel__head strong {
  font-size: 24px;
  line-height: 1.1;
}

.guide-panel__head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.guide-panel__chips span {
  padding: 6px 9px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.07);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.guide-card,
.guide-panel .demo-workspace__brief-card,
.guide-panel .demo-workspace__lane {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: rgba(255, 255, 255, 0.46);
}

.guide-card strong,
.guide-panel .demo-workspace__brief-card strong {
  font-size: 15px;
  line-height: 1.45;
}

.guide-card p,
.guide-panel .demo-workspace__brief-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.guide-panel .demo-workspace__lane {
  background:
    linear-gradient(135deg, rgba(255, 249, 239, 0.8), rgba(244, 236, 219, 0.6)),
    linear-gradient(90deg, rgba(188, 92, 45, 0.06), transparent 42%);
}

.guide-panel .demo-workspace__lane-grid {
  grid-template-columns: 1fr;
}

.event-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.event-item,
.device-list article,
.register-cell {
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: rgba(255, 255, 255, 0.76);
  padding: 12px;
}

.event-item {
  position: relative;
  overflow: hidden;
}

.event-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.12);
}

.event-item.tone-control::before {
  background: var(--teal);
}

.event-item.tone-trap::before {
  background: var(--accent);
}

.event-item.tone-memory::before {
  background: var(--warn);
}

.event-item.tone-lifecycle::before {
  background: #7a4ea3;
}

.event-kind {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-size: 12px;
}

.event-detail {
  margin-top: 6px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.summary-grid,
.register-grid {
  display: grid;
  gap: 10px;
}

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

.summary-grid div {
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 255, 255, 0.72);
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  color: var(--teal);
  overflow-wrap: break-word;
  word-break: break-word;
}

.device-list article {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.device-list article strong {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: right;
}

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

.vector-stage-strip,
.vector-register-grid {
  display: grid;
  gap: 12px;
}

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

.vector-stage-pill,
.vector-register-card {
  border-radius: var(--ui-corner-radius);
  border: 1px solid rgba(24, 33, 39, 0.08);
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.vector-stage-pill span,
.vector-register-card__head span,
.lane-strip__title {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.vector-stage-pill strong {
  display: block;
  margin-top: 8px;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.vector-stage-pill-memory {
  border-color: rgba(198, 132, 30, 0.26);
  background: rgba(198, 132, 30, 0.12);
}

.vector-stage-pill-config {
  border-color: rgba(188, 92, 45, 0.26);
  background: rgba(188, 92, 45, 0.1);
}

.vector-stage-pill-dot,
.vector-stage-pill-relu,
.vector-stage-pill-alu,
.vector-stage-pill-generic {
  border-color: rgba(31, 111, 120, 0.24);
  background: rgba(31, 111, 120, 0.1);
}

.vector-alert {
  padding: 12px 14px;
  border-radius: var(--ui-corner-radius);
  background: rgba(188, 92, 45, 0.12);
  border: 1px solid rgba(188, 92, 45, 0.24);
  line-height: 1.5;
}

.vector-cnn-card {
  display: grid;
  gap: 14px;
}

.vector-cnn-card__grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.lane-strip {
  padding: 12px;
  border-radius: var(--ui-corner-radius);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 33, 39, 0.08);
}

.lane-strip__values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lane-strip__values strong {
  min-width: 32px;
  padding: 6px 10px;
  border-radius: var(--ui-corner-radius);
  background: rgba(24, 33, 39, 0.08);
  color: var(--ink);
  font-family: var(--mono);
  text-align: center;
}

.lane-strip-warn {
  border-color: rgba(198, 132, 30, 0.24);
  background: rgba(198, 132, 30, 0.1);
}

.lane-strip-teal {
  border-color: rgba(31, 111, 120, 0.24);
  background: rgba(31, 111, 120, 0.1);
}

.vector-register-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.vector-register-card {
  display: grid;
  gap: 10px;
}

.vector-register-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.vector-register-card__head strong,
.vector-register-card__lanes,
.vector-register-card__raw {
  font-family: var(--mono);
}

.vector-register-card__head strong {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.vector-register-card__lanes {
  color: var(--ink);
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.vector-register-card__raw {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.vector-register-card.is-focus {
  border-color: rgba(31, 111, 120, 0.3);
  box-shadow: inset 0 0 0 1px rgba(31, 111, 120, 0.16);
}

.vector-register-card.emphasis-rise,
.vector-register-card.emphasis-mutate {
  background: rgba(31, 111, 120, 0.08);
}

.vector-register-card.emphasis-clear {
  background: rgba(188, 92, 45, 0.08);
}

.register-cell.is-changed {
  background: rgba(188, 92, 45, 0.12);
  border-color: rgba(188, 92, 45, 0.28);
}

.register-cell.emphasis-rise {
  background: rgba(31, 111, 120, 0.14);
  border-color: rgba(31, 111, 120, 0.28);
}

.register-cell.emphasis-clear {
  background: rgba(188, 92, 45, 0.14);
  border-color: rgba(188, 92, 45, 0.3);
}

.register-cell.emphasis-mutate {
  background: rgba(198, 132, 30, 0.14);
  border-color: rgba(198, 132, 30, 0.3);
}

.register-cell span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(24, 33, 39, 0.06);
  min-width: 0;
}

.kv-row span {
  flex-shrink: 0;
}

.kv-row strong {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: right;
}

.kv-row:last-child {
  border-bottom: 0;
}

.empty-state {
  color: var(--muted);
  padding: 12px 0;
}

.empty-state-hint {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.95rem;
  opacity: 0.7;
}

@media (max-width: 1400px) {
  .console-layout {
    grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  }

  .console-guide {
    position: static;
    max-height: none;
    grid-column: 1 / -1;
  }

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

  .desktop-stage {
    grid-template-columns: 1fr;
  }

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

  #pipeline-slot {
    grid-column: 1 / -1;
  }

  #vector-slot {
    grid-column: span 1;
  }

  #events-slot {
    grid-column: span 1;
  }
}

@media (max-width: 1100px) {
  .hero,
  .control-bar,
  .console-layout,
  .debug-inspector-grid,
  .stage-sidebar {
    grid-template-columns: 1fr;
  }

  .console-sidebar {
    position: static;
    max-height: none;
  }

  .ai-tiny-model__guide,
  .ai-tiny-model__controls {
    grid-template-columns: 1fr;
  }

  #pipeline-slot {
    grid-column: 1 / -1;
  }

  #vector-slot {
    grid-column: 1 / -1;
  }

  #events-slot {
    grid-column: 1 / -1;
  }

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

  .workload-panel__hero,
  .vector-panel__topline,
  .ai-accelerator-panel__topline,
  .ai-accelerator-grid,
  .l1-data-cache-grid,
  .panel-section__grid--architecture,
  .panel-section__grid--platform,
  .vector-cnn-card__grid {
    grid-template-columns: 1fr;
  }


}

@media (max-width: 720px) {
  .app-shell {
    padding: 18px;
  }

  .stage-sidebar,
  .console-layout,
  .stages-grid,
  .summary-grid,
  .workload-progress,
    .ooo-grid,
    .debug-inspector-grid,
    .vector-stage-strip,
    .vector-register-grid,
    .ai-accelerator-panel__topline,
    .ai-accelerator-grid,
    .l1-data-cache-grid,
    .panel-section__grid--architecture,
    .panel-section__grid--platform,
    .vector-cnn-card__grid {
    grid-template-columns: 1fr;
  }

  .panel-pipeline,
  .panel-timeline,
  .panel-events {
    height: auto;
    max-height: none;
  }

  .terminal-window {
    min-height: 560px;
  }

  .terminal-window.is-collapsed {
    min-height: 0;
  }

  .terminal-window__bar,
  .terminal-hint {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .terminal-window__actions,
  .terminal-window__status {
    justify-items: start;
    text-align: left;
  }

  .terminal-hint {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-head,
  .timeline-row {
    grid-template-columns: 64px 170px repeat(5, minmax(110px, 1fr));
    overflow-x: auto;
  }
}
