:root {
  --rail-width: 196px;
  --blue: var(--brand-action);
  --blue-soft: var(--brand-soft);
  --ink: var(--brand-ink);
  --muted: var(--brand-text-muted);
  --line: var(--brand-border);
  --pale: var(--brand-surface-soft);
  --white: var(--brand-surface);
  --green: #15936f;
  --red: #c03f50;
  --radius: 14px;
  --font: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--brand-paper);
  color: var(--ink);
  font: 14px/1.6 var(--font);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button {
  color: inherit;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 3px solid var(--brand-focus);
  outline-offset: 3px;
}
button svg,
a svg {
  width: 19px;
  height: 19px;
  flex: none;
}
svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.shell {
  min-height: 100dvh;
  display: flex;
}
.rail {
  width: 82px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--brand-paper);
  border-right: 1px solid var(--brand-border);
  display: flex;
  align-items: center;
  flex-direction: column;
  z-index: 10;
  padding: 25px 10px 20px;
  gap: 34px;
}
.brand {
  display: block;
  height: 40px;
}
.rail #nav-items {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-radius: 12px;
  padding: 10px 0;
  color: var(--brand-text-muted);
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
  position: relative;
}
.nav-link svg {
  width: 22px;
  height: 22px;
}
.nav-link:hover {
  background: var(--brand-soft);
  color: var(--blue);
}
.nav-link.active {
  background: var(--blue);
  color: var(--brand-on-action);
  box-shadow: 0 5px 12px rgba(var(--brand-accent-rgb), 0.145);
}
.nav-count {
  position: absolute;
  right: 3px;
  top: 0;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  color: var(--blue);
  border-radius: 20px;
  padding: 0 4px;
  font-size: 9px;
}
.rail-home {
  margin-top: auto;
  color: var(--brand-text-muted);
  display: grid;
  text-align: center;
  font-size: 22px;
}
.rail-home span {
  font-size: 10px;
}
.workspace {
  margin-left: 82px;
  width: calc(100% - 82px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 79px;
  min-height: 79px;
  border-bottom: 1px solid var(--brand-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 16px;
}
.brandline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brandline strong {
  font-size: 17px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.demo-label {
  font-size: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
#breadcrumb {
  font-size: 12px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.connection {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.connection.ready:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 7px;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--brand-surface);
  width: 28px;
  height: 28px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 36px;
  color: var(--brand-text-muted);
  font-size: 10px;
  letter-spacing: 0.3px;
  margin-top: auto;
}
.footer a {
  color: var(--brand-text-muted);
}
.footer-dot {
  margin: 0 10px;
}
#main {
  flex: 1;
  min-width: 0;
}
.initial {
  margin: 130px auto;
  text-align: center;
  color: var(--muted);
}
.home {
  max-width: 920px;
  margin: 0 auto;
  padding: 79px 32px 36px;
}
.eyebrow {
  color: var(--brand-text-muted);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.greeting {
  text-align: center;
  margin-bottom: 33px;
}
.greeting .mini-logo {
  width: 45px;
  margin-bottom: 14px;
}
.greeting h1 {
  font-size: 31px;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 0 0 10px;
}
.greeting p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.composer {
  border: 1.5px solid var(--brand-border-accent);
  border-radius: 16px;
  box-shadow: 0 5px 30px rgba(var(--brand-shadow-rgb), 0.031);
  background: var(--brand-surface);
  padding: 18px 20px 13px;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
.composer:focus-within {
  box-shadow: 0 4px 24px rgba(var(--brand-accent-rgb), 0.078);
  border-color: var(--blue);
}
.composer textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  resize: vertical;
  min-height: 91px;
  max-height: 240px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}
textarea::placeholder,
input::placeholder {
  color: var(--brand-text-muted);
}
.composer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
}
.composer-tools {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 5px 9px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 12px;
}
.text-button:hover {
  background: var(--pale);
  color: var(--blue);
}
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border: 0;
  color: var(--brand-on-action);
  border-radius: 10px;
  width: 37px;
  height: 37px;
  flex: none;
}
.submit-button svg {
  width: 20px;
  height: 20px;
}
.composer-hint {
  margin: 10px 2px;
  color: var(--brand-text-muted);
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.chip {
  font-size: 11px;
  background: var(--blue-soft);
  border: 0;
  color: var(--blue);
  padding: 4px 9px;
  border-radius: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 26px 0 35px;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 7px 14px;
  font-size: 12px;
  background: var(--brand-surface);
  transition: background 0.15s;
}
.skill-pill svg {
  width: 15px;
  height: 15px;
}
.skill-pill.active {
  border-color: var(--brand-border-accent);
  color: var(--blue);
  background: var(--blue-soft);
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
}
.section-label h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}
.section-label span,
.section-label a {
  font-size: 11px;
  color: var(--muted);
}
.suggestions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.suggestion {
  background: var(--brand-surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.suggestion:hover {
  border-color: var(--brand-border-accent);
  transform: translateY(-2px);
}
.suggestion svg {
  color: var(--blue);
  width: 19px;
}
.suggestion strong {
  font-size: 12px;
  font-weight: 500;
}
.suggestion small {
  color: var(--brand-text-muted);
  font-size: 10px;
  line-height: 1.6;
}
.recent {
  margin-top: 37px;
}
.recent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--brand-border);
  font-size: 12px;
}
.recent-row > a {
  color: var(--ink);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.tiny {
  font-size: 10px;
}
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 38px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 29px;
}
.page-title h1 {
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 7px;
}
.page-title p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.button {
  border: 1px solid var(--line);
  background: var(--brand-surface);
  color: var(--ink);
  padding: 9px 15px;
  border-radius: 9px;
  font-size: 12px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.button.primary {
  background: var(--blue);
  color: var(--brand-on-action);
  border-color: var(--blue);
}
.button:hover {
  filter: brightness(0.98);
}
.button.danger {
  color: var(--red);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.search {
  background: var(--pale);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 8px;
  min-width: 160px;
  max-width: 100%;
  color: var(--ink);
}
.tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.tab {
  border: 0;
  background: transparent;
  padding: 8px 15px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 12px;
}
.tab.active {
  background: var(--blue-soft);
  color: var(--blue);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
th {
  background: var(--pale);
  color: var(--brand-text-muted);
  font-weight: 500;
  white-space: nowrap;
}
td,
th {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
.task-title-cell {
  max-width: 350px;
}
.task-title-cell a {
  color: var(--ink);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
}
.status:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}
.status.done {
  color: var(--brand-success);
}
.status.running {
  color: var(--green);
}
.status.failed,
.status.interrupted {
  color: var(--red);
}
.progress-track {
  height: 3px;
  background: var(--brand-surface-soft);
  min-width: 70px;
  border-radius: 8px;
  margin-top: 6px;
}
.progress-bar {
  height: 100%;
  background: currentColor;
  max-width: 100%;
  border-radius: 8px;
}
.empty {
  padding: 65px 20px;
  text-align: center;
  color: var(--muted);
}
.empty svg {
  width: 35px;
  height: 35px;
  color: var(--brand-text-muted);
  display: block;
  margin: 0 auto 15px;
}
.empty p {
  font-size: 12px;
}
.empty h2 {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.empty .button {
  margin-top: 10px;
}
.list-row {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 19px 3px;
  border-bottom: 1px solid var(--line);
}
.file-icon {
  width: 39px;
  height: 42px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  border-radius: 9px;
  flex: none;
}
.list-body {
  flex: 1;
  min-width: 0;
}
.list-body h3 {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.list-body p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.list-body .text-button {
  padding: 0;
  color: var(--ink);
}
.badge {
  display: inline-block;
  background: var(--pale);
  font-size: 10px;
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
}
.skill-list {
  border-top: 1px solid var(--line);
}
.skill-list .list-row {
  padding: 22px 5px;
}
.skill-list .file-icon {
  background: var(--brand-surface-soft);
}
.available {
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
}
.unavailable {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.task-page {
  padding-top: 28px;
}
.back-link {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 32px;
}
.task-main {
  min-width: 0;
}
.request {
  background: var(--blue-soft);
  border-radius: 13px 13px 3px 13px;
  padding: 16px 20px;
  margin-bottom: 27px;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--brand-text-secondary);
}
.agent-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 17px;
  font-size: 13px;
}
.agent-line img {
  width: 29px;
  height: 29px;
}
.agent-line .status {
  margin-left: auto;
}
.task-summary {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 21px;
}
.result {
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.result h1 {
  font-size: 23px;
}
.result h2 {
  font-size: 18px;
}
.result h3 {
  font-size: 15px;
}
.result h1,
.result h2,
.result h3 {
  margin: 22px 0 11px;
  font-weight: 600;
}
.result p {
  margin: 12px 0;
  white-space: pre-wrap;
}
.result ul,
.result ol {
  padding-left: 22px;
}
.result li {
  margin: 4px 0;
}
.result code {
  background: var(--pale);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 12px;
  white-space: pre-wrap;
}
.result pre {
  background: var(--pale);
  padding: 16px;
  border-radius: 8px;
  overflow: auto;
}
.result blockquote {
  border-left: 3px solid var(--brand-border-accent);
  color: var(--muted);
  margin: 15px 0;
  padding-left: 15px;
}
.result hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 27px 0;
}
.result th,
.result td {
  padding: 10px 12px;
  min-width: 95px;
  vertical-align: top;
}
.citation {
  font-size: 10px;
  padding: 0 4px;
  line-height: 1.7;
  border: 0;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 4px;
  display: inline;
  vertical-align: baseline;
}
.task-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  flex-wrap: wrap;
}
.task-actions .selected {
  color: var(--blue);
  background: var(--blue-soft);
}
.artifacts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}
.artifact {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 11px;
  max-width: 100%;
}
.artifact svg {
  color: var(--blue);
  width: 20px;
}
.artifact-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.execution {
  border-left: 1px solid var(--line);
  padding-left: 25px;
  min-width: 0;
}
.execution h2 {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 20px;
}
.execution .metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 20px;
  margin-bottom: 21px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.metric strong {
  font-size: 17px;
  font-weight: 500;
}
.step {
  position: relative;
  padding: 0 0 23px 24px;
  border-left: 1px solid var(--brand-border);
  margin-left: 5px;
}
.step:last-child {
  border-left-color: transparent;
}
.step:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-surface-muted);
  border: 3px solid var(--brand-surface);
  position: absolute;
  left: -7px;
  top: 3px;
  box-sizing: content-box;
}
.step.done:before {
  background: var(--brand-success);
}
.step.running:before {
  background: var(--green);
  animation: pulse 1.5s infinite;
}
.step.failed:before {
  background: var(--red);
}
.step summary {
  font-size: 11px;
  list-style: none;
  cursor: pointer;
  line-height: 1.7;
}
.step summary:after {
  content: "⌄";
  color: var(--brand-text-muted);
  margin-left: 7px;
}
.step .step-tool {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.step-content {
  font-size: 10px;
  white-space: pre-wrap;
  color: var(--brand-text-muted);
  background: var(--pale);
  border-radius: 7px;
  padding: 10px;
  margin-top: 10px;
  max-height: 240px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.sources {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.sources h3 {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.source-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 0;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-text-muted);
}
.source-item:hover {
  color: var(--blue);
}
.source-item .citation {
  margin-right: 4px;
}
.pending {
  padding: 22px 0;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.spinner {
  height: 14px;
  width: 14px;
  border: 2px solid var(--brand-border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.notice {
  background: #fffbef;
  border: 1px solid #f2e7c4;
  color: #8a6c26;
  padding: 13px 16px;
  border-radius: 9px;
  font-size: 12px;
  margin: 15px 0;
  overflow-wrap: anywhere;
}
.error-box {
  background: #fff5f5;
  border: 1px solid #f2d4d9;
  color: #a34454;
  padding: 15px;
  border-radius: 9px;
  font-size: 12px;
  margin: 20px 0;
}
.followup {
  margin-top: 28px;
}
.followup textarea {
  min-height: 52px;
}
.followup .composer {
  padding: 13px 16px;
}
.settings-copy {
  font-size: 13px;
  line-height: 1.9;
  max-width: 750px;
}
.settings-copy h2 {
  font-size: 16px;
  margin-top: 28px;
}
.settings-copy ul {
  padding-left: 19px;
  color: var(--brand-text-muted);
}
.memory-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 30px;
}
.memory-box textarea {
  flex: 1;
  min-height: 85px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  background: var(--pale);
  resize: vertical;
}
.memory-box .button {
  margin-top: 3px;
}
dialog {
  width: min(670px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 0;
  box-shadow: 0 30px 100px rgba(var(--brand-shadow-rgb), 0.188);
  color: var(--ink);
  max-height: 85dvh;
}
dialog::backdrop {
  background: rgba(var(--brand-shadow-rgb), 0.251);
  backdrop-filter: blur(2px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--brand-surface);
  z-index: 1;
}
.dialog-header h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 500;
}
.dialog-body {
  padding: 22px 26px;
}
.dialog-footer {
  padding: 15px 26px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: var(--brand-surface);
}
.dialog-body label {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}
.dialog-body textarea,
.dialog-body input[type="text"] {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  background: var(--pale);
}
.dialog-body textarea {
  min-height: 200px;
  resize: vertical;
}
.doc-choice {
  display: flex !important;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin: 0 !important;
  cursor: pointer;
}
.doc-choice input {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  flex: none;
}
.doc-choice span {
  overflow-wrap: anywhere;
}
.source-text {
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.export-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.network-error {
  font-size: 12px;
  background: #fff5e7;
  color: #896627;
  padding: 8px 30px;
}
#toast {
  position: fixed;
  bottom: 27px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: var(--brand-ink);
  color: var(--brand-on-action);
  padding: 11px 21px;
  border-radius: 9px;
  z-index: 100;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.skip {
  position: fixed;
  left: 100px;
  top: -100px;
  z-index: 100;
  background: var(--brand-surface);
  padding: 10px;
}
.skip:focus {
  top: 8px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 3px #15936f25;
  }
}
@media (min-width: 1500px) {
  .home {
    padding-top: 110px;
    max-width: 960px;
  }
}
@media (max-width: 1100px) {
  .page {
    padding: 29px 26px;
  }
  .task-layout {
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 23px;
  }
  .execution {
    padding-left: 18px;
  }
  .topbar {
    padding: 0 26px;
  }
  .home {
    padding-top: 65px;
  }
  .suggestion {
    padding: 14px 11px;
  }
}
@media (max-width: 760px) {
  .rail {
    width: 60px;
    padding: 22px 5px 15px;
    gap: 25px;
  }
  .nav-link {
    font-size: 9px;
    padding: 10px 0;
  }
  .nav-link svg {
    width: 20px;
  }
  .rail #nav-items {
    gap: 8px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .workspace {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  .topbar {
    height: 65px;
    min-height: 65px;
    padding: 0 18px;
  }
  .brandline {
    gap: 8px;
  }
  .brandline strong {
    font-size: 15px;
  }
  .top-actions {
    gap: 10px;
  }
  .connection {
    font-size: 10px;
  }
  #breadcrumb {
    display: none;
  }
  .home {
    padding: 50px 22px 25px;
  }
  .greeting h1 {
    font-size: 25px;
  }
  .greeting p {
    font-size: 11px;
  }
  .suggestions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .suggestion {
    padding: 15px;
    gap: 8px;
  }
  .suggestion strong {
    font-size: 12px;
  }
  .skill-row {
    gap: 8px;
    margin: 23px 0 28px;
  }
  .skill-pill {
    font-size: 11px;
    padding: 6px 11px;
  }
  .task-layout {
    grid-template-columns: 1fr;
  }
  .execution {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }
  .execution .metrics {
    display: flex;
    gap: 40px;
  }
  .page {
    padding: 26px 20px;
  }
  .page-title {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 13px;
    margin-bottom: 22px;
  }
  .page-title h1 {
    font-size: 23px;
  }
  .footer {
    padding: 20px;
    font-size: 9px;
    gap: 10px;
  }
  .footer > span {
    display: none;
  }
  .footer {
    justify-content: flex-end;
  }
  .composer {
    padding: 15px 15px 11px;
  }
  .composer-tools {
    gap: 0;
  }
  .composer-tools .text-button {
    padding: 5px 6px;
    font-size: 11px;
  }
  .composer textarea {
    font-size: 14px;
    min-height: 100px;
  }
  .composer-hint {
    font-size: 9px;
  }
  .composer-hint span:last-child {
    display: none;
  }
  .task-page .composer textarea {
    min-height: 60px;
  }
  .list-row {
    gap: 12px;
  }
  .list-row > .text-button {
    padding: 5px;
  }
  .memory-box {
    flex-direction: column;
  }
  .memory-box textarea {
    width: 100%;
  }
  .dialog-header,
  .dialog-body {
    padding: 18px;
  }
  .dialog-footer {
    padding: 14px 18px;
  }
  .table-wrap th,
  .table-wrap td {
    padding: 13px 14px;
  }
  .recent-row time {
    display: none;
  }
  .demo-label {
    font-size: 9px;
  }
  .task-main .request {
    padding: 13px;
    font-size: 12px;
  }
  .task-actions .text-button {
    padding: 5px;
  }
  .result {
    font-size: 12px;
  }
}
@media (max-width: 400px) {
  .home {
    padding: 35px 15px 24px;
  }
  .greeting h1 {
    font-size: 21px;
  }
  .greeting .mini-logo {
    width: 36px;
  }
  .greeting p {
    font-size: 10px;
  }
  .composer-tools .tool-label {
    display: none;
  }
  .topbar {
    padding: 0 13px;
  }
  .connection {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .top-actions .icon-button {
    display: none;
  }
  .suggestion {
    padding: 12px 10px;
  }
  .suggestion strong {
    font-size: 11px;
  }
  .suggestion small {
    font-size: 9px;
  }
  .skill-pill {
    font-size: 10px;
    padding: 5px 9px;
  }
  .page {
    padding: 24px 15px;
  }
  .greeting {
    margin-bottom: 24px;
  }
  .page-title .button {
    padding: 8px 10px;
  }
  .brandline {
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* The embedded app owns scrolling inside the remaining workspace height. */
.workspace.medocr-embedded {
  height: 100dvh;
  min-height: 0;
}
.medocr-embedded #main {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.medocr-embedded .footer {
  display: none;
}
.medocr-embed,
.medocr-embed-viewport,
.medocr-embed iframe {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.medocr-embed {
  position: absolute;
  inset: 0;
  background: var(--brand-paper);
}
.medocr-embed iframe {
  display: block;
  border: 0;
}
.medocr-embed-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: auto;
  background: var(--brand-paper);
}
.medocr-embed-retry {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  color: var(--brand-text-secondary);
  background: var(--brand-paper);
  box-shadow: 0 4px 18px rgba(var(--brand-shadow-rgb), .1);
}
.medocr-embed-retry .button {
  flex: none;
}
.medocr-embed-loading[hidden],
.medocr-embed-retry[hidden] {
  display: none;
}

.status.needs-input {
  color: #b48021;
}

/* 53AI reference: labelled blue rail, task conversation, inspectable tool runs. */
.brand-word {
  display: none;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 1px;
  color: var(--ink);
}
.rail {
  overflow-y: auto;
  gap: 20px;
}
.rail #nav-items {
  gap: 5px;
}
.role-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 14px;
}
.role-link {
  display: flex;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px;
  color: var(--ink);
  text-align: left;
  background: var(--brand-surface);
}
.role-link:hover {
  border-color: var(--brand-border-accent);
  background: var(--brand-surface-soft);
}
.role-link strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}
.role-link small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.role-arrow {
  margin-left: auto;
  color: var(--blue);
}
.role-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 12px;
}
.role-avatar svg {
  width: 24px;
  height: 24px;
}
.teacher .role-avatar,
.role-avatar.teacher {
  color: var(--brand-type-teacher);
  background: var(--brand-type-teacher-soft);
}
.support .role-avatar,
.role-avatar.support {
  color: #17876e;
  background: #eaf7f2;
}
.weather-launch {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: var(--pale);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  margin-bottom: 36px;
  font-size: 12px;
  text-align: left;
}
.weather-launch span {
  margin-left: auto;
  color: var(--blue);
  font-size: 11px;
  white-space: nowrap;
}
.role-page.page {
  max-width: 950px;
  margin: 0 auto;
  padding-top: 50px;
}
.role-intro {
  max-width: 640px;
  margin-bottom: 30px;
}
.role-avatar.large {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
}
.role-avatar.large svg {
  width: 29px;
  height: 29px;
}
.role-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}
.role-eyebrow span {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
.role-intro h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.8px;
  margin: 12px 0;
  text-wrap: balance;
}
.role-intro > p:last-child {
  color: var(--muted);
  font-size: 13px;
  max-width: 570px;
}
.role-scenarios {
  margin-top: 30px;
}
.scenario-line {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font-size: 13px;
}
.scenario-line:hover {
  color: var(--blue);
  background: var(--pale);
}
.scenario-line > span:last-child {
  margin-left: auto;
  color: var(--blue);
}
.scenario-number {
  color: var(--brand-text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.role-knowledge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 28px;
  padding: 12px 0;
  font-size: 12px;
}
.role-knowledge > span {
  margin-right: auto;
  color: var(--muted);
}
.role-knowledge svg {
  width: 17px;
  height: 17px;
  margin-right: 6px;
}
.tool-traces {
  margin: 21px 0;
  min-width: 0;
}
.tool-card {
  border: 1px solid var(--brand-border);
  background: var(--brand-surface-soft);
  border-radius: 10px;
  margin: 10px 0;
  min-width: 0;
}
.tool-card summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  list-style: none;
}
.tool-card summary::-webkit-details-marker {
  display: none;
}
.tool-symbol {
  color: var(--blue);
  flex: none;
}
.tool-symbol svg {
  width: 19px;
  height: 19px;
}
.tool-card-name {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.tool-card-name small {
  display: block;
  margin-top: 5px;
  font-weight: 400;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tool-state {
  font-size: 10px;
  flex: none;
  color: var(--muted);
  white-space: nowrap;
}
.tool-state:after {
  content: "＋";
  margin-left: 8px;
}
.tool-card[open] .tool-state:after {
  content: "−";
}
.tool-card.done .tool-state {
  color: var(--green);
}
.tool-card.failed .tool-state {
  color: var(--red);
}
.tool-details {
  border-top: 1px solid var(--brand-border);
  padding: 12px;
  min-width: 0;
}
.trace-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: var(--brand-surface-soft);
  padding: 6px 11px;
  color: var(--brand-text-muted);
  font-size: 11px;
}
.trace-label span {
  font-size: 10px;
}
.tool-details pre {
  max-height: 230px;
  overflow: auto;
  margin: 0 0 10px;
  padding: 12px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    11px/1.7 ui-monospace,
    monospace;
}
.tool-details pre:last-child {
  margin-bottom: 0;
}
.weather-result {
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 25px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  background: var(--brand-surface-soft);
  margin: 23px 0;
}
.weather-result h2 {
  font-size: 40px;
  line-height: 1.3;
  margin: 13px 0;
  font-weight: 500;
  letter-spacing: -1.5px;
}
.weather-result h2 span {
  font-size: 25px;
  padding: 0 5px;
  color: var(--muted);
}
.weather-result h2 small {
  font-size: 18px;
  margin-left: 5px;
}
.weather-result p {
  margin: 4px 0;
  font-size: 12px;
}
.weather-meta {
  font-size: 10px;
  color: var(--muted);
  align-self: center;
}
.weather-meta > svg {
  width: 38px;
  height: 38px;
  color: #daa335;
  margin-bottom: 14px;
}
.weather-meta small {
  display: block;
  margin-top: 5px;
}
.follow-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
}
.follow-suggestions > span {
  color: var(--muted);
  font-size: 11px;
  margin-right: 5px;
}
.follow-suggestions .button {
  font-size: 11px;
  padding: 7px 11px;
}
@media (min-width: 1000px) {
  .rail {
    width: 168px;
    padding: 25px 14px 20px;
    align-items: stretch;
    gap: 27px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 7px;
  }
  .brand-word {
    display: inline;
  }
  .nav-link {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 13px;
    gap: 11px;
    font-size: 12px;
    border-radius: 8px;
  }
  .nav-link svg {
    width: 19px;
    height: 19px;
  }
  .workspace {
    margin-left: 168px;
    width: calc(100% - 168px);
  }
  .rail-home {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 16px;
    font-size: 18px;
  }
  .rail-home span {
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  .role-links {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .role-link {
    padding: 14px;
  }
  .role-page.page {
    padding-top: 27px;
  }
  .role-intro h1 {
    font-size: 25px;
    letter-spacing: 0;
  }
  .role-eyebrow span {
    display: block;
    margin-top: 5px;
  }
  .role-intro {
    margin-bottom: 22px;
  }
  .weather-launch {
    flex-wrap: wrap;
    padding: 13px;
    line-height: 1.7;
  }
  .weather-launch span {
    margin-left: 29px;
  }
  .weather-result {
    flex-direction: column;
    padding: 18px;
    gap: 12px;
  }
  .weather-meta {
    align-self: stretch;
  }
  .weather-meta > svg {
    display: none;
  }
  .tool-card summary {
    padding: 11px;
    gap: 7px;
  }
  .tool-card-name {
    font-size: 11px;
  }
  .tool-state {
    font-size: 9px;
  }
  .trace-label span {
    overflow-wrap: anywhere;
  }
  .role-scenarios .section-label {
    flex-wrap: wrap;
    gap: 6px;
  }
  .role-knowledge > span {
    width: 100%;
  }
}

/* Grouped navigation: only the selected section occupies vertical space. */
.rail {
  width: var(--rail-width);
  align-items: stretch;
  padding: 24px 14px 18px;
  gap: 24px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.rail .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 10px;
  flex: none;
}
.rail .brand-word {
  display: inline;
}
.workspace {
  margin-left: var(--rail-width);
  width: calc(100% - var(--rail-width));
}
.rail #nav-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 0 auto;
}
.rail .nav-heading {
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--brand-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  line-height: 1.4;
  position: relative;
  transition:
    background-color 160ms,
    color 160ms;
}
.rail .nav-heading > svg {
  width: 19px;
  height: 19px;
}
.rail .nav-heading .nav-chevron {
  width: 13px;
  height: 13px;
  margin-left: auto;
  transition: transform 240ms ease;
}
.rail .is-open > .nav-heading .nav-chevron {
  transform: rotate(90deg);
}
.rail .nav-heading:hover,
.rail .nav-child:hover {
  background: var(--brand-soft);
  color: var(--brand-action-hover);
}
.rail .has-current > .nav-heading {
  color: var(--brand-action);
  background: var(--brand-soft);
}
.rail .nav-heading.active {
  background: var(--blue);
  color: var(--brand-on-action);
  box-shadow: none;
}
.nav-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    grid-template-rows 260ms cubic-bezier(0.22, 0.68, 0, 1),
    opacity 180ms ease,
    transform 260ms ease;
}
.is-open > .nav-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-panel-inner {
  min-height: 0;
  overflow: hidden;
}
.nav-children {
  margin: 5px 0 7px 21px;
  padding: 2px 0 2px 9px;
  border-left: 1px solid var(--brand-border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rail .nav-child {
  flex-direction: row;
  justify-content: flex-start;
  min-height: 37px;
  padding: 8px 10px;
  gap: 6px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--brand-text-muted);
  white-space: normal;
  transition:
    background-color 160ms,
    color 160ms;
}
.rail .nav-child.active {
  color: var(--brand-action);
  background: var(--brand-soft);
  box-shadow: none;
  font-weight: 600;
}
.rail .nav-count {
  position: static;
  margin-left: auto;
  flex: none;
  padding: 0 5px;
  min-width: 17px;
  line-height: 17px;
  font-size: 10px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-action);
}
.rail .nav-count[hidden],
.rail .is-open > .nav-heading .nav-count {
  display: none;
}
.rail .nav-preferences {
  margin-top: auto;
  padding-top: 20px;
}
.rail .rail-home {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  margin-top: 0;
  font-size: 18px;
}
.rail .rail-home span {
  font-size: 12px;
}
.rail .nav-child:focus-visible {
  outline-offset: -3px;
}
@media (max-width: 999px) {
  :root {
    --rail-width: 148px;
  }
  .rail {
    padding: 20px 8px 16px;
    gap: 20px;
  }
  .rail .nav-heading {
    gap: 7px;
    padding: 10px 9px;
    font-size: 12px;
  }
  .nav-children {
    margin-left: 17px;
    padding-left: 5px;
  }
  .rail .nav-child {
    padding: 8px 6px;
    font-size: 11px;
  }
}
@media (max-width: 760px) {
  :root {
    --rail-width: 82px;
  }
  .rail {
    padding: 18px 6px 12px;
    gap: 17px;
  }
  .rail .brand {
    justify-content: center;
    padding: 0;
  }
  .rail .brand-word {
    display: none;
  }
  .rail .nav-heading {
    flex-direction: column;
    gap: 4px;
    padding: 10px 4px 13px;
    font-size: 11px;
    text-align: center;
  }
  .rail .nav-heading .nav-chevron {
    position: absolute;
    right: 1px;
    top: 15px;
    width: 10px;
    height: 10px;
  }
  .nav-children {
    margin: 3px 0 6px;
    padding: 0;
    border-left: 0;
  }
  .rail .nav-child {
    justify-content: center;
    text-align: center;
    padding: 8px 3px;
    min-height: 34px;
    font-size: 10px;
    gap: 2px;
  }
  .rail .nav-child .nav-count {
    position: absolute;
    right: 0;
    top: 0;
    line-height: 13px;
    min-width: 13px;
    font-size: 8px;
    padding: 0 3px;
  }
  .rail .nav-heading .nav-count {
    position: absolute;
    right: 0;
    top: 0;
  }
  .rail .nav-preferences {
    padding-top: 14px;
  }
  .rail .rail-home {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-panel,
  .rail .nav-heading,
  .rail .nav-child,
  .rail .nav-chevron {
    transition: none;
    transform: none;
  }
}
.sc-trigger {
  padding: 8px 0 16px;
  font-size: 13px;
  color: var(--brand-text-muted);
}
.sc-trigger a {
  color: var(--brand-action);
}

/* Shared navigation must be present before any feature module loads. */
.rail {
  gap: 20px;
}
.rail #nav-items {
  overflow-y: auto;
  min-height: 0;
  gap: 7px;
  padding-bottom: 8px;
}
.nav-link {
  min-height: 38px;
  flex-shrink: 0;
}
.rail-home {
  flex-shrink: 0;
}
