/* Design tokens keep spacing, colors, and components easy to change. */
:root {
  --paper: #f7f8fa;
  --white: #fff;
  --ink: #222735;
  --muted: #737b8c;
  --line: #e6e9ef;
  --accent: #4f5ad7;
  --accent-soft: #eeefff;
  --green: #24866f;
  --red: #bc4552;
  --radius: 14px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #adb5ff;
  outline-offset: 4px;
}
input,
textarea,
select {
  background: #fff;
  border: 1px solid #dce0e8;
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition:
    border 0.15s,
    box-shadow 0.15s;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #4f5ad712;
}
input::placeholder,
textarea::placeholder {
  color: #9aa1af;
}
label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin: 16px 0 7px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 40px;
  line-height: 1.18;
  letter-spacing: -1.6px;
  font-weight: 650;
  margin-bottom: 14px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.35px;
  font-weight: 650;
  margin-bottom: 10px;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
p {
  line-height: 1.7;
}
small {
  font-size: 11px;
}
svg {
  width: 18px;
  height: 18px;
}
.muted {
  color: var(--muted);
}
.muted-heading {
  color: #858c9b;
  font-weight: 450;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #818899;
  margin-bottom: 14px;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    transform 0.15s;
  white-space: nowrap;
}
.button:hover {
  transform: translateY(-1px);
}
.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 6px #4f5ad714;
}
.button.primary:hover {
  background: #414bc1;
}
.button.secondary {
  background: #fff;
  border-color: var(--line);
}
.button.secondary:hover {
  background: #f5f6fb;
}
.button.small {
  padding: 9px 12px;
  font-size: 11px;
}
.button.danger {
  background: #fff0f1;
  color: var(--red);
}
.text-link {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f9f81;
  display: inline-block;
  flex-shrink: 0;
}
.brand {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #626ce1;
  color: #fff;
  border-radius: 10px;
  font-style: italic;
  letter-spacing: -5px;
  padding-right: 4px;
  font-size: 26px;
  line-height: 1;
}
.brand-dot {
  width: 5px;
  height: 5px;
  background: #8290ff;
  border-radius: 50%;
  margin-left: -5px;
  margin-top: 8px;
}
.sidebar {
  width: 234px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #202535;
  color: #d9dce8;
  padding: 32px 21px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.sidebar .brand {
  color: #fff;
  padding-left: 6px;
}
.workspace-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 35px 0 30px;
  border: 1px solid #3a3f4d;
  border-radius: 9px;
  padding: 12px 10px;
}
.avatar {
  background: #424958;
  color: #e4e7ef;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 12px;
}
.workspace-switch strong {
  font-size: 11px;
  display: block;
  font-weight: 550;
}
.workspace-switch small {
  font-size: 10px;
  color: #9198ad;
  display: block;
  margin-top: 4px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #7e869d;
  margin: 0 0 12px 12px;
  font-weight: 650;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 5px 0;
  border-radius: 8px;
  font-size: 12px;
  color: #a8afc0;
}
.nav-item span {
  font-size: 18px;
  width: 18px;
  line-height: 1;
}
.nav-item:hover {
  color: #fff;
  background: #2d3345;
}
.nav-item.active {
  background: #373e5d;
  color: #ebedff;
}
.sidebar-bottom {
  margin-top: auto;
}
.local-note {
  display: flex;
  gap: 10px;
  padding: 18px 10px;
  align-items: baseline;
}
.local-note strong {
  font-size: 11px;
  display: block;
  font-weight: 550;
}
.local-note small {
  display: block;
  color: #8e96aa;
  margin-top: 6px;
  line-height: 1.5;
  max-width: 140px;
}
.signout {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-top: 1px solid #383e4c;
  background: transparent;
  color: #a6aec0;
  font-size: 11px;
  padding: 20px 10px 0;
}
.app-shell {
  margin-left: 234px;
  min-height: 100vh;
}
.topbar {
  height: 73px;
  border-bottom: 1px solid var(--line);
  background: #ffffffa0;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #778092;
}
.topbar span:not(.status-dot) {
  margin: 0 12px;
}
.topbar .environment {
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 30px;
  padding: 7px 12px;
  font-size: 10px;
}
main {
  padding: 40px 42px 20px;
  max-width: 1600px;
  margin: auto;
}
footer {
  padding: 24px 42px 28px;
  color: #969dac;
  font-size: 10px;
}
footer span {
  margin: 0 8px;
}
.page-heading {
  margin: 6px 0 32px;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}
.page-heading > .button {
  margin-bottom: 6px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px 24px;
  border-radius: 12px;
}
.stat-card > span {
  font-size: 11px;
  color: #788194;
  display: block;
}
.stat-card strong {
  font-size: 31px;
  font-weight: 600;
  display: block;
  letter-spacing: -1px;
  line-height: 1.4;
  margin: 5px 0;
}
.stat-card strong.stat-word {
  font-size: 25px;
  letter-spacing: -0.5px;
  margin: 9px 0;
}
.stat-card small {
  font-size: 10px;
  color: #8c94a3;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 25px;
  align-items: start;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}
.section-heading h2 {
  margin: 0;
  font-size: 16px;
}
.count {
  font-size: 10px;
  background: #eceef3;
  color: #7e8697;
  border-radius: 5px;
  padding: 3px 7px;
  font-weight: 550;
  vertical-align: middle;
  margin-left: 6px;
}
.project-list {
  display: grid;
  gap: 12px;
}
.project-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 22px 20px;
  transition:
    box-shadow 0.15s,
    border 0.15s;
}
.project-card:hover {
  border-color: #b7bdeb;
  box-shadow: 0 5px 16px #22273507;
}
.project-icon,
.empty-icon {
  display: grid;
  place-items: center;
  background: #f0f1fd;
  color: #6a72d6;
  border: 1px solid #e3e5f8;
  border-radius: 10px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  font-family: ui-monospace, monospace;
  font-size: 15px;
}
.project-card-body {
  min-width: 0;
  flex: 1;
}
.project-card h3 {
  margin: 0 0 7px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.project-card p {
  font-size: 11px;
  color: #858d9c;
  margin: 0 0 16px;
  line-height: 1.6;
}
.project-meta {
  display: flex;
  gap: 16px;
  font-size: 10px;
  color: #9299a7;
}
.project-meta span:first-child {
  font-family: ui-monospace, monospace;
  color: #777f90;
}
.project-card-end {
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: space-between;
  align-self: stretch;
  gap: 15px;
}
.card-arrow {
  color: #989eae;
  font-size: 17px;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.3;
  padding: 5px 8px;
  border-radius: 5px;
  background: #f0f1f5;
  color: #7b8392;
  text-transform: capitalize;
  font-weight: 550;
  white-space: nowrap;
}
.badge[data-status="completed"],
.badge[data-status="PASS"],
.badge[data-status="low"] {
  background: #e9f6f0;
  color: #2b8068;
}
.badge[data-status="failed"],
.badge[data-status="FAIL"],
.badge[data-status="high"] {
  background: #fff0f0;
  color: #b74e5a;
}
.badge[data-status="planning"],
.badge[data-status="developing"],
.badge[data-status="testing"],
.badge[data-status="validating"],
.badge[data-status="checkpointing"] {
  background: #eeefff;
  color: #616bd0;
}
.badge[data-status="medium"],
.badge[data-status="interrupted"] {
  background: #fff6e7;
  color: #a87e3b;
}
.empty-projects {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  border: 1px dashed #dce0e9;
  border-radius: 12px;
  padding: 50px 30px;
  background: #ffffff60;
}
.empty-projects h3 {
  font-size: 18px;
  margin: 18px 0 8px;
}
.empty-projects p {
  font-size: 12px;
  color: var(--muted);
  max-width: 310px;
  margin-bottom: 20px;
}
.new-project {
  padding: 25px;
}
.new-project .eyebrow {
  font-size: 8px;
  letter-spacing: 1.1px;
}
.new-project h2 {
  font-size: 19px;
  line-height: 1.4;
  max-width: 210px;
}
.new-project p {
  font-size: 11px;
  color: var(--muted);
}
.new-project .button {
  margin-top: 14px;
  justify-content: space-between;
}
.new-project label {
  font-size: 10px;
}
.new-project input {
  font-size: 12px;
}
.tip-card {
  margin-top: 18px;
  border-radius: 12px;
  background: #eff1f7;
  padding: 24px;
}
.tip-label {
  font-size: 8px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: #8a92a5;
}
.tip-card p {
  font-size: 12px;
  color: #646f84;
  margin: 12px 0 17px;
}
.tip-card a {
  font-size: 10px;
}
.project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 27px;
}
.back-link {
  font-size: 10px;
  color: #8b92a2;
  display: block;
  margin-bottom: 15px;
}
.project-heading h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
  margin: 0 0 9px;
  overflow-wrap: anywhere;
}
.project-heading p {
  margin: 0;
  font-size: 11px;
}
.branch-label {
  font-family: ui-monospace, monospace;
  margin-right: 10px;
}
.project-actions {
  display: flex;
  gap: 10px;
}
.workflow-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 23px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 24px;
  gap: 12px;
}
.workflow-strip > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #8e96a5;
  white-space: nowrap;
}
.workflow-strip b {
  display: grid;
  place-items: center;
  border: 1px solid #e8ebf1;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 8px;
  font-weight: 550;
}
.workflow-strip i {
  height: 1px;
  background: #edf0f5;
  flex: 1;
}
.workflow-strip .active {
  color: var(--accent);
}
.workflow-strip .active b {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 23px;
  align-items: start;
}
.conversation-panel {
  overflow: hidden;
}
.panel-heading {
  padding: 21px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-heading h2 {
  font-size: 14px;
  margin: 0 0 4px;
}
.panel-heading p {
  font-size: 10px;
  color: #929aaa;
  margin: 0;
}
.connection {
  font-size: 9px;
  color: #8b96a5;
}
.connection.online {
  color: var(--green);
}
.activity {
  height: 470px;
  overflow: auto;
  padding: 23px;
  scroll-behavior: smooth;
}
.conversation-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 390px;
  margin: 45px auto;
}
.conversation-empty h3 {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin: 17px 0 9px;
}
.conversation-empty p {
  font-size: 12px;
  color: var(--muted);
  max-width: 300px;
  margin-bottom: 20px;
}
.prompt-suggestion {
  border: 1px solid var(--line);
  background: #fff;
  font-size: 11px;
  padding: 11px 14px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 5px 0;
  color: #788197;
  text-align: left;
}
.prompt-suggestion:hover {
  border-color: #a7afed;
  background: #fafaff;
}
.event {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  animation: appear 0.2s ease-out;
}
.event-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #e3e6fa;
  background: #f1f2ff;
  color: #6974c8;
  border-radius: 8px;
  font-size: 10px;
  flex-shrink: 0;
}
.event.user .event-avatar {
  background: #eef2f4;
  border-color: #e4e9ed;
  color: #667480;
}
.event-content {
  min-width: 0;
  flex: 1;
}
.event-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 6px;
}
.event-agent {
  font-size: 11px;
  font-weight: 650;
}
.event-time {
  font-size: 9px;
  color: #a0a7b3;
}
.event-kind {
  font-size: 8px;
  color: #9ca4b4;
}
.event-message {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #6c7689;
}
.event.user .event-message {
  background: #f5f6fa;
  padding: 12px;
  border-radius: 0 9px 9px 9px;
  color: #45506a;
}
.event.error .event-message {
  background: #fff4f4;
  color: #ac505c;
  border-radius: 8px;
  padding: 12px;
}
.event details {
  margin-top: 7px;
}
.event summary {
  font-size: 10px;
  color: #8791a4;
  cursor: pointer;
}
.event pre {
  font-size: 10px;
  max-height: 230px;
  overflow: auto;
}
.composer {
  border-top: 1px solid var(--line);
  padding: 16px 19px;
  background: #fdfdff;
}
.composer textarea {
  border: 0;
  resize: vertical;
  min-height: 70px;
  font-size: 12px;
  background: transparent;
  padding: 6px;
  box-shadow: none;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.composer-bottom > span {
  font-size: 9px;
  color: #9ba3b2;
  max-width: 220px;
}
.project-inspector {
  display: grid;
  gap: 14px;
}
.inspector-card {
  padding: 20px;
}
.inspector-card h2 {
  font-size: 12px;
}
.inspector-card p {
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 10px;
}
.inspector-card .section-heading {
  margin-bottom: 12px;
}
.inspector-card .section-heading h2 {
  font-size: 12px;
}
.plan-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.plan-list li {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: #7d8697;
  line-height: 1.6;
}
.plan-list li:before {
  content: "";
  width: 5px;
  height: 5px;
  background: #bfc5df;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.file-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.file-tags span {
  font-family: ui-monospace, monospace;
  font-size: 8px;
  border: 1px solid var(--line);
  padding: 4px 6px;
  border-radius: 4px;
  color: #818b9e;
  overflow-wrap: anywhere;
}
.inspector-note {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 0 8px;
}
.inspector-note p {
  font-size: 9px;
  line-height: 1.8;
  color: #929bad;
}
.test-summary {
  display: flex;
  gap: 17px;
  padding: 12px 0 17px;
}
.test-metric strong {
  font-size: 22px;
  font-weight: 600;
  display: block;
}
.test-metric small {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #929bac;
}
.test-metric.pass strong {
  color: var(--green);
}
.test-metric.fail strong {
  color: var(--red);
}
.evidence-section {
  margin-top: 36px;
}
.evidence-section > .section-heading {
  align-items: end;
}
.evidence-section .eyebrow {
  font-size: 8px;
  margin-bottom: 8px;
}
.evidence-section h2 {
  font-size: 19px;
}
.evidence-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
  overflow-x: auto;
}
.evidence-tabs button {
  font-size: 11px;
  padding: 14px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8b94a5;
  white-space: nowrap;
}
.evidence-tabs button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.evidence-tabs button span {
  font-size: 9px;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #eeeff5;
}
.evidence-body {
  padding: 20px;
  min-height: 125px;
}
.empty-line {
  text-align: center;
  color: #939baa;
  font-size: 11px;
  padding: 24px;
  margin: 0;
}
.diff-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.diff-card summary {
  padding: 12px 14px;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  background: #f9fafc;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.diff-count {
  font-size: 10px;
  color: var(--green);
}
pre {
  font-family: "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.7;
  background: #f8f9fc;
  padding: 15px;
  border-radius: 6px;
  color: #556078;
  max-height: 400px;
  overflow: auto;
  margin: 0;
}
.diff-card pre {
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.test-run {
  margin-bottom: 18px;
}
.test-run h3 {
  font-size: 12px;
}
.test-case {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid #eef0f5;
  padding: 9px 0;
  font-size: 10px;
  align-items: start;
}
.test-case code {
  overflow-wrap: anywhere;
  color: #738094;
}
.test-case pre {
  grid-column: 2;
  font-size: 10px;
}
.test-run > details {
  margin-top: 10px;
}
.test-run summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
}
.checkpoint-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.checkpoint-row strong {
  font-size: 12px;
  display: block;
}
.checkpoint-row p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0;
}
.checkpoint-row code {
  font-size: 10px;
  color: #8892a4;
}
.file-browser {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  min-height: 200px;
}
.file-browser button {
  display: block;
  width: 100%;
  padding: 8px;
  text-align: left;
  border: 0;
  border-radius: 5px;
  background: none;
  color: #717d92;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.file-browser button:hover {
  background: #eff1ff;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 11px;
  color: var(--muted);
}
iframe {
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  height: 560px;
  background: #fff;
}
.tab-panel > p.muted {
  font-size: 10px;
  margin-top: 10px;
}
.auth-shell {
  min-height: 100vh;
  background: #fbfbfd;
}
.auth-shell main {
  padding: 0;
  max-width: 1400px;
}
.auth-shell footer {
  padding-left: 7%;
  position: relative;
}
.auth-layout {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  padding: 50px 7%;
  gap: 9%;
}
.auth-intro .brand {
  margin-bottom: 85px;
}
.auth-intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
}
.auth-intro h1 {
  font-size: 48px;
  letter-spacing: -2px;
  line-height: 1.16;
  max-width: 560px;
}
.auth-intro em {
  font-style: normal;
  color: #626ed8;
}
.auth-intro > p {
  font-size: 13px;
  color: #838b9c;
  max-width: 360px;
  line-height: 1.9;
  margin: 22px 0 30px;
}
.auth-flow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.auth-flow span {
  font-size: 9px;
  padding: 8px 12px;
  background: #f0f1f8;
  border: 1px solid #e5e8f1;
  border-radius: 6px;
  color: #7a849a;
}
.intro-detail {
  display: flex;
  gap: 12px;
  align-items: start;
  margin-top: 65px;
}
.check-icon {
  background: #edf7f2;
  color: #468f75;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.intro-detail strong {
  font-size: 11px;
  font-weight: 600;
  display: block;
}
.intro-detail small {
  font-size: 10px;
  line-height: 1.7;
  color: #99a1b0;
  display: block;
  margin-top: 6px;
  max-width: 290px;
}
.auth-card {
  background: #fff;
  padding: 38px;
  border: 1px solid #e4e7ef;
  border-radius: 18px;
  box-shadow: 0 18px 70px #34407106;
}
.auth-card .eyebrow {
  font-size: 8px;
}
.auth-card h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
}
.auth-card > p {
  font-size: 11px;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 26px 0 22px;
  gap: 24px;
}
.auth-tabs button {
  border: 0;
  background: none;
  padding: 12px 0;
  font-size: 11px;
  color: #969eac;
  border-bottom: 2px solid transparent;
}
.auth-tabs button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.auth-form label {
  font-size: 11px;
}
.auth-form input {
  font-size: 12px;
  margin-bottom: 4px;
}
.auth-form small {
  font-size: 9px;
  color: var(--muted);
  display: block;
}
.auth-form .button {
  width: 100%;
  justify-content: space-between;
  margin-top: 24px;
}
.auth-footnote {
  text-align: center;
  color: #a0a8b6;
  font-size: 9px !important;
  margin: 22px 0 0;
}
.alert {
  border: 1px solid #f0d5d8;
  color: #b2515c;
  background: #fff5f6;
  border-radius: 8px;
  padding: 12px;
  font-size: 11px;
  line-height: 1.7;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.guide-card {
  padding: 25px;
}
.step-number {
  display: inline-block;
  color: #717dd1;
  font-size: 12px;
  background: #f0f1ff;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.guide-card h2 {
  font-size: 16px;
}
.guide-card p,
.guide-note p {
  font-size: 12px;
  color: var(--muted);
}
.guide-note {
  padding: 25px;
  margin-top: 25px;
}
.settings-panel {
  padding: 30px;
  max-width: 800px;
}
.settings-panel dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.settings-panel dt {
  color: var(--muted);
}
.settings-panel dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}
.error-page {
  padding: 100px 0;
  text-align: center;
}
.error-page p {
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  padding: 16px 20px;
  background: #252d41;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px #0002;
  font-size: 12px;
  z-index: 100;
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  .activity {
    height: 530px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .project-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 200px;
    padding: 28px 16px;
  }
  .app-shell {
    margin-left: 200px;
  }
  main {
    padding: 30px 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 275px;
    gap: 18px;
  }
  .project-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 16px;
  }
  .workflow-strip {
    gap: 7px;
    padding: 15px;
  }
  .workflow-strip > span {
    gap: 5px;
    font-size: 9px;
  }
  .auth-layout {
    gap: 6%;
    padding: 40px 5%;
  }
  .auth-intro h1 {
    font-size: 40px;
  }
  .auth-card {
    padding: 28px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 175px;
    padding: 25px 12px;
  }
  .sidebar .brand {
    font-size: 18px;
    gap: 7px;
  }
  .workspace-switch {
    padding: 10px 6px;
  }
  .workspace-switch strong {
    font-size: 10px;
  }
  .app-shell {
    margin-left: 175px;
  }
  .dashboard-grid,
  .project-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .tip-card {
    margin-top: 0;
  }
  .project-inspector {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-card small {
    font-size: 9px;
  }
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-intro .brand {
    margin-bottom: 55px;
  }
  .auth-intro h1 {
    font-size: 35px;
  }
  .intro-detail {
    margin-top: 40px;
  }
}
@media (max-width: 650px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar .brand {
    font-size: 19px;
  }
  .sidebar .brand-mark {
    height: 29px;
    width: 29px;
    font-size: 22px;
  }
  .workspace-switch,
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 6px;
  }
  .nav-item {
    padding: 7px;
    font-size: 10px;
    margin: 0;
  }
  .nav-item span {
    display: none;
  }
  .nav-item:last-child {
    display: none;
  }
  .app-shell {
    margin-left: 0;
  }
  .topbar {
    height: 52px;
    padding: 0 20px;
    font-size: 10px;
  }
  .topbar .environment {
    font-size: 8px;
    padding: 6px 9px;
  }
  .topbar span:not(.status-dot) {
    margin: 0 7px;
  }
  main {
    padding: 25px 20px 15px;
  }
  .page-heading {
    align-items: start;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 29px;
    letter-spacing: -1px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .page-heading > .button {
    font-size: 10px;
    padding: 9px 10px;
    gap: 3px;
  }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .stat-card {
    padding: 13px 11px;
  }
  .stat-card > span {
    font-size: 9px;
  }
  .stat-card strong {
    font-size: 25px;
  }
  .stat-card strong.stat-word {
    font-size: 17px;
    margin: 13px 0;
  }
  .stat-card small {
    font-size: 8px;
    line-height: 1.5;
    display: block;
  }
  .dashboard-aside {
    grid-template-columns: 1fr;
  }
  .project-card {
    gap: 11px;
    padding: 17px 13px;
  }
  .project-icon {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .project-card h3 {
    font-size: 12px;
  }
  .project-meta {
    font-size: 8px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .project-card p {
    font-size: 10px;
  }
  .project-card-end .badge {
    font-size: 8px;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .project-heading {
    align-items: start;
  }
  .project-heading h1 {
    font-size: 23px;
  }
  .project-actions {
    flex-direction: column;
    gap: 6px;
  }
  .project-actions .button {
    font-size: 9px;
    padding: 9px;
  }
  .workflow-strip {
    overflow-x: auto;
    padding: 13px;
    gap: 8px;
  }
  .workflow-strip > span {
    font-size: 8px;
    gap: 5px;
  }
  .workflow-strip b {
    width: 17px;
    height: 17px;
    font-size: 7px;
  }
  .workflow-strip i {
    min-width: 10px;
  }
  .activity {
    height: 430px;
    padding: 18px;
  }
  .conversation-empty {
    margin-top: 30px;
  }
  .conversation-empty h3 {
    font-size: 19px;
  }
  .composer {
    padding: 13px;
  }
  .composer-bottom > span {
    max-width: 125px;
    font-size: 8px;
  }
  .project-inspector {
    gap: 10px;
  }
  .inspector-card {
    padding: 15px;
  }
  .inspector-card .section-heading {
    flex-wrap: wrap;
  }
  .inspector-note {
    grid-column: 1/-1;
  }
  .evidence-tabs {
    gap: 23px;
  }
  .evidence-body {
    padding: 14px;
  }
  .evidence-section h2 {
    font-size: 16px;
  }
  .evidence-section > .section-heading {
    align-items: start;
  }
  .evidence-section .button {
    font-size: 8px;
  }
  .file-browser {
    grid-template-columns: 1fr;
  }
  .file-browser #file-list {
    max-height: 140px;
    overflow: auto;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .settings-panel {
    padding: 20px;
  }
  .settings-panel dl > div {
    font-size: 10px;
  }
  .auth-layout {
    display: flex;
    flex-direction: column;
    padding: 28px 22px;
    gap: 30px;
  }
  .auth-intro {
    width: 100%;
  }
  .auth-intro .brand {
    margin-bottom: 35px;
  }
  .auth-intro h1 {
    font-size: 34px;
  }
  .auth-intro > p {
    font-size: 12px;
    margin: 15px 0 18px;
  }
  .auth-flow {
    gap: 8px;
  }
  .auth-flow span {
    font-size: 8px;
    padding: 7px 10px;
  }
  .intro-detail {
    display: none;
  }
  .auth-card {
    width: 100%;
    max-width: 430px;
    padding: 26px;
  }
  .auth-card h2 {
    font-size: 22px;
  }
  footer {
    padding: 23px 20px;
    font-size: 8px;
  }
  .auth-shell footer {
    padding: 20px 22px;
  }
  #toast {
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Keep long model plans from pushing test evidence far below the chat. */
#current-task {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#plan {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
#risk-reason {
  max-height: 100px;
  overflow-y: auto;
}
#affected-files {
  max-height: 88px;
  overflow-y: auto;
}
.event-message {
  overflow-wrap: anywhere;
}

.activity-controls {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 7px;
}
.activity-controls select {
  width: 124px;
  padding: 5px 7px;
  font-size: 10px;
}

/* A compact, non-modal progress popup; the conversation keeps the remaining screen. */
body[data-project-id] .topbar { height: 52px; }
body[data-project-id] main { padding-top: 18px; }
body[data-project-id] .project-heading { margin-bottom: 16px; }
body[data-project-id] .back-link { margin-bottom: 6px; }
body[data-project-id] .project-heading h1 {
  font-size: 24px;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-project-id] .project-heading > div:first-child { min-width: 0; }
body[data-project-id] .project-actions { flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.progress-popup {
  --stage: 0;
  position: sticky;
  top: 12px;
  z-index: 20;
  width: min(700px, 100%);
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid #dedff5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px #36378412, 0 2px 6px #36378408;
  animation: progress-appear 220ms ease-out;
}
.badge[data-status="paused"] { color: #87611c; background: #fff4d9; }
.progress-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 4px 9px;
  font-size: 10px;
  color: #798097;
}
.progress-caption > span:first-child { display: flex; align-items: center; gap: 7px; color: #454b63; font-weight: 600; }
.progress-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.progress-track { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.progress-highlight {
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  border-radius: 10px;
  border: 1px solid #dcdbff;
  background: #eeedff;
  box-shadow: 0 2px 5px #5653c510;
  transform: translateX(calc(var(--stage) * 100%));
  transition: transform 380ms cubic-bezier(.22, 1.2, .36, 1);
}
.progress-track > span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 3px;
  color: #9298aa;
  font-size: 10px;
  transition: color 200ms;
}
.progress-track b { font-size: 9px; font-weight: 600; }
.progress-track .active { color: #5148c7; font-weight: 600; }
.progress-track .done { color: #448573; }
@keyframes progress-appear { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
body[data-project-id] .conversation-panel {
  height: var(--conversation-height, 65dvh);
  min-height: 240px;
  display: flex;
  flex-direction: column;
}
body[data-project-id] .panel-heading { padding: 14px 20px; flex-shrink: 0; }
body[data-project-id] .activity {
  flex: 1;
  height: auto;
  min-height: 0;
  padding: 18px 20px;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
body[data-project-id] .composer { padding: 10px 16px; flex-shrink: 0; }
body[data-project-id] .composer textarea { min-height: 40px; height: 46px; max-height: 46px; resize: none; }
body[data-project-id] .composer-bottom { margin-top: 4px; }
.live-controls { display: flex; align-items: center; gap: 10px; }
.follow-live { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 10px; font-weight: 500; color: #6e7490; cursor: pointer; white-space: nowrap; }
.follow-live input { width: 12px; height: 12px; padding: 0; margin: 0; accent-color: var(--accent); }
@media (min-width: 901px) {
  body[data-project-id] .project-inspector { max-height: var(--conversation-height, 65dvh); overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; }
}
@media (max-width: 650px) {
  body[data-project-id] .topbar { display: none; }
  body[data-project-id] main { padding: 12px; }
  body[data-project-id] .project-heading { gap: 8px; margin-bottom: 12px; }
  body[data-project-id] .project-heading h1 { font-size: 19px; }
  body[data-project-id] .project-actions { max-width: 145px; }
  .progress-popup { padding: 9px; margin-bottom: 12px; top: 6px; border-radius: 12px; }
  .progress-caption { font-size: 9px; }
  #progress-description { max-width: 48%; text-align: right; }
  .progress-track > span { flex-direction: column; gap: 2px; font-size: 9px; }
  body[data-project-id] .panel-heading { padding: 10px 12px; }
  body[data-project-id] .panel-heading p { display: none; }
  body[data-project-id] .activity { padding: 14px 12px; }
  body[data-project-id] .composer { padding: 8px 10px; }
  .live-controls { gap: 7px; }
  .live-controls .connection { font-size: 8px; }
}
