@import url("./rex-dashboard-tokens.css");

body.rex-auth-checking #rex-dashboard-v2-root,
body.rex-auth-locked #rex-dashboard-v2-root {
  visibility: hidden;
  pointer-events: none;
}

body.rex-dashboard-v2-enabled #fit {
  display: none;
}

body:not(.rex-dashboard-v2-enabled) #rex-dashboard-v2-root {
  display: none;
}

.rex-dashboard-v2 {
  width: 100vw;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  font-family: var(--rex-v2-font-family);
  color: var(--rex-v2-text);
  background:
    radial-gradient(circle at 50% 24%, rgba(4, 21, 40, 0.92) 0, rgba(2, 6, 12, 0.72) 42%, rgba(1, 3, 8, 0.96) 100%),
    linear-gradient(135deg, var(--rex-v2-bg) 0%, #030914 50%, var(--rex-v2-bg-deep) 100%);
}

.rex-dashboard-v2-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 166px 240px minmax(0, 1fr) 176px 198px;
  grid-template-rows: 32px 70px 290px 235px 210px 130px;
  grid-template-areas:
    "rail header header header header"
    "rail summary summary summary summary"
    "rail trading workspace content content"
    "rail quick workspace system api"
    "rail events rexcore alerts schedule"
    "rail market agents alerts schedule";
  gap: 8px;
  padding: 7px;
  align-items: stretch;
}

.rex-dashboard-v2-panel,
.rex-dashboard-v2-rail,
.rex-dashboard-v2-header,
.rex-dashboard-v2-summary-card {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: var(--rex-v2-border-width) solid var(--rex-v2-border);
  border-radius: var(--rex-v2-radius-md);
  background: var(--rex-v2-panel-gradient);
  box-shadow: var(--rex-v2-shadow-panel);
}

.rex-dashboard-v2-panel {
  padding: var(--rex-v2-space-5);
}

.rex-dashboard-v2-panel-header {
  min-height: var(--rex-v2-panel-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rex-v2-space-3);
  color: var(--rex-v2-text-strong);
  font-size: var(--rex-v2-font-sm);
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.rex-dashboard-v2-panel-kicker {
  color: var(--rex-v2-cyan-soft);
  font-size: var(--rex-v2-font-micro);
  font-weight: 600;
  text-transform: uppercase;
}

.rex-dashboard-v2-rail {
  grid-area: rail;
  display: grid;
  grid-template-rows: 80px 1fr auto;
  gap: var(--rex-v2-space-4);
  padding: var(--rex-v2-space-4);
}

.rex-dashboard-v2-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rex-dashboard-v2-logo {
  font-size: var(--rex-v2-font-logo);
  line-height: 0.82;
  font-weight: 900;
  letter-spacing: 1px;
  color: transparent;
  background: linear-gradient(#88ddff 0%, #188dff 45%, #75caff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.rex-dashboard-v2-title {
  margin-top: var(--rex-v2-space-3);
  color: var(--rex-v2-cyan-soft);
  font-size: var(--rex-v2-font-xs);
  font-weight: 700;
  letter-spacing: 0.35px;
}

.rex-dashboard-v2-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rex-dashboard-v2-nav button,
.rex-dashboard-v2-icon-button,
.rex-dashboard-v2-action-button {
  font: inherit;
  color: inherit;
  border: var(--rex-v2-border-width) solid transparent;
  border-radius: var(--rex-v2-radius-sm);
  background: transparent;
  cursor: pointer;
}

.rex-dashboard-v2-nav button {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: var(--rex-v2-space-3);
  padding: 0 var(--rex-v2-space-3);
  color: #b1c0cf;
  font-size: var(--rex-v2-font-md);
  text-align: left;
}

.rex-dashboard-v2-nav button[aria-current="page"] {
  color: var(--rex-v2-text-strong);
  border-color: var(--rex-v2-border-strong);
  background: linear-gradient(90deg, rgba(0, 163, 255, 0.22), rgba(0, 163, 255, 0.06));
  box-shadow: inset 3px 0 0 var(--rex-v2-cyan);
}

.rex-dashboard-v2-nav button:focus-visible,
.rex-dashboard-v2-icon-button:focus-visible,
.rex-dashboard-v2-action-button:focus-visible,
.rex-dashboard-v2-mic:focus-visible {
  outline: none;
  box-shadow: var(--rex-v2-shadow-focus);
  border-color: var(--rex-v2-border-strong);
}

.rex-dashboard-v2-rail-status {
  display: grid;
  gap: var(--rex-v2-space-2);
  padding-top: var(--rex-v2-space-4);
  border-top: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  font-size: var(--rex-v2-font-xs);
}

.rex-dashboard-v2-header {
  grid-area: header;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--rex-v2-space-5);
  padding: 0 var(--rex-v2-space-5);
  z-index: var(--rex-v2-z-header);
}

.rex-dashboard-v2-statusbar {
  display: flex;
  align-items: center;
  gap: var(--rex-v2-space-2);
  min-width: 0;
  overflow: hidden;
}

.rex-dashboard-v2-status-pill {
  min-width: 0;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: var(--rex-v2-space-1);
  padding: 0 var(--rex-v2-space-3);
  border-left: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  color: var(--rex-v2-text);
  font-size: var(--rex-v2-font-xs);
  white-space: nowrap;
}

.rex-dashboard-v2-status-pill strong {
  color: var(--rex-v2-text-strong);
  font-weight: 700;
}

.rex-dashboard-v2-header-actions {
  display: flex;
  align-items: center;
  gap: var(--rex-v2-space-3);
}

.rex-dashboard-v2-icon-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-color: var(--rex-v2-border-muted);
  background: rgba(7, 21, 34, 0.7);
}

.rex-dashboard-v2-summary {
  grid-area: summary;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) 170px;
  gap: 0;
  min-width: 0;
}

.rex-dashboard-v2-summary-card {
  border-radius: 0;
  border-left-width: 0;
  padding: 11px 12px 0 52px;
  position: relative;
}

.rex-dashboard-v2-summary-card:first-child {
  border-left-width: var(--rex-v2-border-width);
  border-radius: var(--rex-v2-radius-md) 0 0 var(--rex-v2-radius-md);
}

.rex-dashboard-v2-summary-card:last-child {
  border-radius: 0 var(--rex-v2-radius-md) var(--rex-v2-radius-md) 0;
}

.rex-dashboard-v2-summary-icon {
  position: absolute;
  left: 12px;
  top: 14px;
  width: var(--rex-v2-icon-lg);
  height: var(--rex-v2-icon-lg);
  display: grid;
  place-items: center;
  border: var(--rex-v2-border-width) solid var(--rex-v2-border-strong);
  border-radius: 50%;
  color: var(--rex-v2-cyan);
  box-shadow: var(--rex-v2-shadow-glow);
}

.rex-dashboard-v2-label {
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-micro);
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.rex-dashboard-v2-value {
  color: var(--rex-v2-text-strong);
  font-size: var(--rex-v2-font-lg);
  line-height: var(--rex-v2-line-tight);
  font-weight: 700;
}

.rex-dashboard-v2-detail {
  color: var(--rex-v2-success);
  font-size: var(--rex-v2-font-micro);
  font-weight: 700;
}

.rex-dashboard-v2-trading { grid-area: trading; }
.rex-dashboard-v2-quick { grid-area: quick; }
.rex-dashboard-v2-workspace { grid-area: workspace; }
.rex-dashboard-v2-events { grid-area: events; }
.rex-dashboard-v2-rexcore { grid-area: rexcore; }
.rex-dashboard-v2-recent { grid-area: recent; }
.rex-dashboard-v2-market { grid-area: market; }
.rex-dashboard-v2-agents { grid-area: agents; }
.rex-dashboard-v2-content { grid-area: content; }
.rex-dashboard-v2-system { grid-area: system; }
.rex-dashboard-v2-api { grid-area: api; }
.rex-dashboard-v2-alerts { grid-area: alerts; }
.rex-dashboard-v2-schedule { grid-area: schedule; }

.rex-dashboard-v2-workspace {
  position: relative;
  display: grid;
  grid-template-rows: 31px minmax(0, 1fr) 58px;
  padding: 0;
}

.rex-dashboard-v2-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  padding: 3px var(--rex-v2-space-3);
}

.rex-dashboard-v2-tab {
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--rex-v2-space-4);
  border-radius: var(--rex-v2-radius-sm);
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-sm);
}

.rex-dashboard-v2-tab.is-active {
  color: var(--rex-v2-text-strong);
  border: var(--rex-v2-border-width) solid var(--rex-v2-border-strong);
  background: var(--rex-v2-panel-gradient-active);
}

.rex-dashboard-v2-visual-focus {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(0, 169, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(4, 16, 28, 0.92), rgba(2, 6, 11, 0.95));
}

.rex-dashboard-v2-workspace-core {
  grid-template-columns: minmax(0, 1fr) 190px;
  grid-template-rows: 86px minmax(0, 1fr) 78px;
  grid-template-areas:
    "current context"
    "history context"
    "sources sources";
  gap: var(--rex-v2-space-4);
  align-items: stretch;
  padding: var(--rex-v2-space-5);
}

.rex-dashboard-v2-core-mark {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 210px;
  aspect-ratio: 1 / 0.78;
  display: grid;
  place-items: center;
  border: var(--rex-v2-border-width) dashed rgba(0, 169, 255, 0.34);
  border-radius: 50%;
  color: var(--rex-v2-text-strong);
  font-size: 54px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 0 14px var(--rex-v2-cyan), 0 0 38px #0077ff;
  box-shadow: inset 0 0 28px rgba(0, 169, 255, 0.14), 0 0 35px rgba(0, 169, 255, 0.18);
  opacity: 0.34;
  pointer-events: none;
}

.rex-dashboard-v2-current-turn {
  grid-area: current;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--rex-v2-space-4);
  min-width: 0;
}

.rex-dashboard-v2-current-turn > div,
.rex-dashboard-v2-context-panel,
.rex-dashboard-v2-source-panel,
.rex-dashboard-v2-conversation-log {
  min-width: 0;
  min-height: 0;
  border: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  border-radius: var(--rex-v2-radius-sm);
  background: rgba(3, 11, 19, 0.68);
  box-shadow: inset 0 0 20px rgba(0, 169, 255, 0.06);
}

.rex-dashboard-v2-current-turn > div {
  display: grid;
  align-content: start;
  gap: var(--rex-v2-space-2);
  padding: var(--rex-v2-space-3);
}

.rex-dashboard-v2-current-turn strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--rex-v2-text-strong);
  font-size: var(--rex-v2-font-md);
  line-height: var(--rex-v2-line-normal);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.rex-dashboard-v2-conversation-log {
  grid-area: history;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: var(--rex-v2-space-2);
  padding: var(--rex-v2-space-3);
}

.rex-dashboard-v2-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 92px;
  gap: var(--rex-v2-space-3);
  align-items: center;
  min-height: 30px;
  padding-bottom: var(--rex-v2-space-2);
  border-bottom: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  font-size: var(--rex-v2-font-xs);
}

.rex-dashboard-v2-message span {
  color: var(--rex-v2-cyan-soft);
  font-weight: 700;
}

.rex-dashboard-v2-message strong {
  overflow: hidden;
  color: var(--rex-v2-text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rex-dashboard-v2-message em {
  overflow: hidden;
  color: var(--rex-v2-text-muted);
  font-style: normal;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rex-dashboard-v2-message-empty {
  grid-template-columns: minmax(0, 1fr);
  color: var(--rex-v2-text-muted);
}

.rex-dashboard-v2-context-panel {
  grid-area: context;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: var(--rex-v2-space-2);
  padding: var(--rex-v2-space-3);
}

.rex-dashboard-v2-context-row {
  min-height: 36px;
  display: grid;
  gap: 2px;
  border-bottom: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
}

.rex-dashboard-v2-context-row span,
.rex-dashboard-v2-source-row span {
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-micro);
  text-transform: uppercase;
}

.rex-dashboard-v2-context-row b {
  overflow: hidden;
  color: var(--rex-v2-text-strong);
  font-size: var(--rex-v2-font-xs);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rex-dashboard-v2-source-panel {
  grid-area: sources;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--rex-v2-space-3);
  padding: var(--rex-v2-space-3);
}

.rex-dashboard-v2-source-row {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-xs);
}

.rex-dashboard-v2-source-row a,
.rex-dashboard-v2-source-row b {
  overflow: hidden;
  color: var(--rex-v2-cyan-soft);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
}

.rex-dashboard-v2-command-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: var(--rex-v2-space-3);
  margin: var(--rex-v2-space-5) 66px;
  padding: 0 var(--rex-v2-space-3) 0 var(--rex-v2-space-5);
  border: var(--rex-v2-border-width) solid rgba(0, 169, 255, 0.55);
  border-radius: var(--rex-v2-radius-md);
  background: rgba(7, 15, 25, 0.88);
  box-shadow: var(--rex-v2-shadow-glow);
}

.rex-dashboard-v2-command-line input {
  width: 100%;
  height: 42px;
  color: var(--rex-v2-text);
  border: 0;
  outline: 0;
  background: transparent;
}

.rex-dashboard-v2-panel-body {
  display: grid;
  gap: var(--rex-v2-space-3);
  min-height: 0;
}

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

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

.rex-dashboard-v2-metric,
.rex-dashboard-v2-empty,
.rex-dashboard-v2-unavailable,
.rex-dashboard-v2-loading {
  min-height: 42px;
  padding: var(--rex-v2-space-3);
  border: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  border-radius: var(--rex-v2-radius-sm);
  background: rgba(5, 13, 22, 0.66);
}

.rex-dashboard-v2-metric small {
  display: block;
  margin-top: 4px;
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-micro);
  line-height: 1.25;
}

.rex-dashboard-v2-metric b {
  color: var(--rex-v2-text-strong);
}

.rex-dashboard-v2-empty,
.rex-dashboard-v2-unavailable,
.rex-dashboard-v2-loading {
  display: grid;
  align-items: center;
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-xs);
}

.rex-dashboard-v2-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.rex-dashboard-v2-progress > span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  color: var(--rex-v2-cyan);
  background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px);
}

.rex-dashboard-v2-mini-chart {
  min-height: 52px;
  display: flex;
  align-items: end;
  gap: 3px;
  padding: 7px;
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-micro);
  border: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  border-radius: var(--rex-v2-radius-sm);
  background: linear-gradient(135deg, rgba(5, 19, 32, 0.78), rgba(5, 8, 14, 0.78));
}

.rex-dashboard-v2-mini-chart i {
  width: 5px;
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--rex-v2-cyan), rgba(0, 169, 255, 0.18));
}

.rex-dashboard-v2-chart-label,
.rex-dashboard-v2-chart-value {
  align-self: center;
  color: var(--rex-v2-text-muted);
  font-size: var(--rex-v2-font-micro);
}

.rex-dashboard-v2-chart-value {
  margin-left: auto;
  color: var(--rex-v2-text-strong);
}

.rex-dashboard-v2-provider-list {
  display: grid;
  gap: 5px;
  min-height: 0;
}

.rex-dashboard-v2-provider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  padding: 5px 7px;
  border: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  border-radius: var(--rex-v2-radius-sm);
  background: rgba(5, 13, 22, 0.5);
  font-size: var(--rex-v2-font-micro);
}

.rex-dashboard-v2-provider-row span,
.rex-dashboard-v2-provider-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rex-dashboard-v2-provider-row b {
  color: var(--rex-v2-text-strong);
  font-size: var(--rex-v2-font-micro);
}

.rex-dashboard-v2-provider-row em {
  grid-column: 1 / -1;
  color: var(--rex-v2-text-muted);
  font-style: normal;
}

.rex-dashboard-v2-timeline {
  display: grid;
  gap: var(--rex-v2-space-2);
}

.rex-dashboard-v2-timeline-row {
  min-height: 28px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 70px;
  gap: var(--rex-v2-space-3);
  align-items: center;
  border-bottom: var(--rex-v2-border-width) solid var(--rex-v2-border-muted);
  font-size: var(--rex-v2-font-xs);
}

.rex-dashboard-v2-mic {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: var(--rex-v2-space-4) auto var(--rex-v2-space-3);
  border: var(--rex-v2-border-width) solid var(--rex-v2-border-strong);
  border-radius: 50%;
  color: var(--rex-v2-text-strong);
  background: radial-gradient(circle, #0a3c71 0, #061627 58%, transparent 72%);
  box-shadow: var(--rex-v2-shadow-glow), inset 0 0 16px rgba(0, 169, 255, 0.14);
  cursor: pointer;
}

.rex-dashboard-v2-mic[aria-pressed="true"] {
  border-color: rgba(31, 242, 130, 0.55);
  box-shadow: 0 0 18px var(--rex-v2-glow-green), inset 0 0 16px rgba(31, 242, 130, 0.14);
}

.rex-dashboard-v2-action-row {
  display: flex;
  gap: var(--rex-v2-space-2);
}

.rex-dashboard-v2-action-button {
  min-height: 26px;
  flex: 1 1 auto;
  padding: 0 var(--rex-v2-space-3);
  border-color: var(--rex-v2-border-muted);
  background: rgba(0, 169, 255, 0.08);
  color: var(--rex-v2-cyan-soft);
  font-size: var(--rex-v2-font-xs);
}

.rex-dashboard-v2-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.rex-dashboard-v2[data-reference-viewport="1536x1024"] .rex-dashboard-v2-shell {
  max-width: var(--rex-v2-reference-width);
  max-height: var(--rex-v2-reference-height);
  margin: 0 auto;
}

@media (min-width: 1400px) and (max-height: 1040px) {
  .rex-dashboard-v2-shell {
    grid-template-columns: 166px 240px minmax(0, 718px) 176px 198px;
  }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .rex-dashboard-v2-shell {
    grid-template-columns: 150px minmax(190px, 0.72fr) minmax(0, 1.6fr) minmax(154px, 0.58fr) minmax(170px, 0.62fr);
    grid-template-rows: 32px 64px minmax(220px, 1.35fr) minmax(180px, 1fr) minmax(160px, 0.8fr);
    grid-template-areas:
      "rail header header header header"
      "rail summary summary summary summary"
      "rail trading workspace content content"
      "rail quick workspace system api"
      "rail events rexcore alerts schedule";
  }
  .rex-dashboard-v2-market,
  .rex-dashboard-v2-agents {
    display: none;
  }
}

@media (max-width: 1023px) {
  .rex-dashboard-v2 {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .rex-dashboard-v2-shell {
    height: auto;
    min-height: 100dvh;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-template-areas:
      "rail rail"
      "header header"
      "summary summary"
      "workspace workspace"
      "rexcore events"
      "trading quick"
      "content content"
      "system api"
      "alerts schedule"
      "market agents";
  }

  .rex-dashboard-v2-rail {
    grid-template-rows: auto auto;
  }

  .rex-dashboard-v2-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .rex-dashboard-v2-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "header"
      "summary"
      "rexcore"
      "workspace"
      "rail"
      "quick"
      "trading"
      "events"
      "recent"
      "content"
      "system"
      "api"
      "alerts"
      "schedule"
      "market"
      "agents";
    padding: var(--rex-v2-space-4);
  }

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

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

  .rex-dashboard-v2-command-line {
    margin: var(--rex-v2-space-5);
  }

  .rex-dashboard-v2-workspace-core {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "current"
      "history"
      "context"
      "sources";
  }

  .rex-dashboard-v2-current-turn,
  .rex-dashboard-v2-source-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .rex-dashboard-v2-message {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rex-dashboard-v2-message em {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rex-dashboard-v2 *,
  .rex-dashboard-v2 *::before,
  .rex-dashboard-v2 *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
