:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f7f8f7;
  color: #111827;
  --sidebar: #ffffff;
  --sidebar-muted: #667085;
  --surface: #ffffff;
  --surface-soft: #f3f6f5;
  --surface-warm: #f8fbfa;
  --line: #e5e7eb;
  --text-muted: #667085;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --focus: #d08a3a;
  --danger: #b54745;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  padding: 28px clamp(28px, 6vw, 96px) 48px;
  background: #f4f8f7;
  color: #10211f;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.login-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #0f766e;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 16px;
}

.login-brand span {
  margin-top: 3px;
  color: #667085;
  font-size: 13px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  width: min(100%, 1180px);
  min-height: calc(100vh - 118px);
  margin: 0 auto;
}

.login-intro {
  max-width: 580px;
}

.login-intro h1 {
  max-width: 520px;
  margin: 0 0 18px;
  color: #0c2f2b;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.12;
}

.login-intro > p:last-child {
  max-width: 520px;
  margin: 0;
  color: #536460;
  font-size: 17px;
}

.login-panel {
  padding: 32px;
  border: 1px solid #dce7e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(20, 55, 50, 0.1);
}

.login-panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.login-panel-heading h2,
.login-panel-heading p {
  margin-bottom: 0;
}

.login-panel-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #e7f5f2;
  color: #0f766e;
}

.login-panel-icon svg {
  width: 22px;
  height: 22px;
}

.login-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #34423f;
  font-size: 13px;
  font-weight: 800;
}

.login-field input {
  width: 100%;
  height: 46px;
  border: 1px solid #cddbd7;
  border-radius: 8px;
  padding: 0 14px;
  outline: none;
  background: #fbfdfc;
  color: #10211f;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-field input:focus {
  border-color: #0f766e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.login-error {
  min-height: 22px;
  margin: 14px 0 6px;
  color: #b42318;
  font-size: 13px;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
}

.login-submit svg {
  width: 18px;
  height: 18px;
}

.login-submit.is-loading {
  opacity: 0.72;
}

.login-retry {
  display: block;
  margin: 10px auto 0;
}

@media (max-width: 820px) {
  .login-screen {
    padding: 22px 20px 36px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 30px;
    min-height: calc(100vh - 96px);
  }

  .login-intro h1 {
    font-size: 34px;
  }

  .login-intro > p:last-child {
    font-size: 15px;
  }

  .login-panel {
    width: 100%;
    max-width: 480px;
    padding: 26px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f8f7;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  border-right: 1px solid var(--line);
  padding: 26px 16px;
  background: var(--sidebar);
  color: #111827;
}

.brand-block {
  display: grid;
  gap: 8px;
  padding: 0 8px;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
}

.workspace-name {
  color: var(--sidebar-muted);
  font-size: 13px;
  line-height: 1.5;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: transparent;
  color: #475467;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: #ecf7f5;
  color: var(--accent-strong);
}

.main-panel {
  min-width: 0;
  width: min(100%, 1480px);
  padding: 32px 36px 48px;
}

.topbar,
.section-heading,
.project-overview,
.panel-header,
.dialog-header,
.dialog-actions,
.metadata-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 8px;
  font-size: 23px;
  line-height: 1.3;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.3;
}

p {
  color: var(--text-muted);
  line-height: 1.7;
}

.primary-button,
.secondary-button,
.icon-button,
.text-button {
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button,
.icon-button {
  background: #ffffff;
  border-color: var(--line);
  color: #263034;
}

.secondary-button:hover,
.icon-button:hover {
  border-color: #aab7b3;
}

.text-button {
  min-height: 30px;
  padding: 0 4px;
  background: transparent;
  color: var(--accent);
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.home-grid,
.content-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.home-grid {
  grid-template-columns: minmax(360px, 1.25fr) minmax(300px, 0.85fr);
}

.home-grid .continue-panel {
  min-height: 220px;
}

.attention-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.attention-item {
  border-left: 3px solid var(--focus);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 10px 12px;
}

.attention-item:last-child {
  border-bottom: 0;
}

.attention-item strong {
  color: #30393c;
  font-size: 14px;
  line-height: 1.5;
}

.content-grid {
  grid-template-columns: minmax(340px, 1fr) minmax(300px, 0.9fr);
}

.project-grid {
  align-items: start;
}

.full-width {
  grid-column: 1 / -1;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  padding: 20px;
}

.panel-subtitle {
  margin: 5px 0 0;
  font-size: 13px;
}

.continue-panel {
  background: var(--surface-warm);
}

.narrow-panel {
  max-width: 620px;
}

.project-list,
.activity-list,
.product-change-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.continue-card {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 15px;
  color: inherit;
  text-align: left;
}

.continue-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 104, 0.12);
}

.continue-card strong {
  font-size: 16px;
}

.continue-card span,
.activity-item time,
.product-change-item time,
.count-label,
.hint-text,
.metadata-row {
  color: var(--text-muted);
  font-size: 13px;
}

.continue-card .next-step {
  color: var(--accent-strong);
  font-weight: 800;
}

.continue-title {
  color: #202527;
  font-size: 18px;
}

.continue-meta {
  display: grid;
  gap: 9px;
}

.continue-row {
  display: grid;
  gap: 3px;
}

.continue-row span {
  color: var(--text-muted);
  font-size: 12px;
}

.continue-row strong {
  color: #202527;
  font-size: 15px;
  line-height: 1.45;
}

.continue-action {
  margin-top: 4px;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(31, 111, 104, 0.24);
  border-radius: 999px;
  padding: 4px 9px;
  background: #edf6f3;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  border: 1px dashed #b9c5c0;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 20px;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
}

.activity-item,
.product-change-item {
  display: grid;
  gap: 5px;
  border-left: 3px solid var(--focus);
  padding: 8px 0 8px 12px;
}

.activity-item strong,
.product-change-item strong {
  font-size: 14px;
}

.product-change-item {
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--focus);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 12px 14px;
  min-width: 0;
}

.product-change-item.compact {
  gap: 4px;
  padding: 10px 12px;
}

.product-change-item.compact .product-change-object {
  font-size: 13px;
}

.product-change-project {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.product-change-type {
  color: #202527;
  font-size: 15px;
}

.product-change-object {
  margin: 0;
  color: #263034;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.product-change-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  margin: 0;
}

.product-change-details dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.product-change-details dd {
  margin: 0;
  color: #30393c;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.project-overview {
  align-items: start;
  margin-bottom: 18px;
}

.project-goal {
  margin-bottom: 18px;
  color: #263034;
}

.overview-list {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}

.overview-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.overview-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.overview-list dt {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.overview-list dd {
  margin: 0;
  line-height: 1.7;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.flow-steps span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 8px;
  color: #2c383a;
  text-align: center;
  font-weight: 800;
}

.flow-steps .flow-active {
  border-color: rgba(31, 111, 104, 0.38);
  background: #edf6f3;
  color: var(--accent-strong);
}

.detail-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.detail-form label,
.dialog-content label {
  display: grid;
  gap: 8px;
  color: #30393c;
  font-weight: 800;
}

.detail-form input,
.detail-form textarea,
.detail-form select,
.dialog-content input,
.dialog-content textarea,
.dialog-content select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: #1f2528;
}

.detail-form textarea,
.dialog-content textarea {
  resize: vertical;
}

.status-message {
  min-height: 28px;
  margin-top: 16px;
  color: var(--accent-strong);
  font-weight: 800;
}

.status-message.error {
  color: var(--danger);
}

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 8px;
  overflow: auto;
  padding: 0;
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(22, 34, 37, 0.45);
}

.dialog-content {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.detail-form input:focus,
.detail-form textarea:focus,
.detail-form select:focus,
.dialog-content input:focus,
.dialog-content textarea:focus,
.dialog-content select:focus,
button:focus-visible {
  outline: 3px solid rgba(200, 147, 56, 0.35);
  outline-offset: 2px;
}

.form-error {
  min-height: 24px;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    min-width: 0;
    max-width: 100%;
    padding: 16px;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .nav-item {
    text-align: center;
    padding: 9px 6px;
  }

  .main-panel {
    min-width: 0;
    max-width: 100%;
    padding: 22px 18px 34px;
  }

  .topbar,
  .section-heading,
  .project-overview,
  .panel-header,
  .metadata-row {
    align-items: stretch;
    flex-direction: column;
  }

  .home-grid,
  .content-grid {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar,
  .panel,
  .continue-card,
  .requirement-card {
    min-width: 0;
    max-width: 100%;
  }

  .topbar .primary-button {
    width: 100%;
  }

  .continue-row strong,
  .continue-card span,
  .requirement-card span {
    overflow-wrap: anywhere;
  }

  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ai-analysis-panel {
  background: #fffdf7;
}

.ai-analysis-result {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.ai-result-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(200, 147, 56, 0.34);
  border-radius: 8px;
  background: #fffaf0;
  padding: 15px;
}

.ai-result-card.unavailable {
  border-color: rgba(176, 69, 63, 0.32);
  background: #fff7f5;
}

.analysis-section {
  display: grid;
  gap: 6px;
}

.analysis-section h4 {
  margin: 0;
  color: #1f2528;
  font-size: 14px;
  line-height: 1.35;
}

.analysis-section p {
  margin: 0;
  color: #30393c;
  font-size: 14px;
  line-height: 1.7;
}

.analysis-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
  color: #30393c;
  font-size: 14px;
  line-height: 1.65;
}

.ai-boundary-note {
  margin: 0;
  border-top: 1px solid rgba(200, 147, 56, 0.28);
  padding-top: 11px;
  color: var(--text-muted);
  font-size: 13px;
}

.settings-panel {
  background: #fffdf7;
}

.settings-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.settings-status,
.ai-service-state {
  border: 1px solid rgba(31, 111, 104, 0.2);
  border-radius: 8px;
  background: #edf6f3;
  color: var(--accent-strong);
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 800;
}

.settings-status.configured {
  border-color: rgba(31, 111, 104, 0.35);
  background: #e7f4ee;
}

.ai-service-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.ai-service-state .text-button[hidden] {
  display: none;
}

.settings-form input,
.settings-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: #1f2528;
}

.settings-form label {
  display: grid;
  gap: 8px;
  color: #30393c;
  font-weight: 800;
}
.muted-text {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Global settings: restrained local navigation with one focused work surface. */
.settings-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.settings-page-header h2 { margin: 3px 0 6px; font-size: 26px; line-height: 1.25; }
.settings-page-header p:not(.eyebrow) { margin: 0; color: var(--text-muted); font-size: 13px; }
.settings-page-header button,
.settings-section-heading button { display: inline-flex; align-items: center; gap: 7px; }
.settings-page-header button svg,
.settings-section-heading button svg { width: 16px; height: 16px; }

.global-settings-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.settings-local-nav {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.settings-local-nav button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: transparent;
  color: #475467;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.settings-local-nav button:hover { background: #f2f6f5; color: #18383d; }
.settings-local-nav button.active { background: #e8f4f1; color: var(--accent-strong); }
.settings-local-nav button > svg { width: 19px; height: 19px; justify-self: center; }
.settings-local-nav button span { display: grid; gap: 2px; min-width: 0; }
.settings-local-nav button strong { font-size: 13px; }
.settings-local-nav button small { overflow: hidden; color: #7b8b90; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.settings-content { min-width: 0; }
.settings-section {
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.045);
}

.settings-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: -24px -24px 22px;
  border-bottom: 1px solid var(--line);
  padding: 22px 24px 18px;
  background: #fbfcfc;
}
.settings-section-heading h3 { margin: 3px 0 5px; color: #172b30; font-size: 20px; }
.settings-section-heading p:not(.eyebrow) { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.settings-heading-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.settings-heading-actions button svg,
.settings-form-actions button svg,
.settings-subsection-header button svg { width: 14px; height: 14px; }
.settings-state-chip {
  flex: 0 0 auto;
  border: 1px solid #cfe3df;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef8f5;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.settings-form { margin: 0; }
.settings-form h4,
.settings-subsection-header h4,
.settings-danger-row h4,
.settings-task-models h4 { margin: 0; color: #193439; font-size: 14px; }
.settings-form label { font-size: 12px; }
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  border: 1px solid #d8e1df;
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: #172b30;
  line-height: 1.5;
  resize: vertical;
}
.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus { outline: 3px solid rgba(15, 118, 110, .12); border-color: var(--accent); }
.settings-form.is-readonly input:disabled,
.settings-form.is-readonly select:disabled,
.settings-form.is-readonly textarea:disabled {
  opacity: 1;
  border-color: #e5ebe9;
  background: #f7f9f8;
  color: #34484d;
  cursor: default;
  -webkit-text-fill-color: #34484d;
}
.settings-form.is-readonly textarea:disabled { resize: none; }
.settings-form-compact { gap: 12px; }
.settings-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.settings-form-actions > div { display: flex; gap: 8px; }
.settings-form-actions .form-error { margin: 0; }
.settings-divider { height: 1px; margin: 24px 0; background: var(--line); }
.settings-subsection-header,
.settings-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.settings-subsection-header p,
.settings-danger-row p,
.settings-task-models p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; }
.danger-text { color: var(--danger); }

.settings-list { display: grid; gap: 0; margin-top: 14px; border-top: 1px solid var(--line); }
.settings-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
}
.settings-list-row > div { min-width: 0; }
.settings-list-row strong { display: block; color: #24383d; font-size: 13px; }
.settings-list-row p { margin: 4px 0 0; color: var(--text-muted); font-size: 11px; }
.settings-list-row-actions { display: flex; gap: 7px; flex: 0 0 auto; }

.settings-task-models { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
#aiTaskModelList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.task-model-field { display: grid; gap: 6px; }
.task-model-field span { color: #53666b; font-size: 11px; font-weight: 800; }
.settings-test-result { border-left: 3px solid var(--accent); padding: 10px 12px; background: #f1f8f6; color: #3d595e; font-size: 12px; }

.prompt-workspace { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
.prompt-list { display: grid; align-content: start; gap: 5px; border-right: 1px solid var(--line); padding-right: 14px; }
.prompt-list button { border: 0; border-radius: 7px; padding: 10px; background: transparent; color: #475467; text-align: left; }
.prompt-list button:hover { background: #f4f7f6; }
.prompt-list button.active { background: #eaf5f2; color: var(--accent-strong); }
.prompt-list button strong { display: block; font-size: 12px; }
.prompt-list button span { display: block; margin-top: 4px; color: #697b80; font-size: 10px; line-height: 1.45; }
.prompt-list button em { display: inline-block; margin-top: 7px; border-radius: 4px; padding: 2px 5px; font-size: 9px; font-style: normal; font-weight: 800; }
.prompt-list button em.default { background: #eef2f1; color: #687a7f; }
.prompt-list button em.custom { background: #dff3ee; color: var(--accent-strong); }
.prompt-editor { min-width: 0; }
.prompt-editor-meta { display: flex; gap: 7px; align-items: center; min-height: 26px; color: #65777c; font-size: 11px; }
.prompt-variable-note { display: grid; gap: 7px; border: 1px solid #dce7e4; border-radius: 7px; padding: 10px; background: #f7faf9; font-size: 11px; }
.prompt-variable-note span { color: #64767b; overflow-wrap: anywhere; }
.settings-save-note { color: #687a7f; font-size: 11px; }

.design-engine-summary { display: grid; gap: 12px; min-height: 330px; align-content: start; }
.design-engine-status-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 13px 0; }
.design-engine-status-row svg { width: 20px; height: 20px; color: var(--accent); }
.design-engine-status-row strong { display: block; font-size: 13px; }
.design-engine-status-row p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; }

.storage-meter { display: grid; gap: 10px; margin-bottom: 24px; }
.storage-meter > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #354b50; font-size: 12px; }
.storage-meter-track { height: 8px; overflow: hidden; border-radius: 4px; background: #e9eeed; }
.storage-meter-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width 220ms ease; }
.settings-danger-row { border: 1px solid #efd8d5; border-radius: 8px; padding: 15px; background: #fffafa; }

.settings-callout { display: flex; align-items: center; gap: 10px; border: 1px solid #d6e5e2; border-radius: 7px; padding: 11px 12px; background: #f4f9f8; color: #536a6f; font-size: 12px; }
.settings-callout svg { width: 17px; height: 17px; color: var(--accent); }

.system-info-drawer {
  position: fixed;
  z-index: 81;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 42px rgba(16, 24, 40, .16);
  overflow-y: auto;
}
.system-info-drawer header { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 22px; }
.system-info-drawer h2 { margin: 3px 0 0; font-size: 21px; }
#systemInfoContent { display: grid; gap: 0; padding: 8px 22px 30px; }
.system-info-item { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 0; font-size: 12px; }
.system-info-item span { color: var(--text-muted); }
.system-info-item strong { color: #2c4449; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .global-settings-shell { grid-template-columns: 1fr; }
  .settings-local-nav { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
  .settings-local-nav button { grid-template-columns: 26px minmax(0, 1fr); min-height: 52px; }
  .settings-local-nav button small { display: none; }
  .prompt-workspace { grid-template-columns: 1fr; }
  .prompt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; }
}

@media (max-width: 620px) {
  .settings-page-header,
  .settings-section-heading,
  .settings-form-actions,
  .settings-subsection-header,
  .settings-danger-row { align-items: stretch; flex-direction: column; }
  .settings-local-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-field-row,
  #aiTaskModelList { grid-template-columns: 1fr; }
  .settings-section { padding: 18px; }
  .settings-section-heading { margin: -18px -18px 18px; padding: 18px; }
}

/* Document library */
.document-library-view {
  --doc-ink: #142f38;
  --doc-muted: #6a7d82;
  --doc-line: #dbe5e3;
  --doc-accent: #0f766e;
  --doc-accent-soft: #e7f4f1;
  width: min(1480px, 100%);
  margin: 0 auto;
}

.document-library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--doc-line);
  padding: 4px 0 20px;
}

.document-library-heading h2 {
  margin: 3px 0 5px;
  color: var(--doc-ink);
  font-size: 28px;
  line-height: 1.2;
}

.document-library-heading p:last-child { margin: 0; color: var(--doc-muted); }
.document-heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.document-library-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: calc(100vh - 190px);
  border: 1px solid var(--doc-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(31, 58, 67, 0.06);
}

.document-library-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  border-right: 1px solid var(--doc-line);
  padding: 16px 12px;
  background: #f6f9f8;
}

.document-view-nav { display: grid; gap: 4px; }
.document-view-nav button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: #4c6268;
  text-align: left;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.document-view-nav button:hover { background: #eaf1ef; color: var(--doc-ink); transform: translateX(2px); }
.document-view-nav button:active { transform: translateX(2px) scale(.98); }
.document-view-nav button.active { background: #dceeea; color: #0b6b63; }
.document-view-nav svg { width: 18px; height: 18px; }

.document-storage { border-top: 1px solid var(--doc-line); padding: 16px 8px 4px; }
.document-storage > div:first-child { display: flex; justify-content: space-between; gap: 8px; color: var(--doc-muted); font-size: 12px; }
.document-storage strong { color: var(--doc-ink); }
.document-storage-track { height: 5px; margin: 9px 0; border-radius: 5px; background: #dce7e4; overflow: hidden; }
.document-storage-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--doc-accent); transition: width 250ms ease; }
.document-storage[data-level="warning"] .document-storage-track span { background: #c98522; }
.document-storage[data-level="critical"] .document-storage-track span,
.document-storage[data-level="full"] .document-storage-track span { background: #c44c3f; }
.document-storage p { margin: 0; color: var(--doc-muted); font-size: 11px; }

.document-browser { min-width: 0; }
.document-browser-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  border-bottom: 1px solid var(--doc-line);
  padding: 0 20px;
}
.document-breadcrumbs { display: flex; align-items: center; min-width: 0; gap: 4px; }
.document-breadcrumbs button { border: 0; padding: 5px 6px; background: transparent; color: #567077; font: inherit; cursor: pointer; }
.document-breadcrumbs button:hover { color: var(--doc-accent); }
.document-breadcrumbs button.active { color: var(--doc-ink); font-weight: 750; }
.document-breadcrumbs svg { width: 14px; height: 14px; color: #9babad; }
.document-result-count { flex: 0 0 auto; color: var(--doc-muted); font-size: 12px; }

.document-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(120px, auto));
  gap: 8px;
  border-bottom: 1px solid var(--doc-line);
  padding: 12px 20px;
  background: #fbfcfc;
}
.document-toolbar label { min-width: 0; }
.document-toolbar input,
.document-toolbar select {
  width: 100%;
  height: 38px;
  border: 1px solid #d3dfdd;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--doc-ink);
  font: inherit;
  font-size: 13px;
}
.document-search { position: relative; }
.document-search svg { position: absolute; left: 11px; top: 10px; width: 17px; height: 17px; color: #819397; }
.document-search input { padding-left: 36px; }

.document-table-head,
.document-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) minmax(120px, .9fr) minmax(120px, 1fr) 64px 90px 104px 42px;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}
.document-table-head { min-height: 38px; border-bottom: 1px solid var(--doc-line); color: #829195; font-size: 11px; font-weight: 750; text-transform: uppercase; }
.document-row { min-height: 64px; border-bottom: 1px solid #e8eeec; color: #4c6268; font-size: 13px; transition: background 140ms ease; }
.document-row:hover { background: #f7faf9; }
.document-name-cell { display: flex; align-items: center; min-width: 0; gap: 11px; border: 0; padding: 0; background: transparent; color: var(--doc-ink); text-align: left; cursor: pointer; }
.document-name-cell > span:last-child { display: grid; min-width: 0; }
.document-name-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.document-name-cell small { color: #89999c; font-size: 10px; }
.document-row-icon { display: grid; place-items: center; flex: 0 0 34px; height: 36px; border-radius: 6px; background: #eef4f3; color: #547078; }
.document-row.folder .document-row-icon { background: #e2f1ed; color: var(--doc-accent); }
.document-row-icon svg { width: 18px; height: 18px; }
.document-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-row-actions { display: flex; justify-content: flex-end; }
.document-row-actions .icon-button { width: 32px; height: 32px; min-height: 32px; border: 0; background: transparent; }

.document-list-state { display: grid; min-height: 360px; place-content: center; justify-items: center; padding: 30px; text-align: center; color: var(--doc-muted); }
.document-list-state > svg { width: 34px; height: 34px; margin-bottom: 12px; color: #8da09f; }
.document-list-state strong { color: var(--doc-ink); font-size: 16px; }
.document-list-state p { max-width: 420px; margin: 7px 0 18px; }
.spinning { animation: document-spin 900ms linear infinite; }
@keyframes document-spin { to { transform: rotate(360deg); } }

.document-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20, 36, 42, .28); backdrop-filter: blur(2px); }
.document-detail-drawer {
  position: fixed;
  z-index: 41;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--doc-line);
  background: #fff;
  box-shadow: -18px 0 50px rgba(20, 42, 50, .14);
  transform: translateX(100%);
  transition: transform 180ms ease;
  overflow: auto;
}
.document-detail-drawer.open { transform: translateX(0); }
.document-detail-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; border-bottom: 1px solid var(--doc-line); padding: 22px 24px; background: rgba(255,255,255,.96); }
.document-detail-title { display: flex; min-width: 0; gap: 13px; }
.document-file-mark { display: grid; place-items: center; flex: 0 0 44px; height: 48px; border-radius: 6px; background: var(--doc-accent-soft); color: var(--doc-accent); font-size: 11px; font-weight: 850; }
.document-detail-title p { margin: 0 0 3px; color: var(--doc-muted); font-size: 11px; }
.document-detail-title h2 { margin: 0; overflow-wrap: anywhere; color: var(--doc-ink); font-size: 18px; letter-spacing: 0; }
.document-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--doc-line); padding: 14px 24px; }
.document-detail-actions a { text-decoration: none; }
.document-detail-body { padding: 20px 24px 40px; }
.document-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0 0 20px; }
.document-facts div { min-width: 0; }
.document-facts dt { color: var(--doc-muted); font-size: 11px; }
.document-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--doc-ink); font-weight: 700; }
.document-native-note { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 18px; border-left: 3px solid #c18b2c; padding: 10px 12px; background: #fff8e9; color: #74591e; font-size: 12px; }
.document-native-note svg { flex: 0 0 16px; width: 16px; }
.document-detail-body details { border-top: 1px solid var(--doc-line); }
.document-detail-body summary { display: flex; justify-content: space-between; padding: 15px 0; color: var(--doc-ink); font-weight: 780; cursor: pointer; list-style: none; }
.document-detail-body summary::-webkit-details-marker { display: none; }
.document-detail-body summary span { display: grid; place-items: center; min-width: 24px; height: 20px; border-radius: 10px; background: #eef3f2; color: var(--doc-muted); font-size: 11px; }
.document-detail-list, .document-version-list, .document-operation-list { display: grid; gap: 8px; padding: 0 0 16px; }
.document-detail-list > div, .document-version-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e2e9e7; border-radius: 6px; padding: 10px 11px; }
.document-detail-list > div > svg { flex: 0 0 17px; width: 17px; color: var(--doc-accent); }
.document-detail-list > div > span:first-of-type { display: grid; flex: 1; min-width: 0; }
.document-detail-list strong, .document-version-list strong, .document-operation-list strong { color: var(--doc-ink); font-size: 12px; }
.document-detail-list small, .document-version-list small, .document-operation-list small { display: block; color: var(--doc-muted); font-size: 10px; }
.document-version-list > div > span:last-child { display: flex; gap: 3px; }
.document-version-list .icon-button { width: 30px; height: 30px; min-height: 30px; }
.document-operation-list > div { display: grid; grid-template-columns: 8px 1fr; gap: 10px; }
.document-operation-list > div > span { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: #83aaa4; }
.document-operation-list p { margin: 0; }
.danger-icon-button { color: #ba493d; }

.document-choice { display: grid !important; grid-template-columns: 20px 1fr; align-items: start; gap: 10px; border: 1px solid var(--doc-line); border-radius: 7px; padding: 12px; cursor: pointer; }
.document-choice input { width: 16px !important; height: 16px !important; margin-top: 3px; }
.document-choice span { display: grid; }
.document-choice small { color: var(--doc-muted); }
.document-share-result { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-top: 1px solid var(--doc-line); padding-top: 14px; }

@media (max-width: 1180px) {
  .document-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(120px, auto)); }
  .document-toolbar label:nth-child(4), .document-toolbar label:nth-child(5) { display: none; }
  .document-table-head, .document-row { grid-template-columns: minmax(220px, 2fr) minmax(110px, 1fr) minmax(100px, 1fr) 56px 90px 42px; }
  .document-table-head > span:nth-child(5), .document-row > span:nth-child(5) { display: none; }
}

@media (max-width: 820px) {
  .document-library-heading { align-items: flex-start; }
  .document-library-layout { grid-template-columns: 1fr; }
  .document-library-sidebar { border-right: 0; border-bottom: 1px solid var(--doc-line); }
  .document-view-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .document-storage { display: none; }
  .document-toolbar { grid-template-columns: 1fr 1fr; }
  .document-toolbar .document-search { grid-column: 1 / -1; }
  .document-table-head { display: none; }
  .document-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 14px; }
  .document-row > span { display: none !important; }
  .document-heading-actions { justify-content: flex-end; }
}

@media (max-width: 560px) {
  .document-library-heading { display: grid; }
  .document-heading-actions { justify-content: flex-start; }
  .document-view-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-toolbar { grid-template-columns: 1fr; }
  .document-toolbar label { display: block !important; }
  .document-toolbar .document-search { grid-column: auto; }
  .document-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .document-detail-drawer, .document-view-nav button, .document-storage-track span { transition: none; }
}

/* Product design: the source-of-truth workspace */
.product-design-panel {
  padding-top: 24px;
}

.design-page-heading {
  border-bottom: 1px solid var(--line);
}

.design-heading-actions,
.design-surface-actions,
.design-page-detail-heading > div:last-child,
.design-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.design-archive-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #e8f5f2;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.design-primary-tabs,
.design-surface-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.design-primary-tabs button,
.design-surface-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border: 0;
  padding: 0 16px;
  background: transparent;
  color: #667085;
  font-weight: 800;
}

.design-primary-tabs button::after,
.design-surface-tabs button::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

.design-primary-tabs button:hover,
.design-primary-tabs button.active,
.design-surface-tabs button:hover,
.design-surface-tabs button.active {
  color: var(--accent-strong);
}

.design-primary-tabs button.active::after,
.design-surface-tabs button.active::after {
  background: var(--accent);
}

.design-primary-tabs svg,
.design-surface-tabs svg {
  width: 18px;
  height: 18px;
}

.design-overview-panel,
.design-surface-panel {
  padding-top: 20px;
}

.design-summary-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid #dce5e2;
  border-left: 4px solid var(--accent);
  background: #f5faf8;
}

.design-summary-rail > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid #dce5e2;
}

.design-summary-rail > div:last-child {
  border-right: 0;
}

.design-summary-rail svg {
  grid-row: 1 / 3;
  width: 20px;
  height: 20px;
  align-self: center;
  color: var(--accent);
}

.design-summary-rail span {
  color: var(--text-muted);
  font-size: 12px;
}

.design-summary-rail strong {
  font-size: 20px;
  line-height: 1.1;
}

.design-surface-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  margin-top: 20px;
}

.design-main-section,
.design-side-rail,
.design-user-strip,
.design-tree-workspace,
.design-surface-requirements,
.design-interaction-table {
  border: 1px solid var(--line);
  background: var(--surface);
}

.design-section-heading,
.design-side-rail > header,
.design-user-strip,
.design-context-heading,
.design-page-tree-panel > header,
.design-page-detail-heading,
.design-subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.design-section-heading {
  padding: 22px 22px 16px;
}

.design-section-heading span,
.design-side-rail header span,
.design-user-strip > div > span,
.design-context-heading span,
.design-page-tree-panel header span,
.design-page-detail-heading span,
.design-subsection-heading span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.design-section-heading h3,
.design-side-rail h3,
.design-user-strip h3,
.design-context-heading h3,
.design-page-tree-panel h3,
.design-page-detail-heading h3,
.design-subsection-heading h3 {
  margin-top: 3px;
}

.design-section-heading p,
.design-context-heading p,
.design-page-detail-heading p {
  margin: 0;
  font-size: 13px;
}

.design-surface-table-head,
.design-surface-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.45fr) minmax(120px, .8fr) minmax(120px, .9fr) minmax(120px, .75fr) 92px 112px;
  align-items: center;
  gap: 12px;
}

.design-surface-table-head {
  min-height: 42px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.design-surface-row {
  min-height: 88px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.design-surface-row:hover {
  background: #fbfdfc;
}

.design-surface-name,
.design-requirement-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.design-surface-name > svg {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 9px;
  background: #e9f7f3;
  color: var(--accent);
}

.design-surface-name > span,
.design-requirement-name > span,
.design-table-cell {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.design-surface-name strong,
.design-requirement-name strong,
.design-table-cell strong {
  min-width: 0;
  overflow: hidden;
  color: #172b4d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.design-surface-name small,
.design-requirement-name small,
.design-table-cell small {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.design-artifact-state,
.design-status-badge {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.design-artifact-state.current,
.design-status-badge.confirmed,
.design-status-badge.valid {
  background: #e8f7ef;
  color: #067647;
}

.design-artifact-state.stale,
.design-status-badge.repair {
  background: #fff4e5;
  color: #b54708;
}

.design-status-badge.draft {
  background: #eaf2ff;
  color: #175cd3;
}

.design-status-badge.archived {
  background: #f2f4f7;
  color: #667085;
}

.design-row-actions {
  justify-content: flex-end;
}

.design-row-actions .icon-button {
  width: 32px;
  min-height: 32px;
}

.design-side-rail {
  align-self: start;
}

.design-side-rail > header {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.design-side-rail > header strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #fff1ed;
  color: #c2412d;
}

.design-side-rail > p {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
  font-size: 12px;
}

.design-loose-list {
  display: grid;
}

.design-loose-list > button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  background: transparent;
  color: #344054;
  text-align: left;
}

.design-loose-list > button:hover {
  background: #f8faf9;
}

.design-loose-list > button > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.design-loose-list small {
  color: var(--text-muted);
}

.design-requirement-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 132px 132px auto;
  gap: 10px;
  margin-bottom: 16px;
}

.design-context-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 190px));
  justify-content: end;
  gap: 10px;
  margin: -4px 0 14px;
}

.design-requirement-table,
.design-interaction-table {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.design-requirement-table-head,
.design-requirement-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(160px, .9fr) 90px 120px 120px 120px;
  align-items: center;
  gap: 12px;
}

.design-requirement-table-head,
.design-interaction-table-head {
  min-height: 42px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.design-requirement-row {
  min-height: 80px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.design-requirement-name > svg {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 8px;
  background: #f2f6ff;
  color: #475fc7;
}

.design-surface-header {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--line);
}

.design-surface-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.design-surface-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #dff4ed;
  color: var(--accent);
}

.design-surface-icon svg {
  width: 24px;
  height: 24px;
}

.design-surface-identity span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.design-surface-identity h2 {
  margin: 2px 0;
}

.design-surface-identity p {
  margin: 0;
  font-size: 13px;
}

.design-user-strip {
  min-height: 86px;
  margin-top: 18px;
  padding: 14px 16px;
}

.design-user-list {
  display: flex;
  flex: 1;
  gap: 8px;
  overflow-x: auto;
}

.design-user-chip {
  display: grid;
  grid-template-columns: 26px minmax(110px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 170px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8fbfa;
  color: #344054;
  text-align: left;
}

.design-user-chip > svg {
  color: var(--accent);
}

.design-user-chip > span {
  display: grid;
  gap: 2px;
}

.design-user-chip small,
.design-user-empty {
  color: var(--text-muted);
  font-size: 11px;
}

.design-tree-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
}

.design-page-tree-panel {
  border-right: 1px solid var(--line);
  background: #f8faf9;
}

.design-page-tree-panel > header {
  min-height: 70px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.design-page-tree {
  padding: 10px;
}

.design-page-tree-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.design-page-tree-row > button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px 0 calc(10px + var(--tree-depth) * 18px);
  background: transparent;
  color: #475467;
  text-align: left;
}

.design-page-tree-row > button:hover,
.design-page-tree-row > button.active {
  background: #e7f3ef;
  color: var(--accent-strong);
}

.design-page-tree-row > button small {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  font-size: 11px;
}

.design-page-order-actions {
  display: flex;
  opacity: 0;
  transition: opacity .15s ease;
}

.design-page-tree-row:hover .design-page-order-actions,
.design-page-tree-row:focus-within .design-page-order-actions {
  opacity: 1;
}

.design-page-order-actions .icon-button {
  width: 28px;
  height: 28px;
}

.design-page-workspace {
  min-width: 0;
  background: #fff;
}

.design-page-empty {
  display: grid;
  min-height: 560px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.design-page-empty > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: #98a2b3;
}

.design-page-empty p {
  margin: 5px 0 0;
}

.design-page-detail-heading {
  min-height: 92px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.design-page-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
  min-height: 466px;
}

.design-page-content-grid > section,
.design-page-content-grid > aside {
  padding: 20px;
}

.design-page-content-grid > aside {
  border-left: 1px solid var(--line);
  background: #fbfcfc;
}

.design-subsection-heading {
  min-height: 48px;
  margin-bottom: 12px;
}

.design-module-list,
.design-context-requirements {
  display: grid;
  gap: 8px;
}

.design-module-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  border: 1px solid var(--line);
  padding: 12px;
  background: #fff;
}

.design-module-item > svg {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  padding: 8px;
  background: #fff4e8;
  color: #b54708;
}

.design-module-item p {
  margin: 4px 0 0;
  font-size: 12px;
}

.design-module-item > span {
  color: var(--text-muted);
  font-size: 12px;
}

.design-requirement-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.design-requirement-compact:last-child {
  border-bottom: 0;
}

.design-context-heading {
  padding: 4px 2px 18px;
}

.design-surface-requirements {
  display: grid;
}

.design-interaction-table-head,
.design-interaction-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(140px, .9fr) minmax(130px, .8fr) minmax(180px, 1fr) 80px 100px;
  align-items: center;
  gap: 12px;
}

.design-interaction-row {
  min-height: 76px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

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

.product-design-editor-dialog {
  width: min(720px, calc(100vw - 32px));
}

.product-design-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: min(66vh, 760px);
  overflow-y: auto;
  padding: 2px;
}

.design-dialog-icon {
  background: #e8f5f2;
  color: var(--accent);
}

.design-form-field {
  display: grid;
  gap: 7px;
}

.design-form-field:has(textarea),
.design-checkbox-field,
.design-version-history,
.design-ai-assistant,
.design-editor-danger {
  grid-column: 1 / -1;
}

.design-form-field > span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.design-form-field input,
.design-form-field select,
.design-form-field textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #101828;
  outline: none;
}

.design-form-field textarea {
  min-height: 88px;
  resize: vertical;
}

.design-form-field textarea.large {
  min-height: 150px;
}

.design-form-field input:focus,
.design-form-field select:focus,
.design-form-field textarea:focus {
  border-color: #56a59d;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}

.design-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.design-checkbox-group label {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8faf9;
}

.design-checkbox-group label > input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.design-checkbox-group label > span {
  display: grid;
  gap: 2px;
}

.design-checkbox-group label strong {
  color: #1d2939;
  font-size: 13px;
}

.design-checkbox-group label small {
  color: var(--text-muted);
  line-height: 1.45;
}

.design-checkbox-field > small {
  color: var(--text-muted);
}

.product-design-archive-dialog {
  width: min(720px, calc(100vw - 32px));
}

.product-design-archive-list {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 680px);
  overflow-y: auto;
}

.product-design-archive-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.product-design-archive-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: #edf6f4;
  color: var(--accent-strong);
}

.product-design-archive-icon svg {
  width: 18px;
  height: 18px;
}

.product-design-archive-row > div {
  display: grid;
  gap: 3px;
}

.product-design-archive-row > div > span,
.product-design-archive-row > div > small {
  color: var(--text-muted);
  font-size: 12px;
}

.design-version-history {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.design-version-history > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  border-bottom: 1px solid var(--line);
}

.design-version-history > .design-version-row {
  display: grid;
  align-items: stretch;
  gap: 6px;
  padding: 8px 0;
}

.design-version-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.design-version-row details {
  color: var(--text-muted);
  font-size: 12px;
}

.design-version-row summary {
  cursor: pointer;
  color: #475467;
}

.design-version-row p {
  margin: 7px 0 0;
  line-height: 1.55;
}

.design-ai-assistant {
  border-left: 3px solid #f26b4f;
  padding: 13px 14px;
  background: #fff8f5;
}

.design-ai-assistant-heading,
.design-ai-result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.design-ai-assistant-heading > div {
  display: grid;
  gap: 4px;
}

.design-ai-assistant-heading strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #182230;
}

.design-ai-assistant-heading strong svg {
  width: 16px;
  height: 16px;
  color: #f26b4f;
}

.design-ai-assistant-heading small,
.design-ai-result small {
  color: var(--text-muted);
  line-height: 1.45;
}

.design-ai-result {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid rgba(242, 107, 79, .22);
  padding-top: 12px;
}

.design-ai-result[hidden] {
  display: none;
}

.design-ai-result p {
  margin: 0;
  color: #344054;
  line-height: 1.55;
}

.design-ai-result.is-loading {
  color: #7a4b3c;
}

.design-ai-result.is-error {
  color: var(--danger);
}

.design-ai-result-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .design-ai-assistant-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

.design-editor-danger {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.danger-text-button {
  color: var(--danger);
}

@media (max-width: 1180px) {
  .design-summary-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .design-summary-rail > div:nth-child(3) {
    border-right: 0;
  }

  .design-summary-rail > div:nth-child(-n+3) {
    border-bottom: 1px solid #dce5e2;
  }

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

  .design-side-rail {
    display: none;
  }

  .design-surface-table-head,
  .design-surface-row {
    grid-template-columns: minmax(230px, 1.3fr) minmax(120px, .8fr) minmax(120px, .75fr) 92px 100px;
  }

  .design-surface-table-head > :nth-child(3),
  .design-surface-row > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 820px) {
  .design-heading-actions,
  .design-surface-actions {
    width: 100%;
  }

  .design-heading-actions > button,
  .design-surface-actions > button {
    flex: 1;
  }

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

  .design-summary-rail > div:nth-child(odd) {
    border-right: 1px solid #dce5e2;
  }

  .design-summary-rail > div:nth-child(even) {
    border-right: 0;
  }

  .design-summary-rail > div:nth-child(-n+4) {
    border-bottom: 1px solid #dce5e2;
  }

  .design-surface-table-head {
    display: none;
  }

  .design-surface-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .design-surface-row > :not(.design-surface-name, .design-row-actions) {
    display: none;
  }

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

  .design-context-filters {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .design-requirement-table-head,
  .design-interaction-table-head {
    display: none;
  }

  .design-requirement-row,
  .design-interaction-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .design-requirement-row > :not(.design-requirement-name, .design-row-actions),
  .design-interaction-row > :not(:first-child, :last-child) {
    display: none;
  }

  .design-surface-header {
    grid-template-columns: 1fr;
  }

  .design-surface-identity {
    order: -1;
  }

  .design-user-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .design-user-list {
    order: 3;
    width: 100%;
  }

  .design-tree-workspace {
    grid-template-columns: 1fr;
  }

  .design-page-tree-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .design-page-tree {
    max-height: 260px;
    overflow-y: auto;
  }

  .design-page-content-grid {
    grid-template-columns: 1fr;
  }

  .design-page-content-grid > aside {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .design-module-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .design-module-item > span {
    display: none;
  }

  .product-design-editor-fields {
    grid-template-columns: 1fr;
  }
}

/* Confirmed workbench shell */
body {
  background: #edf3f4;
}

.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 0;
  padding: 28px 16px 22px;
  background: #063b31;
  color: #f4fbf8;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #18a887;
  color: #ffffff;
  font-weight: 900;
}

.brand-name {
  color: #ffffff;
}

.workspace-name {
  margin-top: 3px;
  color: #9cc7bb;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c8ddd7;
  font-weight: 700;
}

.nav-item > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font-size: 18px;
}

.nav-item > svg,
.primary-button > svg,
.secondary-button > svg,
.text-button > svg,
.runtime-button > svg,
.topbar-icon-button > svg,
.global-search > svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.primary-button,
.secondary-button,
.text-button,
.danger-button,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-item:hover,
.nav-item.active {
  background: #0c5a49;
  color: #ffffff;
}

.nav-item.active {
  box-shadow: inset 3px 0 #ff795d;
}

.main-panel {
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 28px 38px 56px;
}

.topbar {
  position: relative;
  align-items: flex-end;
  border-bottom: 1px solid #d9e3e5;
  padding-bottom: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(340px, 32vw);
  height: 40px;
  border: 1px solid #cbd9dc;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  color: #557078;
}

.global-search:focus-within {
  border-color: #138e78;
  box-shadow: 0 0 0 3px rgba(19, 142, 120, 0.12);
}

.global-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.runtime-button,
.topbar-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border: 1px solid #cbd9dc;
  border-radius: 8px;
  background: #ffffff;
  color: #24434a;
  font-weight: 700;
}

.runtime-button {
  padding: 0 12px;
}

.topbar-icon-button {
  width: 40px;
  padding: 0;
  font-size: 22px;
}

.runtime-button:hover,
.topbar-icon-button:hover {
  border-color: #138e78;
}

.runtime-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #11976f;
  box-shadow: 0 0 0 4px rgba(17, 151, 111, 0.12);
}

.runtime-dot.warning {
  background: #d59c20;
  box-shadow: 0 0 0 4px rgba(213, 156, 32, 0.14);
}

.runtime-dot.error {
  background: #c84d4d;
  box-shadow: 0 0 0 4px rgba(200, 77, 77, 0.14);
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  border: 2px solid #edf3f4;
  border-radius: 10px;
  background: #ff684d;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 15px;
}

.topbar .primary-button {
  background: #ff684d;
}

.topbar .primary-button:hover {
  background: #e95138;
}

.search-results {
  position: absolute;
  z-index: 20;
  top: 66px;
  right: 204px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(26, 54, 60, 0.16);
  padding: 8px;
  max-height: min(620px, calc(100vh - 110px));
  overflow-y: auto;
}

.search-results h4 {
  margin: 9px 10px 5px;
  color: #668087;
  font-size: 11px;
  font-weight: 900;
}

.search-results > button,
.search-result-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 11px 12px;
  text-align: left;
}

.search-results > button:hover,
.search-result-button:hover {
  background: #edf8f5;
}

.search-result-button > svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #138e78;
}

.search-result-button > span {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.search-result-button strong,
.search-result-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-button small {
  color: var(--text-muted);
  font-size: 11px;
}

.workbench-welcome {
  padding: 26px 0 4px;
}

.workbench-welcome h2 {
  margin: 0 0 4px;
  font-size: 25px;
}

.workbench-welcome p {
  margin-bottom: 0;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 16px;
  margin-top: 18px;
}

.panel {
  border-color: #dae4e6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 55, 62, 0.05);
}

.panel-kicker {
  margin: 0 0 5px;
  color: #138e78;
  font-size: 11px;
  font-weight: 900;
}

.continue-panel {
  min-height: 0 !important;
  border-left: 4px solid #138e78;
  background: #f4fbf8;
}

.continue-card {
  grid-template-columns: minmax(180px, 0.8fr) minmax(420px, 1.8fr) auto;
  align-items: center;
  gap: 24px;
  border: 0;
  background: transparent;
  padding: 18px 0 2px;
}

.continue-card:hover {
  border-color: transparent;
  box-shadow: none;
}

.continue-heading {
  display: grid;
  gap: 7px;
}

.continue-heading time,
.quick-record-item time,
.recent-project-row time {
  color: var(--text-muted);
  font-size: 12px;
}

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

.continue-row {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.continue-row > span {
  color: var(--text-muted);
  font-size: 11px;
}

.continue-row > strong {
  overflow: hidden;
  color: #15353b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-action {
  white-space: nowrap;
}

.count-badge {
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 14px;
  background: #fff0ec;
  color: #d74c33;
  font-size: 12px;
  font-weight: 900;
}

.attention-item {
  display: grid;
  width: 100%;
  gap: 5px;
  border: 0;
  border-left: 3px solid #d59c20;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 8px 10px 12px;
  color: inherit;
  text-align: left;
}

.attention-item:hover {
  background: #fffaf0;
}

.attention-item span,
.attention-item time {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.quick-record-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.quick-record-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.quick-record-item:last-child {
  border-bottom: 0;
}

.quick-record-item > div:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.quick-record-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.inline-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.inline-text-button {
  border: 0;
  background: transparent;
  padding: 2px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.danger-text-button {
  color: #b54745;
}

.recent-project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #e0e7e9;
  border-radius: 8px;
  background: #e0e7e9;
}

.recent-project-list > .empty-state,
.workbench-activity-list > .empty-state {
  grid-column: 1 / -1;
  border: 0;
  background: #ffffff;
}

.recent-project-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  border: 0;
  background: #ffffff;
  padding: 13px 15px;
  color: inherit;
  text-align: left;
}

.recent-project-row:hover {
  background: #f5fbf9;
}

.project-letter-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e0f4ed;
  color: #08765f;
  font-size: 17px;
  font-weight: 900;
}

.recent-project-row > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.recent-project-row > div:nth-child(2) span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-project-trailing {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.pinned-label {
  color: #d5573d;
  font-size: 11px;
  font-weight: 900;
}

.workbench-activity-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workbench-activity-list .product-change-item {
  min-width: 0;
}

.workbench-activity-list button.product-change-item {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.workbench-activity-list button.product-change-item:hover {
  border-color: #8fc8ba;
  background: #f4fbf8;
}

.workbench-activity-list button.product-change-item > svg {
  width: 16px;
  height: 16px;
  color: #138e78;
}

.notification-dialog .dialog-content {
  width: min(680px, calc(100vw - 32px));
}

.notification-list {
  display: grid;
  max-height: min(620px, calc(100vh - 210px));
  overflow-y: auto;
  border: 1px solid #dce6e8;
  border-radius: 8px;
}

.notification-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #e3eaec;
  background: #ffffff;
  padding: 14px 16px;
  color: inherit;
  text-align: left;
}

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

.notification-row:hover {
  background: #f3faf8;
}

.notification-row > svg {
  width: 18px;
  height: 18px;
  color: #138e78;
}

.notification-row > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.notification-row small,
.notification-row time {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-preview {
  border-left: 3px solid #138e78;
  background: #f2f8f7;
  padding: 12px 14px;
}

.source-preview p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.dialog-content-wide {
  width: min(620px, calc(100vw - 32px));
}

.conversion-fields {
  display: grid;
  gap: 14px;
}

.field-note {
  margin: -4px 0 0;
  font-size: 12px;
}

.runtime-detail {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.runtime-detail > div {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.runtime-detail > div > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.runtime-detail > div > div span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.runtime-detail p {
  margin: 5px 0 0;
  font-size: 12px;
}

@media (max-width: 1120px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .global-search {
    order: 2;
    width: 100%;
  }

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

  .continue-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .main-panel {
    padding: 22px 16px 40px;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
  }

  .topbar {
    flex-direction: column;
  }

  .runtime-button {
    flex: 1;
  }

  .global-search {
    width: 100%;
  }

  .search-results {
    top: 168px;
    right: 0;
  }

  .workbench-grid,
  .recent-project-list {
    grid-template-columns: 1fr;
  }

  .continue-meta,
  .workbench-activity-list {
    grid-template-columns: 1fr;
  }

  .quick-record-item {
    display: grid;
  }
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.embedded-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 16px;
}

.ai-assist-panel {
  background: #fffdf7;
}

.embedded-panel-header,
.card-header,
.version-card-header,
.finding-card-header,
.delivery-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.embedded-panel-header h3,
.delivery-header h3 {
  margin: 0 0 4px;
  color: #202527;
  font-size: 17px;
}

.embedded-panel-header p,
.delivery-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.inline-form label {
  display: grid;
  gap: 6px;
  color: #394245;
  font-size: 13px;
  font-weight: 700;
}

.inline-form input,
.inline-form textarea,
.inline-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #202527;
  padding: 9px 10px;
}

.inline-form textarea {
  resize: vertical;
}

.finding-card,
.version-card,
.delivery-card,
.release-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.finding-source {
  color: var(--text-muted);
  font-size: 12px;
}

.finding-card strong,
.version-card strong,
.delivery-card strong,
.release-card strong {
  color: #202527;
  font-size: 15px;
}

.finding-card p,
.version-card p,
.delivery-card p,
.release-card p,
.card-row {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.card-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.finding-actions,
.version-actions,
.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.delivery-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.delivery-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.delivery-fact {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.delivery-fact span {
  color: var(--text-muted);
  font-size: 12px;
}

.delivery-fact strong {
  color: #263034;
  font-size: 14px;
  line-height: 1.45;
}

.delivery-readiness {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.release-snapshot-list,
.version-list,
.finding-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 760px) {
  .inline-form {
    grid-template-columns: 1fr;
  }

  .embedded-panel-header,
  .card-header,
  .version-card-header,
  .finding-card-header,
  .delivery-header {
    align-items: stretch;
    flex-direction: column;
  }

  .finding-actions,
  .version-actions,
  .delivery-actions {
    justify-content: flex-start;
  }

  .progress-summary,
  .delivery-facts {
    grid-template-columns: 1fr;
  }

  .next-action-panel {
    grid-template-columns: 1fr;
  }

  .next-action-panel button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

/* Final Personal Alpha surface rules: read-first content and calm AI assistance. */
.read-state {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.read-state[hidden],
.detail-form[hidden],
.side-drawer[hidden],
.drawer-backdrop[hidden] {
  display: none;
}

.fact-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.fact-list div {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.fact-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fact-list dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.fact-list dd {
  margin: 0;
  color: #344054;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-line;
}

.read-state .metadata-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.ai-analysis-panel,
.settings-panel,
.ai-assist-panel {
  background: #f7fbfb;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.settings-help {
  background: #ffffff;
}

.settings-help h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.settings-help p:not(.eyebrow) {
  margin-bottom: 18px;
  font-size: 14px;
}

.settings-help-list {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.settings-help-list span {
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.settings-help-list span::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.ai-result-card {
  border-color: #c9e6e1;
  background: #f5fbfa;
}

.ai-result-card.unavailable {
  border-color: #ead2d0;
  background: #fff9f8;
}

.settings-status,
.ai-service-state {
  border-color: #c9e6e1;
  background: #ecf7f5;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(17, 24, 39, 0.28);
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  width: min(40vw, 560px);
  min-width: 360px;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: #ffffff;
  box-shadow: -14px 0 34px rgba(16, 24, 40, 0.12);
  padding: 28px;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 22px;
}

.drawer-note {
  margin: 18px 0 0;
  border-left: 3px solid var(--accent);
  background: #ecf7f5;
  padding: 10px 12px;
  color: #344054;
  font-size: 13px;
  line-height: 1.6;
}

.drawer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 2px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.drawer-status {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.drawer-body .empty-state {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .side-drawer {
    width: 100vw;
    min-width: 0;
    padding: 22px 18px;
  }
}

@media (max-width: 820px) {
  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    width: 100%;
  }

  .global-search {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }

  .runtime-button {
    grid-column: 1;
    grid-row: 2;
  }

  .topbar-icon-button {
    grid-column: 2;
    grid-row: 2;
  }

  .topbar .primary-button {
    grid-column: 3;
    grid-row: 2;
    width: auto;
  }

  .search-results {
    top: 178px;
  }
}

@media (max-width: 520px) {
  .sidebar {
    gap: 20px;
  }

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

  .nav-item {
    min-width: 0;
  }

  .topbar-actions {
    grid-template-columns: minmax(0, 1fr) 40px 44px;
  }

  .runtime-button {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  #runtimeStatusLabel {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar .primary-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
    gap: 0;
    font-size: 0;
  }
}

/* Project directory and create-project flow */
.sr-only,
.visually-hidden-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.directory-heading {
  margin: 26px 0 20px;
}

.directory-heading h2 {
  margin-bottom: 6px;
  font-size: 30px;
}

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

.project-directory-panel {
  min-height: 560px;
  padding: 0;
  overflow: visible;
}

.project-directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #dde6e8;
  padding: 18px 20px 14px;
}

.project-scope-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
}

.project-scope-tab {
  position: relative;
  min-height: 40px;
  border: 0;
  background: transparent;
  padding: 0 8px;
  color: #60717a;
  font-weight: 800;
}

.project-scope-tab::after {
  position: absolute;
  right: 0;
  bottom: -15px;
  left: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  content: "";
}

.project-scope-tab.active {
  color: #087b65;
}

.project-scope-tab.active::after {
  background: #129071;
}

.project-scope-tab span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  place-items: center;
  border-radius: 10px;
  background: #edf2f3;
  color: #64747c;
  font-size: 11px;
}

.project-directory-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-filter-search,
.project-sort-control {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid #ccd9dc;
  border-radius: 8px;
  background: #ffffff;
  color: #698087;
}

.project-filter-search {
  width: min(320px, 34vw);
  padding: 0 12px;
}

.project-filter-search svg,
.project-sort-control svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
}

.project-filter-search input,
.project-sort-control select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263a40;
}

.project-filter-search input {
  width: 100%;
}

.project-sort-control {
  position: relative;
  padding: 0 9px 0 12px;
}

.project-sort-control select {
  appearance: none;
  padding-right: 22px;
  font-weight: 700;
}

.project-sort-control svg {
  position: absolute;
  right: 8px;
}

.project-table-head,
.project-directory-row {
  display: grid;
  grid-template-columns: 56px minmax(260px, 1.7fr) minmax(110px, 0.62fr) minmax(190px, 1fr) minmax(118px, 0.62fr) 44px;
  align-items: center;
  gap: 14px;
}

.project-table-head {
  margin: 16px 18px 0;
  border-radius: 7px;
  background: #f1f5f6;
  padding: 12px 14px;
  color: #657780;
  font-size: 12px;
  font-weight: 800;
}

.project-directory-list {
  gap: 0;
  margin: 0 18px;
}

.project-directory-row {
  position: relative;
  min-height: 88px;
  border-bottom: 1px solid #e1e8ea;
  padding: 13px 14px;
  background: #ffffff;
  transition: background 150ms ease;
}

.project-directory-row:hover,
.project-directory-row:focus-within {
  background: #f7fbfa;
}

.project-directory-row.is-archived {
  background: #fafbfb;
}

.project-pin-button,
.project-row-more {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6a7b83;
  padding: 0;
}

.project-pin-button:hover,
.project-row-more:hover {
  background: #eaf4f1;
  color: #087b65;
}

.project-pin-button.active {
  color: #0d8f70;
}

.project-pin-button.active svg {
  fill: currentColor;
}

.project-pin-button svg,
.project-row-more svg {
  width: 18px;
  height: 18px;
}

.project-identity {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-directory-icon,
.project-icon-preview {
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: #dff3ec;
  color: #096650;
  font-weight: 900;
}

.project-directory-icon {
  width: 50px;
  height: 50px;
  font-size: 20px;
}

.project-directory-icon img,
.project-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-identity-text {
  min-width: 0;
}

.project-open-button {
  display: block;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: #13272c;
  text-align: left;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-open-button:hover {
  color: #087b65;
}

.project-goal-summary,
.project-directory-cell {
  color: #60727a;
  font-size: 13px;
  line-height: 1.55;
}

.project-goal-summary {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-version-label {
  color: #536a73;
  font-weight: 800;
}

.project-row-actions {
  position: relative;
  justify-self: end;
}

.project-row-actions > summary {
  list-style: none;
}

.project-row-actions > summary::-webkit-details-marker {
  display: none;
}

.project-row-menu-panel {
  position: absolute;
  z-index: 8;
  top: 38px;
  right: 0;
  display: grid;
  width: 150px;
  border: 1px solid #d7e1e3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(17, 46, 52, 0.15);
  padding: 6px;
}

.project-row-menu-panel button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 10px;
  color: #263b40;
  text-align: left;
  font-weight: 700;
}

.project-row-menu-panel button:hover {
  background: #eef6f4;
}

.project-row-menu-panel button.danger-menu-item {
  color: #b04442;
}

.project-row-menu-panel svg {
  width: 16px;
  height: 16px;
}

.project-directory-list > .empty-state {
  min-height: 280px;
  place-content: center;
  text-align: center;
}

.project-create-dialog {
  gap: 18px;
  padding: 24px 28px 22px;
}

.project-create-dialog .primary-button {
  background: #ff684d;
}

.project-create-dialog .primary-button:hover {
  background: #e95138;
}

.dialog-title-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-title-lockup h2 {
  margin-bottom: 3px;
}

.dialog-title-lockup p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.dialog-title-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #ff684d;
  color: #ffffff;
}

.dialog-title-icon svg {
  width: 22px;
  height: 22px;
}

.project-icon-field {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e1e8ea;
  padding-bottom: 18px;
}

.project-icon-preview {
  width: 82px;
  height: 82px;
  font-size: 32px;
}

.project-icon-field strong {
  display: block;
  margin-bottom: 8px;
}

.project-icon-field strong span,
.project-form-field em {
  margin-left: 4px;
  color: #788a91;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.project-icon-field p {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.project-icon-actions {
  justify-content: flex-start;
}

.upload-button {
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

.upload-button svg {
  width: 16px;
  height: 16px;
}

.project-form-field {
  position: relative;
}

.project-form-field > span b {
  color: #e44d42;
}

.project-form-field small {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #87969c;
  font-size: 11px;
  font-weight: 600;
}

.project-form-field textarea {
  padding-bottom: 25px;
}

.compact-dialog {
  width: min(460px, calc(100vw - 32px));
}

.danger-button {
  min-height: 38px;
  border: 1px solid #b84643;
  border-radius: 8px;
  background: #b84643;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 800;
}

.danger-button:hover {
  background: #9e3836;
}

@media (max-width: 1080px) {
  .project-table-head,
  .project-directory-row {
    grid-template-columns: 48px minmax(240px, 1.6fr) minmax(100px, 0.65fr) minmax(130px, 0.8fr) 44px;
  }

  .project-table-head span:nth-child(5),
  .project-directory-row > :nth-child(5) {
    display: none;
  }
}

@media (max-width: 760px) {
  .directory-heading {
    margin-top: 18px;
  }

  .project-directory-panel {
    min-height: 420px;
  }

  .project-directory-toolbar,
  .project-directory-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .project-directory-toolbar {
    padding: 14px;
  }

  .project-scope-tabs {
    justify-content: space-around;
  }

  .project-scope-tab {
    flex: 1;
  }

  .project-scope-tab::after {
    bottom: -15px;
  }

  .project-filter-search {
    width: 100%;
  }

  .project-table-head {
    display: none;
  }

  .project-directory-list {
    gap: 10px;
    margin: 14px;
  }

  .project-directory-row {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
    border: 1px solid #dce5e7;
    border-radius: 8px;
    padding: 12px;
  }

  .project-directory-row > .project-directory-cell,
  .project-directory-row > .project-version-label {
    display: none;
  }

  .project-identity {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .project-directory-icon {
    width: 44px;
    height: 44px;
  }

  .project-row-actions {
    grid-column: 3;
  }

  .project-create-dialog {
    padding: 20px 18px;
  }

  .project-icon-field {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .project-icon-preview {
    width: 68px;
    height: 68px;
  }

  .dialog-title-lockup {
    align-items: flex-start;
  }

  .dialog-title-icon {
    display: none;
  }
}

.project-workspace-view {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

.project-context-header {
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid #dce6e5;
  border-top: 3px solid #0f766e;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 45, 52, 0.06);
}

.project-context-topline {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e5eceb;
  padding: 10px 22px;
}

.project-back-button,
.project-context-actions,
.project-context-identity,
.project-module-nav,
.project-last-edited,
.overview-section-heading {
  display: flex;
  align-items: center;
}

.project-back-button {
  gap: 8px;
  padding-left: 8px;
  color: #425466;
}

.project-back-button:hover {
  background: #eef7f5;
  color: #0b5f59;
}

.project-back-button svg,
.project-context-actions svg {
  width: 17px;
  height: 17px;
}

.project-context-actions {
  gap: 10px;
}

.project-version-chip {
  min-height: 30px;
  border: 1px solid #d4e5e1;
  border-radius: 999px;
  background: #eef8f5;
  padding: 5px 10px;
  color: #0b665c;
  font-size: 12px;
  font-weight: 800;
}

.project-context-identity {
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
}

.project-context-icon {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #cfe5df;
  border-radius: 8px;
  background: #dff3ed;
  color: #0a655a;
  font-size: 24px;
  font-weight: 900;
}

.project-context-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-context-copy {
  min-width: 0;
}

.project-context-copy h2 {
  margin: 0 0 6px;
  color: #102a31;
  font-size: 26px;
}

.project-context-copy p {
  max-width: 760px;
  margin: 0;
  color: #637680;
  font-size: 14px;
  line-height: 1.65;
}

.project-module-nav {
  gap: 2px;
  overflow-x: auto;
  border-top: 1px solid #edf1f1;
  padding: 0 14px;
  scrollbar-width: thin;
}

.project-module-nav button {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 52px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0 14px;
  color: #566974;
  font-size: 14px;
  font-weight: 800;
}

.project-module-nav button::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

.project-module-nav button:hover {
  background: #f5faf9;
  color: #0b665c;
}

.project-module-nav button.active {
  color: #0b665c;
}

.project-module-nav button.active::after {
  background: #0f766e;
}

.project-module-nav svg {
  width: 18px;
  height: 18px;
}

.project-overview-heading {
  margin-bottom: 16px;
}

.project-overview-heading h2 {
  margin-bottom: 4px;
  color: #102a31;
  font-size: 24px;
}

.project-overview-heading p:last-child {
  margin: 0;
  font-size: 14px;
}

.project-status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #dce5e7;
  border-radius: 8px;
  background: #ffffff;
}

.project-status-strip button {
  display: grid;
  min-width: 0;
  min-height: 108px;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 10px;
  border: 0;
  border-right: 1px solid #e4ebec;
  background: transparent;
  padding: 18px;
  color: #61717a;
  text-align: left;
}

.project-status-strip button:last-child {
  border-right: 0;
}

.project-status-strip button:hover {
  background: #f3f9f7;
}

.project-status-strip svg {
  grid-row: 1 / 3;
  width: 21px;
  height: 21px;
  color: #0f766e;
}

.project-status-strip span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-status-strip strong {
  margin-top: 5px;
  color: #102a31;
  font-size: 21px;
  line-height: 1;
}

.project-last-edited {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid #d8e8e4;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #f3faf8;
  padding: 13px 14px 13px 16px;
}

.last-edited-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #dcefe9;
  color: #0f766e;
}

.last-edited-mark svg {
  width: 18px;
  height: 18px;
}

.project-last-edited-copy {
  flex: 1;
  min-width: 0;
}

.project-last-edited-copy > span {
  display: block;
  margin-bottom: 4px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
}

.project-last-edited-copy strong,
.project-last-edited-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-last-edited-copy strong {
  color: #183238;
  font-size: 14px;
}

.project-last-edited-copy small {
  margin-top: 3px;
  color: #657983;
}

.project-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.project-overview-section {
  overflow: hidden;
  border: 1px solid #dce5e7;
  border-radius: 8px;
  background: #ffffff;
}

.overview-section-heading {
  min-height: 74px;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e7edee;
  padding: 16px 18px;
}

.overview-section-heading .eyebrow {
  margin-bottom: 3px;
  font-size: 11px;
}

.overview-section-heading > span {
  color: #7b8b92;
  font-size: 12px;
}

.attention-eyebrow {
  color: #c65b45;
}

.attention-count {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #fff0eb;
  color: #c14f38 !important;
  font-size: 12px !important;
  font-weight: 900;
}

.project-module-summary-list,
.project-attention-list,
.project-recent-change-list {
  display: grid;
}

.project-module-summary-row,
.project-attention-item,
.project-recent-change-row {
  display: grid;
  width: 100%;
  min-height: 74px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf1f1;
  background: transparent;
  padding: 12px 16px;
  color: inherit;
  text-align: left;
}

.project-module-summary-row:last-child,
.project-attention-item:last-child,
.project-recent-change-row:last-child {
  border-bottom: 0;
}

.project-module-summary-row:hover,
.project-attention-item:hover,
.project-recent-change-row:hover {
  background: #f7faf9;
}

.project-module-summary-row {
  grid-template-columns: 40px minmax(0, 1fr) auto 18px;
  gap: 12px;
}

.module-summary-icon,
.project-attention-item > span:first-child,
.recent-change-marker {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #e8f5f1;
  color: #0f766e;
}

.module-summary-icon svg,
.project-attention-item > span:first-child svg,
.recent-change-marker svg {
  width: 18px;
  height: 18px;
}

.module-summary-icon.module-product-design {
  background: #edf3ff;
  color: #3566bf;
}

.module-summary-icon.module-deliverables {
  background: #fff0eb;
  color: #c45640;
}

.module-summary-icon.module-review {
  background: #f2edff;
  color: #7352bd;
}

.module-summary-icon.module-versions {
  background: #fff7df;
  color: #9b6b13;
}

.module-summary-copy,
.project-attention-item > span:nth-child(2),
.project-recent-change-row > span:nth-child(2) {
  min-width: 0;
}

.module-summary-copy strong,
.module-summary-copy span,
.project-attention-item strong,
.project-attention-item small,
.project-recent-change-row strong,
.project-recent-change-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-summary-copy strong,
.project-attention-item strong,
.project-recent-change-row strong {
  color: #183238;
  font-size: 14px;
}

.module-summary-copy span,
.project-attention-item small,
.project-recent-change-row small {
  margin-top: 4px;
  color: #6b7d85;
  font-size: 12px;
}

.module-summary-meta,
.project-attention-item time,
.project-recent-change-row time {
  color: #7a8a91;
  font-size: 12px;
  white-space: nowrap;
}

.project-module-summary-row > svg,
.project-attention-item > svg,
.project-recent-change-row > svg {
  width: 16px;
  height: 16px;
  color: #9aa8ad;
}

.project-attention-item {
  grid-template-columns: 40px minmax(0, 1fr) auto 18px;
  gap: 10px;
}

.project-attention-item > span:first-child {
  background: #fff0eb;
  color: #c45640;
}

.attention-empty-state,
.project-recent-change-list > .empty-state {
  min-height: 190px;
  place-content: center;
  border: 0;
  text-align: center;
}

.attention-empty-state > svg {
  width: 30px;
  height: 30px;
  margin: 0 auto 10px;
  color: #0f766e;
}

.project-recent-section {
  margin-top: 18px;
}

.project-recent-change-row {
  grid-template-columns: 40px minmax(0, 1fr) auto 18px;
  gap: 12px;
}

.project-recent-change-row:nth-child(even) .recent-change-marker {
  background: #edf3ff;
  color: #3566bf;
}

.project-workspace-view button:focus-visible {
  outline: 3px solid rgba(208, 138, 58, 0.32);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .project-status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-status-strip button:nth-child(3) {
    border-right: 0;
  }

  .project-status-strip button:nth-child(-n + 3) {
    border-bottom: 1px solid #e4ebec;
  }

  .project-overview-grid {
    grid-template-columns: 1fr;
  }

  .attention-empty-state {
    min-height: 150px;
  }
}

@media (max-width: 720px) {
  .project-context-topline,
  .project-context-identity,
  .project-last-edited {
    align-items: stretch;
    flex-direction: column;
  }

  .project-context-actions {
    justify-content: space-between;
  }

  .project-context-identity {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 18px;
  }

  .project-context-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .project-context-copy h2 {
    font-size: 22px;
  }

  .project-module-nav {
    padding: 0 6px;
  }

  .project-module-nav button {
    min-height: 48px;
    padding: 0 11px;
  }

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

  .project-status-strip button,
  .project-status-strip button:nth-child(3) {
    border-right: 1px solid #e4ebec;
    border-bottom: 1px solid #e4ebec;
  }

  .project-status-strip button:nth-child(even) {
    border-right: 0;
  }

  .project-status-strip button:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .project-last-edited .secondary-button {
    width: 100%;
  }

  .module-summary-meta,
  .project-attention-item time,
  .project-recent-change-row time {
    display: none;
  }

  .project-module-summary-row,
  .project-attention-item,
  .project-recent-change-row {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    min-height: 70px;
    padding: 12px;
  }

  .module-summary-icon,
  .project-attention-item > span:first-child,
  .recent-change-marker {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-workspace-view * {
    scroll-behavior: auto !important;
  }
}

/* Product analysis */
.project-module-panel { min-width: 0; }
.analysis-module-panel { padding-top: 24px; }
.module-page-heading,
.analysis-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.module-page-heading { padding: 4px 2px 22px; }
.module-page-heading h2,
.analysis-detail-title-block h2 { margin: 0; color: #183238; }
.module-page-heading > div > p:last-child,
.analysis-detail-title-block > p { max-width: 720px; margin: 7px 0 0; font-size: 14px; }
.icon-text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.icon-text-button svg,
.subtle-icon-button svg { width: 17px; height: 17px; }
.analysis-summary-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px;
  overflow: hidden; border: 1px solid #dfe8e6; border-radius: 8px; background: #fff;
}
.analysis-summary-strip > div { display: grid; gap: 6px; min-height: 78px; padding: 15px 18px; border-right: 1px solid #e7edec; }
.analysis-summary-strip > div:last-child { border-right: 0; }
.analysis-summary-strip span { color: #6b7d85; font-size: 12px; }
.analysis-summary-strip strong { color: #183238; font-size: 22px; }
.analysis-list-toolbar {
  display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(142px, auto)) auto;
  align-items: end; gap: 10px; margin-bottom: 12px;
}
.search-control {
  display: flex; align-items: center; gap: 9px; min-height: 40px; border: 1px solid #d8e2e0;
  border-radius: 8px; padding: 0 12px; background: #fff;
}
.search-control:focus-within { border-color: #58a49d; box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.11); }
.search-control svg { flex: 0 0 auto; width: 17px; height: 17px; color: #7a8a91; }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #183238; }
.compact-select { position: relative; display: grid; gap: 4px; }
.compact-select > span { color: #6b7d85; font-size: 11px; font-weight: 700; }
.compact-select select {
  min-width: 142px; height: 40px; appearance: none; border: 1px solid #d8e2e0; border-radius: 8px;
  padding: 0 34px 0 11px; background: #fff; color: #29464c;
}
.compact-select svg { position: absolute; right: 10px; bottom: 12px; width: 15px; height: 15px; pointer-events: none; color: #7a8a91; }
.archive-toggle { display: flex; align-items: center; gap: 7px; min-height: 40px; color: #53676d; font-size: 13px; white-space: nowrap; }
.archive-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.analysis-table { overflow: hidden; border: 1px solid #dfe8e6; border-radius: 8px; background: #fff; }
.analysis-table-head,
.analysis-table-row {
  display: grid; grid-template-columns: minmax(190px, 1.35fr) minmax(180px, 1.2fr) 86px 110px 120px 110px 40px;
  align-items: center; gap: 12px;
}
.analysis-table-head { min-height: 42px; padding: 0 16px; background: #f4f7f6; color: #687c81; font-size: 11px; font-weight: 800; }
.analysis-table-row {
  position: relative; width: 100%; min-height: 82px; border: 0; border-top: 1px solid #e8eeee;
  padding: 12px 16px; background: #fff; color: #29464c; text-align: left;
}
.analysis-table-row:hover { background: #f8fbfa; }
.analysis-table-row.archived { background: #fafafa; opacity: 0.74; }
.analysis-row-title { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.analysis-type-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 8px; background: #e8f5f2; color: #0f766e; }
.analysis-type-icon svg { width: 18px; height: 18px; }
.analysis-row-title strong,
.analysis-row-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analysis-row-title strong { color: #183238; font-size: 14px; }
.analysis-row-title small,
.analysis-row-goal,
.analysis-row-muted { color: #6b7d85; font-size: 12px; }
.analysis-row-goal { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.55; }
.analysis-row-menu { position: relative; z-index: 2; }
.analysis-row-menu > summary { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; color: #63767c; list-style: none; }
.analysis-row-menu > summary::-webkit-details-marker { display: none; }
.analysis-row-menu > summary:hover { background: #eaf2f0; color: #0f766e; }
.analysis-row-menu > div,
.analysis-more-menu {
  position: absolute; right: 0; top: calc(100% + 5px); z-index: 20; width: 156px; overflow: hidden;
  border: 1px solid #dfe8e6; border-radius: 8px; background: #fff; box-shadow: var(--shadow);
}
.analysis-row-menu button,
.analysis-more-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; border: 0;
  padding: 0 12px; background: #fff; color: #29464c; text-align: left;
}
.analysis-row-menu button:hover,
.analysis-more-menu button:hover { background: #f1f7f5; }
.analysis-row-menu svg,
.analysis-more-menu svg { width: 15px; height: 15px; }
.danger-menu-item { color: var(--danger) !important; }
.analysis-table-body > .empty-state { min-height: 260px; border: 0; place-content: center; text-align: center; }

.analysis-detail-page { min-width: 0; }
.analysis-detail-heading {
  position: relative; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid #dfe8e6;
}
.analysis-detail-title-block { flex: 1; min-width: 0; }
.analysis-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.analysis-type-mark {
  border-radius: 5px; padding: 4px 7px; background: #e8f5f2; color: #0f766e; font-size: 11px; font-weight: 800;
}
.analysis-detail-actions { position: relative; display: flex; align-items: center; gap: 8px; }
.analysis-more-menu { top: calc(100% + 7px); }
.analysis-mobile-switch { display: none; }
.analysis-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(330px, 1fr) minmax(400px, 1.18fr);
  min-height: 620px; overflow: hidden; border: 1px solid #dfe8e6; border-radius: 8px; background: #fff;
}
.analysis-column { min-width: 0; border-right: 1px solid #e3eae8; background: #fff; }
.analysis-column:last-child { border-right: 0; }
.analysis-column-heading {
  display: flex; min-height: 67px; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid #e3eae8; padding: 12px 14px; background: #fbfcfc;
}
.analysis-column-heading span,
.analysis-column-heading strong { display: block; }
.analysis-column-heading span { color: #728287; font-size: 11px; }
.analysis-column-heading strong { margin-top: 3px; color: #183238; font-size: 14px; }
.analysis-column-note {
  margin: 0; padding: 10px 14px; border-bottom: 1px solid #edf1f0; color: #73858a; font-size: 11px; line-height: 1.55;
}
.subtle-icon-button {
  min-width: 34px; min-height: 34px; padding: 0; border-color: #d8e2e0; background: #fff; color: #536b70;
}
.subtle-icon-button:hover { background: #eaf4f2; color: #0f766e; }
.analysis-material-list { max-height: 555px; overflow: auto; padding: 6px; }
.analysis-material-item {
  position: relative; display: grid; grid-template-columns: 18px 32px minmax(0, 1fr) 30px;
  align-items: center; gap: 8px; width: 100%; min-height: 64px; border: 1px solid transparent;
  border-radius: 7px; padding: 8px; background: transparent; color: #29464c; text-align: left;
}
.analysis-material-item:hover,
.analysis-material-item.active { border-color: #cfe1de; background: #eef7f5; }
.analysis-material-item input { width: 15px; height: 15px; accent-color: var(--accent); }
.analysis-material-file-icon {
  display: grid; width: 32px; height: 32px; place-items: center; border-radius: 7px; background: #edf3ff; color: #3566bf;
}
.analysis-material-file-icon svg { width: 16px; height: 16px; }
.analysis-material-copy { min-width: 0; }
.analysis-material-copy strong,
.analysis-material-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analysis-material-copy strong { color: #183238; font-size: 12px; }
.analysis-material-copy small { margin-top: 3px; color: #728287; font-size: 10px; }
.material-remove-button {
  width: 28px; min-height: 28px; border: 0; border-radius: 6px; padding: 0; background: transparent; color: #8a999d;
}
.material-remove-button:hover { background: #fff0ef; color: var(--danger); }
.material-remove-button svg { width: 15px; height: 15px; }
.preview-toolbar { align-items: center; }
.preview-actions { display: flex; align-items: center; gap: 4px; }
.preview-actions > span { min-width: 38px; color: #53676d; font-size: 10px; text-align: center; }
.preview-search-control { margin: 10px 12px 0; }
.analysis-document-preview {
  height: 515px; overflow: auto; padding: 22px 24px 80px; color: #293f44;
  font-size: calc(14px * var(--preview-zoom, 1)); line-height: 1.85;
}
.analysis-document-segment {
  scroll-margin-top: 20px; margin: 0 0 18px; border-bottom: 1px solid #eef2f1; padding-bottom: 17px;
}
.analysis-document-segment:last-child { border-bottom: 0; }
.analysis-document-segment.highlighted {
  border-radius: 6px; padding: 10px; background: #fff8df; box-shadow: inset 3px 0 #d7a430;
}
.analysis-document-segment-label {
  display: block; margin-bottom: 5px; color: #0f766e; font-size: 10px; font-weight: 800;
}
.preview-search-hit { background: #ffe69b; color: inherit; }
.analysis-preview-empty { display: grid; height: 100%; place-content: center; text-align: center; }
.analysis-preview-empty svg { width: 34px; height: 34px; margin: 0 auto 10px; color: #8ba09d; }
.analysis-preview-empty strong { color: #29464c; }
.analysis-preview-empty p { max-width: 260px; margin: 6px auto 0; font-size: 12px; }

.analysis-result-column { display: flex; min-height: 0; flex-direction: column; }
.analysis-result-content { flex: 1; max-height: 510px; overflow: auto; padding: 16px 18px 88px; }
.analysis-result-section { margin-bottom: 18px; }
.analysis-result-section > h3 { margin-bottom: 8px; color: #183238; font-size: 13px; }
.analysis-result-section > p,
.analysis-result-section li { color: #536b70; font-size: 12px; line-height: 1.7; }
.analysis-result-section ul { margin: 0; padding-left: 18px; }
.analysis-summary-editor {
  width: 100%; min-height: 86px; resize: vertical; border: 1px solid #d8e2e0; border-radius: 7px;
  padding: 10px; color: #29464c; line-height: 1.65;
}
.analysis-conclusion-list { display: grid; gap: 9px; }
.analysis-conclusion { border: 1px solid #dfe8e6; border-radius: 8px; padding: 11px; background: #fff; }
.analysis-conclusion.is-selected { border-color: #9bc8c2; background: #f4faf8; }
.analysis-conclusion-head {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px;
}
.analysis-conclusion-head input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.analysis-conclusion-title,
.analysis-conclusion-content { width: 100%; border: 0; outline: 0; background: transparent; color: #183238; }
.analysis-conclusion-title { font-weight: 800; }
.analysis-conclusion-content {
  min-height: 62px; margin-top: 8px; resize: vertical; color: #53676d; line-height: 1.6;
}
.analysis-source-label {
  border-radius: 4px; padding: 3px 6px; background: #f0f2f1; color: #65777c; font-size: 9px; font-weight: 800;
}
.analysis-evidence-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.analysis-evidence-button {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; border: 1px solid #d7e2df;
  border-radius: 6px; padding: 0 8px; background: #fff; color: #426068; font-size: 10px;
}
.analysis-evidence-button.weak { border-color: #ead7ab; background: #fffaf0; color: #8d6723; }
.analysis-evidence-button svg { width: 13px; height: 13px; }
.analysis-result-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.analysis-task-banner {
  margin: 10px 14px 0; border-radius: 7px; padding: 10px 12px; background: #eef7f5; color: #2f5b58; font-size: 12px;
}
.analysis-task-banner.error { background: #fff0ef; color: var(--danger); }
.analysis-confirm-bar {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid #dfe8e6; padding: 11px 14px; background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 20px rgba(16, 24, 40, 0.05);
}
.analysis-confirm-bar > span { color: #53676d; font-size: 12px; }
.analysis-editor-dialog,
.analysis-versions-dialog { width: min(620px, calc(100vw - 32px)); }
.analysis-dialog-icon { background: #e8f5f2; color: #0f766e; }
.analysis-version-list { display: grid; gap: 8px; max-height: 520px; overflow: auto; }
.analysis-version-item {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px;
  width: 100%; min-height: 68px; border: 1px solid #dfe8e6; border-radius: 8px;
  padding: 10px 12px; background: #fff; color: #29464c; text-align: left;
}
.analysis-version-item:hover,
.analysis-version-item.active { border-color: #8fc1bb; background: #f2f9f7; }
.analysis-version-number {
  display: grid; width: 42px; height: 42px; place-items: center; border-radius: 7px;
  background: #e8f5f2; color: #0f766e; font-size: 12px; font-weight: 800;
}
.analysis-version-copy strong,
.analysis-version-copy small { display: block; }
.analysis-version-copy small { margin-top: 4px; color: #728287; font-size: 11px; }

@media (max-width: 1260px) {
  .analysis-list-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(138px, auto)) auto; }
  .analysis-list-toolbar .compact-select:nth-of-type(3) { display: none; }
  .analysis-table-head,
  .analysis-table-row {
    grid-template-columns: minmax(185px, 1.3fr) minmax(150px, 1fr) 72px 100px 92px 36px;
  }
  .analysis-table-head > :nth-child(6),
  .analysis-table-row > :nth-child(6) { display: none; }
  .analysis-workspace { grid-template-columns: 220px minmax(300px, 0.95fr) minmax(350px, 1.05fr); }
}

@media (max-width: 980px) {
  .analysis-list-toolbar { grid-template-columns: 1fr 1fr; }
  .analysis-search-control { grid-column: 1 / -1; }
  .analysis-table-head { display: none; }
  .analysis-table-row { grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) 94px 36px; }
  .analysis-table-row > :nth-child(3),
  .analysis-table-row > :nth-child(5),
  .analysis-table-row > :nth-child(6) { display: none; }
  .analysis-mobile-switch {
    display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 10px;
    border: 1px solid #d8e2e0; border-radius: 8px; padding: 3px; background: #f0f4f3;
  }
  .analysis-mobile-switch button {
    min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: #65777c; font-weight: 800;
  }
  .analysis-mobile-switch button.active {
    background: #fff; color: #0f766e; box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  }
  .analysis-workspace { display: block; min-height: 620px; }
  .analysis-column { display: none; min-height: 620px; border-right: 0; }
  .analysis-column.active { display: flex; flex-direction: column; }
  .analysis-material-list,
  .analysis-document-preview,
  .analysis-result-content { max-height: none; height: auto; min-height: 520px; }
}

@media (max-width: 720px) {
  .analysis-module-panel { padding-top: 14px; }
  .module-page-heading,
  .analysis-detail-heading { flex-direction: column; align-items: stretch; }
  .module-page-heading .primary-button { width: 100%; }
  .analysis-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-summary-strip > div:nth-child(2) { border-right: 0; }
  .analysis-summary-strip > div:nth-child(-n + 2) { border-bottom: 1px solid #e7edec; }
  .analysis-list-toolbar { grid-template-columns: 1fr; }
  .analysis-search-control { grid-column: auto; }
  .archive-toggle { min-height: 30px; }
  .analysis-table-row { grid-template-columns: minmax(0, 1fr) 98px 34px; gap: 8px; min-height: 76px; padding: 10px; }
  .analysis-table-row > :nth-child(2),
  .analysis-table-row > :nth-child(3),
  .analysis-table-row > :nth-child(5),
  .analysis-table-row > :nth-child(6) { display: none; }
  .analysis-detail-actions { width: 100%; }
  .analysis-detail-actions .secondary-button:not(.icon-button) { flex: 1; }
  .analysis-result-actions,
  .analysis-confirm-bar { align-items: stretch; flex-direction: column; }
  .analysis-confirm-bar .primary-button { width: 100%; }
}

/* Generated artifacts: one surface, one multi-page prototype, one PRD. */
.deliverables-module-panel { min-width: 0; padding-top: 18px; }
.deliverables-principle-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; border: 1px solid #cfe3df;
  border-left: 3px solid #13877d; border-radius: 8px; padding: 12px 14px; background: #f1f8f6; color: #315b5a;
}
.deliverables-principle-bar svg { width: 19px; height: 19px; flex: 0 0 auto; color: #13877d; }
.deliverables-principle-bar strong,
.deliverables-principle-bar span { display: block; }
.deliverables-principle-bar strong { color: #173b3d; font-size: 13px; }
.deliverables-principle-bar span { margin-top: 2px; color: #60777a; font-size: 11px; }
.deliverables-surface-list { overflow: hidden; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; }
.deliverables-surface-row {
  display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(170px, .9fr) minmax(120px, .65fr) minmax(120px, .65fr) minmax(250px, auto);
  align-items: center; gap: 14px; min-height: 92px; border-bottom: 1px solid #e8eeed; padding: 14px 16px;
}
.deliverables-surface-row:last-child { border-bottom: 0; }
.deliverables-surface-row:hover { background: #f9fbfb; }
.deliverables-surface-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.deliverable-surface-icon {
  display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 8px;
  background: #e8f5f2; color: #0f766e;
}
.deliverable-surface-icon svg { width: 19px; height: 19px; }
.deliverables-surface-identity strong,
.deliverables-surface-identity span,
.deliverable-source-summary span,
.deliverable-source-summary strong,
.deliverable-source-summary small,
.deliverable-kind-summary span,
.deliverable-kind-summary strong,
.deliverable-kind-summary small { display: block; }
.deliverables-surface-identity strong { overflow: hidden; color: #173238; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.deliverables-surface-identity span,
.deliverable-source-summary span,
.deliverable-kind-summary span { margin-top: 3px; color: #738388; font-size: 10px; }
.deliverable-source-summary strong,
.deliverable-kind-summary strong { margin-top: 4px; color: #28484d; font-size: 12px; }
.deliverable-source-summary small,
.deliverable-kind-summary small { margin-top: 3px; color: #8a999d; font-size: 10px; }
.basis-state.design_changed,
.basis-state.prototype_changed { color: #a16c17; }
.deliverables-row-actions,
.deliverable-heading-actions,
.prototype-preview-toolbar > div:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.deliverables-row-actions button { min-height: 34px; white-space: nowrap; }

.deliverable-detail-page { min-width: 0; }
.deliverable-detail-heading {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
  border-bottom: 1px solid #e0e8e7; padding: 5px 2px 18px;
}
.deliverable-detail-heading h2 { margin: 3px 0 0; color: #142f35; font-size: 24px; }
.deliverable-detail-heading p:last-child { margin: 5px 0 0; color: #6c7e82; font-size: 12px; }
.prototype-detail-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 650px; margin-top: 14px; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.deliverable-version-panel,
.prd-outline-panel { min-width: 0; border-right: 1px solid #e2e9e8; padding: 14px; background: #f8faf9; }
.deliverable-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 10px; }
.deliverable-panel-heading span { color: #60757a; font-size: 10px; font-weight: 800; }
.deliverable-panel-heading strong { color: #2d4a4f; font-size: 10px; }
.deliverable-version-list { display: grid; gap: 6px; }
.deliverable-version-list button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 56px;
  border: 1px solid transparent; border-radius: 7px; padding: 8px 9px; background: transparent; color: #2e4b50; text-align: left;
}
.deliverable-version-list button:hover,
.deliverable-version-list button.active { border-color: #b9d7d2; background: #eaf5f2; }
.deliverable-version-list span,
.deliverable-version-list strong,
.deliverable-version-list small { display: block; }
.deliverable-version-list strong { font-size: 12px; }
.deliverable-version-list small,
.deliverable-version-list time { margin-top: 3px; color: #77898d; font-size: 9px; }
.prototype-directory-block { margin: 16px 0; border-top: 1px solid #e2e9e8; padding-top: 13px; }
.prototype-directory-block > span { display: block; margin-bottom: 7px; color: #60757a; font-size: 10px; font-weight: 800; }
.prototype-directory-block nav { display: grid; gap: 3px; max-height: 230px; overflow: auto; }
.prototype-directory-block nav > span { display: flex; align-items: center; gap: 7px; min-height: 30px; border-radius: 6px; padding: 0 7px; color: #49656a; font-size: 11px; }
.prototype-directory-block nav svg { width: 14px; height: 14px; color: #16877e; }
.full-width-button { width: 100%; justify-content: center; }
.prototype-preview-panel { min-width: 0; background: #eef3f2; }
.prototype-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; border-bottom: 1px solid #dce6e4; padding: 9px 14px; background: #fff; }
.prototype-preview-toolbar span,
.prototype-preview-toolbar strong { display: block; }
.prototype-preview-toolbar span { color: #74868a; font-size: 10px; }
.prototype-preview-toolbar strong { margin-top: 3px; color: #29484d; font-size: 12px; }
.prototype-basis-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid #dce6e4; background: #fff; }
.prototype-basis-summary > div { border-right: 1px solid #e6eceb; padding: 9px 13px; }
.prototype-basis-summary > div:last-child { border-right: 0; }
.prototype-basis-summary dt { color: #7a898d; font-size: 9px; }
.prototype-basis-summary dd { margin: 3px 0 0; overflow: hidden; color: #315157; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.prototype-preview-panel iframe { display: block; width: 100%; height: 585px; border: 0; background: #fff; }
.prototype-preview-empty { display: grid; min-height: 520px; place-content: center; padding: 30px; color: #6f8387; text-align: center; }
.prototype-preview-empty svg { width: 36px; height: 36px; margin: 0 auto 10px; color: #86a6a2; }
.prototype-preview-empty strong { color: #28474c; }
.prototype-preview-empty p { max-width: 320px; margin: 7px auto 0; font-size: 11px; }

.prd-workspace-layout { display: grid; grid-template-columns: 220px minmax(360px, 1fr) 230px; min-height: 650px; margin-top: 14px; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.prd-outline-list { display: grid; gap: 2px; }
.prd-outline-list button {
  display: flex; align-items: center; gap: 7px; min-height: 34px; border: 0; border-radius: 6px;
  padding: 0 8px 0 calc(8px + (var(--outline-level, 1) - 1) * 12px); background: transparent; color: #526b70; font-size: 11px; text-align: left;
}
.prd-outline-list button:hover,
.prd-outline-list button.active { background: #e8f4f1; color: #0f766e; }
.prd-outline-list svg { width: 14px; height: 14px; flex: 0 0 auto; }
.prd-version-history { display: grid; gap: 7px; margin-top: 18px; border-top: 1px solid #e1e9e7; padding-top: 12px; }
.prd-version-history > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.prd-version-history span,
.prd-version-history strong,
.prd-version-history small { display: block; }
.prd-version-history strong { color: #315157; font-size: 11px; }
.prd-version-history small { margin-top: 2px; color: #819095; font-size: 9px; }
.prd-version-history button { min-height: 28px; padding: 0 4px; font-size: 9px; }
.prd-version-history .prd-history-heading {
  margin: 5px 0 0;
  color: #708388;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}
.prd-editor-panel { display: grid; grid-template-rows: minmax(430px, 1fr) auto; min-width: 0; }
.prd-section-editor,
.prd-sync-notes { display: flex; min-height: 0; flex-direction: column; margin: 0; }
.prd-section-editor > span,
.prd-sync-notes > span { border-bottom: 1px solid #e3eae9; padding: 13px 16px; color: #29484d; font-size: 12px; font-weight: 800; }
.prd-section-editor textarea,
.prd-sync-notes textarea { width: 100%; flex: 1; resize: none; border: 0; outline: 0; padding: 20px; background: #fff; color: #2c454a; font: 13px/1.8 inherit; }
.prd-section-editor textarea:disabled,
.prd-sync-notes textarea:disabled { color: #43595e; opacity: 1; }
.prd-sync-notes { min-height: 150px; border-top: 1px solid #e3eae9; }
.prd-sync-notes textarea { min-height: 110px; padding-top: 13px; background: #fbfcfc; font-size: 11px; }
.prd-context-panel { border-left: 1px solid #e2e9e8; padding: 14px; background: #fbfcfc; }
.prd-context-panel dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; margin: 4px 0 14px; }
.prd-context-panel dt { color: #829095; font-size: 10px; }
.prd-context-panel dd { margin: 0; color: #315157; font-size: 10px; font-weight: 800; text-align: right; }
.prd-context-panel p { margin: 0; border-top: 1px solid #e4eae9; padding-top: 12px; color: #75868a; font-size: 10px; line-height: 1.6; }
.autosave-indicator { color: #73868a; font-size: 10px; white-space: nowrap; }
.manual-change-pages { margin: 0; border: 1px solid #dce5e3; border-radius: 8px; padding: 10px 12px; }
.manual-change-pages legend { padding: 0 4px; color: #516a70; font-size: 11px; font-weight: 800; }
.manual-change-pages > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 150px; overflow: auto; }
.checkbox-row { display: flex !important; align-items: center; gap: 8px; min-height: 32px; margin: 0; }
.checkbox-row input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #0f766e; }
.checkbox-row span { color: #496167; font-size: 11px; }

@media (max-width: 1180px) {
  .deliverables-surface-row { grid-template-columns: minmax(210px, 1.2fr) minmax(150px, .9fr) minmax(110px, .6fr) minmax(220px, auto); }
  .deliverables-surface-row > :nth-child(4) { display: none; }
  .prd-workspace-layout { grid-template-columns: 210px minmax(340px, 1fr); }
  .prd-context-panel { display: none; }
}

@media (max-width: 860px) {
  .deliverables-surface-row { grid-template-columns: minmax(180px, 1fr) minmax(110px, .6fr); }
  .deliverables-surface-row > :nth-child(2),
  .deliverables-surface-row > :nth-child(4) { display: none; }
  .deliverables-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .deliverable-detail-heading { grid-template-columns: 1fr; align-items: stretch; }
  .deliverable-heading-actions { justify-content: flex-start; }
  .prototype-detail-layout,
  .prd-workspace-layout { display: block; }
  .deliverable-version-panel,
  .prd-outline-panel { border-right: 0; border-bottom: 1px solid #e2e9e8; }
  .deliverable-version-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .prototype-directory-block nav { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); max-height: none; }
}

@media (max-width: 620px) {
  .deliverables-surface-row { grid-template-columns: 1fr; padding: 13px; }
  .deliverables-surface-row > :nth-child(2),
  .deliverables-surface-row > :nth-child(3),
  .deliverables-surface-row > :nth-child(4) { display: none; }
  .deliverables-row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliverables-row-actions button { width: 100%; }
  .prototype-preview-toolbar { align-items: stretch; flex-direction: column; }
  .prototype-preview-toolbar > div:last-child { display: grid; grid-template-columns: repeat(3, 1fr); }
  .prototype-preview-toolbar button { justify-content: center; }
  .prototype-basis-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prototype-basis-summary > div:nth-child(2) { border-right: 0; }
  .prototype-basis-summary > div:nth-child(-n + 2) { border-bottom: 1px solid #e6eceb; }
  .deliverable-heading-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliverable-heading-actions .autosave-indicator { grid-column: 1 / -1; }
  .deliverable-heading-actions button { width: 100%; justify-content: center; }
  .manual-change-pages > div { grid-template-columns: 1fr; }
}

/* Review center: immutable artifact review, focused comments, explicit actions. */
.review-center-panel { min-width: 0; padding-top: 18px; }
.review-guidance-bar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin-bottom: 14px; border: 1px solid #cfe3df; border-left: 3px solid #13877d; border-radius: 8px;
  padding: 12px 14px; background: #f1f8f6; color: #315b5a;
}
.review-guidance-bar svg { width: 19px; height: 19px; color: #13877d; }
.review-guidance-bar strong,
.review-guidance-bar span { display: block; }
.review-guidance-bar strong { color: #173b3d; font-size: 13px; }
.review-guidance-bar span { margin-top: 2px; color: #60777a; font-size: 11px; }
.review-list-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 160px 180px; gap: 9px; margin-bottom: 10px; }
.review-list-toolbar .search-field {
  display: flex; min-width: 0; min-height: 38px; align-items: center; gap: 8px; margin: 0;
  border: 1px solid #d6e1df; border-radius: 7px; padding: 0 11px; background: #fff;
}
.review-list-toolbar .search-field:focus-within { border-color: #16877e; box-shadow: 0 0 0 3px rgba(22, 135, 126, .1); }
.review-list-toolbar .search-field svg { width: 15px; height: 15px; flex: 0 0 auto; color: #70868a; }
.review-list-toolbar .search-field input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 0; background: transparent; color: #29484d; font: inherit; }
.review-list-toolbar .search-field input::placeholder { color: #8a999c; }
.review-list-toolbar select { min-height: 38px; border: 1px solid #d6e1df; border-radius: 7px; padding: 0 10px; background: #fff; color: #3e595e; }
.review-table { overflow: hidden; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; }
.review-table-head,
.review-table-row {
  display: grid; grid-template-columns: minmax(230px, 1.3fr) minmax(160px, .9fr) 105px 105px 135px 32px;
  align-items: center; gap: 14px; padding: 0 16px;
}
.review-table-head { min-height: 40px; border-bottom: 1px solid #dfe8e6; background: #f6f9f8; color: #75878b; font-size: 10px; font-weight: 800; }
.review-table-row { min-height: 82px; border-bottom: 1px solid #e7edec; color: #415b60; cursor: pointer; }
.review-table-row:last-child { border-bottom: 0; }
.review-table-row:hover { background: #f8fbfa; }
.review-table-row strong,
.review-table-row span,
.review-table-row small { display: block; }
.review-table-row strong { color: #17353b; font-size: 13px; }
.review-table-row span { margin-top: 4px; color: #667b80; font-size: 11px; }
.review-table-row small { margin-top: 3px; color: #879599; font-size: 9px; }
.review-status-pill {
  display: inline-flex !important; width: fit-content; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 9px;
  background: #edf2f3; color: #556b70 !important; font-size: 10px !important; font-weight: 800;
}
.review-status-pill.pending_review { background: #eef3f8; color: #49677d !important; }
.review-status-pill.in_review { background: #e7f5f2; color: #08786b !important; }
.review-status-pill.changes_requested { background: #fff1dc; color: #9b6413 !important; }
.review-status-pill.approved { background: #e8f6ea; color: #287440 !important; }
.review-status-pill.cancelled { background: #f2f2f2; color: #777 !important; }
.review-detail-heading {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
  border-bottom: 1px solid #e0e8e7; padding: 5px 2px 18px;
}
.review-detail-heading h2 { margin: 3px 0 0; color: #142f35; font-size: 24px; }
.review-detail-heading p { margin: 5px 0 0; color: #6c7e82; font-size: 12px; }
.review-detail-kicker { display: flex; align-items: center; gap: 8px; color: #728489; font-size: 10px; }
.review-detail-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.review-workspace {
  display: grid; grid-template-columns: 210px minmax(420px, 1fr) 320px; min-height: 650px;
  margin-top: 14px; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden;
}
.review-directory-panel { min-width: 0; border-right: 1px solid #e2e9e8; padding: 14px; background: #f8faf9; }
.review-artifact-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; border-radius: 7px; padding: 3px; background: #e9efee; }
.review-artifact-switch button { display: flex; min-height: 34px; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 5px; background: transparent; color: #65787c; font-size: 11px; }
.review-artifact-switch button.active { background: #fff; color: #0f766e; box-shadow: 0 1px 4px rgba(31,59,64,.09); font-weight: 800; }
.review-artifact-switch svg { width: 14px; height: 14px; }
.review-version-lock { display: flex; align-items: center; gap: 7px; margin: 12px 0; border-bottom: 1px solid #e2e9e8; padding: 0 3px 12px; color: #718388; font-size: 10px; }
.review-version-lock svg { width: 13px; height: 13px; color: #0f766e; }
#reviewArtifactDirectory { display: grid; gap: 3px; max-height: 520px; overflow: auto; }
#reviewArtifactDirectory button {
  display: flex; width: 100%; min-height: 34px; align-items: center; gap: 7px; border: 0; border-radius: 6px;
  padding: 0 8px; background: transparent; color: #526b70; font-size: 11px; text-align: left;
}
#reviewArtifactDirectory button:hover,
#reviewArtifactDirectory button.active { background: #e8f4f1; color: #0f766e; font-weight: 800; }
.review-artifact-panel { min-width: 0; background: #eef3f2; }
.review-artifact-toolbar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #dce6e4; padding: 8px 14px; background: #fff; }
.review-artifact-toolbar span,
.review-artifact-toolbar strong { display: block; }
.review-artifact-toolbar span { color: #75868a; font-size: 9px; }
.review-artifact-toolbar strong { margin-top: 2px; color: #29484d; font-size: 12px; }
#reviewPrototypeFrame { display: block; width: 100%; height: 590px; border: 0; background: #fff; }
.review-artifact-empty { display: grid; min-height: 590px; place-content: center; padding: 30px; color: #718489; text-align: center; }
.review-artifact-empty svg { width: 34px; height: 34px; margin: 0 auto 9px; color: #87a7a2; }
.review-artifact-empty p { max-width: 300px; margin: 6px auto 0; font-size: 11px; }
.review-prd-document { height: 590px; overflow: auto; padding: 32px 42px; background: #fff; }
.review-prd-document section { margin: 0 0 28px; }
.review-prd-document h2 { border-bottom: 1px solid #e1e8e7; padding-bottom: 8px; font-size: 20px; }
.review-prd-document h3 { font-size: 16px; }
.review-prd-document h4 { font-size: 13px; }
.review-prd-document p { color: #435c61; font-size: 12px; line-height: 1.8; }
.review-comment-panel { display: grid; grid-template-rows: auto minmax(160px, 1fr) auto; min-width: 0; border-left: 1px solid #e2e9e8; background: #fff; }
.review-side-heading { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 9px; border-bottom: 1px solid #e3eae9; padding: 10px 14px; }
.review-side-heading span,
.review-side-heading strong { display: block; }
.review-side-heading span { color: #5d7378; font-size: 10px; font-weight: 800; }
.review-side-heading strong { margin-top: 2px; color: #29484d; font-size: 11px; }
.review-comment-list { overflow: auto; padding: 5px 14px; }
.review-comment-card { border-bottom: 1px solid #e7edec; padding: 12px 0; }
.review-comment-card:last-child { border-bottom: 0; }
.review-comment-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #809094; font-size: 9px; }
.review-comment-card p { margin: 7px 0; color: #365158; font-size: 11px; line-height: 1.65; }
.review-comment-location { display: inline-flex; align-items: center; gap: 4px; color: #0f766e; font-size: 9px; }
.review-comment-controls { display: flex; gap: 7px; flex-wrap: wrap; }
.review-comment-controls button { min-height: 26px; padding: 0 4px; font-size: 9px; }
.review-comment-reply { margin: 8px 0 0 14px; border-left: 2px solid #d9e6e3; padding-left: 10px; }
.review-comment-composer { border-top: 1px solid #e0e8e7; padding: 12px 14px; background: #fafcfc; }
.review-comment-composer label { margin: 0; }
.review-comment-composer label span { color: #60757a; font-size: 9px; }
.review-comment-composer textarea { min-height: 88px; resize: vertical; font-size: 11px; }
.review-comment-composer .primary-button { width: 100%; justify-content: center; }
.review-actions-section { margin-top: 14px; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.review-action-list { display: grid; }
.review-action-row { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 120px auto; align-items: center; gap: 12px; min-height: 64px; border-bottom: 1px solid #e7edec; padding: 10px 14px; }
.review-action-row:last-child { border-bottom: 0; }
.review-action-row strong,
.review-action-row span,
.review-action-row small { display: block; }
.review-action-row strong { color: #244248; font-size: 12px; }
.review-action-row span { margin-top: 3px; color: #73858a; font-size: 9px; }
.review-action-row small { color: #5b7277; font-size: 10px; }
.review-result-page > .text-button { margin-bottom: 12px; }
.review-result-hero { display: flex; align-items: center; gap: 18px; border: 1px solid #cfe4dc; border-radius: 8px; padding: 24px; background: #f2f9f6; }
.review-result-icon { display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #0f766e; color: #fff; }
.review-result-icon.changes_requested { background: #b67a20; }
.review-result-icon.cancelled { background: #738288; }
.review-result-icon svg { width: 25px; height: 25px; }
.review-result-hero h2 { margin: 3px 0 4px; color: #17383d; font-size: 25px; }
.review-result-hero p:last-child { margin: 0; color: #597177; }
.review-result-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.review-result-facts > div { border-right: 1px solid #e5ecea; padding: 13px 15px; }
.review-result-facts > div:last-child { border-right: 0; }
.review-result-facts dt { color: #809095; font-size: 9px; }
.review-result-facts dd { margin: 4px 0 0; color: #29484d; font-size: 12px; font-weight: 800; }
.review-result-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.review-result-grid > section { border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.review-event-list { max-height: 430px; overflow: auto; }
.review-event-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #e8eeed; padding: 10px 14px; }
.review-event-row:last-child { border-bottom: 0; }
.review-event-row svg { width: 14px; height: 14px; color: #16877e; }
.review-event-row strong { display: block; color: #315157; font-size: 10px; }
.review-event-row small { display: block; margin-top: 2px; color: #809095; font-size: 9px; }
.review-submit-basis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.review-submit-basis > div { border: 1px solid #dce6e4; border-radius: 7px; padding: 10px 12px; background: #f8faf9; }
.review-submit-basis span,
.review-submit-basis strong { display: block; }
.review-submit-basis span { color: #718489; font-size: 9px; }
.review-submit-basis strong { margin-top: 3px; color: #29484d; font-size: 11px; }
.review-share-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.review-share-result input { min-width: 0; }

@media (max-width: 1180px) {
  .review-workspace { grid-template-columns: 200px minmax(360px, 1fr); }
  .review-comment-panel { grid-column: 1 / -1; min-height: 360px; border-top: 1px solid #e2e9e8; border-left: 0; }
  .review-comment-list { max-height: 320px; }
  .review-table-head,
  .review-table-row { grid-template-columns: minmax(220px, 1.2fr) minmax(145px, .8fr) 105px 95px 32px; }
  .review-table-head > :nth-child(5),
  .review-table-row > :nth-child(5) { display: none; }
}
@media (max-width: 820px) {
  .review-list-toolbar { grid-template-columns: 1fr 1fr; }
  .review-list-toolbar .search-field { grid-column: 1 / -1; }
  .review-table-head { display: none; }
  .review-table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .review-table-row > :nth-child(2),
  .review-table-row > :nth-child(4),
  .review-table-row > :nth-child(5) { display: none; }
  .review-detail-heading { grid-template-columns: 1fr; align-items: stretch; }
  .review-detail-actions { justify-content: flex-start; }
  .review-workspace { display: block; }
  .review-directory-panel { border-right: 0; border-bottom: 1px solid #e2e9e8; }
  #reviewArtifactDirectory { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); max-height: none; }
  .review-comment-panel { min-height: 380px; }
  .review-action-row { grid-template-columns: minmax(0, 1fr) auto; }
  .review-action-row > :nth-child(2),
  .review-action-row > :nth-child(3) { display: none; }
  .review-result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .review-guidance-bar { grid-template-columns: auto minmax(0, 1fr); }
  .review-guidance-bar button { grid-column: 1 / -1; justify-self: start; }
  .review-list-toolbar { grid-template-columns: 1fr; }
  .review-list-toolbar .search-field { grid-column: auto; }
  .review-detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-detail-actions button { width: 100%; justify-content: center; }
  .review-prd-document { padding: 24px 20px; }
  .review-result-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-result-facts > div:nth-child(2) { border-right: 0; }
  .review-result-facts > div:nth-child(-n + 2) { border-bottom: 1px solid #e5ecea; }
  .review-submit-basis { grid-template-columns: 1fr; }
}

/* Project version management */
.version-management-panel { min-width: 0; padding-top: 18px; }
.version-page-heading { align-items: flex-end; }
.version-principle-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; border: 1px solid #cfe4dc; border-left: 4px solid #16877e; border-radius: 8px; padding: 13px 16px; background: #f2f9f6; color: #315157; }
.version-principle-bar > svg { width: 20px; height: 20px; color: #0f766e; }
.version-principle-bar strong,
.version-principle-bar span { display: block; }
.version-principle-bar strong { font-size: 12px; }
.version-principle-bar span { margin-top: 3px; color: #6e8185; font-size: 10px; }
.version-current-band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-top: 14px; border: 1px solid #dce6e4; border-radius: 8px; padding: 18px; background: #fff; box-shadow: 0 8px 22px rgba(21, 58, 57, .05); }
.version-current-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 8px; background: #0f766e; color: #fff; }
.version-current-mark.empty { background: #e9f2f0; color: #4e6c70; }
.version-current-mark svg { width: 22px; height: 22px; }
.version-current-band > div:nth-child(2) > span { color: #16877e; font-size: 9px; font-weight: 800; }
.version-current-band h3 { margin: 4px 0; color: #17383d; font-size: 18px; }
.version-current-band p { margin: 0; color: #718489; font-size: 10px; }
.version-current-band dl { display: grid; grid-template-columns: repeat(3, minmax(82px, 1fr)); margin: 0; }
.version-current-band dl div { border-left: 1px solid #e5ecea; padding: 2px 16px; }
.version-current-band dt { color: #809095; font-size: 9px; }
.version-current-band dd { margin: 4px 0 0; color: #29484d; font-size: 12px; font-weight: 800; }
.version-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 20px 0 8px; }
.version-list-toolbar > div:first-child span,
.version-list-toolbar > div:first-child strong { display: block; }
.version-list-toolbar > div:first-child span { color: #789096; font-size: 9px; }
.version-list-toolbar > div:first-child strong { margin-top: 3px; color: #244248; font-size: 13px; }
.version-compare-controls { display: flex; align-items: center; gap: 7px; }
.version-compare-controls select { min-width: 170px; border: 1px solid #d5e1df; border-radius: 7px; padding: 8px 28px 8px 10px; background: #fff; color: #315157; font-size: 10px; }
.version-compare-controls > svg { width: 14px; height: 14px; color: #7c8f93; }
.version-table { border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.version-table-head,
.version-table-row { display: grid; grid-template-columns: minmax(230px, 1.35fr) minmax(130px, .75fr) minmax(120px, .7fr) 115px 145px 24px; align-items: center; gap: 12px; padding: 0 16px; }
.version-table-head { min-height: 38px; border-bottom: 1px solid #dce6e4; background: #f6f9f8; color: #768a8e; font-size: 9px; font-weight: 700; }
.version-table-row { min-height: 74px; border-bottom: 1px solid #e7edec; transition: background .18s ease; }
.version-table-row:last-child { border-bottom: 0; }
.version-table-row:hover { background: #f8fbfa; }
.version-table-row.draft { box-shadow: inset 3px 0 #d08a3a; }
.version-table-row > div strong,
.version-table-row > div span { display: block; }
.version-table-row > div strong { color: #244248; font-size: 11px; }
.version-table-row > div span { margin-top: 4px; color: #76898e; font-size: 9px; }
.version-table-row > svg { width: 16px; height: 16px; color: #829397; }
.version-status-pill { display: inline-flex !important; width: fit-content; align-items: center; border-radius: 999px; padding: 4px 8px; background: #eef2f2; color: #5e7176 !important; font-size: 9px !important; font-weight: 800; }
.version-status-pill.confirmed { background: #e5f5ef; color: #0f766e !important; }
.version-status-pill.draft { background: #fff4df; color: #9a6319 !important; }
.version-status-pill.archived { background: #eef1f5; color: #667085 !important; }
.version-workspace-page { padding-top: 2px; }
.version-detail-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 18px; border-bottom: 1px solid #dce6e4; padding: 4px 2px 18px; }
.version-detail-heading > div h2 { margin: 5px 0; color: #17383d; font-size: 24px; }
.version-detail-heading > div p:last-child { margin: 0; color: #718489; font-size: 10px; }
.version-detail-kicker { display: flex; align-items: center; gap: 8px; color: #74878b; font-size: 9px; }
.version-stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; padding: 0; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; list-style: none; overflow: hidden; }
.version-stepper li { display: flex; align-items: center; gap: 10px; border-right: 1px solid #e4ebea; padding: 12px 16px; }
.version-stepper li:last-child { border-right: 0; }
.version-stepper li > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #e7f4f1; color: #0f766e; font-size: 10px; font-weight: 800; }
.version-stepper strong,
.version-stepper small { display: block; }
.version-stepper strong { color: #315157; font-size: 10px; }
.version-stepper small { margin-top: 2px; color: #869599; font-size: 8px; }
.version-draft-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 14px; }
.version-draft-main { display: grid; gap: 14px; }
.version-section { border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.version-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e5ecea; padding: 12px 16px; }
.version-section-heading span { color: #16877e; font-size: 9px; font-weight: 800; }
.version-section-heading h3 { margin: 3px 0 0; color: #29484d; font-size: 13px; }
.version-section-heading small { color: #809095; font-size: 9px; }
.version-basic-fields { display: grid; grid-template-columns: 150px minmax(220px, 1fr); gap: 12px; padding: 16px; }
.version-basic-fields label { display: grid; gap: 6px; color: #587076; font-size: 9px; }
.version-basic-fields .wide-field { grid-column: 1 / -1; }
.version-basic-fields input,
.version-basic-fields textarea { width: 100%; border: 1px solid #d7e2e0; border-radius: 7px; padding: 9px 11px; background: #fff; color: #213f45; font-size: 11px; resize: vertical; }
.version-basic-fields input:focus,
.version-basic-fields textarea:focus,
.version-surface-row select:focus,
.version-compare-controls select:focus { outline: 2px solid rgba(15, 118, 110, .2); outline-offset: 1px; border-color: #16877e; }
.version-surface-head,
.version-surface-row { display: grid; grid-template-columns: minmax(165px, 1fr) 135px minmax(210px, 1.15fr) minmax(170px, .9fr); align-items: center; gap: 12px; padding: 0 16px; }
.version-surface-head { min-height: 34px; background: #f7faf9; color: #809095; font-size: 9px; }
.version-surface-row { min-height: 72px; border-top: 1px solid #e8eeed; }
.version-surface-row > div:first-child { display: flex; align-items: center; gap: 9px; }
.version-surface-row strong,
.version-surface-row small { display: block; }
.version-surface-row strong { color: #29484d; font-size: 10px; }
.version-surface-row small { margin-top: 3px; color: #829397; font-size: 9px; }
.version-surface-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #e8f5f2; color: #0f766e; }
.version-surface-icon svg { width: 15px; height: 15px; }
.version-surface-row select { min-width: 0; width: 100%; border: 1px solid #d7e2e0; border-radius: 7px; padding: 8px 9px; background: #fff; color: #315157; font-size: 9px; }
.version-surface-basis { display: flex; align-items: center; gap: 7px; color: #667c81; font-size: 9px; }
.version-surface-basis svg { width: 14px; height: 14px; color: #16877e; }
.version-difference-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid #e5ecea; background: #fbfcfc; }
.version-difference-summary > div { border-right: 1px solid #e7edec; padding: 11px 14px; }
.version-difference-summary > div:last-child { border-right: 0; }
.version-difference-summary span,
.version-difference-summary strong { display: block; }
.version-difference-summary span { color: #7c8f93; font-size: 8px; }
.version-difference-summary strong { margin-top: 3px; color: #315157; font-size: 14px; }
.version-difference-summary .added strong { color: #0f766e; }
.version-difference-summary .modified strong { color: #a56a1a; }
.version-difference-summary .removed strong { color: #b54745; }
.version-difference-list { max-height: 430px; overflow: auto; }
.version-difference-row { display: grid; grid-template-columns: 48px minmax(150px, .8fr) minmax(200px, 1.2fr); align-items: center; gap: 10px; border-bottom: 1px solid #e8eeed; padding: 10px 16px; }
.version-difference-row:last-child { border-bottom: 0; }
.version-difference-row strong,
.version-difference-row span { display: block; }
.version-difference-row strong { color: #315157; font-size: 10px; }
.version-difference-row div span { margin-top: 2px; color: #859599; font-size: 8px; }
.version-difference-row p { margin: 0; color: #677c81; font-size: 9px; }
.version-change-badge { display: inline-flex !important; width: fit-content; border-radius: 4px; padding: 3px 6px; background: #eef2f2; color: #667c81; font-size: 8px; font-weight: 800; }
.version-change-badge.added { background: #e5f5ef; color: #0f766e; }
.version-change-badge.modified { background: #fff4df; color: #9a6319; }
.version-change-badge.removed { background: #fbeceb; color: #a63f3d; }
.version-change-badge.moved { background: #e9eff8; color: #3f5f91; }
.version-ai-panel { position: sticky; top: 14px; border: 1px solid #cfe4dc; border-radius: 8px; background: #f7fbf9; overflow: hidden; }
.version-ai-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #dbe9e4; padding: 12px 14px; }
.version-ai-heading > span { display: flex; align-items: center; gap: 7px; color: #245157; font-size: 11px; font-weight: 800; }
.version-ai-heading svg { width: 15px; height: 15px; color: #0f766e; }
.version-ai-empty { display: grid; min-height: 230px; place-items: center; align-content: center; padding: 24px; text-align: center; }
.version-ai-empty svg { width: 24px; height: 24px; color: #16877e; }
.version-ai-empty strong { margin-top: 10px; color: #315157; font-size: 11px; }
.version-ai-empty p { max-width: 245px; margin: 6px 0 0; color: #789095; font-size: 9px; line-height: 1.65; }
.version-ai-summary-copy { display: grid; gap: 12px; max-height: 500px; padding: 15px; overflow: auto; }
.version-ai-summary-copy > strong { color: #29484d; font-size: 11px; line-height: 1.6; }
.version-ai-summary-copy section > span { color: #16877e; font-size: 8px; font-weight: 800; }
.version-ai-summary-copy section p { margin: 5px 0 0; color: #5f7479; font-size: 9px; line-height: 1.55; }
.version-ai-summary-copy small { color: #8a999c; font-size: 8px; }
.version-draft-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid #dbe9e4; padding: 12px; background: #fff; }
.version-draft-actions .form-error { grid-column: 1 / -1; margin: 0; }
.version-detail-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; border: 1px solid #dce6e4; border-radius: 8px; background: #fff; overflow: hidden; }
.version-detail-facts > div { border-right: 1px solid #e5ecea; padding: 13px 16px; }
.version-detail-facts > div:last-child { border-right: 0; }
.version-detail-facts span,
.version-detail-facts strong { display: block; }
.version-detail-facts span { color: #809095; font-size: 9px; }
.version-detail-facts strong { margin-top: 4px; color: #29484d; font-size: 15px; }
.version-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.version-baseline-row { display: grid; grid-template-columns: minmax(170px, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid #e7edec; padding: 12px 16px; }
.version-baseline-row:last-child { border-bottom: 0; }
.version-baseline-row > div { display: flex; align-items: center; gap: 9px; }
.version-baseline-row strong,
.version-baseline-row small { display: block; }
.version-baseline-row strong { color: #29484d; font-size: 10px; }
.version-baseline-row small { margin-top: 3px; color: #829397; font-size: 8px; }
.version-baseline-row dl { display: grid; grid-template-columns: repeat(4, minmax(55px, 1fr)); margin: 0; }
.version-baseline-row dl div { border-left: 1px solid #e5ecea; padding: 0 10px; }
.version-baseline-row dt { color: #829397; font-size: 8px; }
.version-baseline-row dd { margin: 3px 0 0; color: #315157; font-size: 9px; font-weight: 800; }
.version-detail-ai { margin-top: 14px; }
.version-detail-ai .version-ai-summary-copy { grid-template-columns: 1.2fr repeat(3, 1fr); max-height: none; }
.version-empty-inline { display: grid; min-height: 100px; place-items: center; align-content: center; gap: 4px; padding: 20px; color: #7c8f93; text-align: center; }
.version-empty-inline strong { color: #4d666b; font-size: 11px; }
.version-empty-inline span { font-size: 9px; }

@media (max-width: 1180px) {
  .version-draft-layout { grid-template-columns: 1fr; }
  .version-ai-panel { position: static; }
  .version-detail-grid { grid-template-columns: 1fr; }
  .version-table-head,
  .version-table-row { grid-template-columns: minmax(220px, 1.3fr) minmax(120px, .7fr) 105px 135px 24px; }
  .version-table-head > :nth-child(3),
  .version-table-row > :nth-child(3) { display: none; }
}
@media (max-width: 820px) {
  .version-current-band { grid-template-columns: auto minmax(0, 1fr); }
  .version-current-band dl { grid-column: 1 / -1; }
  .version-list-toolbar { align-items: stretch; flex-direction: column; }
  .version-compare-controls { display: grid; grid-template-columns: 1fr auto 1fr; }
  .version-compare-controls button { grid-column: 1 / -1; justify-content: center; }
  .version-table-head { display: none; }
  .version-table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .version-table-row > :nth-child(2),
  .version-table-row > :nth-child(3),
  .version-table-row > :nth-child(5) { display: none; }
  .version-detail-heading { grid-template-columns: 1fr; }
  .version-stepper small { display: none; }
  .version-surface-head { display: none; }
  .version-surface-row { grid-template-columns: 1fr 1fr; padding: 12px; }
  .version-surface-basis { grid-column: 1 / -1; }
  .version-detail-ai .version-ai-summary-copy { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .version-current-band dl,
  .version-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .version-current-band dl div:nth-child(3),
  .version-detail-facts > div:nth-child(2) { border-right: 0; }
  .version-basic-fields,
  .version-surface-row,
  .version-detail-ai .version-ai-summary-copy { grid-template-columns: 1fr; }
  .version-basic-fields .wide-field,
  .version-surface-basis { grid-column: auto; }
  .version-stepper li { padding: 10px; }
  .version-stepper li > div { display: none; }
  .version-stepper li { justify-content: center; }
  .version-difference-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .version-difference-summary > div:nth-child(3) { border-right: 0; }
  .version-difference-row { grid-template-columns: 44px minmax(0, 1fr); }
  .version-difference-row p { grid-column: 1 / -1; }
  .version-baseline-row { grid-template-columns: 1fr; }
}

/* Project settings: one project identity, one explicit save boundary. */
.project-settings-panel {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding-top: 18px;
}
.project-settings-heading { align-items: center; }
.project-settings-stack { display: grid; gap: 14px; }
.project-settings-section {
  overflow: hidden;
  border: 1px solid #dce6e4;
  border-radius: 8px;
  background: #fff;
}
.project-settings-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #e6edeb;
  padding: 18px 20px;
  background: #f8faf9;
}
.project-settings-section-heading h3 { margin: 0; color: #18383d; font-size: 15px; }
.project-settings-section-heading p { margin: 5px 0 0; color: #718388; font-size: 12px; line-height: 1.55; }
.settings-section-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: #e8f5f2;
  color: #0f766e;
}
.settings-section-icon svg { width: 17px; height: 17px; }
.settings-section-icon.status-icon { background: #eef3f7; color: #47677b; }
.settings-section-icon.danger-icon { background: #fff0ee; color: #b54745; }
.project-settings-body { padding: 22px 20px 18px; }
.project-settings-icon-editor {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e7edec;
  padding-bottom: 20px;
}
.project-settings-icon-preview {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #cfe1dd;
  border-radius: 8px;
  background: #eaf6f2;
  color: #0f766e;
  font-size: 26px;
  font-weight: 900;
}
.project-settings-icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.project-settings-icon-editor strong { color: #25474c; font-size: 13px; }
.project-settings-icon-editor p { margin: 5px 0 10px; color: #7b8d91; font-size: 11px; }
.upload-button.is-disabled { pointer-events: none; opacity: .48; }
.project-settings-fields { display: grid; gap: 16px; padding-top: 20px; }
.project-settings-fields input,
.project-settings-fields textarea,
.project-delete-dialog input {
  width: 100%;
  border: 1px solid #d5e0de;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: #19393e;
  outline: none;
}
.project-settings-fields input:focus,
.project-settings-fields textarea:focus,
.project-delete-dialog input:focus {
  border-color: #4c9a92;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.project-settings-fields :disabled { background: #f3f6f5; color: #718388; }
.project-settings-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0 0;
  border-top: 1px solid #e7edec;
  padding-top: 16px;
}
.project-settings-metadata div + div { border-left: 1px solid #e7edec; padding-left: 20px; }
.project-settings-metadata dt { color: #819095; font-size: 10px; }
.project-settings-metadata dd { margin: 5px 0 0; color: #3c5960; font-size: 12px; font-weight: 800; }
.project-settings-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #e4ecea;
  padding: 14px 20px;
  background: #fafcfb;
}
.project-settings-form-actions > span { color: #718388; font-size: 11px; }
.project-settings-form-actions > div { display: flex; gap: 8px; }
.project-settings-status-row,
.project-settings-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
}
.project-settings-status-row > div { display: flex; align-items: center; gap: 12px; }
.project-settings-status-row strong,
.project-settings-danger-row strong { color: #25474c; font-size: 13px; }
.project-settings-status-row p,
.project-settings-danger-row p { margin: 4px 0 0; color: #77898d; font-size: 11px; line-height: 1.55; }
.project-status-indicator { width: 9px; height: 9px; border-radius: 50%; background: #1f9b73; box-shadow: 0 0 0 5px #e9f7f1; }
.project-status-indicator.archived { background: #8a979b; box-shadow: 0 0 0 5px #eef2f2; }
.project-settings-danger { border-color: #efd8d5; }
.project-settings-danger .project-settings-section-heading { border-color: #f1ddda; background: #fffafa; }
.project-settings-archived-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #d8e2e0;
  border-left: 3px solid #718388;
  border-radius: 8px;
  padding: 13px 15px;
  background: #f5f7f7;
}
.project-settings-archived-notice svg { width: 19px; height: 19px; color: #60757a; }
.project-settings-archived-notice strong,
.project-settings-archived-notice span { display: block; }
.project-settings-archived-notice strong { color: #29484d; font-size: 12px; }
.project-settings-archived-notice span { margin-top: 2px; color: #73868a; font-size: 10px; }
.project-delete-warning {
  display: flex;
  gap: 10px;
  border: 1px solid #efcfca;
  border-radius: 7px;
  padding: 12px;
  background: #fff5f3;
}
.project-delete-warning svg { flex: 0 0 auto; width: 18px; height: 18px; color: #b54745; }
.project-delete-warning p { margin: 0; color: #8a3f3c; font-size: 12px; }
.project-delete-dialog > p { margin: 14px 0; font-size: 12px; }
.danger-eyebrow { color: #b54745; }

@media (max-width: 720px) {
  .project-settings-heading { align-items: stretch; }
  .project-settings-status-row,
  .project-settings-danger-row,
  .project-settings-form-actions { align-items: stretch; flex-direction: column; }
  .project-settings-status-row button,
  .project-settings-danger-row button { width: 100%; }
  .project-settings-form-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .project-settings-icon-editor { grid-template-columns: 1fr; }
  .project-settings-metadata { grid-template-columns: 1fr; gap: 12px; }
  .project-settings-metadata div + div { border-left: 0; border-top: 1px solid #e7edec; padding: 12px 0 0; }
}
