:root {
  /* PASS121 workbench polish retained */
  /* PASS127 frontier UX retained */
  color-scheme: dark;
  --mcai-bg: #030815;
  --mcai-surface: rgba(8, 16, 31, 0.84);
  --mcai-surface-raised: rgba(11, 20, 37, 0.94);
  --mcai-text: #edf6ff;
  --mcai-muted: #86a5bf;
  --mcai-aurora-green: #22e9bb;
  --mcai-aurora-cyan: #3bdcff;
  --mcai-aurora-violet: #7d63ff;
  --mcai-warning: #ffbc5e;
  --mcai-danger: #ff6a78;
  --mcai-success: #68f6a4;
  --mcai-border: rgba(98, 152, 202, 0.22);
  --mcai-border-strong: rgba(59, 220, 255, 0.36);
  --mcai-shadow: 0 28px 84px rgba(0, 0, 0, 0.46);
  --mcai-sidebar-track: clamp(214px, 16vw, 250px);
  --mcai-status-track: clamp(220px, 18vw, 300px);
  --mcai-tree-line: linear-gradient(180deg, rgba(2, 7, 15, 0) 0%, rgba(2, 7, 15, 0.84) 66%, rgba(2, 7, 15, 1) 100%);
  --mcai-tracks: radial-gradient(circle at 50% 50%, rgba(59, 220, 255, 0.28) 0, rgba(59, 220, 255, 0) 62%);
  --mcai-drawer-clearance: 5rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Space Grotesk", "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--mcai-text);
  background:
    radial-gradient(circle at top center, rgba(18, 44, 75, 0.56) 0%, rgba(3, 8, 21, 0) 42%),
    radial-gradient(circle at 80% 16%, rgba(25, 162, 190, 0.16) 0%, rgba(3, 8, 21, 0) 34%),
    linear-gradient(180deg, #040915 0%, #02050f 100%);
}

body.auth-gate-active {
  overflow: hidden;
}

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

button {
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: var(--mcai-aurora-cyan);
  text-decoration: none;
}

svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.aurora-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aurora-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(8px) saturate(1.04);
}

.aurora {
  position: absolute;
  inset: auto;
  filter: blur(40px);
  opacity: 0.56;
  mix-blend-mode: screen;
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

.aurora-one {
  width: 56vw;
  height: 24vw;
  top: 4vh;
  left: 18vw;
  background: radial-gradient(circle, rgba(36, 231, 195, 0.34) 0%, rgba(36, 231, 195, 0.08) 52%, rgba(36, 231, 195, 0) 76%);
}

.aurora-two {
  width: 34vw;
  height: 18vw;
  top: 12vh;
  right: 10vw;
  animation-duration: 22s;
  background: radial-gradient(circle, rgba(125, 99, 255, 0.18) 0%, rgba(59, 220, 255, 0.1) 42%, rgba(59, 220, 255, 0) 74%);
}

.tree-line {
  position: absolute;
  inset: auto 0 0;
  height: 34vh;
  background:
    linear-gradient(180deg, rgba(2, 7, 15, 0) 0%, rgba(2, 7, 15, 0.96) 86%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23030914' d='M0 288l27-42 27 11 26-75 27 48 27-97 26 58 27-101 27 88 26-28 27 38 27-109 26 82 27-21 27 102 26-31 27 14 27-126 26 71 27 28 27-87 26 75 27-31 27 124 26-55 27-88 27 27 26 55 27-121 27 89 26-52 27 46 27-116 26 72 27 36 27-68 26 77 27-53 27 72 26-90 27 28 27 102 26-25 27 35 27-125 26 90 27-60 27 77 26 15 27-54 27 42 26-119 27 75 27 32 26-47 27 61 27-26v150H0Z'/%3E%3C/svg%3E")
      bottom center / cover no-repeat;
  opacity: 0.92;
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--mcai-sidebar-track) minmax(0, 1fr);
  gap: 0.8rem;
  height: 100vh;
  padding: 2px;
  overflow: hidden;
  transition: filter 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.shell[data-sidebar-collapsed="true"] {
  --mcai-sidebar-track: 4.2rem;
}

.shell[data-status-collapsed="true"] {
  --mcai-status-track: 0px;
}

body.auth-gate-active .shell {
  filter: blur(10px) saturate(0.82);
  opacity: 0.34;
  transform: scale(0.992);
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 50% 0%, rgba(33, 160, 177, 0.16) 0%, rgba(3, 8, 21, 0) 34%),
    linear-gradient(180deg, rgba(2, 6, 14, 0.38) 0%, rgba(2, 7, 15, 0.84) 100%);
  backdrop-filter: blur(10px);
}

.auth-gate.hidden {
  display: none !important;
}

.auth-gate-shell {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(320px, 520px);
  gap: clamp(1.2rem, 2.6vw, 2rem);
  width: min(100%, 1040px);
  margin: auto;
  align-items: stretch;
}

.auth-gate-brand,
.auth-gate-card {
  border: 1px solid var(--mcai-border);
  border-radius: 30px;
  box-shadow: var(--mcai-shadow);
  backdrop-filter: blur(18px);
}

.auth-gate-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6, 15, 29, 0.95) 0%, rgba(4, 10, 21, 0.96) 100%),
    var(--mcai-tracks);
}

.auth-gate-brand::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: var(--mcai-tree-line);
  opacity: 0.92;
}

.auth-gate-logo,
.auth-gate-wordmark {
  position: relative;
  z-index: 1;
}

.auth-gate-logo {
  width: 100%;
  max-width: min(100%, 240px);
  margin: 0 auto 1rem;
  filter: drop-shadow(0 18px 42px rgba(24, 224, 197, 0.2));
}

.auth-gate-wordmark {
  text-align: center;
}

.auth-gate-wordmark p,
.auth-gate-wordmark h1,
.auth-gate-eyebrow {
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
}

.auth-gate-wordmark p {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 700;
}

.auth-gate-wordmark h1 {
  margin: 0.4rem 0 0;
  color: var(--mcai-aurora-cyan);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 600;
}

.auth-gate-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.5rem, 2.8vw, 2.2rem);
  background: linear-gradient(180deg, rgba(8, 16, 31, 0.94) 0%, rgba(6, 13, 25, 0.97) 100%);
}

.auth-gate-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.36rem 0.7rem;
  border: 1px solid rgba(59, 220, 255, 0.24);
  border-radius: 999px;
  color: var(--mcai-aurora-cyan);
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(9, 28, 44, 0.55);
}

.auth-gate-card h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.auth-gate-card p {
  margin: 0;
  color: rgba(237, 246, 255, 0.86);
  line-height: 1.6;
}

.auth-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.auth-gate-primary,
.auth-gate-secondary {
  min-height: 3.15rem;
  padding: 0.82rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.auth-gate-primary:hover,
.auth-gate-primary:focus-visible,
.auth-gate-secondary:hover,
.auth-gate-secondary:focus-visible {
  transform: translateY(-1px);
}

.auth-gate-primary {
  background: linear-gradient(135deg, rgba(32, 201, 233, 0.9) 0%, rgba(40, 235, 188, 0.88) 100%);
  color: #03131a;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(34, 233, 187, 0.18);
}

.auth-gate-secondary {
  background: rgba(8, 21, 37, 0.84);
  border-color: rgba(99, 154, 204, 0.26);
  color: var(--mcai-text);
}

.auth-gate-primary:disabled,
.auth-gate-secondary:disabled {
  opacity: 0.62;
  cursor: progress;
  transform: none;
}

.auth-gate-facts {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--mcai-muted);
}

.auth-gate-facts li {
  position: relative;
  padding-left: 1rem;
}

.auth-gate-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--mcai-success);
  box-shadow: 0 0 14px rgba(104, 246, 164, 0.48);
}

.auth-gate-status {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(96, 148, 198, 0.2);
  border-radius: 18px;
  background: rgba(7, 18, 33, 0.76);
  color: rgba(237, 246, 255, 0.82);
  line-height: 1.55;
}

.auth-gate-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  padding-top: 0.35rem;
  color: var(--mcai-muted);
  font-size: 0.9rem;
}

.auth-gate-footer a {
  color: var(--mcai-aurora-cyan);
  text-decoration: none;
}

.auth-gate-footer a:hover,
.auth-gate-footer a:focus-visible {
  text-decoration: underline;
}

.legal-page {
  margin: 0;
  min-height: 100vh;
  color: var(--mcai-text);
  background:
    radial-gradient(circle at top, rgba(34, 233, 187, 0.15), transparent 34%),
    radial-gradient(circle at 20% 20%, rgba(59, 220, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #050c18 0%, #030815 100%);
}

.legal-page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.legal-card {
  width: min(100%, 860px);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--mcai-border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(7, 16, 30, 0.96) 0%, rgba(4, 10, 20, 0.98) 100%);
  box-shadow: var(--mcai-shadow);
  backdrop-filter: blur(18px);
}

.legal-eyebrow {
  margin: 0 0 0.8rem;
  color: var(--mcai-aurora-cyan);
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
}

.legal-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.legal-lead {
  margin: 1rem 0 1.5rem;
  max-width: 68ch;
  color: rgba(237, 246, 255, 0.86);
}

.legal-card h2 {
  margin: 1.45rem 0 0.65rem;
  font-size: 1.1rem;
  color: var(--mcai-aurora-cyan);
}

.legal-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(237, 246, 255, 0.82);
  line-height: 1.65;
}

.legal-card li + li {
  margin-top: 0.35rem;
}

.legal-note {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(96, 148, 198, 0.16);
  color: var(--mcai-muted);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.2rem 0 0;
}

.legal-links a {
  color: var(--mcai-aurora-cyan);
}

.sidebar,
.topbar,
.hero-card,
.chat-shell,
.status-card,
.drawer-panel {
  border: 1px solid var(--mcai-border);
  background: linear-gradient(180deg, rgba(7, 15, 28, 0.92) 0%, rgba(5, 12, 24, 0.94) 100%);
  box-shadow: var(--mcai-shadow);
  backdrop-filter: blur(18px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 0;
  padding: 0.72rem;
  border-radius: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: padding 180ms ease, gap 180ms ease;
}

.shell[data-sidebar-collapsed="true"] .sidebar {
  padding-inline: 0.5rem;
}

.shell[data-sidebar-collapsed="true"] .brand-copy,
.shell[data-sidebar-collapsed="true"] .sidebar-mobile-tier,
.shell[data-sidebar-collapsed="true"] .sidebar-companion,
.shell[data-sidebar-collapsed="true"] .support-card,
.shell[data-sidebar-collapsed="true"] .sidebar-divider {
  display: none;
}

.shell[data-sidebar-collapsed="true"] .nav-stack {
  gap: 0.18rem;
}

.shell[data-sidebar-collapsed="true"] .nav-link {
  justify-content: center;
  gap: 0;
  padding-inline: 0.55rem;
}

.shell[data-sidebar-collapsed="true"] .nav-link span:last-child {
  display: none;
}

.shell[data-sidebar-collapsed="true"] .nav-link-icon {
  margin-inline: auto;
}

.brand-card {
  position: relative;
  padding: 0.3rem 0.5rem 0.45rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(5, 14, 30, 0.96) 0%, rgba(4, 10, 20, 0.9) 100%),
    var(--mcai-tracks);
  overflow: hidden;
}

.brand-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: var(--mcai-tree-line);
}

.brand-logo,
.brand-copy {
  position: relative;
  z-index: 1;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 172px;
  margin: 0 auto;
  filter: drop-shadow(0 16px 34px rgba(17, 217, 198, 0.18));
}

.brand-copy {
  display: none;
}

.hero-brand p,
.hero-brand h2,
.workspace-switcher,
.frontier-chip,
.status-card h3,
.route-banner-label,
.mode-tab,
.nav-link span:last-child,
.drawer-panel h4,
.sidebar-section-label,
.message-panel-eyebrow {
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

.nav-stack {
  display: grid;
  flex: 0 0 auto;
  gap: 0.25rem;
  min-height: max-content;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.54rem 0.68rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(237, 246, 255, 0.9);
  font-size: 0.91rem;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  border-color: rgba(59, 220, 255, 0.45);
  background: linear-gradient(180deg, rgba(12, 30, 46, 0.9) 0%, rgba(8, 23, 39, 0.92) 100%);
  transform: translateX(2px);
}

.nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.88rem;
  height: 1.88rem;
  border-radius: 11px;
  color: var(--mcai-aurora-cyan);
  background: rgba(59, 220, 255, 0.08);
}

.sidebar-divider {
  height: 1px;
  background: rgba(76, 127, 177, 0.18);
}

.sidebar-companion {
  display: grid;
  flex: 0 0 auto;
  gap: 0.45rem;
}

.sidebar-section-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.companion-inline {
  display: flex;
  align-items: center;
  gap: 0.82rem;
  width: 100%;
  padding: 0.55rem 0.15rem;
  text-align: left;
}

.sidebar-companion-pack {
  display: grid;
  gap: 0.45rem;
}

.companion-pack-item {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  padding: 0.7rem 0.82rem;
  border: 1px solid rgba(76, 127, 177, 0.18);
  border-radius: 14px;
  background: rgba(6, 15, 27, 0.56);
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.companion-pack-item:hover,
.companion-pack-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(59, 220, 255, 0.34);
  background: rgba(9, 22, 37, 0.84);
}

.companion-pack-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}

.companion-pack-topline strong {
  font-size: 0.96rem;
  font-weight: 600;
}

.companion-pack-topline span {
  color: rgba(147, 173, 190, 0.86);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.companion-pack-summary {
  color: var(--mcai-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.companion-inline-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.companion-inline strong,
.support-card strong,
.message-author,
.route-banner strong,
.drawer-panel strong,
.workspace-switcher span,
.health-list strong,
.message-panel-copy strong {
  font-weight: 600;
}

.companion-inline-copy span,
.support-card p,
.health-list span,
.activity-list span,
.message-meta,
.drawer-list li,
.status-card p,
.message-panel-copy p,
.message-panel-detail {
  color: var(--mcai-muted);
}

.paw-mark {
  display: inline-flex;
  width: 2.45rem;
  height: 2.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--mcai-aurora-cyan);
  background: rgba(59, 220, 255, 0.08);
  border: 1px solid rgba(59, 220, 255, 0.12);
}

.paw-mark svg,
.composer-mark svg,
.message-avatar.paw svg {
  width: 1.38rem;
  height: 1.38rem;
  fill: currentColor;
  stroke: none;
}

.message-panel-icon svg {
  width: 1.38rem;
  height: 1.38rem;
}

.message-asset {
  display: grid;
  gap: 0.45rem;
  margin: 0.95rem 0 0;
}

.message-asset img {
  width: min(100%, 420px);
  border-radius: 18px;
  border: 1px solid rgba(76, 127, 177, 0.2);
  background: rgba(5, 12, 22, 0.88);
  box-shadow: 0 18px 38px rgba(3, 12, 23, 0.34);
}

.message-asset figcaption {
  color: var(--mcai-muted);
  font-size: 0.84rem;
}

.companion-dot,
.frontier-chip i,
.tree-line-dot,
.trust-band i,
.health-dot {
  display: inline-block;
  border-radius: 999px;
  background: var(--mcai-success);
  box-shadow: 0 0 16px rgba(104, 246, 164, 0.48);
}

.companion-dot {
  width: 0.64rem;
  height: 0.64rem;
  margin-left: auto;
}

.support-card {
  position: relative;
  flex: 0 0 auto;
  margin-top: auto;
  min-height: 140px;
  padding: 0.9rem;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 12, 24, 0.44) 0%, rgba(4, 11, 21, 0.96) 100%),
    url("./assets/project-sasquatch-hero-scene.png") center bottom / cover no-repeat;
}

.sidebar-companion-pack {
  display: none;
}

.support-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 8, 17, 0.2) 0%, rgba(2, 8, 17, 0.78) 48%, rgba(2, 8, 17, 0.96) 100%);
}

.support-card::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: -1.1rem;
  width: 11rem;
  height: 11.5rem;
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(circle at 39% 31%, rgba(61, 237, 255, 0.98) 0 2px, transparent 3px),
    radial-gradient(circle at 56% 30%, rgba(61, 237, 255, 0.98) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 63%, rgba(2, 6, 12, 0.92) 0 35%, transparent 60%),
    radial-gradient(circle at 50% 83%, rgba(2, 6, 12, 0.94) 0 49%, transparent 72%),
    linear-gradient(180deg, rgba(8, 20, 28, 0) 0%, rgba(2, 6, 12, 0.94) 46%, rgba(2, 6, 12, 1) 100%);
  filter: blur(0.3px);
  opacity: 0.98;
}

.support-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  margin-top: auto;
}

.sidebar-mobile-tier {
  display: grid;
  gap: 0.75rem;
}

.sidebar-tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.sidebar-tier-button {
  width: 100%;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(76, 127, 177, 0.22);
  border-radius: 14px;
  color: rgba(237, 246, 255, 0.82);
  background: rgba(6, 15, 27, 0.58);
  text-align: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.sidebar-tier-button:hover,
.sidebar-tier-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(59, 220, 255, 0.34);
  background: rgba(10, 23, 38, 0.84);
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.8rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.topbar {
  position: relative;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0.35rem 0.15rem 0.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-left,
.topbar-right,
.workspace-switcher,
.frontier-chip,
.composer-actions {
  display: flex;
  align-items: center;
}

.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-width: 0;
}

.topbar-left,
.topbar-right {
  gap: 0.62rem;
}

.workspace-switcher {
  gap: 0.45rem;
  color: rgba(237, 246, 255, 0.92);
}

.workspace-switcher span {
  font-size: 1.1rem;
}

.response-profile-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  padding: 0.24rem;
  border: 1px solid rgba(59, 220, 255, 0.16);
  border-radius: 18px;
  background: rgba(5, 17, 29, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.response-profile-option {
  display: grid;
  gap: 0.12rem;
  min-width: 88px;
  padding: 0.54rem 0.82rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(237, 246, 255, 0.74);
  text-align: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.response-profile-option span {
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.response-profile-option small {
  color: rgba(134, 165, 191, 0.88);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.response-profile-option:hover,
.response-profile-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(59, 220, 255, 0.22);
  color: rgba(237, 246, 255, 0.94);
}

.response-profile-option.active {
  border-color: rgba(59, 220, 255, 0.34);
  color: var(--mcai-text);
  background:
    linear-gradient(180deg, rgba(12, 32, 44, 0.96) 0%, rgba(7, 22, 34, 0.92) 100%),
    radial-gradient(circle at top, rgba(34, 233, 187, 0.14) 0%, rgba(34, 233, 187, 0) 58%);
  box-shadow:
    inset 0 0 0 1px rgba(125, 99, 255, 0.08),
    0 10px 24px rgba(6, 17, 32, 0.34);
}

.response-profile-option.active small {
  color: var(--mcai-aurora-cyan);
}

.response-profile-option:disabled,
.response-profile-option.locked {
  opacity: 0.46;
  border-color: rgba(76, 127, 177, 0.14);
  background: rgba(6, 15, 27, 0.38);
  color: rgba(237, 246, 255, 0.46);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.drawer-tone-picker {
  display: flex;
  width: 100%;
}

.legendary-voice-picker {
  margin-top: 0.35rem;
}

.drawer-tone-picker .response-profile-option {
  flex: 1 1 0;
  min-width: 0;
}

.response-tone-note {
  margin: 0.75rem 0 0;
  color: rgba(134, 165, 191, 0.92);
}

.frontier-chip {
  gap: 0.68rem;
  padding: 0.74rem 1rem;
  border: 1px solid rgba(59, 220, 255, 0.24);
  border-radius: 16px;
  color: rgba(237, 246, 255, 0.94);
  background: rgba(5, 17, 29, 0.78);
}

.frontier-chip-icon {
  color: var(--mcai-aurora-cyan);
}

.frontier-chip i {
  width: 0.54rem;
  height: 0.54rem;
}

.icon-button,
.avatar-button,
.composer-action,
.composer-icon,
.send-button,
.ghost-action,
.activity-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.icon-button,
.avatar-button,
.composer-icon {
  width: 2.76rem;
  height: 2.76rem;
  border: 1px solid rgba(76, 127, 177, 0.25);
  border-radius: 16px;
  background: rgba(7, 17, 31, 0.72);
}

.topbar .icon-button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.icon-button:hover,
.icon-button:focus-visible,
.avatar-button:hover,
.avatar-button:focus-visible,
.composer-action:hover,
.composer-action:focus-visible,
.composer-icon:hover,
.composer-icon:focus-visible,
.send-button:hover,
.send-button:focus-visible,
.ghost-action:hover,
.ghost-action:focus-visible,
.mode-tab:hover,
.mode-tab:focus-visible,
.activity-link:hover,
.activity-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(59, 220, 255, 0.38);
}

.avatar-button {
  width: 2.85rem;
  color: var(--mcai-aurora-cyan);
  font-weight: 700;
  background: rgba(6, 15, 27, 0.6);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--mcai-status-track));
  gap: 0.64rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 180ms ease, gap 180ms ease;
}

.chat-column {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.8rem;
  overflow: hidden;
}

.hero-card {
  display: none;
}

.hero-backdrop,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(3, 8, 18, 0.14) 0%, rgba(3, 8, 18, 0.58) 88%),
    linear-gradient(90deg, rgba(2, 7, 15, 0.08) 0%, rgba(2, 7, 15, 0.16) 100%);
}

.hero-brand {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  height: 100%;
  text-align: center;
  gap: 0.42rem;
  padding: 1.75rem 2rem;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.hero-brand p {
  margin: 0;
  color: rgba(247, 251, 255, 0.96);
  font-size: clamp(1.9rem, 3vw, 3rem);
  letter-spacing: 0.15em;
}

.hero-brand h2 {
  margin: 0;
  color: var(--mcai-aurora-cyan);
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  letter-spacing: 0.24em;
}

.hero-brand span {
  color: rgba(247, 251, 255, 0.94);
  font-size: 1.02rem;
}

.hero-brand strong {
  color: var(--mcai-aurora-cyan);
  font-size: 1.12rem;
  font-weight: 500;
}

.chat-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  gap: 0.66rem;
  padding: 0.78rem 0.86rem 0.72rem;
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  max-height: 100%;
  position: relative;
  isolation: isolate;
}

.chat-shell > :not(.aurora-field) {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.chat-shell.is-drop-target {
  box-shadow:
    0 0 0 1px rgba(59, 220, 255, 0.22) inset,
    0 0 0 1px rgba(59, 220, 255, 0.16);
}

.chat-shell.is-drop-target .composer-shell {
  border-color: rgba(59, 220, 255, 0.48);
  background: rgba(7, 19, 33, 0.96);
}

.chat-shell.is-drop-target .message-feed {
  outline: 1px dashed rgba(59, 220, 255, 0.24);
  outline-offset: 4px;
}

.mode-strip,
.mode-tabs,
.composer-shell,
.message-card,
.proof-grid,
.health-list li,
.activity-list li,
.tree-line-panel,
.route-banner,
.trust-band,
.attachment-row,
.drawer-panel header,
.drawer-inline-actions {
  display: flex;
  align-items: center;
}

.mode-strip,
.route-banner,
.trust-band,
.attachment-row,
.drawer-inline-actions {
  justify-content: space-between;
}

.mode-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.8rem;
  padding: 0 0.2rem;
  border-bottom: 1px solid rgba(76, 127, 177, 0.16);
}

.mode-tabs {
  flex-wrap: nowrap;
  gap: 0.95rem;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mode-tabs::-webkit-scrollbar {
  display: none;
}

.mode-tab,
.ghost-action {
  padding: 0.72rem 1rem;
  border: 1px solid rgba(76, 127, 177, 0.22);
  border-radius: 14px;
  color: rgba(237, 246, 255, 0.76);
  background: rgba(6, 15, 27, 0.58);
}

.ghost-action {
  min-width: 160px;
  gap: 0.55rem;
  flex: 0 0 auto;
  justify-content: center;
  background: rgba(5, 16, 27, 0.72);
}

.mode-tab {
  flex: 0 0 auto;
  position: relative;
  padding: 0.35rem 0 0.95rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mode-tab.active {
  color: var(--mcai-text);
  border-color: transparent;
  box-shadow: none;
}

.mode-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59, 220, 255, 0.88) 0%, rgba(59, 220, 255, 1) 100%);
}

.route-banner {
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(34, 233, 187, 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8, 22, 30, 0.95) 0%, rgba(8, 18, 24, 0.86) 100%);
}

.route-banner-label {
  display: block;
  color: var(--mcai-aurora-green);
  font-size: 0.85rem;
}

.route-banner strong {
  display: block;
  margin-top: 0.2rem;
}

.route-banner p {
  margin: 0.4rem 0 0;
  color: var(--mcai-muted);
}

.adult-language-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0.1rem 0 0.4rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(255, 163, 92, 0.34);
  border-radius: 999px;
  color: rgba(255, 219, 191, 0.96);
  background: rgba(56, 21, 9, 0.52);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(255, 163, 92, 0.05) inset;
}

.companion-rail {
  display: none;
}

.companion-card {
  display: grid;
  flex: 0 0 148px;
  gap: 0.22rem;
  justify-items: start;
  padding: 0.82rem 0.88rem;
  border: 1px solid rgba(76, 127, 177, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(9, 18, 32, 0.94) 0%, rgba(7, 15, 28, 0.94) 100%),
    var(--mcai-tracks);
  text-align: left;
  color: rgba(237, 246, 255, 0.8);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
  scroll-snap-align: start;
}

.companion-card:hover,
.companion-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(59, 220, 255, 0.42);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  color: var(--mcai-text);
}

.companion-card.active {
  border-color: rgba(34, 233, 187, 0.42);
  box-shadow: inset 0 0 0 1px rgba(59, 220, 255, 0.12), 0 18px 36px rgba(0, 0, 0, 0.26);
  color: var(--mcai-text);
}

.companion-card-mode,
.companion-card-badge {
  font-size: 0.78rem;
  color: var(--mcai-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.companion-card strong {
  font-size: 1rem;
  font-weight: 700;
}

.message-feed {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 0 0.25rem 0.6rem 0;
  overflow: auto;
  max-height: 100%;
  overscroll-behavior: contain;
  scroll-padding-bottom: 1.6rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.message-feed::-webkit-scrollbar {
  display: none;
}

.message-row {
  display: grid;
  gap: 0.42rem;
}

.message-row.user {
  justify-items: end;
}

.message-card {
  align-items: flex-start;
  gap: 0.9rem;
  max-width: min(820px, 100%);
}

.message-row.user .message-card {
  justify-self: end;
}

.message-row.user .message-body {
  align-items: end;
}

.message-row.user .message-author-row {
  justify-content: flex-end;
}

.message-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 18px;
  border: 1px solid rgba(59, 220, 255, 0.34);
  background: rgba(5, 15, 28, 0.92);
}

.message-avatar.user-badge {
  font-weight: 700;
  color: var(--mcai-aurora-cyan);
}

.message-body {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.message-author-row {
  display: flex;
  align-items: baseline;
  gap: 0.62rem;
}

.message-content {
  max-width: 560px;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(82, 128, 172, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11, 21, 36, 0.84) 0%, rgba(8, 16, 28, 0.9) 100%);
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.message-row.user .message-content {
  background: linear-gradient(180deg, rgba(38, 47, 63, 0.92) 0%, rgba(28, 35, 49, 0.96) 100%);
  max-width: 380px;
}

.starter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.05rem;
}

.trailhead-rail {
  display: grid;
  gap: 0.75rem;
  margin: 0.1rem 0 0.6rem;
  padding: 0.78rem 0.85rem 0.82rem;
  border: 1px solid rgba(76, 127, 177, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8, 17, 30, 0.82) 0%, rgba(6, 14, 25, 0.9) 100%);
}

.trailhead-rail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.trailhead-rail-header-copy {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.trailhead-rail-header strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1rem;
}

.trailhead-rail-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.3rem;
  color: var(--mcai-aurora-cyan);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trailhead-rail-header p {
  max-width: 24rem;
  margin: 0;
  color: rgba(237, 246, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: right;
}

.trailhead-quick-actions {
  margin-top: 0;
}

.trailhead-document-rail {
  margin-top: 0.2rem;
}

.trailhead-gallery-rail {
  display: none;
}

.trailhead-document-actions {
  margin-top: 0;
}

.contextual-action-tray {
  gap: 0.6rem;
}

.contextual-action-tray .trailhead-quick-actions,
.contextual-action-tray .trailhead-overflow-actions {
  margin-top: 0;
}

.contextual-action-tray .trailhead-overflow-actions {
  padding-top: 0.1rem;
  border-top: 1px solid rgba(76, 127, 177, 0.16);
}

.trailhead-chip {
  white-space: nowrap;
}

.trailhead-gallery-chip {
  border-style: dashed;
}

.trailhead-handoff-button {
  align-self: end;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(59, 220, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 25, 41, 0.72);
  color: var(--mcai-text);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.trailhead-handoff-button:hover,
.trailhead-handoff-button:focus-visible {
  border-color: rgba(59, 220, 255, 0.52);
  background: rgba(12, 35, 54, 0.92);
}

.selected-document-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.selected-document-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(59, 220, 255, 0.26);
  border-radius: 16px;
  background: rgba(5, 17, 28, 0.68);
  color: var(--mcai-text);
  max-width: 100%;
}

.selected-document-chip strong {
  font-size: 0.9rem;
}

.selected-document-chip span {
  color: rgba(237, 246, 255, 0.72);
  font-size: 0.84rem;
}

.selected-document-chip-actions {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.document-receipt-button {
  width: 100%;
  text-align: left;
}

.document-receipt-button.is-selected {
  border-color: rgba(59, 220, 255, 0.48);
  background: rgba(8, 25, 41, 0.92);
  color: var(--mcai-text);
}

.document-receipt-button .document-receipt-meta {
  display: block;
  margin-top: 0.25rem;
  color: rgba(237, 246, 255, 0.7);
  font-size: 0.82rem;
}

.message-disclosure {
  margin-top: 12px;
  border: 1px solid rgba(126,240,208,.14);
  border-radius: 14px;
  background: rgba(2, 16, 25, .48);
  padding: 10px 12px;
}

.message-disclosure summary {
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--accent);
  outline: none;
  list-style: none;
}

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

.message-disclosure-grid {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.message-disclosure-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  font-size: .88rem;
}

.message-disclosure-key {
  color: var(--muted);
}

.message-disclosure-value {
  color: var(--text);
  text-align: right;
}

.starter-chip {
  padding: 0.66rem 0.84rem;
  border: 1px solid rgba(76, 127, 177, 0.22);
  border-radius: 14px;
  color: rgba(237, 246, 255, 0.8);
  background: rgba(6, 15, 27, 0.52);
  font-size: 0.92rem;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.starter-chip:hover,
.starter-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(59, 220, 255, 0.38);
  background: rgba(8, 20, 34, 0.82);
  color: var(--mcai-text);
}

.starter-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.message-panel {
  display: grid;
  gap: 0.9rem;
  width: min(560px, 100%);
  padding: 1rem 1.05rem;
  border: 1px solid rgba(76, 127, 177, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 20, 33, 0.92) 0%, rgba(10, 18, 29, 0.94) 100%);
}

.message-panel-summary,
.message-panel-footer {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.message-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 16px;
  color: var(--mcai-aurora-cyan);
  background: rgba(59, 220, 255, 0.08);
  border: 1px solid rgba(59, 220, 255, 0.18);
}

.message-panel-icon.buildroom {
  color: var(--mcai-success);
}

.message-panel-icon.orb-weaver {
  color: var(--mcai-aurora-cyan);
}

.message-panel-icon.settings {
  color: var(--mcai-aurora-cyan);
}

.message-panel-copy {
  display: grid;
  gap: 0.22rem;
  flex: 1 1 auto;
  min-width: 0;
}

.message-panel-copy strong {
  font-size: 1.05rem;
}

.message-panel-copy p,
.message-panel-detail {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.message-panel-footer {
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.88rem;
  border-top: 1px solid rgba(76, 127, 177, 0.18);
}

.message-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.message-panel-eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.message-panel-button {
  padding: 0.78rem 1rem;
  border: 1px solid rgba(59, 220, 255, 0.38);
  border-radius: 14px;
  color: var(--mcai-aurora-cyan);
  background: rgba(4, 16, 25, 0.62);
  white-space: nowrap;
}

/* Compact collapsed panel — renders as a single inline bar, not a full card block */
.message-panel-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.28rem 0;
}

.message-panel-compact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mcai-muted, rgba(160, 185, 210, 0.62));
}

.message-panel-compact-action {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.62rem;
  border: 1px solid rgba(59, 220, 255, 0.28);
  border-radius: 8px;
  color: var(--mcai-aurora-cyan);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.message-panel-compact-action:hover {
  border-color: rgba(59, 220, 255, 0.55);
  background: rgba(59, 220, 255, 0.07);
}

.composer {
  display: grid;
  gap: 0.72rem;
  position: relative;
  margin-top: 0;
  align-self: stretch;
  z-index: 2;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  background: linear-gradient(180deg, rgba(5, 12, 22, 0) 0%, rgba(5, 12, 22, 0.84) 22%, rgba(5, 12, 22, 0.98) 100%);
}

.composer-shell {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.72rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(76, 127, 177, 0.22);
  border-radius: 18px;
  background: rgba(4, 11, 20, 0.9);
  align-items: center;
}

.composer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.72rem;
  height: 2.72rem;
  border: 1px solid rgba(76, 127, 177, 0.22);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(10, 19, 32, 0.94);
}

.composer-shell input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 0;
  color: var(--mcai-text);
  background: transparent;
  border: 0;
  outline: 0;
}

.composer-shell input::placeholder {
  color: rgba(134, 165, 191, 0.74);
}

.composer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.55rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(76, 127, 177, 0.16);
  border-radius: 999px;
  background: rgba(5, 13, 23, 0.62);
  color: var(--mcai-muted);
  font-size: 0.84rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.composer-status-spinner {
  flex: 0 0 auto;
  width: 0.88rem;
  height: 0.88rem;
  border: 2px solid rgba(134, 165, 191, 0.5);
  border-right-color: transparent;
  border-radius: 999px;
  opacity: 0.78;
}

.composer-status[data-phase="idle"] {
  opacity: 0.82;
}

.composer-status[data-phase="processing"],
.composer-status[data-phase="tool"] {
  color: var(--mcai-text);
  background: rgba(5, 16, 27, 0.86);
}

.composer-status[data-phase="processing"] {
  border-color: rgba(59, 220, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(59, 220, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.composer-status[data-phase="tool"] {
  border-color: rgba(34, 233, 187, 0.34);
  box-shadow: 0 0 0 1px rgba(34, 233, 187, 0.08), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.composer-status[data-phase="failed"] {
  color: #ffd8dc;
  background: rgba(36, 8, 14, 0.82);
  border-color: rgba(255, 106, 120, 0.36);
  box-shadow: 0 0 0 1px rgba(255, 106, 120, 0.08), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.composer-status[data-phase="complete"] {
  color: #dafce6;
  background: rgba(8, 25, 16, 0.76);
  border-color: rgba(104, 246, 164, 0.3);
  box-shadow: 0 0 0 1px rgba(104, 246, 164, 0.08), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.composer-status[data-phase="processing"] .composer-status-spinner {
  border-color: rgba(59, 220, 255, 0.92);
  border-right-color: transparent;
  animation: composerSpin 0.72s linear infinite;
}

.composer-status[data-phase="tool"] .composer-status-spinner {
  border-color: rgba(34, 233, 187, 0.92);
  border-right-color: transparent;
  animation: composerSpin 0.62s linear infinite;
}

.composer-status[data-phase="failed"] .composer-status-spinner {
  border-color: rgba(255, 106, 120, 0.88);
  border-right-color: transparent;
}

.composer-status[data-phase="complete"] .composer-status-spinner {
  border-color: rgba(104, 246, 164, 0.88);
  border-right-color: transparent;
}

.composer-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.54rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.composer-action,
.send-button {
  min-height: 2.72rem;
  padding: 0.72rem 0.98rem;
  border: 1px solid rgba(76, 127, 177, 0.24);
  border-radius: 14px;
  background: rgba(7, 17, 31, 0.78);
  color: rgba(237, 246, 255, 0.92);
  font-family: "Rajdhani", "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.composer-action {
  min-width: 4.9rem;
}

.composer-session {
  min-width: 6rem;
}

.send-button {
  min-width: 4.9rem;
  color: #021019;
  background: linear-gradient(180deg, rgba(96, 228, 255, 1) 0%, rgba(47, 197, 255, 1) 100%);
  box-shadow: 0 16px 24px rgba(59, 220, 255, 0.25);
}

.attachment-row {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem;
  margin-top: 0.72rem;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(76, 127, 177, 0.24);
  border-radius: 999px;
  background: rgba(6, 15, 27, 0.54);
  color: var(--mcai-muted);
}

.trust-band {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.15rem 0.1rem 0;
  border-top: 1px solid rgba(76, 127, 177, 0.16);
}

.conversation-jump-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 0.25rem;
}

.conversation-jump-button {
  padding: 0.46rem 0.8rem;
  border: 1px solid rgba(59, 220, 255, 0.24);
  border-radius: 999px;
  color: var(--mcai-text);
  background: rgba(6, 18, 30, 0.78);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.conversation-jump-button:hover,
.conversation-jump-button:focus-visible {
  border-color: rgba(59, 220, 255, 0.5);
  background: rgba(10, 29, 46, 0.92);
}

.trust-band span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: rgba(237, 246, 255, 0.82);
  white-space: nowrap;
}

.trust-band i {
  width: 0.45rem;
  height: 0.45rem;
}

.status-column {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0.48rem;
  overflow: hidden;
  transition: opacity 180ms ease, transform 180ms ease, width 180ms ease, min-width 180ms ease;
}

.status-column.is-collapsed {
  opacity: 0;
  transform: translateX(0.5rem);
  min-width: 0;
  width: 0;
  pointer-events: none;
}

.status-card-activity,
.status-card-health {
  display: none;
}

.support-card {
  display: none;
}

.status-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  border-radius: 20px;
  padding: 0.62rem 0.72rem;
  overflow: hidden;
}

.status-card h3 {
  margin: 0 0 0.3rem;
  color: var(--mcai-aurora-green);
  font-size: 0.96rem;
}

.status-card p {
  margin: 0;
  line-height: 1.2;
  font-size: 0.9rem;
}

.tree-line-panel {
  position: relative;
  min-height: 52px;
  margin-bottom: 0.24rem;
  border: 1px solid rgba(76, 127, 177, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(10, 22, 35, 0.08) 0%, rgba(5, 10, 17, 0.86) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 140'%3E%3Cpath fill='%23060c15' d='M0 140V97l18-20 15 10 14-41 19 22 18-57 12 33 17-44 21 75 14-19 17 24 19-64 18 54 16-14 17 61 18-21 14 10 17-80 20 47 18 18 14-55 18 45 16-18 18 79 18-35 14-57 20 18 16 36 15-78 18 57 15-31 16 29 20-74 14 45 18 23 15-43 19 48 15-31 17 44 18-58 12 18 18 64 18-16 15 22 18-83 18 59 14-38 20 51 16 9 15-32 19 23 15-78 18 48 18 20 14-31 19 39 19-16v63H0Z'/%3E%3C/svg%3E")
      bottom center / cover no-repeat;
}

.tree-line-dot {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 0.72rem;
  height: 0.72rem;
  transform: translateY(-50%);
  animation: watchPulse 2.8s ease-in-out infinite;
}

.thinking-cinema {
  position: relative;
  height: 56px;
  margin-top: 0.24rem;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(7, 14, 29, 0.8) 0%, rgba(4, 10, 21, 1) 100%);
}

.thinking-cinema video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

body[data-sasquatch-work-state="idle"] .aurora-video {
  opacity: 0.18;
  filter: blur(9px) saturate(0.98) brightness(0.92);
}

body[data-sasquatch-work-state="idle"] .aurora {
  opacity: 0.44;
  filter: blur(42px);
}

body[data-sasquatch-work-state="processing"] .aurora-video {
  opacity: 0.5;
  filter: blur(4px) saturate(1.28) brightness(1.18) contrast(1.08);
}

body[data-sasquatch-work-state="tool"] .aurora-video {
  opacity: 0.58;
  filter: blur(4px) saturate(1.34) brightness(1.24) contrast(1.1);
}

body[data-sasquatch-work-state="failed"] .aurora-video {
  opacity: 0.18;
  filter: blur(8px) saturate(0.82) brightness(0.86);
}

body[data-sasquatch-work-state="complete"] .aurora-video {
  opacity: 0.28;
  filter: blur(7px) saturate(1.04) brightness(0.98);
}

body[data-sasquatch-work-state="processing"] .aurora,
body[data-sasquatch-work-state="tool"] .aurora {
  opacity: 0.94;
  filter: blur(30px);
}

body[data-sasquatch-work-state="failed"] .aurora {
  opacity: 0.48;
  filter: blur(42px);
}

body[data-sasquatch-work-state="complete"] .aurora {
  opacity: 0.58;
  filter: blur(38px);
}

body[data-sasquatch-work-state="processing"] .tree-line-panel {
  border-color: rgba(59, 220, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(59, 220, 255, 0.08), 0 0 24px rgba(59, 220, 255, 0.14);
}

body[data-sasquatch-work-state="tool"] .tree-line-panel {
  border-color: rgba(34, 233, 187, 0.34);
  box-shadow: 0 0 0 1px rgba(34, 233, 187, 0.08), 0 0 28px rgba(34, 233, 187, 0.16);
}

body[data-sasquatch-work-state="failed"] .tree-line-panel {
  border-color: rgba(255, 106, 120, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 106, 120, 0.08), 0 0 20px rgba(255, 106, 120, 0.12);
}

body[data-sasquatch-work-state="complete"] .tree-line-panel {
  border-color: rgba(104, 246, 164, 0.24);
  box-shadow: 0 0 0 1px rgba(104, 246, 164, 0.06), 0 0 18px rgba(104, 246, 164, 0.1);
}

body[data-sasquatch-work-state="processing"] .tree-line-dot {
  width: 0.78rem;
  height: 0.78rem;
  background: radial-gradient(circle, rgba(59, 220, 255, 1) 0%, rgba(34, 233, 187, 0.76) 58%, rgba(34, 233, 187, 0) 76%);
  box-shadow: 0 0 0 0.42rem rgba(59, 220, 255, 0.08), 0 0 18px rgba(59, 220, 255, 0.34);
  animation-duration: 1.6s;
}

body[data-sasquatch-work-state="tool"] .tree-line-dot {
  width: 0.8rem;
  height: 0.8rem;
  background: radial-gradient(circle, rgba(34, 233, 187, 1) 0%, rgba(59, 220, 255, 0.8) 58%, rgba(59, 220, 255, 0) 76%);
  box-shadow: 0 0 0 0.46rem rgba(34, 233, 187, 0.1), 0 0 20px rgba(34, 233, 187, 0.34);
  animation-duration: 1.18s;
}

body[data-sasquatch-work-state="failed"] .tree-line-dot {
  width: 0.76rem;
  height: 0.76rem;
  background: radial-gradient(circle, rgba(255, 106, 120, 1) 0%, rgba(255, 188, 94, 0.74) 58%, rgba(255, 188, 94, 0) 76%);
  box-shadow: 0 0 0 0.38rem rgba(255, 106, 120, 0.1), 0 0 18px rgba(255, 106, 120, 0.28);
  animation-duration: 2.2s;
}

body[data-sasquatch-work-state="complete"] .tree-line-dot {
  width: 0.76rem;
  height: 0.76rem;
  background: radial-gradient(circle, rgba(104, 246, 164, 1) 0%, rgba(34, 233, 187, 0.78) 58%, rgba(34, 233, 187, 0) 76%);
  box-shadow: 0 0 0 0.38rem rgba(104, 246, 164, 0.08), 0 0 16px rgba(104, 246, 164, 0.28);
  animation-duration: 2.6s;
}

body[data-sasquatch-work-state="processing"] .thinking-cinema,
body[data-sasquatch-work-state="tool"] .thinking-cinema {
  box-shadow: 0 0 0 1px rgba(59, 220, 255, 0.18), 0 0 32px rgba(59, 220, 255, 0.16), 0 0 68px rgba(34, 233, 187, 0.08);
}

body[data-sasquatch-work-state="processing"] .composer-status-spinner,
body[data-sasquatch-work-state="tool"] .composer-status-spinner {
  box-shadow: 0 0 0 1px rgba(59, 220, 255, 0.12);
}

body[data-sasquatch-work-state="tool"] .thinking-cinema {
  box-shadow: 0 0 0 1px rgba(34, 233, 187, 0.2), 0 0 40px rgba(34, 233, 187, 0.2), 0 0 72px rgba(59, 220, 255, 0.14);
}

body[data-sasquatch-work-state="failed"] .thinking-cinema {
  box-shadow: 0 0 0 1px rgba(255, 106, 120, 0.2), 0 0 24px rgba(255, 106, 120, 0.14);
}

body[data-sasquatch-work-state="complete"] .thinking-cinema {
  box-shadow: 0 0 0 1px rgba(104, 246, 164, 0.16), 0 0 22px rgba(104, 246, 164, 0.12);
}

body[data-sasquatch-work-state="processing"] .thinking-cinema video {
  opacity: 1;
  filter: saturate(1.2) brightness(1.06) contrast(1.04);
}

body[data-sasquatch-work-state="tool"] .thinking-cinema video {
  opacity: 1;
  filter: saturate(1.3) brightness(1.12) contrast(1.06);
}

body[data-sasquatch-work-state="failed"] .thinking-cinema video {
  opacity: 0.84;
  filter: saturate(0.86) brightness(0.88) contrast(0.98);
}

body[data-sasquatch-work-state="complete"] .thinking-cinema video {
  opacity: 0.9;
  filter: saturate(1.04) brightness(0.98) contrast(1);
}

.track-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
  margin-top: 0.24rem;
}

.track-step {
  position: relative;
  height: 20px;
  border-radius: 999px;
  background: rgba(13, 20, 36, 0.8);
  overflow: hidden;
}

.track-step::before {
  content: "";
  position: absolute;
  inset: 6px 8px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 220, 255, 0.24) 0%, rgba(59, 220, 255, 0) 65%);
}

.track-step.active::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 38%, rgba(34, 233, 187, 0.85) 0 7px, transparent 8px),
    radial-gradient(circle at 65% 50%, rgba(34, 233, 187, 0.65) 0 5px, transparent 6px),
    radial-gradient(circle at 35% 50%, rgba(34, 233, 187, 0.65) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 70%, rgba(59, 220, 255, 0.55) 0 8px, transparent 9px);
  animation: trackPulse 1.8s ease-in-out infinite;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.34rem;
}

.proof-light {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  padding: 0.28rem 0.12rem;
  border: 1px solid rgba(76, 127, 177, 0.18);
  border-radius: 16px;
  background: rgba(7, 17, 31, 0.6);
  text-align: center;
  font-size: 0.8rem;
}

.proof-light i {
  width: 0.86rem;
  height: 0.86rem;
  border-radius: 999px;
  background: rgba(120, 140, 163, 0.22);
  box-shadow: none;
}

.proof-light.ready i {
  background: var(--mcai-success);
  box-shadow: 0 0 16px rgba(104, 246, 164, 0.44);
}

.proof-light.pending i {
  background: rgba(120, 140, 163, 0.26);
  box-shadow: none;
}

.proof-light.blocked i {
  background: var(--mcai-danger);
  box-shadow: 0 0 16px rgba(255, 106, 120, 0.32);
}

.health-list,
.activity-list,
.drawer-list,
.workspace-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.34rem;
  min-height: 0;
}

.health-list li,
.activity-list li {
  justify-content: space-between;
  gap: 0.55rem;
  font-size: 0.86rem;
}

.health-list li {
  line-height: 1.18;
}

.activity-list li {
  align-items: flex-start;
}

.activity-list span {
  white-space: nowrap;
}

.health-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.health-dot {
  width: 0.5rem;
  height: 0.5rem;
}

.status-card-activity {
  display: none;
}

.status-card-health {
  display: none;
}

.support-card {
  display: none;
}

.status-card-health .health-list,
.status-card-activity .activity-list {
  min-height: 0;
  overflow: auto;
  padding-right: 0.12rem;
}

.activity-link {
  align-self: flex-start;
  padding: 0;
  color: var(--mcai-aurora-cyan);
}

.drawer-backdrop {
  position: fixed;
  inset: var(--mcai-drawer-clearance) 0 0;
  z-index: 20;
  background: rgba(3, 8, 21, 0.58);
}

.drawer-panel {
  position: fixed;
  top: var(--mcai-drawer-clearance);
  right: 1.4rem;
  z-index: 21;
  width: min(444px, calc(100vw - 2rem));
  max-height: calc(100vh - var(--mcai-drawer-clearance) - 1.4rem);
  padding: 1rem;
  border-radius: 28px;
  overflow: auto;
}

.drawer-panel-wide {
  width: min(820px, calc(100vw - 2rem));
}

.drawer-panel header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.drawer-panel header span {
  display: block;
  color: var(--mcai-aurora-cyan);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.drawer-body {
  display: grid;
  gap: 1rem;
}

.drawer-body section {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(76, 127, 177, 0.18);
  border-radius: 20px;
  background: rgba(6, 15, 27, 0.66);
}

.drawer-surface-body {
  gap: 1.15rem;
}

.surface-hero-card {
  display: grid;
  gap: 0.9rem;
  background:
    linear-gradient(180deg, rgba(9, 24, 41, 0.92) 0%, rgba(7, 16, 28, 0.96) 100%),
    radial-gradient(circle at top right, rgba(34, 233, 187, 0.16) 0%, rgba(34, 233, 187, 0) 56%);
}

.surface-hero-card p,
.surface-card p,
.surface-card span,
.surface-item-copy p,
.surface-item-copy span,
.surface-pill {
  margin: 0;
  color: var(--mcai-muted);
}

.surface-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.surface-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(59, 220, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 15, 28, 0.62);
  font-size: 0.88rem;
}

.surface-pill strong {
  color: var(--mcai-text);
}

.surface-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.surface-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(76, 127, 177, 0.18);
  border-radius: 20px;
  background: rgba(6, 15, 27, 0.66);
}

.surface-card header,
.surface-item,
.surface-item-copy {
  display: grid;
}

.surface-card header {
  gap: 0.22rem;
}

.surface-card header strong,
.surface-item-copy strong {
  color: var(--mcai-text);
}

.surface-item-list {
  display: grid;
  gap: 0.7rem;
}

.surface-item {
  gap: 0.6rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(76, 127, 177, 0.16);
  border-radius: 16px;
  background: rgba(4, 11, 20, 0.72);
}

.surface-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.surface-item-copy {
  gap: 0.2rem;
  min-width: 0;
}

.surface-item-copy span,
.surface-item-copy p {
  overflow-wrap: anywhere;
}

.surface-item-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(59, 220, 255, 0.18);
  border-radius: 999px;
  color: var(--mcai-aurora-cyan);
  background: rgba(8, 20, 34, 0.8);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.surface-item-actions,
.surface-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.surface-link,
.surface-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.68rem 0.9rem;
  border: 1px solid rgba(59, 220, 255, 0.24);
  border-radius: 14px;
  color: var(--mcai-aurora-cyan);
  background: rgba(4, 16, 25, 0.62);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.surface-link:hover,
.surface-link:focus-visible,
.surface-inline-button:hover,
.surface-inline-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(59, 220, 255, 0.38);
  background: rgba(7, 19, 30, 0.86);
}

.surface-inline-button {
  color: var(--mcai-text);
}

.surface-inline-button:disabled {
  opacity: 0.48;
  border-color: rgba(76, 127, 177, 0.14);
  color: rgba(237, 246, 255, 0.5);
  cursor: not-allowed;
  transform: none;
}

.surface-empty {
  padding: 0.82rem 0.9rem;
  border: 1px dashed rgba(76, 127, 177, 0.18);
  border-radius: 16px;
  color: var(--mcai-muted);
  background: rgba(4, 11, 20, 0.56);
}

.drawer-body h4 {
  margin: 0 0 0.65rem;
  color: var(--mcai-text);
  font-size: 1rem;
}

.drawer-list li {
  color: var(--mcai-muted);
  line-height: 1.55;
}

.drawer-workspace {
  display: grid;
  gap: 0.95rem;
}

.drawer-workspace-copy p,
.workspace-card p,
.workspace-preview-header p,
.workspace-note,
.workspace-list li {
  margin: 0;
  color: var(--mcai-muted);
}

.drawer-inline-actions {
  gap: 0.58rem;
  flex-wrap: wrap;
}

.workspace-card,
.workspace-preview-textarea,
.workspace-download-link,
.workspace-list li,
.workspace-form input,
.workspace-form textarea,
.workspace-form select {
  border: 1px solid rgba(76, 127, 177, 0.18);
  background: rgba(5, 13, 24, 0.7);
}

.workspace-card {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
}

.workspace-form {
  display: grid;
  gap: 0.75rem;
}

.workspace-form-label {
  display: grid;
  gap: 0.35rem;
  color: rgba(237, 246, 255, 0.88);
  font-size: 0.94rem;
}

.workspace-form input,
.workspace-form textarea,
.workspace-form select,
.workspace-preview-textarea {
  width: 100%;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  color: var(--mcai-text);
  outline: none;
}

.workspace-form textarea,
.workspace-preview-textarea {
  resize: vertical;
}

.workspace-inline-fields {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.workspace-inline-fields > * {
  flex: 1 1 0;
}

.workspace-subsection {
  display: grid;
  gap: 0.55rem;
}

.workspace-subsection h5 {
  margin: 0;
}

.workspace-list li {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  line-height: 1.5;
}

.workspace-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
}

.workspace-list button strong {
  display: block;
  color: var(--mcai-text);
}

.workspace-list button span {
  display: block;
  color: var(--mcai-muted);
  font-size: 0.9rem;
}

.workspace-list button.is-active strong,
.workspace-list button.is-active span:last-child {
  color: var(--mcai-aurora-cyan);
}

.workspace-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.workspace-preview-textarea {
  min-height: 220px;
  font-family: "SFMono-Regular", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

.workspace-downloads {
  display: grid;
  gap: 0.55rem;
}

.workspace-download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  color: var(--mcai-text);
}

.workspace-download-link small {
  display: block;
  color: var(--mcai-muted);
}

.workspace-form input:disabled,
.workspace-form textarea:disabled,
.workspace-form select:disabled,
.ghost-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: inline-flex;
}

@keyframes auroraDrift {
  from {
    transform: translate3d(-2%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(5%, 2%, 0) scale(1.08);
  }
}

@keyframes watchPulse {
  0%,
  100% {
    transform: translateY(-50%) scale(0.96);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-50%) scale(1.06);
    opacity: 1;
  }
}

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

@keyframes trackPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

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

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

  .sidebar {
    position: fixed;
    top: 0.7rem;
    left: 0.7rem;
    bottom: 0.7rem;
    z-index: 30;
    width: min(320px, calc(100vw - 1.4rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-115%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .status-column {
    display: none;
  }
}

@media (max-width: 980px) {
  .desktop-only {
    display: none;
  }

  .auth-gate {
    align-items: flex-start;
  }

  .auth-gate-shell {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin: 0 auto;
    padding-block: 0.2rem 1rem;
  }

  .auth-gate-brand {
    min-height: clamp(220px, 34svh, 280px);
  }

  .shell {
    height: 100dvh;
    min-height: 100dvh;
    padding:
      max(0.7rem, env(safe-area-inset-top))
      max(0.7rem, env(safe-area-inset-right))
    max(0.7rem, env(safe-area-inset-bottom))
    max(0.7rem, env(safe-area-inset-left));
    overflow: hidden;
  }

  .sidebar .nav-stack,
  .sidebar-mobile-tier,
  .sidebar-companion,
  .support-card {
    flex: 0 0 auto;
  }

  .support-card {
    margin-top: 0;
  }

  .workspace,
  .layout,
  .chat-column,
  .chat-shell,
  .message-feed {
    min-height: 0;
  }

  .workspace,
  .layout,
  .chat-column {
    height: 100%;
  }

  .chat-column {
    grid-template-rows: minmax(0, 1fr);
  }

  .mode-strip {
    display: none;
  }

  .chat-shell {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .route-banner {
    padding: 0.95rem 1rem;
    margin: 0 0.1rem;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 5;
    padding:
      calc(0.15rem + env(safe-area-inset-top))
      0.08rem
      0.35rem;
    background: linear-gradient(180deg, rgba(3, 8, 21, 0.96) 0%, rgba(3, 8, 21, 0.78) 78%, rgba(3, 8, 21, 0) 100%);
  }

  .topbar-left {
    min-width: 0;
  }

  .topbar-left > .icon-button:not(.mobile-only) {
    display: none;
  }

  .workspace-switcher span {
    font-size: 1rem;
  }

  .topbar-center {
    justify-content: flex-start;
    min-width: 0;
  }

  .response-profile-picker {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .response-profile-picker::-webkit-scrollbar {
    display: none;
  }

  .response-profile-option {
    min-width: 82px;
    padding-inline: 0.72rem;
  }

  .topbar-right {
    justify-self: end;
  }

  .trust-band {
    gap: 0.7rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  .trust-band::-webkit-scrollbar {
    display: none;
  }

  .message-content,
  .message-panel {
    max-width: 100%;
  }

  .message-feed {
    padding: 0 0.1rem 0.85rem;
    scroll-padding-bottom: 8.5rem;
  }

  .conversation-jump-row {
    padding-inline: 0.1rem;
  }

  .composer {
    position: relative;
    bottom: auto;
    margin-top: 0;
    padding:
      0.45rem 0 calc(0.45rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(5, 12, 22, 0) 0%, rgba(5, 12, 22, 0.84) 20%, rgba(5, 12, 22, 0.98) 100%);
  }

  .composer-shell {
    padding: 0.76rem 0.82rem;
    border-radius: 22px;
  }

  .trust-band {
    padding-top: 0.3rem;
  }

  .mobile-only {
    display: inline-flex;
  }

  .sidebar-mobile-tier.mobile-only {
    display: grid;
  }
}

@media (max-width: 820px) {
  :root {
    --mcai-drawer-clearance: 4.4rem;
  }

  .drawer-panel {
    padding: 1rem;
  }

  .drawer-panel-wide {
    width: min(100vw - 1rem, 100%);
  }

  .topbar,
  .status-card {
    border-radius: 22px;
  }

  .topbar-center {
    gap: 0.6rem;
  }

  .surface-section-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .composer-shell {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .composer-mark {
    display: none;
  }

  .composer-shell input {
    padding-inline: 0.15rem;
    padding-bottom: 0.15rem;
  }

  .composer-actions {
    order: 2;
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .composer-action,
  .send-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .send-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .auth-gate {
    padding:
      max(0.85rem, env(safe-area-inset-top))
      max(0.85rem, env(safe-area-inset-right))
      max(0.85rem, env(safe-area-inset-bottom))
      max(0.85rem, env(safe-area-inset-left));
  }

  .auth-gate-brand,
  .auth-gate-card {
    border-radius: 24px;
  }

  .auth-gate-shell {
    gap: 0.9rem;
  }

  .auth-gate-brand {
    min-height: clamp(180px, 28svh, 240px);
    padding: 1.25rem 1rem 1.1rem;
  }

  .auth-gate-logo {
    max-width: min(72vw, 220px);
    margin-bottom: 0.7rem;
  }

  .auth-gate-card {
    padding: 1.25rem 1rem 1.1rem;
  }

  .auth-gate-card h2 {
    font-size: 1.8rem;
  }

  .auth-gate-actions {
    flex-direction: column;
  }

  .auth-gate-primary,
  .auth-gate-secondary {
    width: 100%;
  }

  .shell {
    padding: 0.85rem;
  }

  .chat-shell {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  .route-banner {
    display: none;
  }

  .topbar {
    row-gap: 0.65rem;
  }

  .topbar-center {
    order: 3;
    grid-column: 1 / -1;
  }

  .response-profile-picker {
    justify-content: space-between;
  }

  .workspace-switcher {
    min-width: 0;
  }

  .workspace-switcher span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mode-strip,
  .workspace-inline-fields,
  .workspace-preview-header,
  .surface-item-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mode-tabs {
    width: 100%;
  }

  .mode-tab,
  .ghost-action {
    width: 100%;
    justify-content: center;
  }

  .trust-band {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .trust-band {
    display: none;
  }

  .message-content,
  .message-panel {
    max-width: 100%;
  }

  .message-card {
    gap: 0.72rem;
  }

  .message-avatar {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 15px;
  }

  .message-content,
  .message-panel {
    width: 100%;
    padding: 0.92rem 0.96rem;
  }

  .message-panel-summary,
  .message-panel-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .message-panel-footer {
    gap: 0.75rem;
  }

  .message-panel-button {
    width: 100%;
    white-space: normal;
  }

  .starter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .starter-chip {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .message-row.user .message-content {
    max-width: min(88vw, 380px);
  }

  .composer-shell {
    padding: 0.72rem 0.76rem;
  }

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

  .composer-action,
  .send-button {
    min-height: 2.52rem;
    padding: 0.66rem 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  .send-button {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .tree-line-dot,
  .track-step.active::after,
  .composer-status-spinner {
    animation: none !important;
  }

  * {
    scroll-behavior: auto;
  }
}
