@font-face {
  font-family: "Demo Sans";
  src: url("dm-sans-normal-300-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
}

@font-face {
  font-family: "Demo Serif";
  src: url("cormorant-garamond-normal-400-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #20211f;
  --ink-soft: #4d4c47;
  --muted: #7a776f;
  --faint: #aaa69d;
  --paper: #f3f1eb;
  --paper-2: #ebe8df;
  --surface: #fbfaf7;
  --white: #fffefa;
  --line: #d9d5ca;
  --line-strong: #c8c1b2;
  --gold: #98710f;
  --gold-bright: #c49a32;
  --gold-wash: #f4ead1;
  --nav: #1c201f;
  --nav-2: #242927;
  --green: #217a50;
  --green-wash: #dfeee5;
  --amber: #ad691c;
  --amber-wash: #f4e7d7;
  --red: #b94b43;
  --red-wash: #f5e2df;
  --blue: #356b8c;
  --blue-wash: #e2edf3;
  --violet: #66569e;
  --violet-wash: #ebe8f6;
  --shadow: 0 16px 48px rgba(40, 35, 25, 0.09);
  --shadow-soft: 0 5px 18px rgba(40, 35, 25, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% -10%, rgba(196, 154, 50, 0.11), transparent 34%),
    var(--paper);
  font-family: "Demo Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Avenir Next", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.sm {
  width: 15px;
  height: 15px;
}

.icon.lg {
  width: 23px;
  height: 23px;
}

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

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 640px;
  color: #d6d4ce;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 23%),
    var(--nav);
  border-right: 1px solid #303532;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 72px;
  padding: 0 22px;
  border-bottom: 1px solid #303532;
}

.brand-name {
  font-family: "Demo Serif", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fffaf0;
  white-space: nowrap;
}

.brand-env {
  margin-left: auto;
  color: #817b6c;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace-switcher {
  margin: 14px 14px 9px;
  padding: 12px;
  color: #e8e5dc;
  background: var(--nav-2);
  border: 1px solid #373c39;
  border-radius: 9px;
}

.workspace-switcher button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.workspace-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #171a18;
  font-size: 11px;
  font-weight: 700;
  background: var(--gold-bright);
  border-radius: 6px;
}

.workspace-copy {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.workspace-name {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-meta {
  display: block;
  margin-top: 2px;
  color: #8e918b;
  font-size: 10px;
}

.workspace-switcher .chevron {
  margin-left: auto;
  color: #7d817b;
}

.rail-section {
  margin: 14px 12px 0;
}

.rail-label {
  padding: 0 10px 7px;
  color: #777b75;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 3px;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  color: #a8aaa5;
  border-radius: 7px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  color: #f0eee8;
  background: #292e2b;
  transform: translateX(2px);
}

.nav-link.active {
  color: #fffaf0;
  background: linear-gradient(90deg, #33372f, #292e2b);
}

.nav-link.active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -12px;
  width: 2px;
  content: "";
  background: var(--gold-bright);
}

.nav-link .label {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
}

.nav-count {
  min-width: 19px;
  padding: 2px 5px;
  color: #cec5ad;
  font-size: 9px;
  text-align: center;
  background: #3a3d38;
  border: 1px solid #474a44;
  border-radius: 10px;
}

.rail-spacer {
  flex: 1;
}

.agent-monitor {
  margin: 14px;
  padding: 12px;
  background: #242826;
  border: 1px solid #383c39;
  border-radius: 9px;
}

.agent-monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #aaa9a2;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #83c6a3;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live::before {
  width: 6px;
  height: 6px;
  content: "";
  background: #54b881;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(84, 184, 129, 0.1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 7px rgba(84, 184, 129, 0); }
}

.agent-monitor-main {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}

.agent-monitor-main > span:last-child {
  flex: 1;
  min-width: 0;
}

.agent-ring {
  position: relative;
  width: 31px;
  height: 31px;
  min-width: 31px;
  flex: 0 0 31px;
  aspect-ratio: 1;
  border: 2px solid #4b514d;
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 5s linear infinite;
}

.agent-ring::after {
  position: absolute;
  inset: 7px;
  content: "";
  background: #d9c486;
  border-radius: 50%;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.agent-monitor-title {
  display: block;
  overflow: hidden;
  color: #e6e3da;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-monitor-sub {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #81847f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 63px;
  padding: 0 20px;
  border-top: 1px solid #303532;
}

.avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff9e9;
  font-size: 10px;
  font-weight: 600;
  background: linear-gradient(145deg, #8d6b21, #443819);
  border: 1px solid #77653a;
  border-radius: 50%;
}

.avatar.agent {
  color: var(--gold);
  background: var(--gold-wash);
  border-color: #dfc988;
}

.rail-user-name {
  color: #e7e3da;
  font-size: 11px;
  font-weight: 600;
}

.rail-user-role {
  margin-top: 2px;
  color: #777c76;
  font-size: 9px;
}

.page {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  height: 72px;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: rgba(243, 241, 235, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.mobile-menu {
  display: none;
  width: 35px;
  height: 35px;
  place-items: center;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.crumbs strong {
  color: var(--ink);
  font-weight: 600;
}

.topbar-spacer {
  flex: 1;
}

.command-button {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 254, 250, 0.76);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.command-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.command-button kbd {
  padding: 2px 5px;
  color: var(--faint);
  font: 9px "Demo Sans", sans-serif;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.topbar-status::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--green);
  border-radius: 50%;
}

.page-body {
  padding: 28px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 5px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: clamp(34px, 3.2vw, 48px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.page-heading p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.btn {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #aaa391;
  box-shadow: var(--shadow-soft);
}

.btn.primary {
  color: #fffaf0;
  background: var(--ink);
  border-color: var(--ink);
}

.btn.gold {
  color: #fffaf0;
  background: var(--gold);
  border-color: var(--gold);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
}

.icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.surface {
  background: rgba(255, 254, 250, 0.82);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric {
  position: relative;
  min-height: 104px;
  padding: 16px;
  overflow: hidden;
}

.metric::after {
  position: absolute;
  right: -18px;
  bottom: -32px;
  width: 85px;
  height: 85px;
  content: "";
  border: 1px solid rgba(152, 113, 15, 0.13);
  border-radius: 50%;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.metric-value {
  margin-top: 15px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.metric-foot {
  margin-top: 7px;
  color: var(--faint);
  font-size: 9px;
}

.metric-trend {
  color: var(--green);
}

.badge {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.badge.success {
  color: var(--green);
  background: var(--green-wash);
  border-color: #c5dfce;
}

.badge.warning {
  color: var(--amber);
  background: var(--amber-wash);
  border-color: #e7cfb2;
}

.badge.danger {
  color: var(--red);
  background: var(--red-wash);
  border-color: #e7c2bd;
}

.badge.info {
  color: var(--blue);
  background: var(--blue-wash);
  border-color: #c5dce7;
}

.badge.violet {
  color: var(--violet);
  background: var(--violet-wash);
  border-color: #d8d0ed;
}

.dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 19px;
  font-weight: 600;
}

.section-kicker {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.text-link {
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.split-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(310px, 0.72fr);
  gap: 16px;
}

.activity-list,
.list {
  display: grid;
}

.activity-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 66px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.source-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-icon.repository {
  color: #514361;
  background: #eee9f1;
}

.source-icon.work-item {
  color: #495998;
  background: #e8eaf5;
}

.source-icon.observability {
  color: #a05b29;
  background: #f4e8dd;
}

.activity-title {
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.activity-time {
  color: var(--faint);
  font-size: 9px;
  white-space: nowrap;
}

.agent-queue {
  padding: 8px;
}

.agent-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
}

.agent-card:last-child {
  border-bottom: 0;
}

.agent-glyph {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--gold);
  font-family: "Demo Serif", Georgia, serif;
  font-weight: 700;
  background: var(--gold-wash);
  border: 1px solid #e6d6ac;
  border-radius: 50%;
}

.agent-card-title {
  font-size: 10px;
  font-weight: 600;
}

.agent-card-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.progress {
  width: 54px;
  height: 3px;
  overflow: hidden;
  background: var(--paper-2);
  border-radius: 2px;
}

.progress > span {
  display: block;
  width: var(--progress, 50%);
  height: 100%;
  background: var(--gold);
}

.callout {
  padding: 17px;
  background:
    linear-gradient(120deg, rgba(152, 113, 15, 0.08), transparent 54%),
    var(--surface);
}

.callout-label {
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.callout h3 {
  max-width: 320px;
  margin: 11px 0 7px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.05;
}

.callout p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.filter {
  min-height: 29px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.filter:hover {
  color: var(--ink);
  background: var(--surface);
}

.filter.active {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(40, 35, 25, 0.05);
}

.filter-count {
  margin-left: 4px;
  color: var(--faint);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 11px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 6px;
}

.kanban-column {
  min-height: 525px;
  padding: 9px;
  background: rgba(235, 232, 223, 0.54);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 11px;
}

.kanban-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
}

.kanban-title::before {
  width: 7px;
  height: 7px;
  content: "";
  background: var(--column-color, var(--faint));
  border-radius: 50%;
}

.kanban-count {
  color: var(--faint);
  font-size: 9px;
}

.task-card {
  margin-bottom: 8px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(40, 35, 25, 0.035);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: #b9b09f;
  box-shadow: var(--shadow-soft);
}

.task-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-card h3 {
  margin: 9px 0 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.task-card p {
  display: -webkit-box;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-footer {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mini-avatar {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  background: #5c655f;
  border: 2px solid var(--surface);
  border-radius: 50%;
}

.mini-avatar + .mini-avatar {
  margin-left: -10px;
}

.task-date {
  margin-left: auto;
  color: var(--faint);
  font-size: 8px;
}

.review-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 306px;
  gap: 0;
  min-height: calc(100vh - 72px);
  background: var(--surface);
}

.review-files {
  padding: 20px 12px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.review-files h2 {
  margin: 0 8px 15px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 18px;
}

.file-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 8px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.file-summary div {
  padding: 8px 5px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.file-summary div:last-child {
  border-right: 0;
}

.file-summary strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
}

.file-item {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  color: var(--muted);
  font: 9px "SFMono-Regular", Consolas, monospace;
  border-radius: 5px;
  cursor: pointer;
}

.file-item:hover,
.file-item.active {
  color: var(--ink);
  background: var(--surface);
}

.file-item .change {
  margin-left: auto;
  color: var(--green);
  font-size: 8px;
}

.review-main {
  min-width: 0;
  background: var(--surface);
}

.review-titlebar {
  display: flex;
  min-height: 104px;
  align-items: flex-start;
  gap: 14px;
  padding: 21px 23px;
  border-bottom: 1px solid var(--line);
}

.pr-number {
  color: var(--gold);
  font: 10px "SFMono-Regular", Consolas, monospace;
}

.review-titlebar h1 {
  margin: 5px 0 8px;
  font-family: "Demo Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.review-title-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.review-title-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.review-content {
  padding: 22px 23px 42px;
}

.review-summary {
  padding: 15px;
  border-left: 3px solid var(--gold);
  background: var(--gold-wash);
}

.review-summary h2 {
  margin-bottom: 6px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 19px;
  font-weight: 600;
}

.review-summary p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.finding {
  margin-top: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.finding-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.finding-index {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  background: var(--red);
  border-radius: 5px;
}

.finding-index.warning {
  background: var(--amber);
}

.finding h3 {
  margin: 0 0 4px;
  font-size: 11px;
}

.finding-path {
  color: var(--muted);
  font: 8px "SFMono-Regular", Consolas, monospace;
}

.finding-body {
  padding: 14px;
}

.finding-body p {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.code {
  overflow-x: auto;
  color: #d8d9d3;
  background: #202321;
  border: 1px solid #313633;
  border-radius: 6px;
  font: 9px/1.65 "SFMono-Regular", Consolas, monospace;
}

.code-line {
  display: grid;
  grid-template-columns: 35px minmax(max-content, 1fr);
  min-width: 540px;
}

.code-line .no {
  padding-right: 9px;
  color: #6d746e;
  text-align: right;
  user-select: none;
  border-right: 1px solid #333834;
}

.code-line .src {
  padding: 0 11px;
  white-space: pre;
}

.code-line.del {
  color: #e1aca7;
  background: rgba(185, 75, 67, 0.14);
}

.code-line.add {
  color: #a9d3b9;
  background: rgba(33, 122, 80, 0.15);
}

.review-aside {
  padding: 20px 17px;
  background: var(--paper);
  border-left: 1px solid var(--line);
}

.aside-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.check-list {
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}

.check-row:last-child {
  border-bottom: 0;
}

.check-status {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: var(--green);
  background: var(--green-wash);
  border-radius: 50%;
}

.check-status.running {
  color: var(--amber);
  background: var(--amber-wash);
}

.check-name {
  font-size: 9px;
  font-weight: 600;
}

.check-time {
  margin-left: auto;
  color: var(--faint);
  font-size: 8px;
}

.reasoning {
  position: relative;
  padding: 0 0 2px 19px;
}

.reasoning::before {
  position: absolute;
  top: 4px;
  bottom: 0;
  left: 6px;
  width: 1px;
  content: "";
  background: var(--line-strong);
}

.reason-step {
  position: relative;
  margin-bottom: 14px;
}

.reason-step::before {
  position: absolute;
  top: 3px;
  left: -16px;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: 50%;
}

.reason-step strong {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
}

.reason-step span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

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

.automation-card {
  position: relative;
  min-height: 244px;
  overflow: hidden;
  padding: 17px;
}

.automation-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--automation-color, var(--gold));
}

.automation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.automation-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--automation-color, var(--gold));
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toggle {
  position: relative;
  width: 32px;
  height: 18px;
  padding: 0;
  background: var(--line-strong);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background 150ms ease;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  content: "";
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.toggle.on {
  background: var(--green);
}

.toggle.on::after {
  transform: translateX(14px);
}

.automation-card h3 {
  margin: 16px 0 6px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.automation-card > p {
  min-height: 42px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.automation-rule {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 9px;
  color: var(--ink-soft);
  font: 8px "SFMono-Regular", Consolas, monospace;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.automation-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
}

.automation-last {
  color: var(--muted);
  font-size: 8px;
}

.automation-detail-link {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.automation-detail-link:hover {
  color: var(--gold);
}

.automation-run {
  margin-left: 0;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.automation-detail-page {
  max-width: 1440px;
  margin: 0 auto;
}

.automation-detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  padding: 25px 27px;
  color: #f8f4e9;
  background:
    radial-gradient(circle at 88% 14%, rgba(196, 154, 50, 0.22), transparent 27%),
    linear-gradient(115deg, #202421, #2d302a);
  border: 1px solid #3b403b;
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.automation-detail-hero::after {
  position: absolute;
  right: -52px;
  bottom: -92px;
  width: 220px;
  height: 220px;
  content: "";
  border: 1px solid rgba(196, 154, 50, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(196, 154, 50, 0.035), 0 0 0 48px rgba(196, 154, 50, 0.025);
}

.automation-hero-copy,
.automation-hero-actions {
  position: relative;
  z-index: 1;
}

.automation-detail-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a9aea7;
  font-size: 11px;
}

.automation-detail-state strong {
  color: #8bd0aa;
}

.automation-detail-state > span:last-child {
  padding-left: 8px;
  border-left: 1px solid #4a4e48;
}

.automation-pulse {
  width: 8px;
  height: 8px;
  background: #5fc08a;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(95, 192, 138, 0.11);
  animation: pulse 2s infinite;
}

.automation-detail-page.is-paused .automation-pulse {
  background: var(--faint);
  box-shadow: 0 0 0 5px rgba(170, 166, 157, 0.11);
  animation: none;
}

.automation-detail-page.is-paused .automation-detail-state strong {
  color: #c9c4b8;
}

.automation-hero-copy h1 {
  margin: 13px 0 8px;
  color: #fffaf0;
  font-size: clamp(30px, 3.3vw, 43px);
}

.automation-hero-copy > p {
  max-width: 760px;
  margin-bottom: 16px;
  color: #b8b9b3;
  font-size: 14px;
  line-height: 1.7;
}

.automation-trigger-code {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  color: #d9d6cc;
  background: rgba(11, 14, 12, 0.45);
  border: 1px solid #464b46;
  border-radius: 6px;
}

.automation-trigger-code span {
  color: #d8b65d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.automation-trigger-code code {
  font: 11px "SFMono-Regular", Consolas, monospace;
}

.automation-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.automation-hero-actions .btn:not(.gold) {
  color: #dedbd2;
  background: #303530;
  border-color: #4b504b;
}

.automation-hero-actions .toggle {
  margin-left: 5px;
}

.automation-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 13px 0 16px;
}

.automation-detail-stat {
  min-height: 86px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.automation-detail-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.automation-detail-stat strong {
  display: inline-block;
  margin-top: 8px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.automation-detail-stat em {
  margin-left: 7px;
  color: var(--green);
  font-size: 10px;
  font-style: normal;
}

.automation-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.automation-detail-main,
.automation-detail-aside {
  display: grid;
  gap: 12px;
}

.automation-detail-aside {
  position: sticky;
  top: 88px;
}

.automation-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 19px;
}

.automation-flow-step {
  position: relative;
  min-height: 132px;
  padding: 14px 14px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.automation-flow-step:first-child {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

.automation-flow-step:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

.automation-flow-step::after {
  position: absolute;
  top: 27px;
  right: -6px;
  z-index: 2;
  width: 11px;
  height: 11px;
  content: "";
  background: var(--gold-bright);
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.automation-flow-step:last-child::after {
  display: none;
}

.automation-flow-step > span {
  color: var(--gold);
  font: 10px "SFMono-Regular", Consolas, monospace;
}

.automation-flow-step strong {
  display: block;
  margin: 16px 0 7px;
  font-size: 13px;
}

.automation-flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.automation-config-card {
  position: relative;
  min-height: 190px;
  padding: 16px;
}

.config-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--gold);
  background: var(--gold-wash);
  border: 1px solid #e3d09c;
  border-radius: 8px;
}

.config-card-icon.guard {
  color: var(--green);
  background: var(--green-wash);
  border-color: #c5dfce;
}

.config-card-icon.retry {
  color: var(--amber);
  background: var(--amber-wash);
  border-color: #e7cfb2;
}

.config-card-icon.output {
  color: var(--blue);
  background: var(--blue-wash);
  border-color: #c5dce7;
}

.automation-config-card > span {
  position: absolute;
  top: 18px;
  right: 16px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.automation-config-card h3 {
  margin: 13px 0 9px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 19px;
}

.automation-config-card > div:last-child {
  display: grid;
  gap: 7px;
}

.automation-config-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.automation-config-item::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  margin-top: 6px;
  content: "";
  background: var(--gold-bright);
  border-radius: 50%;
}

.detail-panel-head > a {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
}

.automation-run-head,
.automation-run-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) 0.8fr 0.65fr 0.5fr 0.65fr;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.automation-run-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.automation-run-row {
  min-height: 57px;
  border-bottom: 1px solid var(--line);
}

.automation-run-row:last-child {
  border-bottom: 0;
}

.automation-run-row strong {
  font-size: 12px;
}

.automation-run-row span {
  color: var(--muted);
  font-size: 11px;
}

.automation-property-list {
  display: grid;
}

.automation-property {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.automation-property:last-child {
  border-bottom: 0;
}

.automation-property strong {
  color: var(--ink-soft);
  font-size: 11px;
  text-align: right;
}

.run-table {
  margin-top: 16px;
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 0.75fr 0.7fr 0.55fr 0.75fr;
  gap: 14px;
  align-items: center;
}

.table-head {
  min-height: 37px;
  padding: 0 15px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.table-row {
  min-height: 54px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-main {
  font-size: 10px;
  font-weight: 600;
}

.table-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.table-cell {
  color: var(--ink-soft);
  font-size: 9px;
}

.skill-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
}

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

.skill-card {
  display: flex;
  min-height: 167px;
  flex-direction: column;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.skill-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.skill-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--gold);
  background: var(--gold-wash);
  border: 1px solid #e5d3a2;
  border-radius: 7px;
}

.skill-card h3 {
  margin: 0 0 2px;
  font-size: 11px;
}

.skill-scope {
  color: var(--muted);
  font-size: 8px;
}

.skill-card p {
  min-height: 42px;
  margin: 14px 0 11px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  padding: 3px 6px;
  color: var(--muted);
  font: 7px "SFMono-Regular", Consolas, monospace;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.skill-detail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 13px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}

.skill-detail-link span {
  transition: transform 150ms ease;
}

.skill-card:hover .skill-detail-link span {
  transform: translateX(3px);
}

.skill-detail-page {
  max-width: 1440px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.back-link:hover {
  color: var(--ink);
}

.skill-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at 86% 8%, rgba(152, 113, 15, 0.11), transparent 34%),
    var(--surface);
}

.skill-detail-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--gold);
  background: var(--gold-wash);
  border: 1px solid #dfc989;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(152, 113, 15, 0.1);
}

.skill-detail-copy {
  min-width: 0;
}

.skill-detail-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.skill-detail-kicker > span + span {
  padding-left: 9px;
  border-left: 1px solid var(--line);
}

.skill-detail-copy h1 {
  margin: 11px 0 7px;
  font-family: "Demo Sans", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.skill-detail-copy > p {
  max-width: 760px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.skill-detail-actions {
  display: flex;
  gap: 8px;
}

.skill-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}

.skill-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 15px 16px;
  background: var(--ink);
  border: 1px solid #343936;
  border-radius: 9px;
}

.skill-stat-card::after {
  position: absolute;
  right: -18px;
  bottom: -32px;
  width: 82px;
  height: 82px;
  content: "";
  border: 1px solid rgba(196, 154, 50, 0.22);
  border-radius: 50%;
}

.skill-stat-card span {
  display: block;
  color: #9da19b;
  font-size: 10px;
}

.skill-stat-card strong {
  display: block;
  margin-top: 8px;
  color: #fffaf0;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

.skill-stat-card em {
  position: absolute;
  right: 14px;
  top: 15px;
  color: #79bd99;
  font-size: 10px;
  font-style: normal;
}

.skill-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: start;
}

.skill-detail-main,
.skill-detail-aside {
  display: grid;
  gap: 12px;
}

.skill-detail-aside {
  position: sticky;
  top: 88px;
}

.detail-panel {
  overflow: hidden;
}

.detail-panel-head {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
}

.detail-panel-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-index {
  color: var(--gold);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 17px;
}

.detail-panel-head h2 {
  margin: 0;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
}

.detail-panel-head > span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 18px;
}

.flow-step {
  position: relative;
  min-height: 124px;
  padding: 11px 13px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.flow-step:first-child {
  border-radius: 7px 0 0 7px;
}

.flow-step:last-child {
  border-radius: 0 7px 7px 0;
}

.flow-step + .flow-step {
  border-left: 0;
}

.flow-step + .flow-step::before {
  position: absolute;
  top: 50%;
  left: -7px;
  z-index: 1;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  color: var(--gold);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "›";
  font-size: 11px;
  transform: translateY(-50%);
}

.flow-step > span {
  color: var(--gold);
  font: 10px "SFMono-Regular", Consolas, monospace;
}

.flow-step strong {
  display: block;
  margin: 13px 0 6px;
  font-size: 13px;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.contract-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  padding: 18px;
}

.contract-column {
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.contract-column.output {
  background: var(--gold-wash);
  border-color: #dfc989;
}

.contract-column h3 {
  margin-bottom: 11px;
  font-size: 13px;
}

.contract-column > div {
  display: grid;
  gap: 7px;
}

.contract-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.contract-item::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  content: "";
  background: var(--gold-bright);
  border-radius: 50%;
}

.contract-arrow {
  align-self: center;
  color: var(--gold);
  font-size: 20px;
}

.skill-file-list {
  display: grid;
}

.skill-file-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  padding: 8px 17px;
  border-bottom: 1px solid var(--line);
}

.skill-file-row:last-child {
  border-bottom: 0;
}

.skill-file-row strong {
  font: 12px "SFMono-Regular", Consolas, monospace;
}

.skill-file-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.skill-file-row span {
  color: var(--faint);
  font-size: 10px;
}

.detail-side-card {
  overflow: hidden;
  padding: 14px;
}

.detail-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.detail-side-title a {
  color: var(--gold);
  letter-spacing: 0;
}

.detail-trigger-list,
.detail-connection-list,
.detail-run-list {
  display: grid;
  gap: 7px;
}

.detail-trigger {
  padding: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.detail-trigger span {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font: 9px "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
}

.detail-connection,
.detail-run {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 8px;
  background: var(--paper);
  border-radius: 6px;
}

.detail-connection .dot {
  color: var(--green);
}

.detail-connection strong,
.detail-run strong {
  font-size: 12px;
}

.detail-connection span:last-child,
.detail-run span:last-child {
  color: var(--faint);
  font-size: 10px;
}

.run-status {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--green);
  background: var(--green-wash);
  border-radius: 50%;
  font-size: 10px;
}

.connection-list {
  padding: 8px;
}

.connection {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 53px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}

.connection:last-child {
  border-bottom: 0;
}

.connection-logo {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.connection-name {
  font-size: 10px;
  font-weight: 600;
}

.connection-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.capability-map {
  margin-top: 16px;
  padding: 16px;
  overflow: hidden;
}

.capability-map h3 {
  margin-bottom: 4px;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 18px;
}

.capability-map > p {
  color: var(--muted);
  font-size: 9px;
}

.map {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.85fr 1fr;
  gap: 35px;
  align-items: center;
  min-height: 170px;
  margin-top: 13px;
}

.map::before,
.map::after {
  position: absolute;
  top: 50%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.map::before {
  right: 55%;
  left: 20%;
}

.map::after {
  right: 20%;
  left: 55%;
}

.map-column {
  display: grid;
  gap: 6px;
  z-index: 1;
}

.map-node {
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  color: var(--ink-soft);
  font-size: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.map-core {
  display: grid;
  width: 112px;
  height: 112px;
  place-self: center;
  place-items: center;
  color: #fff8e8;
  text-align: center;
  background:
    radial-gradient(circle at 35% 30%, #5f5b46, transparent 28%),
    var(--ink);
  border: 1px solid #434641;
  border-radius: 50%;
  box-shadow: 0 0 0 9px rgba(152, 113, 15, 0.09), 0 0 0 10px rgba(152, 113, 15, 0.19);
  z-index: 2;
}

.map-core strong {
  display: block;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 18px;
}

.map-core span {
  color: #aaa794;
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chat-demo {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr) 286px;
  min-height: calc(100vh - 72px);
  background: var(--surface);
}

.chat-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.chat-page .app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.chat-page .rail {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

.chat-page .page {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.chat-page .topbar {
  flex: 0 0 auto;
}

.chat-page .chat-demo {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.chat-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.chat-list-head {
  padding: 17px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.chat-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 12px;
}

.chat-tab {
  display: grid;
  width: 36px;
  height: 31px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.chat-tab.active {
  color: var(--gold);
  background: var(--surface);
  border-color: var(--line);
}

.search {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.search input {
  min-width: 0;
  flex: 1;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search input::placeholder {
  color: var(--faint);
}

.chat-items {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 8px;
}

.chat-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 59px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.chat-item:hover {
  background: rgba(255, 254, 250, 0.55);
}

.chat-item.active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 3px 10px rgba(40, 35, 25, 0.04);
}

.chat-item-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--muted);
  background: var(--paper-2);
  border-radius: 6px;
}

.chat-item-title {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.chat-item-time {
  color: var(--faint);
  font-size: 8px;
}

.chat-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(rgba(217, 213, 202, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 213, 202, 0.13) 1px, transparent 1px),
    var(--surface);
  background-size: 24px 24px;
}

.chat-head {
  display: flex;
  flex: 0 0 auto;
  min-height: 71px;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid var(--line);
}

.chat-head h1 {
  margin: 0 0 3px;
  font-family: "Demo Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

.chat-head-meta {
  color: var(--muted);
  font-size: 8px;
}

.chat-head-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.messages {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 15px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 22px clamp(18px, 4vw, 56px) 18px;
}

.message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: rise 450ms both;
}

.message:nth-child(2) { animation-delay: 70ms; }
.message:nth-child(3) { animation-delay: 140ms; }
.message:nth-child(4) { animation-delay: 210ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.bubble {
  max-width: 77%;
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
  background: rgba(255, 254, 250, 0.93);
  border: 1px solid var(--line);
  border-radius: 3px 12px 12px 12px;
  box-shadow: 0 3px 12px rgba(40, 35, 25, 0.04);
}

.user .bubble {
  color: #f4f1e8;
  background: var(--ink);
  border-color: var(--ink);
  border-radius: 12px 12px 3px 12px;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.assistant-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  width: 100%;
  gap: 12px;
}

.assistant-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fffaf0;
  background: var(--ink);
  border: 1px solid #343936;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(40, 35, 25, 0.1);
}

.assistant-mark svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.assistant-response {
  min-width: 0;
  color: var(--ink-soft);
}

.response-activity {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
}

.response-activity summary {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  list-style: none;
  background: rgba(235, 232, 223, 0.62);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  user-select: none;
}

.response-activity summary::-webkit-details-marker {
  display: none;
}

.response-activity summary strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.response-check {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--green);
  background: var(--green-wash);
  border-radius: 50%;
  font-size: 10px;
}

.response-chevron {
  color: var(--faint);
  font-size: 12px;
  transition: transform 150ms ease;
}

.response-activity[open] .response-chevron {
  transform: rotate(180deg);
}

.response-activity > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.response-activity .tool-trace {
  max-width: 620px;
  margin-top: 8px;
}

.response-copy h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: "Demo Sans", "PingFang SC", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.response-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.78;
}

.assistant-response > .evidence-board {
  margin-top: 17px;
}

.response-section {
  margin-top: 20px;
}

.response-section h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-family: "Demo Sans", "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.response-section .insight-list {
  gap: 0;
  margin-top: 0;
}

.response-section .insight-item {
  display: block;
  padding: 11px 0;
}

.response-section .insight-item > strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.response-section .insight-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.response-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  padding-top: 8px;
}

.response-actions button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.response-actions button:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.response-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tool-trace {
  margin-top: 10px;
  padding: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tool-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 8px;
}

.tool-row strong {
  color: var(--ink-soft);
}

.result-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.result-stat {
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.result-stat span {
  display: block;
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.result-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 18px;
}

.message:nth-child(3) .bubble {
  width: min(94%, 760px);
  max-width: 94%;
}

.evidence-board {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.evidence-heading,
.chart-title,
.diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.evidence-heading {
  margin-bottom: 11px;
}

.evidence-heading > span:first-child {
  display: grid;
  gap: 2px;
}

.evidence-heading small,
.evidence-period {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.evidence-heading strong {
  color: var(--ink);
  font-size: 10px;
}

.support-evidence {
  background:
    linear-gradient(135deg, rgba(53, 107, 140, 0.06), transparent 42%),
    var(--surface);
}

.support-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 9px;
  border: 1px solid #cedbe2;
  border-radius: 6px;
}

.support-kpis > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 5px;
  padding: 8px 9px;
  border-right: 1px solid #d8e2e7;
}

.support-kpis > div:last-child {
  border-right: 0;
}

.support-kpis span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 7px;
}

.support-kpis strong {
  color: var(--ink);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 18px;
  line-height: 1;
}

.support-kpis em {
  color: var(--green);
  font-size: 7px;
  font-style: normal;
}

.support-kpis em.negative {
  color: var(--red);
}

.support-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(130px, 0.9fr);
  gap: 8px;
}

.chart-panel {
  padding: 9px;
  background: rgba(255, 254, 250, 0.76);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.chart-title {
  margin-bottom: 5px;
}

.chart-title strong {
  color: var(--ink-soft);
  font-size: 8px;
}

.chart-title span {
  color: var(--muted);
  font-size: 7px;
}

.line-chart {
  width: 100%;
  height: 116px;
  overflow: visible;
}

.chart-grid-lines line {
  stroke: #dedbd3;
  stroke-width: 1;
}

.chart-area {
  fill: rgba(53, 107, 140, 0.12);
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-width: 3;
}

.chart-points circle {
  fill: var(--surface);
  stroke: var(--blue);
  stroke-width: 3;
}

.chart-axis-labels {
  fill: var(--faint);
  font-family: "Demo Sans", sans-serif;
  font-size: 9px;
}

.chart-annotation {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font-size: 7px;
}

.chart-annotation span {
  width: 12px;
  height: 2px;
  background: var(--blue);
}

.donut-wrap {
  display: grid;
  place-items: center;
  gap: 8px;
}

.donut-chart {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  background: conic-gradient(var(--blue) 0 38%, var(--gold-bright) 38% 62%, #7e9d82 62% 83%, #d7d3c9 83% 100%);
  border-radius: 50%;
}

.donut-chart::before {
  grid-area: 1 / 1;
  width: 53px;
  height: 53px;
  background: var(--surface);
  border-radius: 50%;
  content: "";
}

.donut-chart span {
  z-index: 1;
  display: grid;
  grid-area: 1 / 1;
  text-align: center;
}

.donut-chart strong {
  color: var(--ink);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 17px;
  line-height: 1;
}

.donut-chart small {
  color: var(--muted);
  font-size: 6px;
}

.donut-legend {
  display: grid;
  width: 100%;
  gap: 4px;
}

.donut-legend span {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 6px;
}

.donut-legend i {
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
}

.donut-legend i.billing {
  background: var(--gold-bright);
}

.donut-legend i.account {
  background: #7e9d82;
}

.donut-legend i.other {
  background: #d7d3c9;
}

.donut-legend strong {
  color: var(--ink-soft);
}

.topic-panel {
  margin-top: 8px;
}

.topic-bars {
  display: grid;
  grid-template-columns: 58px minmax(60px, 1fr) 34px;
  align-items: center;
  gap: 5px 7px;
  color: var(--muted);
  font-size: 7px;
}

.topic-bars > div {
  height: 5px;
  overflow: hidden;
  background: var(--paper-2);
  border-radius: 5px;
}

.topic-bars i {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: inherit;
}

.topic-bars i.cool {
  background: var(--green);
}

.topic-bars strong {
  color: var(--ink-soft);
  font-size: 7px;
  text-align: right;
}

.pr-evidence {
  background:
    linear-gradient(90deg, rgba(173, 105, 28, 0.06), transparent 45%),
    var(--surface);
}

.queue-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 11px;
}

.queue-summary > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 8px;
  background: var(--paper);
  border-radius: 5px;
}

.queue-summary strong {
  color: var(--ink);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 17px;
}

.queue-summary span {
  color: var(--muted);
  font-size: 7px;
}

.age-scale {
  display: grid;
  grid-template-columns: 22px minmax(115px, 1fr) minmax(60px, 0.6fr) 27px 33px;
  gap: 7px;
  padding: 0 5px 5px;
  color: var(--faint);
  font-size: 6px;
}

.age-scale span:first-child {
  grid-column: 3;
}

.age-ticks {
  display: flex;
  grid-column: 3;
  justify-content: space-between;
}

.age-ticks i {
  font-style: normal;
}

.pr-queue {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pr-row {
  display: grid;
  grid-template-columns: 22px minmax(115px, 1fr) minmax(60px, 0.6fr) 27px 33px;
  align-items: center;
  gap: 7px;
  min-height: 45px;
  padding: 6px 7px;
  border-bottom: 1px solid var(--line);
}

.pr-row:last-child {
  border-bottom: 0;
}

.pr-row:hover {
  background: var(--paper);
}

.pr-row.priority {
  background: rgba(244, 231, 215, 0.45);
}

.queue-rank {
  color: var(--faint);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 13px;
}

.pr-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.pr-row > span:nth-child(2) strong,
.pr-row > span:nth-child(2) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-row > span:nth-child(2) strong {
  color: var(--ink);
  font-size: 7px;
}

.pr-row > span:nth-child(2) small {
  color: var(--muted);
  font-size: 6px;
}

.age-track {
  height: 5px;
  overflow: hidden;
  background: var(--paper-2);
  border-radius: 5px;
}

.age-track i {
  display: block;
  height: 100%;
  background: var(--amber);
  border-radius: inherit;
}

.pr-row b {
  color: var(--ink-soft);
  font-size: 7px;
}

.pr-row em {
  color: var(--amber);
  font-size: 6px;
  font-style: normal;
  text-align: right;
}

.api-evidence {
  background:
    linear-gradient(135deg, rgba(102, 86, 158, 0.07), transparent 44%),
    var(--surface);
}

.api-blueprint {
  display: grid;
  grid-template-columns: minmax(72px, 0.65fr) auto minmax(120px, 1.1fr) auto minmax(100px, 0.8fr);
  align-items: stretch;
  gap: 7px;
  margin-bottom: 9px;
}

.api-origin,
.api-gateway,
.api-resources {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 8px;
  background: rgba(255, 254, 250, 0.82);
  border: 1px solid #d8d3e7;
  border-radius: 6px;
}

.api-origin span,
.api-gateway strong {
  color: var(--ink);
  font-size: 8px;
}

.api-origin small,
.api-gateway small,
.api-gateway span {
  color: var(--muted);
  font-size: 6px;
}

.api-gateway {
  border-color: #a79acb;
  box-shadow: inset 3px 0 var(--violet);
}

.api-arrow {
  align-self: center;
  color: var(--violet);
  font-size: 12px;
}

.api-resources {
  gap: 4px;
}

.api-resources span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 6px;
}

.api-resources i {
  min-width: 25px;
  padding: 2px 3px;
  color: var(--green);
  background: var(--green-wash);
  border-radius: 3px;
  font-size: 5px;
  font-style: normal;
  text-align: center;
}

.api-resources i.post {
  color: var(--violet);
  background: var(--violet-wash);
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.decision-card {
  min-height: 84px;
  padding: 8px;
  background: var(--paper);
  border-top: 2px solid var(--green);
  border-radius: 4px;
}

.decision-card.open {
  border-color: var(--gold-bright);
}

.decision-card.guarded {
  border-color: var(--red);
}

.decision-card > span {
  color: var(--muted);
  font-size: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.decision-card strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 7px;
}

.decision-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 6px;
  line-height: 1.45;
}

.compatibility-strip {
  display: flex;
  align-items: center;
  margin-top: 9px;
  color: var(--muted);
  font-size: 6px;
}

.compatibility-strip i {
  flex: 1;
  height: 1px;
  margin: 0 5px;
  background: linear-gradient(90deg, var(--violet), var(--line));
}

.compound-evidence {
  background:
    radial-gradient(circle at 21% 42%, rgba(33, 122, 80, 0.09), transparent 31%),
    linear-gradient(135deg, rgba(152, 113, 15, 0.055), transparent 52%),
    var(--surface);
}

.compound-layout {
  display: grid;
  grid-template-columns: minmax(155px, 0.9fr) minmax(175px, 1.1fr);
  gap: 9px;
}

.compound-cycle {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  background: rgba(255, 254, 250, 0.62);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.compound-cycle svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.compound-cycle path {
  fill: none;
  stroke: rgba(33, 122, 80, 0.28);
  stroke-dasharray: 4 4;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.compound-cycle-core,
.compound-node {
  position: absolute;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
}

.compound-cycle-core {
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  color: #f9f5e9;
  background: var(--ink);
  border: 1px solid #414640;
  box-shadow: 0 0 0 8px rgba(33, 122, 80, 0.07);
  transform: translate(-50%, -50%);
}

.compound-cycle-core strong {
  font-family: "Demo Serif", Georgia, serif;
  font-size: 14px;
}

.compound-cycle-core small {
  color: #aeb0a9;
  font-size: 9px;
}

.compound-node {
  width: 57px;
  height: 57px;
  color: var(--green);
  background: var(--green-wash);
  border: 1px solid #bdd8c6;
  box-shadow: 0 5px 12px rgba(40, 35, 25, 0.055);
}

.compound-node > span {
  color: rgba(33, 122, 80, 0.65);
  font: 9px "SFMono-Regular", Consolas, monospace;
}

.compound-node strong {
  font-size: 11px;
}

.compound-node small {
  color: var(--muted);
  font-size: 9px;
}

.compound-node.capture {
  top: 8px;
  left: 12px;
}

.compound-node.structure {
  top: 10px;
  right: 10px;
}

.compound-node.validate {
  right: 13px;
  bottom: 9px;
}

.compound-node.reuse {
  bottom: 8px;
  left: 10px;
}

.skill-package {
  overflow: hidden;
  background: #222624;
  border: 1px solid #3c413e;
  border-radius: 7px;
  box-shadow: 0 7px 18px rgba(40, 35, 25, 0.09);
}

.skill-package-head {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid #3b403d;
}

.package-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #151815;
  font-family: "Demo Serif", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  background: var(--gold-bright);
  border-radius: 7px;
}

.skill-package-head > span:last-child {
  display: grid;
  min-width: 0;
}

.skill-package-head strong {
  overflow: hidden;
  color: #f5f1e7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-package-head small {
  color: #8d918b;
  font-size: 9px;
}

.package-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 4px 9px;
  color: #737a74;
  border-bottom: 1px solid #323633;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.package-file:last-child {
  border-bottom: 0;
}

.package-file strong {
  overflow: hidden;
  color: #d9d8d1;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-file em {
  color: #8f938e;
  font-size: 9px;
  font-style: normal;
}

.package-file i {
  color: #79bd99;
  font-size: 9px;
  font-style: normal;
}

.compound-impact {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-top: 9px;
  padding: 10px 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.compound-impact-copy {
  display: grid;
}

.compound-impact-copy span,
.compound-impact-copy small,
.compound-quality span,
.compound-quality small {
  color: var(--muted);
  font-size: 9px;
}

.compound-impact-copy strong {
  color: var(--ink);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 15px;
}

.compound-bars {
  display: grid;
  grid-template-columns: auto minmax(50px, 1fr) auto;
  align-items: center;
  gap: 3px 6px;
  color: var(--muted);
  font-size: 9px;
}

.compound-bars > div {
  display: contents;
}

.compound-bars i {
  display: block;
  height: 5px;
  background: var(--green);
  border-radius: 5px;
}

.compound-bars strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.compound-quality {
  display: grid;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.compound-quality strong {
  color: var(--green);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 17px;
  line-height: 1;
}

.doc-evidence {
  background:
    radial-gradient(circle at 12% 30%, rgba(152, 113, 15, 0.08), transparent 36%),
    var(--surface);
}

.doc-compare {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(170px, 1.15fr);
  gap: 13px;
}

.document-stack {
  position: relative;
  min-height: 159px;
}

.doc-sheet {
  position: absolute;
  right: 0;
  left: 0;
  display: grid;
  gap: 3px;
  min-height: 88px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 8px 16px rgba(40, 35, 25, 0.06);
}

.doc-sheet.old {
  top: 0;
  right: 22px;
  opacity: 0.45;
  transform: rotate(-2deg);
}

.doc-sheet.middle {
  top: 24px;
  left: 11px;
  opacity: 0.7;
  transform: rotate(1.4deg);
}

.doc-sheet.current {
  top: 51px;
  right: 3px;
  left: 23px;
  border-color: #c7af72;
  box-shadow: inset 3px 0 var(--gold), 0 9px 19px rgba(40, 35, 25, 0.09);
}

.doc-sheet span {
  color: var(--gold);
  font-size: 5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-sheet strong {
  color: var(--ink);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 11px;
}

.doc-sheet small {
  color: var(--muted);
  font-size: 6px;
}

.version-diff {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.version-diff > div {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.version-diff > div:last-child {
  border-bottom: 0;
}

.version-diff .diff-head {
  background: var(--paper);
}

.diff-head span {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.diff-head strong {
  color: var(--ink);
  font-size: 7px;
}

.diff-mark {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--green);
  background: var(--green-wash);
  border-radius: 50%;
  font-size: 9px;
}

.diff-mark.change {
  color: var(--amber);
  background: var(--amber-wash);
}

.diff-mark.minus {
  color: var(--red);
  background: var(--red-wash);
}

.version-diff p {
  display: grid;
  margin: 0;
}

.version-diff p strong {
  color: var(--ink-soft);
  font-size: 7px;
}

.version-diff p small {
  color: var(--muted);
  font-size: 6px;
}

.doc-confidence {
  display: grid;
  grid-template-columns: auto minmax(50px, 1fr);
  align-items: center;
  gap: 4px 9px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 6px;
}

.doc-confidence span strong {
  margin-right: 4px;
  color: var(--gold);
  font-family: "Demo Serif", Georgia, serif;
  font-size: 14px;
}

.doc-confidence > div {
  height: 5px;
  overflow: hidden;
  background: var(--paper-2);
  border-radius: 4px;
}

.doc-confidence > div i {
  display: block;
  height: 100%;
  background: var(--gold-bright);
}

.doc-confidence small {
  grid-column: 1 / -1;
  color: var(--faint);
  font-size: 6px;
}

.risk-evidence {
  background:
    radial-gradient(circle at 73% 28%, rgba(185, 75, 67, 0.09), transparent 26%),
    radial-gradient(circle at 27% 77%, rgba(53, 107, 140, 0.08), transparent 28%),
    var(--surface);
}

.risk-map-chart {
  position: relative;
  height: 192px;
  margin: 0 16px 8px 22px;
  border-bottom: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.risk-line {
  position: absolute;
  display: block;
  background: var(--line);
}

.risk-line.horizontal {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.risk-line.vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.axis-label {
  position: absolute;
  color: var(--faint);
  font-size: 6px;
}

.axis-label.impact {
  right: 0;
  bottom: -15px;
}

.axis-label.urgency {
  top: 0;
  left: -20px;
  transform: rotate(-90deg) translateX(-100%);
  transform-origin: top left;
}

.risk-bubble {
  position: absolute;
  display: grid;
  place-content: center;
  width: 74px;
  height: 74px;
  color: var(--red);
  text-align: center;
  background: rgba(245, 226, 223, 0.9);
  border: 1px solid rgba(185, 75, 67, 0.35);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(40, 35, 25, 0.08);
}

.risk-bubble strong {
  font-size: 8px;
}

.risk-bubble small {
  font-size: 6px;
}

.risk-bubble.checkout {
  top: 9px;
  right: 11%;
  width: 86px;
  height: 86px;
}

.risk-bubble.migration {
  top: 57px;
  left: 33%;
  width: 68px;
  height: 68px;
  color: var(--amber);
  background: rgba(244, 231, 215, 0.92);
  border-color: rgba(173, 105, 28, 0.32);
}

.risk-bubble.reviews {
  right: 17%;
  bottom: 8px;
  width: 62px;
  height: 62px;
  color: var(--blue);
  background: rgba(226, 237, 243, 0.92);
  border-color: rgba(53, 107, 140, 0.3);
}

.risk-bubble.mobile {
  bottom: 13px;
  left: 8%;
  width: 52px;
  height: 52px;
  color: var(--muted);
  background: rgba(235, 232, 223, 0.94);
  border-color: var(--line);
}

.risk-legend {
  display: flex;
  gap: 12px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 6px;
}

.risk-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.risk-legend i {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}

.risk-legend i.watch {
  background: var(--amber);
}

.risk-legend i.stable {
  background: var(--blue);
}

.insight-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.insight-item {
  display: grid;
  grid-template-columns: minmax(118px, 0.42fr) minmax(0, 1fr);
  gap: 9px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.insight-item > strong {
  color: var(--ink);
  font-size: 7px;
}

.insight-item p {
  margin: 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.5;
}

.composer-wrap {
  flex: 0 0 auto;
  padding: 0 clamp(18px, 4vw, 56px) 18px;
}

.composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.composer textarea {
  height: 37px;
  max-height: 90px;
  resize: none;
  padding: 9px 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.send {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: #fffaf0;
  background: var(--gold);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.chat-context {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 17px 14px;
  background: var(--paper);
  border-left: 1px solid var(--line);
}

.context-section {
  margin-bottom: 22px;
}

.context-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.context-card {
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.context-card h3 {
  margin-bottom: 5px;
  font-size: 10px;
}

.context-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.context-list {
  display: grid;
  gap: 6px;
}

.context-item {
  display: flex;
  min-height: 35px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: var(--ink-soft);
  font-size: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.context-item .icon {
  color: var(--gold);
}

.context-item span:last-child {
  margin-left: auto;
  color: var(--faint);
}

/* CJK typography scale: keep Chinese body copy comfortably readable. */
html[lang="zh-CN"] body {
  font-size: 15px;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

html[lang="zh-CN"] :is(.brand-name, h1, .section-head h2, .section-head h3, .callout h3, .review-files h2, .review-summary h2, .automation-card h3, .capability-map h3) {
  font-family: "Demo Serif", "Songti SC", "STSong", serif;
}

html[lang="zh-CN"] :is(button, input, textarea) {
  line-height: 1.5;
}

html[lang="zh-CN"] :is(
  .brand-env,
  .rail-label,
  .nav-count,
  .live,
  .agent-monitor-sub,
  .rail-user-role,
  .command-button kbd
) {
  font-size: 10px;
}

html[lang="zh-CN"] :is(
  .workspace-meta,
  .agent-monitor-head,
  .topbar-status,
  .metric-foot,
  .section-kicker,
  .activity-meta,
  .activity-time,
  .agent-card-meta,
  .callout-label,
  .task-source,
  .task-date,
  .review-title-meta,
  .finding-path,
  .aside-title,
  .check-time,
  .reason-step span,
  .automation-rule,
  .automation-last,
  .table-head,
  .table-sub,
  .skill-scope,
  .tag,
  .connection-meta,
  .map-core span
) {
  font-size: 10px;
}

html[lang="zh-CN"] :is(
  .workspace-avatar,
  .agent-monitor-title,
  .rail-user-name,
  .crumbs,
  .metric-label,
  .badge,
  .text-link,
  .filter,
  .file-summary div,
  .file-item,
  .file-item .change,
  .pr-number,
  .finding-index,
  .check-name,
  .reason-step strong,
  .automation-run,
  .table-cell,
  .map-node
) {
  font-size: 11px;
}

html[lang="zh-CN"] :is(
  .nav-link .label,
  .btn,
  .activity-title,
  .agent-card-title,
  .kanban-title,
  .kanban-count,
  .table-main,
  .skill-card h3,
  .connection-name
) {
  font-size: 13px;
}

html[lang="zh-CN"] .page-heading p {
  font-size: 14px;
  line-height: 1.75;
}

html[lang="zh-CN"] :is(
  .callout p,
  .task-card p,
  .review-summary p,
  .finding-body p,
  .automation-card > p,
  .skill-card p,
  .capability-map > p
) {
  font-size: 14px;
  line-height: 1.72;
}

html[lang="zh-CN"] .task-card h3,
html[lang="zh-CN"] .finding h3 {
  font-size: 13px;
  line-height: 1.55;
}

html[lang="zh-CN"] .code {
  font-size: 11px;
  line-height: 1.75;
}

html[lang="zh-CN"] .chat-item {
  min-height: 64px;
}

html[lang="zh-CN"] .chat-item-title {
  font-size: 12px;
}

html[lang="zh-CN"] :is(.chat-item-meta, .chat-item-time, .chat-head-meta) {
  font-size: 10px;
}

html[lang="zh-CN"] .chat-head h1 {
  font-size: 16px;
}

html[lang="zh-CN"] .search input,
html[lang="zh-CN"] .composer textarea {
  font-size: 14px;
}

html[lang="zh-CN"] .bubble {
  font-size: 14px;
  line-height: 1.75;
}

html[lang="zh-CN"] .tool-row {
  font-size: 11px;
}

html[lang="zh-CN"] .result-stat span {
  font-size: 10px;
}

html[lang="zh-CN"] .evidence-heading :is(small, .evidence-period) {
  font-size: 9px;
}

html[lang="zh-CN"] .evidence-heading strong {
  font-size: 13px;
}

html[lang="zh-CN"] .support-kpis span,
html[lang="zh-CN"] .support-kpis em {
  font-size: 10px;
}

html[lang="zh-CN"] .chart-title strong {
  font-size: 11px;
}

html[lang="zh-CN"] :is(
  .chart-title span,
  .chart-annotation,
  .donut-legend span,
  .topic-bars,
  .topic-bars strong,
  .queue-summary span,
  .pr-row > span:nth-child(2) strong,
  .pr-row b,
  .api-origin span,
  .api-gateway strong,
  .decision-card strong,
  .diff-head span,
  .diff-head strong,
  .version-diff p strong,
  .risk-bubble strong,
  .insight-item > strong,
  .context-label
) {
  font-size: 10px;
}

html[lang="zh-CN"] :is(
  .donut-chart small,
  .age-scale,
  .pr-row > span:nth-child(2) small,
  .pr-row em,
  .api-origin small,
  .api-gateway small,
  .api-gateway span,
  .api-resources span,
  .decision-card > span,
  .decision-card p,
  .compatibility-strip,
  .doc-sheet span,
  .doc-sheet small,
  .version-diff p small,
  .doc-confidence,
  .doc-confidence small,
  .axis-label,
  .risk-bubble small,
  .risk-legend
) {
  font-size: 9px;
}

html[lang="zh-CN"] .api-resources i {
  min-width: 31px;
  font-size: 8px;
}

html[lang="zh-CN"] .doc-sheet strong {
  font-size: 13px;
}

html[lang="zh-CN"] .insight-item p {
  font-size: 12px;
  line-height: 1.65;
}

html[lang="zh-CN"] .context-item {
  min-height: 39px;
  font-size: 11px;
}

html[lang="zh-CN"] .context-card h3 {
  font-size: 13px;
}

html[lang="zh-CN"] .context-card p {
  font-size: 12px;
  line-height: 1.65;
}

html[lang="zh-CN"] .toast {
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  color: #f5f1e7;
  font-size: 10px;
  background: #242825;
  border: 1px solid #3d423f;
  border-radius: 7px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast::before {
  width: 7px;
  height: 7px;
  content: "";
  background: var(--gold-bright);
  border-radius: 50%;
}

.rail-scrim {
  display: none;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-dashboard,
  .skill-layout,
  .skill-detail-layout,
  .automation-detail-layout {
    grid-template-columns: 1fr;
  }

  .skill-detail-aside,
  .automation-detail-aside {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .review-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .review-aside,
  .chat-context {
    display: none;
  }

  .chat-demo {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

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

  .rail {
    position: fixed;
    left: 0;
    transform: translateX(-102%);
    width: 236px;
    transition: transform 180ms ease;
  }

  body.rail-open .rail {
    transform: translateX(0);
  }

  .rail-scrim {
    position: fixed;
    inset: 0;
    z-index: 18;
    display: block;
    background: rgba(20, 22, 21, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.rail-open .rail-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu {
    display: grid;
  }

  .page-body {
    padding: 20px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .kanban {
    grid-template-columns: repeat(4, 250px);
  }

  .review-layout {
    grid-template-columns: 1fr;
  }

  .review-files {
    display: none;
  }

  .chat-demo {
    grid-template-columns: 1fr;
  }

  .chat-list {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 62px;
    padding: 0 14px;
  }

  .command-button,
  .topbar-status {
    display: none;
  }

  .page-body {
    padding: 17px 13px;
  }

  .metric-grid,
  .automation-grid,
  .skill-grid,
  .skill-stat-grid {
    grid-template-columns: 1fr;
  }

  .skill-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .skill-detail-actions {
    grid-column: 1 / -1;
  }

  .skill-flow,
  .skill-detail-aside {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-height: auto;
    border: 1px solid var(--line);
    border-radius: 0;
  }

  .flow-step:first-child {
    border-radius: 7px 7px 0 0;
  }

  .flow-step:last-child {
    border-radius: 0 0 7px 7px;
  }

  .flow-step + .flow-step {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .flow-step + .flow-step::before {
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
  }

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

  .contract-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .skill-file-row {
    grid-template-columns: 1fr auto;
  }

  .skill-file-row p {
    grid-column: 1 / -1;
  }

  .automation-detail-hero {
    grid-template-columns: 1fr;
    padding: 21px;
  }

  .automation-hero-actions {
    flex-wrap: wrap;
  }

  .automation-detail-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .automation-flow,
  .automation-config-grid,
  .automation-detail-aside {
    grid-template-columns: 1fr;
  }

  .automation-flow-step {
    min-height: auto;
    border: 1px solid var(--line);
    border-radius: 0;
  }

  .automation-flow-step:first-child {
    border-radius: 7px 7px 0 0;
  }

  .automation-flow-step:last-child {
    border-radius: 0 0 7px 7px;
  }

  .automation-flow-step + .automation-flow-step {
    border-top: 0;
  }

  .automation-flow-step::after {
    top: auto;
    right: auto;
    bottom: -7px;
    left: 26px;
  }

  .automation-run-head {
    display: none;
  }

  .automation-run-row {
    grid-template-columns: 1fr auto;
    gap: 5px 10px;
    padding: 10px 13px;
  }

  .automation-run-row span:nth-child(2),
  .automation-run-row span:nth-child(3),
  .automation-run-row span:nth-child(4) {
    display: none;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .btn {
    flex: 1;
  }

  .filters {
    overflow-x: auto;
  }

  .table-head {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding: 10px 12px;
  }

  .table-row .table-cell:nth-child(2),
  .table-row .table-cell:nth-child(3) {
    display: none;
  }

  .review-titlebar {
    padding: 16px;
  }

  .review-title-actions {
    display: none;
  }

  .review-content {
    padding: 16px 12px 28px;
  }

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

  .bubble {
    max-width: 90%;
  }

  .assistant-message {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 9px;
  }

  .assistant-mark {
    width: 25px;
    height: 25px;
    border-radius: 7px;
  }

  .assistant-mark svg {
    width: 14px;
    height: 14px;
  }

  .response-activity summary {
    max-width: 100%;
  }

  .message:nth-child(3) .bubble {
    width: 96%;
    max-width: 96%;
  }

  .support-chart-grid,
  .doc-compare,
  .compound-layout {
    grid-template-columns: 1fr;
  }

  .compound-impact {
    grid-template-columns: 1fr;
  }

  .compound-quality {
    padding-top: 9px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .mix-panel .donut-wrap {
    grid-template-columns: auto 1fr;
  }

  .decision-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .api-blueprint {
    grid-template-columns: 1fr;
  }

  .api-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .pr-row,
  .age-scale {
    grid-template-columns: 20px minmax(100px, 1fr) 58px 25px;
  }

  .pr-row em {
    display: none;
  }

  .age-scale {
    display: none;
  }

  .insight-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .messages,
  .composer-wrap {
    padding-right: 13px;
    padding-left: 13px;
  }

  .map {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .map::before,
  .map::after {
    display: none;
  }

  .map-core {
    width: 92px;
    height: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
