:root {
  color-scheme: dark;
  --bg: #191919;
  --sidebar: #202020;
  --sidebar-hover: #2c2c2c;
  --panel: #222222;
  --panel-2: #262626;
  --bubble: #303030;
  --text: #e9e9e9;
  --muted: #a7a7a7;
  --faint: #6f6f6f;
  --line: #313131;
  --line-strong: #3d3d3d;
  --success: #6bd65d;
  --danger: #ff6b6b;
  --blue: #8fb4ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f4;
  --sidebar: #eeeeeb;
  --sidebar-hover: #e2e2de;
  --panel: #ffffff;
  --panel-2: #f2f2ef;
  --bubble: #ededeb;
  --text: #242424;
  --muted: #505050;
  --faint: #676767;
  --line: #ddddda;
  --line-strong: #cfcfcb;
  --success: #207a34;
  --danger: #c44242;
  --blue: #245fcc;
  --shadow: 0 18px 48px rgba(30, 30, 30, 0.11);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 16px 10px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.brand-row,
.workspace-header,
.dock-head,
.task-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-row {
  padding: 0 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark,
.assistant-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #303030;
  color: #f2f2f2;
  font-size: 11px;
  font-weight: 800;
}

.brand strong {
  display: block;
  color: #f0f0f0;
  font-size: 18px;
  font-weight: 740;
  line-height: 1;
}

.sidebar-icons {
  display: flex;
  gap: 8px;
}

.sidebar-icons button {
  appearance: none;
  position: relative;
  position: relative;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.sidebar-icons button:hover {
  background: var(--sidebar-hover);
}

.sidebar-icons button::before,
.sidebar-icons button::after {
  position: absolute;
  content: "";
}

.sidebar-icons button:first-child::before {
  inset: 6px;
  border: 2px solid #9b9b9b;
  border-radius: 999px;
}

.sidebar-icons button:first-child::after {
  right: 4px;
  bottom: 5px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: #9b9b9b;
  transform: rotate(45deg);
}

.sidebar-icons button:last-child::before {
  inset: 6px;
  border: 2px solid #9b9b9b;
  border-radius: 3px;
}

.sidebar-icons button:last-child::after {
  top: 6px;
  bottom: 6px;
  left: 12px;
  width: 2px;
  background: #9b9b9b;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 78px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  padding-inline: 8px;
}

body.sidebar-collapsed .brand span:not(.brand-mark),
body.sidebar-collapsed .side-nav span:not(.nav-icon),
body.sidebar-collapsed .task-dock,
body.sidebar-collapsed .sidebar-bottom {
  display: none;
}

body.sidebar-collapsed .brand-row {
  justify-content: center;
}

.side-nav,
.project-dock,
.ecosystem-dock,
.task-dock,
.sidebar-bottom,
.login-grid,
.task-list,
.seed-composer,
.event-timeline {
  display: grid;
}

.side-nav {
  gap: 4px;
}

.side-nav a,
.project-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  border-radius: 11px;
  padding: 0 12px;
  color: #d6d6d6;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.side-nav a:hover,
.side-nav a.is-active,
.project-link:hover,
.task-card:hover,
.task-card.is-selected {
  background: var(--sidebar-hover);
}

.nav-icon {
  width: 22px;
  color: #a6a6a6;
  font-size: 18px;
  text-align: center;
}

.project-dock,
.ecosystem-dock,
.task-dock {
  align-content: start;
  gap: 8px;
}

.task-dock {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.ecosystem-list,
.ecosystem-client {
  display: grid;
  gap: 6px;
}

.ecosystem-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border-radius: 12px;
  padding: 8px 10px;
  background: transparent;
  color: #d8d8d8;
  text-decoration: none;
}

.ecosystem-link:not(.is-static):hover {
  background: var(--sidebar-hover);
}

.ecosystem-link.is-static {
  cursor: default;
}

.ecosystem-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #303030;
  color: #f0f0f0;
  font-size: 11px;
  font-weight: 820;
}

.ecosystem-link strong,
.ecosystem-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecosystem-link strong {
  color: #e7e7e7;
  font-size: 14px;
  font-weight: 760;
}

.ecosystem-link small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.client-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding-left: 38px;
}

.client-downloads a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.client-downloads a:hover {
  border-color: var(--line-strong);
  background: var(--sidebar-hover);
}

.dock-head {
  min-height: 28px;
  padding: 0 12px;
  color: #8f8f8f;
  font-size: 14px;
  font-weight: 740;
}

.dock-head a,
.icon-button {
  border: 0;
  background: transparent;
  color: #9a9a9a;
  cursor: pointer;
  text-decoration: none;
}

.dock-head a {
  font-size: 22px;
  line-height: 1;
}

.icon-button {
  min-height: 28px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 13px;
}

.icon-button:hover {
  background: var(--sidebar-hover);
}

.task-list {
  min-height: 0;
  align-content: start;
  gap: 4px;
  overflow: auto;
  padding-right: 2px;
}

.task-list .muted {
  min-height: 52px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
}

.task-card {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.task-card h3 {
  overflow: hidden;
  margin: 5px 0 3px;
  color: #eeeeee;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card p {
  overflow: hidden;
  color: #a2a2a2;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge,
.detail-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #bbbbbb;
  font-size: 11px;
  font-weight: 720;
}

.badge.status-running,
.badge.status-claimed,
.badge.status-needs_retry,
.detail-status.status-running,
.detail-status.status-claimed,
.detail-status.status-needs_retry {
  background: rgba(143, 180, 255, 0.15);
  color: #a9c4ff;
}

.badge.status-completed,
.detail-status.status-completed {
  background: rgba(107, 214, 93, 0.14);
  color: var(--success);
}

.badge.status-blocked,
.badge.status-failed,
.detail-status.status-blocked,
.detail-status.status-failed {
  background: rgba(255, 107, 107, 0.14);
  color: var(--danger);
}

.sidebar-bottom {
  position: relative;
  gap: 10px;
}

.identity-gate,
.user-box {
  position: relative;
  z-index: 5;
}

.gate-copy h2 {
  margin-top: 2px;
  color: #f0f0f0;
  font-size: 17px;
  line-height: 1.15;
}

.eyebrow,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.login-grid {
  gap: 8px;
  margin-top: 10px;
}

.modal-shell,
.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-shell[hidden],
.settings-modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.56);
  cursor: default;
}

.login-modal-panel,
.settings-window {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  background: #1f1f1f;
  box-shadow: var(--shadow);
}

.login-modal-panel {
  width: min(520px, 100%);
  border-radius: 26px;
  padding: 32px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #2b2b2b;
  color: #dcdcdc;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.login-brand {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.login-brand .brand-mark {
  width: 42px;
  height: 42px;
}

.login-brand h2 {
  color: #f1f1f1;
  font-size: 32px;
  line-height: 1.1;
}

.login-brand p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.open-gate,
.member-login {
  display: none;
}

.user-box {
  gap: 8px;
}

.user-box:empty {
  display: none;
}

.account-trigger {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 9px 12px;
  background: #242424;
  color: #ededed;
  text-align: left;
  cursor: pointer;
}

.account-trigger.login-trigger {
  grid-template-columns: 42px minmax(0, 1fr);
}

.account-trigger strong,
.account-menu strong,
.settings-profile strong {
  display: block;
  overflow: hidden;
  color: #efefef;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-trigger small,
.account-menu small,
.settings-profile small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #333333;
  color: #f3f3f3;
  font-size: 14px;
  font-weight: 850;
}

.account-chevron {
  color: #a2a2a2;
}

.account-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 30;
  width: auto;
  max-height: min(72vh, 430px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: #202020;
  box-shadow: var(--shadow);
}

.account-menu[hidden] {
  display: none;
}

.account-menu-head,
.settings-profile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.account-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  border-radius: 14px;
  padding: 12px;
  background: #2b2b2b;
}

.account-plan span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-plan button,
.settings-quiet-btn {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: #f0f0f0;
  color: #202020;
  cursor: pointer;
}

.account-task-summary button {
  padding: 0 16px;
}

.account-menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.account-menu-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  background: transparent;
  color: #dddddd;
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-item:hover {
  background: #2c2c2c;
}

.account-menu-item.is-danger,
.danger-link {
  color: #ff6b6b;
}

.settings-window {
  width: min(1180px, 96vw);
  min-height: min(760px, 90vh);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 28px;
}

.settings-sidebar {
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  background: #191919;
}

.settings-profile {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.settings-tab {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  background: transparent;
  color: #cfcfcf;
  text-align: left;
  cursor: pointer;
}

.settings-tab.is-active,
.settings-tab:hover {
  background: #2c2c2c;
  color: #ffffff;
}

.settings-content {
  position: relative;
  overflow-y: auto;
  padding: 48px 64px;
}

.settings-pane {
  display: none;
}

.settings-pane.is-active {
  display: grid;
  gap: 22px;
}

.settings-pane h2 {
  margin: 0;
  color: #f2f2f2;
  font-size: 34px;
}

.settings-account-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: #242424;
}

.settings-account-card .account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  font-size: 24px;
}

.settings-account-card p,
.settings-note {
  margin: 5px 0 0;
  color: var(--muted);
}

.settings-info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.settings-info-list div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.settings-info-list dt {
  color: #bdbdbd;
  font-weight: 760;
}

.settings-info-list dd {
  margin: 0;
  color: #eeeeee;
  word-break: break-all;
}

.settings-field {
  max-width: 520px;
}

.settings-field span {
  display: block;
  margin-bottom: 8px;
  color: #d8d8d8;
}

.settings-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.settings-metric-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #242424;
}

.settings-metric-grid strong {
  display: block;
  color: #f2f2f2;
  font-size: 34px;
}

.settings-metric-grid span,
.settings-toggle span {
  color: var(--muted);
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #242424;
}

.settings-toggle input {
  width: 20px;
  margin: 0;
}

.settings-link-list {
  display: grid;
  gap: 12px;
  max-width: 620px;
}

.settings-link-list a {
  display: flex;
  min-height: 48px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  background: #242424;
  color: #e8e8e8;
  text-decoration: none;
}

.danger-link {
  width: fit-content;
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  cursor: pointer;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg);
}

.workspace-header {
  height: 60px;
  border-bottom: 1px solid var(--line);
  padding: 0 26px;
  background: #1d1d1d;
}

.workspace-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.download-menu,
.top-menu {
  position: relative;
}

.download-menu summary,
.top-menu summary,
.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 12px;
  background: #242424;
  color: #d8d8d8;
  font-size: 13px;
  font-weight: 740;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  text-decoration: none;
}

.download-menu summary::-webkit-details-marker,
.top-menu summary::-webkit-details-marker {
  display: none;
}

.download-menu summary::after,
.top-menu summary::after {
  content: "⌄";
  margin-left: 8px;
  color: var(--faint);
  font-size: 12px;
}

.download-panel,
.top-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 260px;
  max-width: min(92vw, 520px);
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ecosystem-panel {
  width: min(92vw, 420px);
}

.download-panel p {
  margin: 8px 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.download-panel a {
  display: block;
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.download-panel a:hover {
  background: var(--sidebar-hover);
}

.product-pending {
  display: block;
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 720;
}

.top-panel {
  width: min(92vw, 360px);
  padding: 14px;
}

.about-panel {
  display: grid;
  gap: 8px;
}

.about-panel strong {
  color: #f0f0f0;
  font-size: 15px;
}

.about-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.contact-panel {
  display: grid;
  gap: 8px;
}

.contact-panel p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 13px;
}

.contact-panel .contact-note {
  min-height: 0;
  margin: 0 0 2px;
  padding: 0 2px 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.contact-panel em {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
  white-space: nowrap;
}

.contact-panel strong {
  color: #f0f0f0;
  font-size: 14px;
}

.workspace-controls select {
  width: auto;
  min-height: 36px;
  margin: 0;
  border-radius: 12px;
  padding: 0 32px 0 12px;
  background: #242424;
  color: #d8d8d8;
  font-size: 13px;
  font-weight: 700;
}

.workspace-title {
  max-width: min(560px, 55vw);
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  padding: 0;
  background: transparent;
  color: #eeeeee;
  font-size: 19px;
  font-weight: 780;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.workspace-title::after {
  content: "⌄";
  margin-left: 7px;
  color: #9a9a9a;
  font-size: 15px;
}

.home-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 58px 28px 72px;
}

.stage-inner {
  width: min(100%, 940px);
  display: grid;
  justify-items: center;
  gap: 26px;
  margin-top: -4vh;
}

.stage-inner > h1 {
  color: #efefef;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 540;
  line-height: 1.15;
  text-align: center;
}

.task-composer {
  width: min(100%, 840px);
}

.seed-composer {
  gap: 12px;
}

.prompt-field {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #222222;
  box-shadow: var(--shadow);
}

.prompt-field span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.prompt-field textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  max-height: 280px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 22px 24px 8px;
  background: transparent;
  color: #efefef;
  font-size: 18px;
  line-height: 1.45;
  outline: none;
  resize: vertical;
}

.prompt-field textarea::placeholder {
  color: #858585;
}

.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -64px;
  padding: 0 16px 14px;
  pointer-events: none;
}

.tool-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  pointer-events: auto;
}

.tool-button,
.send-button,
.login-grid button,
.user-box button {
  cursor: pointer;
}

.tool-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  height: 38px;
  min-height: 38px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: #242424;
  color: #d8d8d8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.tool-button input {
  display: none;
}

.tool-button span:not([data-i18n]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
}

.tool-button [data-i18n] {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: 20px;
  font-size: 14px;
  line-height: 1;
}

.send-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #393939;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  pointer-events: auto;
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.feature-card {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 17px;
  background: #222222;
  color: #d8d8d8;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.feature-card:hover,
.feature-card.is-active {
  border-color: #575757;
  background: #2a2a2a;
}

.chip-icon {
  margin-right: 7px;
  color: #9d9d9d;
}

.library-view {
  padding: 0 28px 82px;
}

.wiki-workspace {
  min-height: 100vh;
}

.wiki-page-view {
  padding-top: 34px;
}

.library-inner {
  width: min(100%, 1120px);
  display: grid;
  gap: 20px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}

.library-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.library-header h1,
.library-header h2 {
  margin-top: 6px;
  color: #f1f1f1;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 760;
  line-height: 1.12;
}

.library-header p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.library-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 8px;
}

.library-stats span {
  display: grid;
  gap: 2px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #222222;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.library-stats strong {
  color: #f2f2f2;
  font-size: 24px;
  line-height: 1;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto;
  gap: 10px;
  align-items: end;
}

.library-search,
.library-filter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.library-search input,
.library-filter select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 13px;
  background: #202020;
  color: var(--text);
  outline: none;
}

.library-search input:focus,
.library-filter select:focus {
  border-color: var(--line-strong);
}

.library-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  background: #202020;
}

.library-tabs button {
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.library-tabs button.is-active,
.library-tabs button:hover {
  background: #303030;
  color: #f0f0f0;
}

.benchmark-principles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benchmark-principles span,
.benchmark-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  background: #202020;
  color: #cfcfcf;
  font-size: 12px;
  font-weight: 800;
}

.benchmark-status {
  margin-left: auto;
}

.benchmark-number {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9d9d9;
  font-size: 12px;
  font-weight: 860;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.benchmark-status.active {
  background: rgba(107, 214, 93, 0.12);
  color: #b7f0ad;
}

.benchmark-status.draft {
  background: rgba(143, 180, 255, 0.14);
  color: #bcd0ff;
}

.benchmark-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) minmax(140px, 180px);
}

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

.library-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #222222;
}

.library-card-head,
.library-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.library-kind,
.library-domain,
.library-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #bfbfbf;
  font-size: 12px;
  font-weight: 760;
}

.library-kind.leaderboard {
  background: rgba(143, 180, 255, 0.14);
  color: #bcd0ff;
}

.library-kind.algorithm {
  background: rgba(107, 214, 93, 0.12);
  color: #b7f0ad;
}

.library-kind.github {
  background: rgba(246, 183, 86, 0.14);
  color: #ffd29a;
}

.library-card h3 {
  color: #f2f2f2;
  font-size: 21px;
  line-height: 1.2;
}

.library-summary {
  color: #cfcfcf;
  font-size: 14px;
  min-height: 44px;
}

.library-keyfacts {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.library-keyfacts p {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.library-keyfacts strong {
  color: var(--faint);
  font-size: 12px;
}

.library-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.library-facts div {
  display: grid;
  gap: 4px;
}

.library-facts dt {
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.library-facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.library-more {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.library-more summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #dedede;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.library-more summary::-webkit-details-marker {
  display: none;
}

.library-more summary::after {
  content: "+";
  margin-left: auto;
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
}

.library-more[open] summary {
  border-bottom: 1px solid var(--line);
}

.library-more[open] summary::after {
  content: "−";
}

.library-more .library-facts {
  padding: 12px;
}

.benchmark-board {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
}

.benchmark-board div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.benchmark-board strong {
  color: var(--faint);
  font-size: 12px;
}

.benchmark-mini-rank {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.benchmark-mini-head {
  color: var(--faint);
  font-size: 12px;
  font-weight: 860;
}

.benchmark-mini-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(108px, auto);
  gap: 8px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.benchmark-mini-row span:nth-child(2) {
  min-width: 0;
}

.benchmark-mini-row strong {
  color: #f2f2f2;
  font-size: 12px;
  text-align: right;
}

.benchmark-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1f1f1;
  font-size: 11px;
  font-weight: 860;
}

.ai-fit {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 5px;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 860;
}

.ai-fit-高 {
  background: rgba(107, 214, 93, 0.14);
  color: #b7f0ad;
}

.ai-fit-中 {
  background: rgba(143, 180, 255, 0.14);
  color: #bcd0ff;
}

.ai-fit-低 {
  background: rgba(255, 107, 107, 0.14);
  color: #ffb0b0;
}

.library-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: #dcdcdc;
  font-size: 12px;
  font-weight: 780;
  text-decoration: none;
}

.library-links a:hover {
  border-color: var(--line-strong);
  background: #2a2a2a;
}

.library-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.library-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #202020;
  color: #e5e5e5;
  font-size: 13px;
  font-weight: 820;
  text-decoration: none;
}

.library-detail-link:hover {
  border-color: var(--line-strong);
  background: #2a2a2a;
}

.library-use {
  align-self: end;
  justify-self: start;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 14px;
  background: #f0f0f0;
  color: #181818;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
}

.library-use:hover {
  background: #ffffff;
}

.library-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.detail-page-view {
  padding-top: 34px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.detail-hero h1 {
  margin-top: 6px;
  color: #f1f1f1;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.06;
}

.detail-hero p {
  max-width: 760px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
}

.detail-grid article,
.ranking-section,
.detail-empty {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #222222;
}

.detail-grid h2,
.ranking-section h2 {
  color: #f2f2f2;
  font-size: 20px;
  line-height: 1.2;
}

.detail-facts {
  margin-top: 14px;
}

.detail-note,
.ranking-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.ranking-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 13px;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.ranking-table th {
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 860;
}

.ranking-table a {
  color: #f2f2f2;
  font-weight: 800;
  text-decoration: none;
}

.ranking-table a:hover {
  text-decoration: underline;
}

.benchmark-submit-section {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.benchmark-submit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--panel);
}

.benchmark-submit-form label {
  display: grid;
  gap: 7px;
}

.benchmark-submit-form .span-2,
.benchmark-submit-form button,
.benchmark-submit-form .message {
  grid-column: 1 / -1;
}

.benchmark-submit-form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.benchmark-submit-form input,
.benchmark-submit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

.benchmark-submit-form input:focus,
.benchmark-submit-form textarea:focus {
  border-color: var(--line-strong);
}

.benchmark-submission-list {
  display: grid;
  gap: 10px;
}

.benchmark-submission-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel);
}

.benchmark-submission-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.benchmark-submission-card span {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.benchmark-submission-card a {
  color: var(--blue);
  font-weight: 700;
}

.platform-view {
  padding-top: 34px;
}

.platform-inner {
  gap: 18px;
}

.platform-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 24px;
  align-items: end;
}

.platform-hero h1 {
  max-width: 860px;
  margin-top: 8px;
  color: #f1f1f1;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 820;
}

.platform-hero p:not(.eyebrow) {
  max-width: 780px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.platform-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.platform-hero-actions a,
.platform-hero-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #222222;
  color: #f0f0f0;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.platform-hero-actions a {
  display: inline-flex;
  align-items: center;
}

.platform-hero-actions a:hover,
.platform-hero-actions button:hover {
  border-color: var(--line-strong);
  background: #2a2a2a;
}

.platform-api-status {
  margin-top: 12px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 760;
}

.platform-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-scoreboard span,
.platform-moat article,
.platform-card,
.loop-card,
.platform-router,
.capability-panel,
.pipeline-form-panel,
.pipeline-result-panel,
.pipeline-stage,
.pipeline-run-summary,
.pipeline-checks,
.module-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #222222;
}

.platform-scoreboard span {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.platform-scoreboard strong {
  color: #f2f2f2;
  font-size: 34px;
  line-height: 1;
}

.platform-moat {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.platform-moat article {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.platform-moat span,
.module-head span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform-moat strong {
  color: #f2f2f2;
  font-size: 17px;
  line-height: 1.25;
}

.platform-moat p,
.platform-card p,
.platform-router header p:not(.eyebrow),
.capability-panel p,
.capability-live-status,
.capability-check-result p,
.loop-card li,
.module-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.platform-router {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.platform-router header {
  display: grid;
  gap: 8px;
}

.platform-router h2 {
  color: #f2f2f2;
  font-size: 26px;
  line-height: 1.18;
}

.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.platform-tabs button:hover,
.platform-tabs button.is-active {
  border-color: var(--line-strong);
  background: #f0f0f0;
  color: #262626;
}

.capability-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 1.4fr) minmax(220px, 0.8fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.capability-panel h3 {
  margin-top: 5px;
  color: #f2f2f2;
  font-size: 22px;
  line-height: 1.18;
}

.capability-label {
  color: var(--faint);
  font-size: 11px;
  font-weight: 860;
}

.capability-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.capability-flow span {
  min-height: 70px;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.capability-flow strong {
  color: #efefef;
  font-size: 11px;
}

.capability-assets {
  display: grid;
  gap: 6px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.capability-assets strong {
  color: #f2f2f2;
  font-size: 14px;
}

.capability-live-counts {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.capability-live-counts span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
}

.capability-live-counts strong {
  color: var(--faint);
  font-size: 12px;
}

.capability-actions {
  display: grid;
  gap: 8px;
}

.capability-check {
  justify-content: center;
  width: 100%;
  min-height: 42px;
  cursor: pointer;
}

.capability-check-result {
  grid-column: 1 / -1;
  min-height: 40px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
}

.capability-check-result strong {
  color: #f2f2f2;
}

.pipeline-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.2fr);
  gap: 14px;
}

.pipeline-form-panel,
.pipeline-result-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.pipeline-form-panel h2,
.pipeline-result-panel h2 {
  color: #f2f2f2;
  font-size: 26px;
  line-height: 1.18;
}

.pipeline-form-panel p:not(.eyebrow),
.pipeline-status,
.pipeline-run-summary p,
.pipeline-stage p,
.pipeline-checks p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.pipeline-form {
  display: grid;
  gap: 12px;
}

.pipeline-form label {
  display: grid;
  gap: 7px;
  color: #f0f0f0;
  font-size: 13px;
  font-weight: 850;
}

.pipeline-form input,
.pipeline-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 13px;
  background: #202020;
  color: #f0f0f0;
  font: inherit;
  font-size: 14px;
  outline: none;
  resize: vertical;
}

.pipeline-form input:focus,
.pipeline-form textarea:focus {
  border-color: var(--line-strong);
}

.pipeline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pipeline-actions button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.pipeline-status {
  min-height: 28px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-weight: 780;
}

.pipeline-status[data-tone="ok"] {
  color: #b7f0ad;
}

.pipeline-status[data-tone="error"] {
  color: #ffb0b0;
}

.pipeline-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.pipeline-result {
  display: grid;
  gap: 12px;
}

.pipeline-run-summary {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.pipeline-run-summary span,
.pipeline-stage span,
.pipeline-checks span {
  justify-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(107, 214, 93, 0.12);
  color: #b7f0ad;
  font-size: 12px;
  font-weight: 860;
}

.pipeline-run-summary h3,
.pipeline-stage h3,
.pipeline-checks h3 {
  color: #f2f2f2;
  font-size: 18px;
  line-height: 1.2;
}

.pipeline-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pipeline-stage {
  display: grid;
  gap: 9px;
  min-height: 160px;
  padding: 14px;
}

.pipeline-stage.warn span,
.pipeline-stage.running span,
.pipeline-stage.ready-for-worker span {
  background: rgba(246, 183, 86, 0.14);
  color: #ffd29a;
}

.pipeline-stage.fail span,
.pipeline-stage.needs-attention span {
  background: rgba(255, 107, 107, 0.14);
  color: #ffb0b0;
}

.pipeline-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pipeline-evidence em {
  max-width: 100%;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--faint);
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.pipeline-checks {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.pipeline-checks div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.pipeline-checks strong {
  color: #f0f0f0;
  font-size: 13px;
}

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

.platform-card {
  display: grid;
  gap: 16px;
  min-height: 360px;
  padding: 22px;
}

.platform-card-num {
  color: #727272;
  font-size: 34px;
  font-weight: 860;
  line-height: 1;
}

.platform-card h2,
.loop-card h2,
.module-section h2,
.module-card h3 {
  color: #f2f2f2;
  line-height: 1.18;
}

.platform-card h2 {
  font-size: 26px;
}

.platform-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.platform-card dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.platform-card dt {
  color: var(--faint);
  font-size: 12px;
  font-weight: 860;
}

.platform-card dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.loop-card {
  padding: 22px;
}

.loop-card h2 {
  margin-top: 6px;
  font-size: 24px;
}

.loop-card ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.loop-card li {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 780;
}

.module-section {
  display: grid;
  gap: 16px;
}

.module-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: 12px;
}

.module-toolbar label {
  display: grid;
  gap: 8px;
  color: #f0f0f0;
  font-size: 13px;
  font-weight: 850;
}

.module-toolbar input,
.module-toolbar select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 13px;
  background: #222222;
  color: #f0f0f0;
  font: inherit;
  font-size: 14px;
}

.module-stats {
  min-width: min(100%, 440px);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 218px;
  padding: 16px;
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-head a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  color: #dcdcdc;
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
}

.module-head a:hover {
  border-color: var(--line-strong);
  background: #2a2a2a;
}

.module-use {
  align-self: end;
  margin-top: auto;
}

.skill-card {
  width: min(100%, 650px);
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 20px;
  align-items: center;
  margin-top: 20vh;
  border-radius: 14px;
  padding: 24px 28px;
  background: #232323;
  color: #cfcfcf;
}

.skill-card h2 {
  color: #f0f0f0;
  font-size: 21px;
}

.skill-card p {
  margin-top: 4px;
  color: #a6a6a6;
  font-size: 15px;
}

.skill-lines {
  display: grid;
  gap: 12px;
}

.skill-lines span {
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(90deg, #3a3a3a 0 28%, rgba(255, 255, 255, 0.08) 28% 100%);
}

.task-detail {
  width: min(100%, 840px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: #222222;
  box-shadow: var(--shadow);
}

.task-detail-head h2 {
  margin-top: 8px;
  color: #f0f0f0;
  font-size: 24px;
  line-height: 1.15;
}

.task-detail-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.task-detail-head button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #242424;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 999px;
  background: #303030;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #e6e6e6;
  transition: width 180ms ease;
}

.task-detail-summary {
  margin-top: 14px;
  color: #c8c8c8;
}

.event-timeline {
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.event-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
}

.event-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: #8b8b8b;
}

.event-item.severity-success .event-dot {
  background: var(--success);
}

.event-item.severity-warning .event-dot {
  background: #d69943;
}

.event-item.severity-error .event-dot {
  background: var(--danger);
}

.event-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.event-title strong {
  color: #f0f0f0;
  font-size: 15px;
}

.event-title span,
.event-phase {
  color: var(--muted);
  font-size: 12px;
}

.event-item p {
  margin-top: 3px;
  color: #c8c8c8;
  font-size: 14px;
}

.event-empty {
  color: var(--muted);
  font-size: 14px;
}

.evidence-cloud {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 16px;
  background: #222222;
}

.evidence-cloud[open] {
  padding-bottom: 16px;
  box-shadow: var(--shadow);
}

.evidence-cloud summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  color: #d8d8d8;
  cursor: pointer;
  font-weight: 700;
}

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

label {
  display: block;
  margin-bottom: 12px;
  color: #ededed;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 12px;
  background: #202020;
  color: #ededed;
  font-size: 15px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #777777;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(143, 180, 255, 0.14);
}

button {
  font-weight: 700;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.login-grid input {
  min-height: 38px;
  border-radius: 10px;
  font-size: 14px;
}

.login-grid button,
.user-box button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #242424;
  color: #d8d8d8;
}

.login-grid button[type="submit"] {
  background: #383838;
  color: #fff;
}

.message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: var(--success);
}

body.is-chat-open .home-stage {
  place-items: stretch center;
  padding: 0 28px;
}

body.is-chat-open .stage-inner {
  width: min(100%, 1040px);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
}

body.is-chat-open .stage-inner > h1,
body.is-chat-open .feature-strip,
body.is-chat-open .skill-card {
  display: none;
}

body.is-chat-open .task-detail {
  order: 1;
  flex: 1;
  width: 100%;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  padding: 44px 0 148px;
  background: transparent;
  box-shadow: none;
}

body.is-chat-open .task-detail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
  background: linear-gradient(#191919 70%, rgba(25, 25, 25, 0));
}

body.is-chat-open .task-detail-head h2 {
  margin-top: 8px;
  font-size: 18px;
}

body.is-chat-open .progress-track,
body.is-chat-open .task-detail-summary {
  display: none;
}

body.is-chat-open .event-timeline {
  width: min(100%, 760px);
  margin: 0 auto;
  gap: 34px;
}

.chat-message {
  display: grid;
}

.user-message {
  justify-content: end;
}

.chat-bubble {
  max-width: min(520px, 76vw);
  border-radius: 18px;
  padding: 13px 18px;
  background: #343434;
  color: #f0f0f0;
  font-size: 17px;
  line-height: 1.55;
}

.assistant-message {
  justify-content: start;
  gap: 10px;
}

.assistant-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ededed;
}

.assistant-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
}

.assistant-body {
  max-width: min(760px, 82vw);
  color: #d8d8d8;
  font-size: 17px;
  line-height: 1.62;
}

.assistant-main {
  color: #dfdfdf;
  font-weight: 650;
}

.assistant-meta {
  margin-top: 8px;
  border-left: 3px solid #555555;
  padding-left: 14px;
  color: #969696;
}

.waiting-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.mining-animation {
  position: relative;
  width: 78px;
  height: 68px;
}

.miner-head,
.miner-body,
.miner-arm,
.miner-pick,
.ore,
.spark {
  position: absolute;
  display: block;
}

.miner-head {
  left: 21px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d9d9d9;
}

.miner-body {
  left: 20px;
  top: 29px;
  width: 24px;
  height: 26px;
  border-radius: 10px 10px 8px 8px;
  background: #8f8f8f;
}

.miner-arm {
  left: 37px;
  top: 30px;
  width: 25px;
  height: 7px;
  border-radius: 999px;
  background: #bdbdbd;
  transform-origin: 3px 50%;
  animation: miner-arm-swing 920ms ease-in-out infinite;
}

.miner-pick {
  left: 51px;
  top: 15px;
  width: 4px;
  height: 34px;
  border-radius: 999px;
  background: #dddddd;
  transform-origin: 50% 95%;
  animation: pick-swing 920ms ease-in-out infinite;
}

.miner-pick::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 1px;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: #dddddd;
}

.ore {
  right: 7px;
  bottom: 8px;
  width: 24px;
  height: 20px;
  border-radius: 12px 12px 7px 7px;
  background: #3a3a3a;
}

.ore-b {
  right: 0;
  bottom: 5px;
  width: 15px;
  height: 13px;
  opacity: 0.75;
}

.spark {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e6e6e6;
  opacity: 0;
  animation: spark-pop 920ms ease-out infinite;
}

.spark-a {
  right: 28px;
  top: 30px;
}

.spark-b {
  right: 14px;
  top: 25px;
  animation-delay: 140ms;
}

@keyframes miner-arm-swing {
  0%, 100% { transform: rotate(-23deg); }
  48% { transform: rotate(32deg); }
}

@keyframes pick-swing {
  0%, 100% { transform: rotate(-38deg); }
  48% { transform: rotate(24deg); }
}

@keyframes spark-pop {
  0%, 45% { opacity: 0; transform: scale(0.5); }
  58% { opacity: 1; transform: scale(1.3); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.7); }
}

.assistant-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: #9d9d9d;
}

.assistant-step span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #333333;
  color: #a8a8a8;
  font-size: 13px;
}

.assistant-step.is-done span {
  background: rgba(107, 214, 93, 0.14);
  color: var(--success);
}

.assistant-step strong {
  overflow: hidden;
  color: #cfcfcf;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-step small {
  color: #7d7d7d;
  font-size: 12px;
}

.delivery-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid #6bd65d;
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(107, 214, 93, 0.12);
  color: #e9ffe5;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
}

.delivery-download:hover {
  background: rgba(107, 214, 93, 0.18);
}

.delivery-download span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #6bd65d;
  color: #141414;
  font-size: 16px;
  line-height: 1;
}

body.is-chat-open .task-composer {
  position: sticky;
  bottom: 0;
  order: 2;
  width: min(100%, 820px);
  margin: -112px auto 0;
  padding: 16px 0 22px;
  background: linear-gradient(to top, #191919 82%, rgba(25, 25, 25, 0));
}

body.is-chat-open .prompt-field {
  border-radius: 22px;
  background: #202020;
}

body.is-chat-open .prompt-field textarea {
  min-height: 88px;
  padding: 19px 24px 8px;
  font-size: 16px;
}

body.is-chat-open .evidence-cloud,
body.is-chat-open .message {
  display: none;
}

html[data-theme="light"] body,
html[data-theme="light"] .app-shell,
html[data-theme="light"] .workspace {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] .sidebar {
  background: var(--sidebar);
}

html[data-theme="light"] .workspace-header {
  background: #fbfbfa;
}

html[data-theme="light"] .brand-mark,
html[data-theme="light"] .assistant-mark,
html[data-theme="light"] .assistant-step span {
  background: #dfdfdc;
  color: #252525;
}

html[data-theme="light"] .brand strong,
html[data-theme="light"] .task-card h3,
html[data-theme="light"] .gate-copy h2,
html[data-theme="light"] .user-box span,
html[data-theme="light"] .workspace-title,
html[data-theme="light"] .stage-inner > h1,
html[data-theme="light"] .task-detail-head h2,
html[data-theme="light"] .event-title strong,
html[data-theme="light"] .assistant-brand,
html[data-theme="light"] label {
  color: #262626;
}

html[data-theme="light"] .side-nav a,
html[data-theme="light"] .project-link,
html[data-theme="light"] .ecosystem-link,
html[data-theme="light"] .tool-button,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .evidence-cloud summary,
html[data-theme="light"] .login-grid button,
html[data-theme="light"] .user-box button,
html[data-theme="light"] .workspace-controls select,
html[data-theme="light"] .download-menu summary,
html[data-theme="light"] .top-menu summary,
html[data-theme="light"] .header-link {
  background: #f8f8f6;
  color: #242424;
}

html[data-theme="light"] .ecosystem-link:not(.is-static):hover,
html[data-theme="light"] .client-downloads a:hover {
  background: #e8e8e4;
}

html[data-theme="light"] .ecosystem-icon {
  background: #dfdfdc;
  color: #252525;
}

html[data-theme="light"] .ecosystem-link strong {
  color: #262626;
}

html[data-theme="light"] .ecosystem-link small {
  color: #707070;
}

html[data-theme="light"] .client-downloads a {
  background: #fbfbfa;
  color: #343434;
}

html[data-theme="light"] .download-panel {
  background: #ffffff;
}

html[data-theme="light"] .top-panel {
  background: #ffffff;
}

html[data-theme="light"] .about-panel strong,
html[data-theme="light"] .contact-panel strong {
  color: #242424;
}

html[data-theme="light"] .about-panel p,
html[data-theme="light"] .contact-panel p,
html[data-theme="light"] .download-panel p,
html[data-theme="light"] .product-pending {
  color: #3f3f3f;
}

html[data-theme="light"] .contact-panel p {
  background: #f2f2ef;
}

html[data-theme="light"] .contact-panel .contact-note {
  background: transparent;
  color: #424242;
}

html[data-theme="light"] .contact-panel em {
  color: #5a5a5a;
}

html[data-theme="light"] .identity-gate,
html[data-theme="light"] .user-box,
html[data-theme="light"] .settings-menu,
html[data-theme="light"] .prompt-field,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .library-stats span,
html[data-theme="light"] .platform-scoreboard span,
html[data-theme="light"] .platform-moat article,
html[data-theme="light"] .platform-card,
html[data-theme="light"] .platform-router,
html[data-theme="light"] .capability-panel,
html[data-theme="light"] .loop-card,
html[data-theme="light"] .module-card,
html[data-theme="light"] .pipeline-form-panel,
html[data-theme="light"] .pipeline-result-panel,
html[data-theme="light"] .pipeline-stage,
html[data-theme="light"] .pipeline-run-summary,
html[data-theme="light"] .pipeline-checks,
html[data-theme="light"] .platform-hero-actions a,
html[data-theme="light"] .platform-hero-actions button,
html[data-theme="light"] .platform-tabs button,
html[data-theme="light"] .library-search input,
html[data-theme="light"] .library-filter select,
html[data-theme="light"] .module-toolbar input,
html[data-theme="light"] .module-toolbar select,
html[data-theme="light"] .library-tabs,
html[data-theme="light"] .library-card,
html[data-theme="light"] .library-keyfacts,
html[data-theme="light"] .library-more,
html[data-theme="light"] .benchmark-principles span,
html[data-theme="light"] .benchmark-board,
html[data-theme="light"] .library-detail-link,
html[data-theme="light"] .detail-grid article,
html[data-theme="light"] .ranking-section,
html[data-theme="light"] .detail-empty,
html[data-theme="light"] .skill-card,
html[data-theme="light"] .task-detail,
html[data-theme="light"] .evidence-cloud,
html[data-theme="light"] body.is-chat-open .prompt-field {
  background: #ffffff;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #fbfbfa;
  color: #242424;
}

html[data-theme="light"] .settings-panel select,
html[data-theme="light"] .settings-link {
  background: #fbfbfa;
  color: #242424;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #6f6f6f;
}

html[data-theme="light"] .prompt-field textarea,
html[data-theme="light"] .assistant-main,
html[data-theme="light"] .task-detail-summary,
html[data-theme="light"] .assistant-body {
  color: #2b2b2b;
}

html[data-theme="light"] .task-card p,
html[data-theme="light"] .assistant-meta,
html[data-theme="light"] .assistant-step,
html[data-theme="light"] .assistant-step strong,
html[data-theme="light"] .assistant-step small,
html[data-theme="light"] .library-header p:not(.eyebrow),
html[data-theme="light"] .platform-hero p:not(.eyebrow),
html[data-theme="light"] .platform-moat p,
html[data-theme="light"] .platform-card p,
html[data-theme="light"] .platform-card dd,
html[data-theme="light"] .platform-router header p:not(.eyebrow),
html[data-theme="light"] .capability-panel p,
html[data-theme="light"] .platform-api-status,
html[data-theme="light"] .capability-live-status,
html[data-theme="light"] .capability-live-counts span,
html[data-theme="light"] .capability-check-result,
html[data-theme="light"] .capability-flow span,
html[data-theme="light"] .loop-card li,
html[data-theme="light"] .module-card p,
html[data-theme="light"] .pipeline-form-panel p:not(.eyebrow),
html[data-theme="light"] .pipeline-status,
html[data-theme="light"] .pipeline-run-summary p,
html[data-theme="light"] .pipeline-stage p,
html[data-theme="light"] .pipeline-checks p,
html[data-theme="light"] .library-summary,
html[data-theme="light"] .library-keyfacts p,
html[data-theme="light"] .benchmark-board div,
html[data-theme="light"] .library-facts dd,
html[data-theme="light"] .detail-hero p,
html[data-theme="light"] .detail-note,
html[data-theme="light"] .ranking-head p,
html[data-theme="light"] .ranking-table,
html[data-theme="light"] .dock-head,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .muted {
  color: #4f4f4f;
}

html[data-theme="light"] .library-header h2,
html[data-theme="light"] .library-header h1,
html[data-theme="light"] .platform-hero h1,
html[data-theme="light"] .platform-scoreboard strong,
html[data-theme="light"] .platform-moat strong,
html[data-theme="light"] .platform-card h2,
html[data-theme="light"] .platform-router h2,
html[data-theme="light"] .capability-panel h3,
html[data-theme="light"] .capability-assets strong,
html[data-theme="light"] .capability-check-result strong,
html[data-theme="light"] .loop-card h2,
html[data-theme="light"] .module-section h2,
html[data-theme="light"] .module-card h3,
html[data-theme="light"] .pipeline-form-panel h2,
html[data-theme="light"] .pipeline-result-panel h2,
html[data-theme="light"] .pipeline-run-summary h3,
html[data-theme="light"] .pipeline-stage h3,
html[data-theme="light"] .pipeline-checks h3,
html[data-theme="light"] .pipeline-checks strong,
html[data-theme="light"] .library-card h3,
html[data-theme="light"] .detail-hero h1,
html[data-theme="light"] .detail-grid h2,
html[data-theme="light"] .ranking-section h2,
html[data-theme="light"] .ranking-table th,
html[data-theme="light"] .ranking-table a,
html[data-theme="light"] .library-stats strong {
  color: #262626;
}

html[data-theme="light"] .library-more summary {
  color: #333333;
}

html[data-theme="light"] .library-keyfacts,
html[data-theme="light"] .library-more,
html[data-theme="light"] .benchmark-board,
html[data-theme="light"] .benchmark-principles span {
  background: #fbfbfa;
}

html[data-theme="light"] .benchmark-status.active {
  background: rgba(32, 122, 52, 0.1);
  color: #207a34;
}

html[data-theme="light"] .benchmark-status.draft {
  background: rgba(36, 95, 204, 0.1);
  color: #245fcc;
}

html[data-theme="light"] .benchmark-number,
html[data-theme="light"] .library-kind,
html[data-theme="light"] .library-domain,
html[data-theme="light"] .library-tags span {
  background: #eeeeea;
  color: #3f3f3f;
}

html[data-theme="light"] .library-tabs button.is-active,
html[data-theme="light"] .library-tabs button:hover {
  background: #e8e8e4;
  color: #252525;
}

html[data-theme="light"] .library-kind,
html[data-theme="light"] .library-domain,
html[data-theme="light"] .library-tags span {
  background: #eeeeea;
  color: #555555;
}

html[data-theme="light"] .library-kind.leaderboard {
  background: rgba(36, 95, 204, 0.1);
  color: #245fcc;
}

html[data-theme="light"] .library-kind.algorithm {
  background: rgba(32, 122, 52, 0.1);
  color: #207a34;
}

html[data-theme="light"] .library-kind.github {
  background: rgba(164, 104, 24, 0.12);
  color: #9a6418;
}

html[data-theme="light"] .ai-fit-高 {
  background: rgba(32, 122, 52, 0.1);
  color: #207a34;
}

html[data-theme="light"] .ai-fit-中 {
  background: rgba(36, 95, 204, 0.1);
  color: #245fcc;
}

html[data-theme="light"] .ai-fit-低 {
  background: rgba(196, 66, 66, 0.1);
  color: #c44242;
}

html[data-theme="light"] .library-links a {
  background: #fbfbfa;
  color: #343434;
}

html[data-theme="light"] .platform-hero-actions a,
html[data-theme="light"] .platform-hero-actions button,
html[data-theme="light"] .module-head a,
html[data-theme="light"] .loop-card li {
  background: #fbfbfa;
  color: #343434;
}

html[data-theme="light"] .library-links a:hover,
html[data-theme="light"] .library-detail-link:hover,
html[data-theme="light"] .platform-hero-actions a:hover,
html[data-theme="light"] .platform-hero-actions button:hover,
html[data-theme="light"] .module-head a:hover {
  background: #e8e8e4;
}

html[data-theme="light"] .library-use {
  background: #2f2f2f;
  color: #ffffff;
}

html[data-theme="light"] .chat-bubble {
  background: #e9e9e6;
  color: #222222;
}

html[data-theme="light"] .send-button,
html[data-theme="light"] .login-grid button[type="submit"] {
  background: #2f2f2f;
  color: #ffffff;
}

html[data-theme="light"] .progress-track {
  background: #e2e2df;
}

html[data-theme="light"] .progress-track span {
  background: #292929;
}

html[data-theme="light"] .delivery-download {
  background: rgba(32, 122, 52, 0.1);
  color: #195f28;
}

html[data-theme="light"] body.is-chat-open .task-detail-head {
  background: linear-gradient(#f6f6f4 70%, rgba(246, 246, 244, 0));
}

html[data-theme="light"] body.is-chat-open .task-composer {
  background: linear-gradient(to top, #f6f6f4 82%, rgba(246, 246, 244, 0));
}

.user-box .account-trigger {
  min-height: 58px;
  display: grid;
  border-radius: 18px;
  padding: 9px 12px;
}

html[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.24);
}

html[data-theme="light"] .login-modal-panel,
html[data-theme="light"] .settings-window,
html[data-theme="light"] .account-menu {
  border-color: #dededa;
  background: #ffffff;
}

html[data-theme="light"] .settings-sidebar {
  border-color: #dededa;
  background: #f1f1ee;
}

html[data-theme="light"] .modal-close,
html[data-theme="light"] .account-trigger,
html[data-theme="light"] .account-plan,
html[data-theme="light"] .settings-account-card,
html[data-theme="light"] .settings-metric-grid div,
html[data-theme="light"] .settings-toggle,
html[data-theme="light"] .settings-link-list a,
html[data-theme="light"] .waiting-card {
  border-color: #dededa;
  background: #f4f4f1;
  color: #252525;
}

html[data-theme="light"] .account-menu-item:hover,
html[data-theme="light"] .settings-tab.is-active,
html[data-theme="light"] .settings-tab:hover {
  background: #e9e9e5;
}

html[data-theme="light"] .login-brand h2,
html[data-theme="light"] .settings-pane h2,
html[data-theme="light"] .account-trigger strong,
html[data-theme="light"] .account-menu strong,
html[data-theme="light"] .settings-profile strong,
html[data-theme="light"] .settings-info-list dd,
html[data-theme="light"] .settings-info-list dt,
html[data-theme="light"] .settings-metric-grid strong,
html[data-theme="light"] .settings-link-list a,
html[data-theme="light"] .account-menu-item,
html[data-theme="light"] .settings-tab {
  color: #282828;
}

html[data-theme="light"] .account-trigger small,
html[data-theme="light"] .account-menu small,
html[data-theme="light"] .settings-profile small,
html[data-theme="light"] .account-plan span,
html[data-theme="light"] .settings-account-card p,
html[data-theme="light"] .settings-note,
html[data-theme="light"] .settings-metric-grid span,
html[data-theme="light"] .settings-toggle span {
  color: #4d4d4d;
}

html[data-theme="light"] .account-avatar,
html[data-theme="light"] .miner-head,
html[data-theme="light"] .miner-pick,
html[data-theme="light"] .miner-pick::before,
html[data-theme="light"] .spark {
  background: #303030;
  color: #ffffff;
}

html[data-theme="light"] .miner-body,
html[data-theme="light"] .miner-arm {
  background: #6f6f6f;
}

html[data-theme="light"] .ore {
  background: #b9b9b4;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .platform-moat,
  .pipeline-workbench,
  .pipeline-stage-grid,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace-header {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 16px;
  }

  .workspace-controls {
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .download-menu {
    flex: 0 0 auto;
  }

  .download-menu summary {
    justify-content: center;
    width: 100%;
  }

  .account-menu {
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
    width: auto;
  }

  .settings-window {
    width: min(100%, 760px);
    min-height: min(88vh, 760px);
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }

  .settings-profile {
    grid-column: 1 / -1;
    margin-bottom: 4px;
    padding-bottom: 12px;
  }

  .settings-content {
    padding: 44px 22px 24px;
  }

  .settings-tab {
    min-height: 38px;
    padding: 0 8px;
    text-align: center;
  }

  .home-stage {
    padding: 38px 16px 54px;
  }

  .library-view {
    padding: 0 16px 54px;
  }

  .library-header,
  .library-toolbar,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .library-stats {
    width: 100%;
  }

  .library-tabs {
    justify-self: start;
  }

  .library-keyfacts p {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .benchmark-toolbar {
    grid-template-columns: 1fr;
  }

  .benchmark-board div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .detail-hero,
  .detail-grid,
  .platform-hero,
  .capability-panel,
  .module-toolbar,
  .pipeline-workbench,
  .pipeline-fields,
  .pipeline-stage-grid,
  .platform-grid,
  .loop-map,
  .platform-moat,
  .module-grid {
    grid-template-columns: 1fr;
  }

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

  .capability-flow {
    grid-template-columns: 1fr;
  }

  .capability-assets {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }

  .loop-card ol {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    justify-self: stretch;
  }

  .detail-actions .library-use,
  .detail-actions .library-detail-link,
  .library-actions .library-use,
  .library-actions .library-detail-link {
    width: 100%;
  }

  .stage-inner {
    gap: 20px;
    margin-top: 0;
  }

  .composer-tools,
  .tool-left {
    align-items: stretch;
  }

  .composer-tools {
    display: grid;
    margin-top: 0;
    padding: 0;
    pointer-events: auto;
  }

  .tool-left {
    display: grid;
  }

  .send-button {
    width: 100%;
  }

  .optional-field-grid,
  .skill-card {
    grid-template-columns: 1fr;
  }

  .skill-card {
    margin-top: 8vh;
  }

  body.is-chat-open .home-stage {
    padding: 0 16px;
  }

  body.is-chat-open .task-detail {
    padding-bottom: 170px;
  }
}

@media (max-width: 520px) {
  .sidebar {
    padding: 12px;
  }

  .stage-inner > h1 {
    font-size: 32px;
  }

  .prompt-field {
    border-radius: 22px;
  }

  .login-modal-panel {
    padding: 26px 18px;
  }

  .login-brand h2,
  .settings-pane h2 {
    font-size: 26px;
  }

  .settings-sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .settings-account-card,
  .settings-info-list div,
  .settings-metric-grid,
  .waiting-card {
    grid-template-columns: 1fr;
  }

  .settings-account-card .account-avatar {
    width: 58px;
    height: 58px;
    font-size: 19px;
  }

  .prompt-field textarea {
    min-height: 120px;
    padding: 18px;
    font-size: 16px;
  }

  .feature-strip {
    justify-content: flex-start;
  }

  .library-stats {
    grid-template-columns: 1fr;
  }

  .platform-scoreboard {
    grid-template-columns: 1fr;
  }

  .library-tabs {
    width: 100%;
  }

  .library-tabs button {
    flex: 1;
  }

  .library-card {
    min-height: auto;
  }

  .assistant-step {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .assistant-step small {
    grid-column: 2;
  }
}
