/* MCU beta — same tokens / swirl / type as Pyx Assistant + Announcer */

html.mcu-page,
html.mcu-page body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.mcu-page body {
  min-height: 100dvh;
}

.mcu-stage {
  max-width: 880px;
  margin: 0 auto;
  min-height: 100dvh;
  height: auto;
  display: block;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  overflow: visible;
}

.mcu-stage > .swirl {
  pointer-events: none;
}

.mcu-stage > .swirl .swirl__veil {
  background:
    radial-gradient(ellipse at 28% 18%, color-mix(in srgb, var(--swirl-a) 42%, transparent), transparent 44%),
    radial-gradient(ellipse at 82% 28%, color-mix(in srgb, var(--swirl-c) 38%, transparent), transparent 48%),
    radial-gradient(ellipse at 52% 86%, color-mix(in srgb, var(--swirl-b) 34%, transparent), transparent 52%),
    radial-gradient(ellipse at 50% 42%, transparent 0%, var(--bg) 74%);
}

.mcu-main {
  position: relative;
  z-index: 2;
  padding: 8px 20px 32px;
}

.mcu-tabs,
.mode-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 6px 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass) 80%, transparent);
}

.mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.mode-btn.is-on {
  background: linear-gradient(135deg, var(--swirl-a), var(--swirl-c));
  color: #1a1020;
}

.mcu-main .lede {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.45;
}

.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 18px 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 16px;
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.meter {
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass) 80%, transparent);
  overflow: hidden;
  margin: 0 0 8px;
}

.meter i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--swirl-d), var(--swirl-c), var(--swirl-a));
}

.meter-label {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.thread {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  min-height: 16rem;
  max-height: 52vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--glass) 70%, transparent);
  border: 1px solid var(--line);
}

.msg p { margin: 0; }
.msg small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.msg--user {
  background: color-mix(in srgb, var(--swirl-b) 16%, var(--glass));
  color: var(--ink);
}

.mcu-main .composer {
  margin: 0;
  max-width: none;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
@media (max-width: 720px) { .two { grid-template-columns: 1fr; } }

.box {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.box--pair { min-height: 12rem; }
.box label,
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.box textarea,
.field textarea {
  flex: 1;
  width: 100%;
  min-height: 10rem;
  resize: vertical;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 40%, var(--glass));
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
}
.field textarea { min-height: 7.5rem; }
.box-actions { margin-top: 12px; display: flex; gap: 8px; align-items: center; }

.teach { font-size: 0.95rem; }

.train-block {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.doc-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 650;
}

.quiet { color: var(--muted); }
.train-status {
  min-height: 1.2em;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--swirl-d) 70%, var(--ink));
}
.train-status.is-bad { color: #fda4af; }

.api pre,
.endpoint {
  background: color-mix(in srgb, var(--bg) 45%, var(--glass));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: 0.75rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: auto;
  color: var(--ink);
}

.foot {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--swirl-c); }
