/* Projects: the project, its real state, and the next useful record fit in the first view. */
body.mac-theme #project-workspace-host .project-workspace {
  grid-template-columns: minmax(200px, 218px) minmax(0, 1fr);
  gap: 14px;
}

body.mac-theme #project-workspace-host .project-navigation {
  padding: 18px 10px 28px;
  border: 1px solid var(--white-line, #e1e7e4);
  border-radius: 14px;
  background: #fff;
}

body.mac-theme #project-workspace-host .project-navigation-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 13px;
  font-size: 12px;
  font-weight: 700;
  color: var(--white-text, #1d2c30);
}

body.mac-theme #project-workspace-host .project-navigation-title span,
body.mac-theme #project-workspace-host .project-group-toggle small {
  color: var(--white-muted, #64767a);
  font-size: 11px;
  font-weight: 500;
}

body.mac-theme #project-workspace-host .project-group-toggle {
  min-width: 0;
  padding: 8px 9px 5px;
  line-height: 1.4;
  color: var(--white-muted, #64767a);
}

body.mac-theme #project-workspace-host .project-group-toggle > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mac-theme #project-workspace-host .project-navigation-item {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  line-height: 1.4;
}

body.mac-theme #project-workspace-host .project-navigation-item > span { min-width: 0; flex: 1; }
body.mac-theme #project-workspace-host .project-navigation-item strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  word-break: keep-all;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 570;
}

body.mac-theme #project-workspace-host .project-navigation-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

body.mac-theme #project-workspace-host .project-content {
  max-width: none;
  padding: 0 0 max(42px, env(safe-area-inset-bottom));
}

body.mac-theme #project-workspace-host .project-heading {
  min-height: 0;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  padding: 18px 20px;
  border-radius: 14px;
}

body.mac-theme #project-workspace-host .project-heading-title { flex: 1; min-width: 0; }
body.mac-theme #project-workspace-host .project-heading h1 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.34;
  font-weight: 720;
  letter-spacing: -.045em;
}

body.mac-theme #project-workspace-host .project-breadcrumb {
  margin-bottom: 5px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
  font-weight: 550;
  text-transform: none;
}

body.mac-theme #project-workspace-host .project-heading-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

body.mac-theme #project-workspace-host .project-sharing-badge,
body.mac-theme #project-workspace-host .project-completion-badge {
  margin: 0;
  vertical-align: initial;
}

body.mac-theme #project-workspace-host .project-heading-actions {
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 325px;
}

body.mac-theme #project-workspace-host .project-heading-actions :is(.project-text-button, .project-refresh-button) {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 11px !important;
  white-space: nowrap;
}

.project-mobile-select { display: none; }

body.mac-theme #project-workspace-host .project-focus {
  display: grid;
  grid-template-columns: minmax(225px, .82fr) minmax(290px, 1.18fr);
  gap: 0;
  margin-bottom: 11px;
  border: 1px solid var(--white-line, #e1e7e4);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

body.mac-theme #project-workspace-host .project-focus-overview,
body.mac-theme #project-workspace-host .project-focus-next { min-width: 0; padding: 17px 19px; }
body.mac-theme #project-workspace-host .project-focus-overview { border-right: 1px solid var(--white-line, #e1e7e4); }
body.mac-theme #project-workspace-host .project-focus-kicker {
  display: block;
  color: var(--white-muted, #64767a);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

body.mac-theme #project-workspace-host .project-focus-lead > strong {
  display: block;
  margin-top: 4px;
  color: var(--white-text, #1d2c30);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 730;
  letter-spacing: -.045em;
}

body.mac-theme #project-workspace-host .project-focus-lead > p {
  margin-top: 3px;
  color: var(--white-muted, #64767a);
  font-size: 12px;
  line-height: 1.55;
}

body.mac-theme #project-workspace-host .project-focus-metrics {
  display: flex;
  gap: 0;
  margin: 16px 0 0;
  border-top: 1px solid var(--white-line, #e1e7e4);
  padding-top: 12px;
}

body.mac-theme #project-workspace-host .project-focus-metrics > div { flex: 1; min-width: 0; }
body.mac-theme #project-workspace-host .project-focus-metrics > div + div { padding-left: 15px; border-left: 1px solid var(--white-line, #e1e7e4); }
body.mac-theme #project-workspace-host .project-focus-metrics dt { color: var(--white-muted, #64767a); font-size: 11px; white-space: nowrap; }
body.mac-theme #project-workspace-host .project-focus-metrics dd {
  margin: 2px 0 0;
  color: var(--white-text, #1d2c30);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body.mac-theme #project-workspace-host .project-focus-next-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

body.mac-theme #project-workspace-host .project-focus-next-heading h2 {
  margin-top: 2px;
  color: var(--white-text, #1d2c30);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 690;
  letter-spacing: -.02em;
}

body.mac-theme #project-workspace-host .project-focus-overflow {
  color: var(--white-muted, #64767a);
  font-size: 11px;
  white-space: nowrap;
}

body.mac-theme #project-workspace-host .project-focus-task-list { display: grid; }
body.mac-theme #project-workspace-host .project-focus-task {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: 7px 3px;
  border: 0;
  border-bottom: 1px solid var(--white-line, #e1e7e4);
  background: transparent;
  color: var(--white-text, #1d2c30);
  text-align: left;
}

body.mac-theme #project-workspace-host .project-focus-task:hover { color: var(--white-accent, #2b675b); background: #f8faf9; }
body.mac-theme #project-workspace-host .project-focus-task-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
body.mac-theme #project-workspace-host .project-focus-task strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 610;
}

body.mac-theme #project-workspace-host .project-focus-task small {
  flex: none;
  color: var(--white-muted, #64767a);
  font-size: 11px;
  white-space: nowrap;
}

body.mac-theme #project-workspace-host .project-focus-task.is-attention small { color: #946128; }
body.mac-theme #project-workspace-host .project-focus-task.is-result small { color: var(--white-accent, #2b675b); }
body.mac-theme #project-workspace-host .project-focus-task > .project-icon { width: 13px; height: 13px; color: var(--white-accent, #2b675b); }
body.mac-theme #project-workspace-host .project-focus-empty { color: var(--white-muted, #64767a); font-size: 12px; line-height: 1.6; padding: 10px 0 2px; }
body.mac-theme #project-workspace-host .project-focus-empty-action { margin-top: 10px; padding: 0; border: 0; background: none; color: var(--white-accent, #2b675b); font-size: 12px; font-weight: 650; }
body.mac-theme #project-workspace-host .project-focus-empty-action .project-icon { width: 13px; height: 13px; }

body.mac-theme #project-workspace-host .project-source-row {
  gap: 10px;
  align-items: center;
  min-height: 0;
  margin: 0 2px 13px;
}

body.mac-theme #project-workspace-host .project-source-status { flex: 1; min-width: 0; font-size: 11px; }
body.mac-theme #project-workspace-host .project-source-status > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
body.mac-theme #project-workspace-host .project-source-status > summary > strong { flex: none; color: var(--white-text, #1d2c30); font-weight: 680; }
body.mac-theme #project-workspace-host .project-source-chips { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
body.mac-theme #project-workspace-host .project-source-chips > span {
  display: block;
  max-width: min(220px, 34vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 7px;
  border: 1px solid var(--white-line, #e1e7e4);
  border-radius: 5px;
  background: #f8faf9;
  color: var(--white-muted, #64767a);
}

body.mac-theme #project-workspace-host .project-source-status > summary > small { margin-left: auto; font-size: 10px; color: var(--white-muted, #64767a); white-space: nowrap; }
body.mac-theme #project-workspace-host .project-source-status > summary > .project-icon { flex: none; }
body.mac-theme #project-workspace-host .project-source-status > div { margin-top: 7px; }
body.mac-theme #project-workspace-host .project-source-row > .project-text-button { font-size: 11px !important; font-weight: 650; white-space: nowrap; }

body.mac-theme #project-workspace-host .project-controls { align-items: center; gap: 10px; margin: 0 0 13px; }
body.mac-theme #project-workspace-host .project-tabs { background: #f6f8f7; border: 1px solid var(--white-line, #e1e7e4); }
body.mac-theme #project-workspace-host .project-tab { min-height: 37px; padding: 7px 12px; }

@media (max-width: 1180px) {
  body.mac-theme #project-workspace-host .project-heading { flex-wrap: wrap; }
  body.mac-theme #project-workspace-host .project-heading-actions { max-width: none; justify-content: flex-start; }
  body.mac-theme #project-workspace-host .project-focus { grid-template-columns: minmax(0, 1fr); }
  body.mac-theme #project-workspace-host .project-focus-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--white-line, #e1e7e4); }
  body.mac-theme #project-workspace-host .project-focus-metrics { flex: none; gap: 17px; margin: 0; padding: 0; border-top: 0; }
  body.mac-theme #project-workspace-host .project-focus-metrics > div + div { padding-left: 17px; }
}

@media (max-width: 1000px) {
  body.mac-theme #project-workspace-host .project-workspace { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  body.mac-theme #project-workspace-host .project-navigation { min-height: 0; max-height: none; overflow: visible; scrollbar-gutter: auto; padding: 11px 14px; }
  body.mac-theme #project-workspace-host .project-navigation :is(.project-navigation-title, .project-group) { display: none; }
  body.mac-theme #project-workspace-host .project-mobile-select { display: flex; align-items: center; gap: 11px; color: var(--white-muted, #64767a); font-size: 12px; font-weight: 620; }
  body.mac-theme #project-workspace-host .project-mobile-select > span { flex: none; }
  body.mac-theme #project-workspace-host .project-mobile-select > select { flex: 1; min-width: 0; max-width: 100%; border: 1px solid var(--white-line, #e1e7e4); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--white-text, #1d2c30); font-size: 13px; }
}

@media (max-width: 600px) {
  body.mac-theme #project-workspace-host .project-heading { padding: 15px; }
  body.mac-theme #project-workspace-host .project-heading h1 { font-size: 21px; }
  body.mac-theme #project-workspace-host .project-heading-actions { gap: 5px; }
  body.mac-theme #project-workspace-host .project-heading-actions :is(.project-text-button, .project-refresh-button) { padding: 5px 7px; }
  body.mac-theme #project-workspace-host .project-focus-overview { display: block; padding: 15px; }
  body.mac-theme #project-workspace-host .project-focus-metrics { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--white-line, #e1e7e4); }
  body.mac-theme #project-workspace-host .project-focus-next { padding: 15px; }
  body.mac-theme #project-workspace-host .project-focus-task-main { align-items: flex-start; flex-direction: column; gap: 0; }
  body.mac-theme #project-workspace-host .project-focus-task strong { width: 100%; }
  body.mac-theme #project-workspace-host .project-source-row { align-items: flex-start; }
  body.mac-theme #project-workspace-host .project-source-status > summary > small { margin-left: 0; }
  body.mac-theme #project-workspace-host .project-source-chips > span { max-width: min(210px, 64vw); }
}
