@font-face {
  font-family: system;
  src: local("PingFang SC");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #222b29;
  background: #f5f6f3;
  font:
    14px/1.6 system,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
select,
textarea {
  outline-color: #39735d;
}
button {
  border: 1px solid #dce2da;
  border-radius: 9px;
  background: #fff;
  color: #56596d;
  padding: 8px 13px;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  background: #f0f4f0;
  border-color: #b6c9bc;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.primary {
  background: #263c34;
  color: white;
  border-color: #263c34;
  box-shadow: 0 3px 8px #263c3415;
}
button.primary:hover {
  background: #152e24;
}
.danger {
  color: #b43e50;
}
input,
select,
textarea {
  border: 1px solid #dfe2ed;
  background: #fff;
  border-radius: 8px;
  padding: 9px 11px;
  color: #35374c;
  max-width: 100%;
}
textarea {
  resize: vertical;
  min-height: 85px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15px;
}
.muted,
small {
  color: #8a8da1;
}
small {
  font-size: 11px;
}
a {
  color: #2c634d;
}
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid #e4e8e1;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  padding: 0 10px 30px;
}
.brandmark {
  background: #263c34;
  color: #fff;
  border-radius: 11px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 2px;
}
.workspace-picker {
  width: 100%;
  margin-bottom: 24px;
  background: #f5f6f3;
  font-weight: 600;
}
.navlabel {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #a0a4b7;
  padding: 0 12px;
  margin: 14px 0 7px;
}
.nav {
  border: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  margin: 4px 0;
  padding: 11px 13px;
  background: transparent;
}
.nav.active {
  background: #eaf1eb;
  color: #284b3c;
  font-weight: 600;
}
.nav .ico {
  font-size: 17px;
  width: 20px;
}
.nav .count {
  margin-left: auto;
  font-size: 11px;
  color: #5c6b62;
}
.side-note {
  margin-top: auto;
  padding: 18px 12px;
  color: #a0a3b3;
  font-size: 11px;
}
.profile {
  display: flex;
  align-items: center;
  border: 0;
  border-top: 1px solid #eee;
  border-radius: 0;
  padding-top: 18px;
  gap: 10px;
  text-align: left;
}
.avatar {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: #eef2eb;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 19px;
}
.profile strong {
  display: block;
  font-size: 12px;
}
.profile small {
  font-size: 10px;
}
.main {
  min-width: 0;
  padding: 30px 34px 24px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.breadcrumb {
  font-size: 11px;
  color: #999cae;
  display: flex;
  gap: 10px;
  align-items: center;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mcp-pill {
  border-radius: 20px;
  font-size: 11px;
  background: #fff;
  padding: 6px 12px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b7b5c8;
  margin-right: 7px;
}
.dot.live {
  background: #48a68c;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 23px;
}
.subtitle {
  font-size: 12px;
  color: #979aac;
  margin-top: 4px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.stat {
  background: #fff;
  border: 1px solid #e3e7df;
  border-radius: 12px;
  padding: 16px 19px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.stat-icon {
  border-radius: 10px;
  background: #eaf1eb;
  color: #456755;
  padding: 9px;
  font-size: 18px;
}
.stat b {
  font-size: 24px;
  line-height: 1.2;
  display: block;
  font-weight: 600;
}
.stat small {
  font-size: 11px;
}
.panel {
  background: #fff;
  border: 1px solid #dfe5dc;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 3px 12px #2d335203;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid #e8ece5;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 5px;
  align-items: center;
}
.tabs button {
  border: 0;
  background: transparent;
  font-size: 12px;
  padding: 7px 12px;
}
.tabs button.active {
  background: #eaf1eb;
  color: #284b3c;
  font-weight: 600;
}
.weeknav {
  display: flex;
  align-items: center;
  gap: 7px;
}
.weeknav button {
  padding: 4px 9px;
  font-size: 14px;
  border-color: #e6e8f0;
}
.weeknav span {
  font-size: 12px;
  min-width: 150px;
  text-align: center;
}
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid #e8ece5;
  flex-wrap: wrap;
}
.filters select,
.filters input {
  padding: 5px 9px;
  font-size: 11px;
  background: #fafbfe;
  border-color: #e8ece5;
}
.legend {
  margin-left: auto;
  display: flex;
  gap: 14px;
  font-size: 10px;
}
.status-todo {
  color: #828899;
}
.status-doing {
  color: #347bc1;
}
.status-blocked {
  color: #c24b5e;
}
.status-done {
  color: #368c73;
}
.tag {
  font-size: 10px;
  border-radius: 5px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f2f4f7;
}
.tag.status-doing {
  background: #eaf3fd;
}
.tag.status-blocked {
  background: #fcebef;
}
.tag.status-done {
  background: #e7f6ef;
}
.timeline-scroll {
  overflow: auto;
  max-height: 65vh;
  scrollbar-width: thin;
  scrollbar-color: #b8c7be #fafbf9;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  position: relative;
}
.timeline {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: max-content;
}
.timeline th,
.timeline td {
  border-right: 1px solid #e6ebe4;
  border-bottom: 1px solid #e6ebe4;
  width: 224px;
  min-width: 224px;
  max-width: 224px;
  vertical-align: top;
}
.timeline thead th {
  background: #fafbfe;
  height: 61px;
  position: sticky;
  top: 0;
  z-index: 4;
  font-size: 11px;
  font-weight: 500;
  padding: 9px;
}
.timeline .frozen {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 218px;
  min-width: 218px;
  max-width: 218px;
  background: #fff;
  box-shadow: 3px 0 6px #30344805;
  padding: 17px 17px;
}
.timeline thead .frozen {
  z-index: 5;
  background: #fafbfe;
  text-align: left;
  padding-top: 20px;
  color: #9297aa;
}
.date-num {
  font-size: 15px;
  color: #5b6076;
  display: inline-block;
}
.is-today .date-num {
  color: #fff;
  background: #365f4b;
  border-radius: 6px;
  padding: 0 6px;
}
.timeline .is-today {
  background: #edf3ee;
}
.day-week {
  font-size: 10px;
  color: #a1a6b6;
  margin-left: 5px;
}
.timeline tbody td {
  height: 145px;
  padding: 12px 10px;
}
.cell-todo {
  background: #f8f9fc;
}
.cell-doing {
  background: #eff6fd;
}
.cell-blocked {
  background: #fcf0f1;
}
.cell-done {
  background: #eff8f3;
}
.cell-label {
  font-size: 9px;
  opacity: 0.65;
  margin-bottom: 7px;
  display: block;
}
.task-link {
  display: block;
  border: 0;
  border-radius: 5px;
  padding: 3px 0;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  background: transparent;
  width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.task-link:hover {
  background: #ffffffaa;
  border: 0;
}
.task-link small {
  color: inherit;
}
.goal-card {
  background: #fff9ed;
  border: 1px solid #e8dcba;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 10px;
  color: #947128;
  margin: 5px 0;
  display: block;
  width: 100%;
  text-align: left;
}
.goal-card:hover {
  background: #fff2d9;
}
.carry {
  font-size: 9px;
  color: #a0a7b7;
  line-height: 1.9;
  display: block;
}
.project-name {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
  border: 0;
  padding: 0;
  text-align: left;
  color: #41465e;
  max-width: 100%;
  background: transparent;
}
.project-name:hover {
  background: transparent;
  color: #2c634d;
}
.project-meta {
  font-size: 10px;
  color: #9a9eb0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}
.project-meta .avatar {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  font-size: 12px;
}
.member-projects {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 9px;
  color: #52675b;
}
.member-projects span {
  background: #f0f4ef;
  padding: 1px 4px;
  border-radius: 4px;
}
.group-project {
  font-size: 10px;
  color: #405c4d;
  margin: 8px 0 2px;
  font-weight: 650;
}
.timeline-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 20px;
  color: #a0a5b7;
  font-size: 10px;
}
.loading,
.empty {
  padding: 70px 25px;
  text-align: center;
  color: #9a9daf;
}
.empty b {
  display: block;
  font-size: 18px;
  color: #6d6c83;
  margin-bottom: 8px;
}
.empty button {
  margin-top: 15px;
}
.list {
  padding: 14px 22px;
}
.list-row {
  padding: 15px 0;
  border-bottom: 1px solid #edf0f6;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.list-row:last-child {
  border: 0;
}
.list-row h3 {
  font-weight: 550;
}
.row-info {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.list-actions {
  display: flex;
  gap: 6px;
}
.list-actions button {
  font-size: 11px;
  padding: 5px 9px;
}
.notice {
  background: #faf7ed;
  border: 1px solid #eee4ca;
  border-radius: 9px;
  padding: 12px 15px;
  font-size: 12px;
  color: #9b8152;
  margin: 12px 0;
}
.error {
  background: #fff0f2;
  color: #bc445b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
}
.success {
  background: #eaf7f1;
  color: #368b71;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
}
dialog {
  border: 1px solid #e3e4f1;
  border-radius: 16px;
  box-shadow: 0 25px 90px #29234030;
  padding: 0;
  width: min(600px, calc(100vw - 28px));
  max-height: 90vh;
  color: #35394e;
}
dialog::backdrop {
  background: #24233f55;
  backdrop-filter: blur(3px);
}
dialog.drawer {
  margin: 0 0 0 auto;
  height: 100vh;
  max-height: 100vh;
  border-radius: 16px 0 0 16px;
  width: min(570px, 100vw);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px 25px;
  border-bottom: 1px solid #e8ece5;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.dialog-head h2 {
  font-size: 17px;
}
.close {
  border: 0;
  background: transparent;
  font-size: 20px;
  padding: 0 5px;
}
.dialog-body {
  padding: 22px 25px;
}
.form {
  display: grid;
  gap: 14px;
}
.form label {
  font-size: 12px;
  color: #73788e;
  display: grid;
  gap: 6px;
}
.form .inline-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form .inline-label input {
  width: auto;
}
.form input,
.form select,
.form textarea {
  width: 100%;
}
.form .cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}
.form-hint {
  font-size: 11px;
  color: #999db0;
}
.detail-section {
  border-top: 1px solid #e8ece5;
  margin-top: 22px;
  padding-top: 18px;
}
.detail-section h3 {
  margin-bottom: 12px;
  font-weight: 600;
}
.detail-description {
  font-size: 13px;
  color: #74798c;
  white-space: pre-wrap;
}
.update {
  border-left: 2px solid #d6e1d8;
  padding: 0 0 15px 15px;
  margin-top: 15px;
  font-size: 12px;
}
.update-header {
  font-size: 10px;
  color: #9b9fb2;
  margin-bottom: 7px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.update p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.update-evidence {
  color: #657369;
  font-size: 11px;
  margin-top: 7px;
}
.mono {
  font:
    11px/1.7 ui-monospace,
    SFMono-Regular,
    monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: #f3f5f2;
  padding: 13px;
  border-radius: 8px;
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: #f6f7f3;
  border-radius: 8px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.checks input {
  width: auto;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--canvas);
}
.login-card {
  background: white;
  border: 1px solid #e5e4f1;
  border-radius: 20px;
  padding: 38px;
  width: min(420px, 92vw);
  box-shadow: 0 15px 55px #6a588e0d;
}
.login-card .brand {
  padding-left: 0;
  padding-bottom: 32px;
}
.login-card h1 {
  font-size: 23px;
  margin-bottom: 6px;
}
.login-card .form {
  margin-top: 25px;
}
.login-foot {
  font-size: 10px;
  color: #a5a6b8;
  text-align: center;
  margin-top: 22px;
}
.local-code {
  background: #edf3ee;
  padding: 12px;
  border-radius: 9px;
  color: #456854;
  font-size: 11px;
}
.local-code b {
  font-size: 22px;
  letter-spacing: 5px;
  display: block;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #24382f;
  color: #fff;
  box-shadow: 0 5px 20px #24382f20;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 12px;
  z-index: 100;
  display: none;
}
.report-content {
  max-width: 850px;
  padding: 28px;
  margin: auto;
}
.report-content h2 {
  margin-bottom: 9px;
}
.report-content h3 {
  margin: 23px 0 8px;
}
.report-content li {
  font-size: 12px;
  margin: 7px 0;
}
.report-content .source {
  font-size: 9px;
  color: #9b9aac;
}
.report-content ul {
  padding-left: 20px;
}
.report-content .report-task {
  border-top: 1px solid #e8ece5;
  padding-top: 4px;
  margin-top: 20px;
}
.mobile-nav {
  display: none;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .sidebar {
    padding: 26px 10px;
  }
  .main {
    padding: 24px 20px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 12px;
  }
  .stat-icon {
    display: none;
  }
  .legend {
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    display: block;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid #e4e8e1;
  }
  .brand {
    padding: 0;
    font-size: 16px;
    display: inline-flex;
  }
  .brand small {
    display: none;
  }
  .brandmark {
    width: 28px;
    height: 28px;
  }
  .sidebar .workspace-picker {
    float: right;
    width: 145px;
    margin: 0;
  }
  .sidebar .navlabel,
  .side-note,
  .sidebar .profile {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    margin-top: 12px;
    gap: 4px;
  }
  .nav {
    white-space: nowrap;
    font-size: 10px;
    padding: 7px 9px;
    margin: 0;
    width: auto;
    gap: 5px;
  }
  .nav .ico {
    font-size: 13px;
    width: auto;
  }
  .nav .count {
    display: none;
  }
  .main {
    padding: 18px 12px;
  }
  .topbar {
    margin-bottom: 18px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions button {
    padding: 5px 8px;
    font-size: 10px;
  }
  .page-title {
    align-items: flex-start;
    margin-bottom: 17px;
  }
  h1 {
    font-size: 22px;
  }
  .subtitle {
    font-size: 10px;
  }
  .page-title button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .stats {
    gap: 6px;
    margin-bottom: 17px;
  }
  .stat {
    padding: 10px;
  }
  .stat b {
    font-size: 20px;
  }
  .stat small {
    font-size: 9px;
  }
  .toolbar {
    padding: 10px;
    gap: 9px;
  }
  .tabs button {
    padding: 5px 8px;
    font-size: 11px;
  }
  .weeknav {
    gap: 4px;
  }
  .weeknav span {
    min-width: 120px;
    font-size: 10px;
  }
  .filters {
    padding: 10px;
    gap: 5px;
  }
  .filters select {
    max-width: 110px;
  }
  .legend {
    margin-left: 0;
    width: 100%;
    padding-top: 3px;
    gap: 14px;
  }
  .timeline .frozen {
    width: 138px;
    min-width: 138px;
    max-width: 138px;
    padding: 13px 10px;
  }
  .timeline th,
  .timeline td {
    width: 190px;
    min-width: 190px;
    max-width: 190px;
  }
  .timeline-footer {
    padding: 9px 12px;
    font-size: 9px;
  }
  .timeline-footer span:last-child {
    display: none;
  }
  .list {
    padding: 8px 14px;
  }
  .list-row {
    align-items: flex-start;
    gap: 8px;
  }
  .list-actions {
    flex-wrap: wrap;
  }
  .list-actions button {
    font-size: 10px;
  }
  .form .cols {
    grid-template-columns: 1fr;
  }
  .dialog-body {
    padding: 18px;
  }
  .dialog-head {
    padding: 17px 18px;
  }
  .checks {
    grid-template-columns: 1fr 1fr;
  }
  .report-content {
    padding: 20px;
  }
  .mcp-pill {
    max-width: 135px;
  }
  .timeline-scroll {
    max-height: 65vh;
  }
  .topbar .profile-mobile {
    display: block;
  }
}
@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  .page-title,
  .stats,
  .toolbar,
  .filters,
  .form-actions,
  .no-print,
  dialog,
  #toast {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .main {
    padding: 0;
  }
  .panel {
    border: 0;
    box-shadow: none;
  }
  .report-content {
    max-width: none;
    padding: 0;
  }
  .report-content .source {
    display: block;
    word-break: break-all;
  }
  .report-task {
    break-inside: avoid;
  }
  .report-content {
    font-size: 12pt;
  }
}

.member-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 11px 20px;
  border-bottom: 1px solid #e8ece5;
  flex-wrap: wrap;
}
.member-summary .member-projects {
  margin-top: 0;
  font-size: 11px;
  gap: 7px;
}
.member-summary .member-projects span {
  padding: 3px 8px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.account-row {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  overflow-wrap: anywhere;
}
.account-row .list-actions {
  flex-wrap: wrap;
}

/* Readable, quiet progress timeline. State remains accessible without repeated labels. */
.timeline {
  font-size: 14px;
}
.timeline thead th {
  font-size: 13px;
  height: 68px;
}
.timeline thead th[data-date] {
  cursor: grab;
  user-select: none;
}
.timeline-scroll.dragging-dates,
.timeline-scroll.dragging-dates th[data-date] {
  cursor: grabbing;
}
.timeline .date-num {
  font-size: 17px;
  font-weight: 600;
}
.timeline .day-week {
  font-size: 12px;
}
.timeline tbody td {
  padding: 14px 12px;
}
.timeline .project-name {
  font-size: 16px;
  line-height: 1.5;
}
.timeline .project-meta {
  font-size: 13px;
  margin: 8px 0;
}
.timeline .project-meta .avatar {
  width: 25px;
  height: 25px;
  font-size: 16px;
}
.timeline .member-projects {
  font-size: 12px;
}
.timeline .group-project {
  font-size: 13px;
}
.timeline .goal-card {
  font-size: 14px;
}
.timeline .goal-card small {
  font-size: 12px;
}
.task-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.55;
  padding: 6px 4px;
}
.timeline .task-card {
  font-size: 15px;
  margin: 0 0 5px;
}
.task-avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 17px;
  background: #fff;
}
.task-avatar.unassigned {
  background: #eef0f4;
  color: #8a91a2;
}
.task-title {
  min-width: 0;
  flex: 1;
  padding-top: 1px;
}
.status-null {
  color: #737c8d;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.project-status {
  display: inline-flex;
  align-items: center;
  padding: 8px 8px 8px 0;
}
.day-step {
  font-size: 20px;
  min-width: 34px;
  touch-action: none;
  user-select: none;
}
.week-step {
  font-size: 17px;
}
@media (max-width: 700px) {
  .weeknav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .weeknav span {
    min-width: 105px;
  }
  .day-step,
  .week-step {
    padding: 4px 7px;
    min-width: 30px;
  }
  .timeline .project-name {
    font-size: 14px;
  }
  .timeline .task-card {
    font-size: 14px;
    gap: 6px;
  }
  .timeline .task-avatar {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }
}

.profile-button {
  padding: 3px;
  border: 0;
  background: transparent;
}

/* Calm grid, distinct work cards, and consistent visual hierarchy. */
.timeline-panel {
  border-color: #e2e7f0;
  box-shadow: 0 6px 24px #25324b05;
}
.timeline-panel .toolbar {
  background: #fff;
  padding: 16px 20px;
}
.timeline-panel .filters {
  background: #fcfdff;
  border-bottom-color: #e5eaf2;
}
.timeline-panel .filters select {
  background: #fff;
  font-size: 12px;
  border-color: #e1e7f0;
  border-radius: 7px;
}
.timeline-panel .tabs {
  padding: 4px;
  background: #f3f5f9;
  border-radius: 10px;
}
.timeline-panel .tabs button {
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
}
.timeline-panel .tabs button.active {
  background: #fff;
  color: #284b3c;
  box-shadow: 0 1px 5px #273c5b12;
}
.timeline-panel .weeknav {
  gap: 6px;
}
.timeline-panel .weeknav button {
  background: #fff;
  border-color: #dfe5ef;
  border-radius: 8px;
  min-height: 32px;
}
.timeline-panel .weeknav button:hover {
  background: #edf3ee;
  border-color: #a9c3b2;
}
.timeline-panel .weeknav .day-step {
  background: #edf3ee;
  color: #365f4b;
  font-size: 20px;
}
.timeline-panel #date-range {
  color: #475569;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.timeline-panel .legend {
  font-size: 11px;
  gap: 12px;
}
.timeline-scroll {
  scrollbar-width: auto;
  scrollbar-color: #c4cbd9 #f5f7fb;
}
.timeline thead th {
  background: #f8fafc;
  border-bottom: 1px solid #dde4ef;
  padding-top: 14px;
}
.timeline thead .frozen {
  color: #64748b;
  background: #f8fafc;
}
.timeline .frozen {
  border-right-color: #dce3ee;
  box-shadow: 5px 0 12px #24344e06;
}
.timeline .date-num {
  color: #334155;
  letter-spacing: 0.01em;
}
.timeline .day-week {
  color: #8895a8;
}
.timeline .is-today {
  background: #eaf1eb;
  box-shadow: inset 0 3px 0 #406e54;
}
.timeline .is-today .date-num {
  background: #365f4b;
  color: #fff;
  border-radius: 7px;
  padding: 1px 7px;
}
.timeline tbody td {
  height: 152px;
  border-bottom-color: #e3e9f2;
}
.timeline .cell-todo {
  background: #fafbfd;
}
.timeline .cell-null {
  background: #fafbfd;
}
.timeline .cell-doing {
  background: #f1f6fc;
}
.timeline .cell-blocked {
  background: #fdf1f2;
}
.timeline .cell-done {
  background: #f0f8f4;
}
.timeline .project-name {
  color: #29364b;
  font-weight: 650;
  line-height: 1.5;
}
.timeline .project-meta {
  color: #7b879b;
  font-weight: 500;
}
.timeline .project-meta .avatar {
  border-radius: 8px;
}
.timeline .task-card {
  background: #ffffffec;
  border: 1px solid #e3e9f2;
  border-left: 3px solid currentColor;
  border-radius: 9px;
  padding: 9px 9px 9px 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px #26364e04;
  gap: 8px;
  line-height: 1.55;
}
.timeline .task-card:hover {
  background: #fff;
  border-color: #c6cde0;
  border-left-color: currentColor;
  box-shadow: 0 3px 9px #26364e0c;
}
.timeline .task-card .task-title {
  color: #34445b;
  font-weight: 550;
}
.timeline .task-avatar {
  border-radius: 8px;
  background: #f2f5fa;
  box-shadow: 0 0 0 1px #273c5b08;
}
.timeline .task-avatar img {
  display: block;
}
.timeline .goal-card {
  border-radius: 9px;
  padding: 8px 10px;
  background: #fffbef;
}
.timeline-panel .timeline-footer {
  background: #fcfdff;
  color: #8490a4;
  font-size: 11px;
  border-top: 1px solid #e5eaf2;
}
@media (max-width: 700px) {
  .timeline-panel .toolbar {
    padding: 10px;
  }
  .timeline-panel .filters select {
    font-size: 11px;
  }
  .timeline-panel .legend {
    font-size: 10px;
    gap: 10px;
  }
  .timeline-panel .weeknav {
    gap: 4px;
  }
  .timeline .task-card {
    padding: 8px 7px;
    gap: 6px;
    font-size: 14px;
  }
  .timeline-panel .timeline-footer {
    font-size: 9px;
  }
}

/* Compact date header and factual project summary. */
.timeline thead th,
.timeline thead .frozen {
  height: 44px;
  padding: 7px 12px;
  vertical-align: middle;
  white-space: nowrap;
}
.timeline thead .frozen {
  padding-left: 16px;
}
.timeline .project-row > .frozen {
  padding: 12px 16px;
  text-align: left;
}
.timeline .project-name {
  margin-bottom: 6px;
}
.timeline .project-owner {
  margin: 0;
  gap: 6px;
  min-height: 24px;
}
.timeline .project-role {
  color: #78869a;
  font-size: 10px;
  font-weight: 500;
  flex: 0 0 32px;
  white-space: nowrap;
}
.timeline .project-owner .avatar {
  width: 22px;
  height: 22px;
  font-size: 15px;
  flex-shrink: 0;
}
.project-person-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.project-people {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  margin-top: 4px;
  font-size: 12px;
  color: #69788e;
  font-weight: 500;
}
.project-people-list {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.project-person {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.project-person .avatar {
  width: 20px;
  height: 20px;
  font-size: 14px;
  flex-shrink: 0;
  border-radius: 6px;
}
.project-people-more {
  flex-shrink: 0;
  padding: 0 4px;
  border: 0;
  background: #edf3ee;
  border-radius: 5px;
  font-size: 11px;
  color: #456854;
}
.project-row-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}
.timeline .project-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
}
.timeline .project-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 5px;
  flex-shrink: 0;
  color: #365f4b;
  border: 1px solid #d8e2d8;
  background: #f2f6f1;
  border-radius: 8px;
  box-shadow: 0 1px 2px #344c3d08;
}
.timeline .project-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.timeline .project-toggle:hover {
  background: #e9f1e9;
  border-color: #a9c3b2;
  color: #284b3c;
}
.timeline .project-toggle:focus-visible,
.project-people-more:focus-visible {
  outline: 2px solid #365f4b;
  outline-offset: 2px;
}
.project-people-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.project-people-detail > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.project-people-detail small {
  color: #78869a;
  font-size: 11px;
}
@media (max-width: 700px) {
  .timeline .project-row > .frozen {
    padding: 10px;
  }
  .timeline thead .frozen {
    padding-left: 10px;
  }
  .timeline .project-role {
    flex-basis: 28px;
    font-size: 9px;
  }
  .project-people {
    gap: 4px;
    font-size: 11px;
  }
  .project-people-list {
    gap: 4px;
  }
  .project-people .avatar {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }
  .timeline .project-owner {
    gap: 4px;
    font-size: 12px;
  }
  .timeline .project-status {
    font-size: 10px;
  }
}

/* Fangxia brand: warm paper, charcoal, and a restrained sage selection state.
   Semantic task colours stay independent from the brand accent. */
:root {
  --canvas: #f5f6f3;
  --surface: #ffffff;
  --surface-soft: #f6f8f4;
  --ink: #222b29;
  --ink-secondary: #4f5d55;
  --ink-muted: #667168;
  --line: #e1e7dd;
  --brand: #263c34;
  --brand-hover: #152e24;
  --brand-tint: #eaf1eb;
  --focus: #39735d;
}
body {
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  color: var(--ink-secondary);
}
button {
  border-color: #d8e0d4;
  border-radius: 8px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.timeline-scroll:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
input,
select,
textarea {
  accent-color: var(--brand);
  border-color: #d8e0d4;
}
button.primary {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 4px #22382c0a;
}
button.primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
a {
  color: #2c634d;
  text-underline-offset: 3px;
}
h1 {
  letter-spacing: -0.6px;
  font-weight: 650;
}
.muted,
small,
.subtitle,
.form-hint,
.login-foot,
.side-note,
.breadcrumb,
.navlabel,
.nav .count,
.project-meta,
.timeline .project-meta,
.timeline .project-role,
.project-people,
.project-people-detail small,
.update-header,
.update-evidence,
.report-content .source,
.timeline .day-week,
.timeline-panel .timeline-footer,
.carry,
.loading,
.empty {
  color: var(--ink-muted);
}
.subtitle {
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.65;
}
.shell {
  grid-template-columns: 232px minmax(0, 1fr);
}
.sidebar {
  padding: 32px 18px 20px;
  border-color: var(--line);
}
.brand {
  padding: 0 8px 30px;
  gap: 14px;
  color: #151c18;
}
.brand-logo {
  display: block;
  width: 58px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand-wordmark {
  font-size: 22px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 2px;
  white-space: nowrap;
}
.brand small {
  color: var(--ink-muted);
  font-size: 8px;
  letter-spacing: 1.4px;
  margin-top: 4px;
  font-weight: 500;
}
.workspace-picker {
  background: #fafbf8;
  border-color: var(--line);
  font-size: 12px;
  padding: 10px;
  margin-bottom: 22px;
}
.navlabel {
  font-size: 10px;
  letter-spacing: 1.6px;
  padding-left: 13px;
}
.nav {
  font-size: 13px;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid transparent;
  color: #566158;
  margin: 5px 0;
}
.nav:hover {
  background: #f6f8f3;
  border-color: transparent;
}
.nav.active {
  color: #284b3c;
  background: var(--brand-tint);
  border-color: #d9e5d8;
  box-shadow: inset 3px 0 0 #456f54;
}
.nav .ico {
  display: inline-flex;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.nav .ico svg,
.stat-icon svg {
  width: 100%;
  height: 100%;
}
.nav .count {
  border-radius: 5px;
  padding: 0 5px;
  font-size: 10px;
}
.profile {
  background: transparent;
  border-top-color: var(--line);
}
.profile strong {
  color: #39463c;
}
.avatar {
  background: #edf2e9;
}
.side-note {
  border-top: 1px solid var(--line);
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 1.8;
  padding-top: 18px;
}
.main {
  padding: 30px 32px 24px;
}
.topbar {
  margin-bottom: 27px;
}
.breadcrumb {
  font-size: 12px;
}
.mcp-pill {
  border-color: var(--line);
  color: #4f6255;
}
.page-title {
  margin-bottom: 24px;
}
.stats {
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  border-color: var(--line);
  border-radius: 12px;
  padding: 17px 18px;
  box-shadow: 0 1px 2px #1c302603;
}
.stat b {
  color: var(--ink);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
.stat small {
  font-size: 12px;
}
.stat-icon {
  background: #f0f4ed;
  color: #546c58;
  padding: 10px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.panel,
.timeline-panel {
  border-color: var(--line);
  box-shadow: 0 3px 12px #273b2504;
  border-radius: 12px;
}
.toolbar,
.filters,
.member-summary,
.dialog-head {
  border-color: #e7ece3;
}
.timeline-panel .toolbar {
  padding: 16px 18px;
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.timeline-panel .tabs {
  background: #f2f5ef;
  border: 1px solid #e8ede4;
  padding: 3px;
  border-radius: 9px;
}
.timeline-panel .tabs button {
  padding: 7px 12px;
}
.timeline-panel .tabs button.active {
  color: #284b3c;
  box-shadow: 0 1px 4px #243a2612;
}
.timeline-panel .filters,
.timeline-panel .timeline-footer {
  background: #fdfefa;
}
.timeline-panel .filters select {
  border-color: #dbe3d5;
  color: #4f5d55;
}
.timeline-panel .weeknav button {
  border-color: #d8e0d4;
}
.timeline-panel .weeknav .day-step {
  background: #f4f7f1;
  color: #3d6049;
}
.timeline-panel #date-range {
  color: #44564a;
}
.timeline-panel .legend {
  gap: 12px;
}
.member-summary {
  padding: 12px 20px;
  gap: 12px;
}
.member-projects {
  color: #4b6352;
}
.member-projects span {
  background: #f0f4ed;
  border: 1px solid #e3eadc;
  border-radius: 5px;
}
.group-project {
  color: #405c4d;
}
.timeline-scroll {
  scrollbar-color: #b9c7b8 #f6f8f2;
}
.timeline th,
.timeline td {
  border-color: #e5eae2;
}
.timeline thead th,
.timeline thead .frozen {
  background: #f6f8f3;
  border-bottom-color: #dfe6d9;
}
.timeline .frozen {
  border-right-color: #dbe3d4;
  box-shadow: 5px 0 12px #28392304;
}
.timeline .date-num {
  color: #36473b;
}
.timeline .is-today {
  background: #edf3e9;
  box-shadow: inset 0 3px 0 #456f54;
}
.timeline .is-today .date-num {
  background: #365f4b;
  color: white;
}
.timeline .project-name {
  color: #2a382e;
}
/* A task owns its fill; the surrounding date cell still reflects the project. */
.timeline .task-card {
  --task-fill: #f1f3f5;
  --task-hover: #e8edf1;
  --task-border: #d5dbe0;
  border-top-color: var(--task-border);
  border-right-color: var(--task-border);
  border-bottom-color: var(--task-border);
  background: var(--task-fill);
  box-shadow: 0 1px 3px #253b2504;
}
.timeline .task-card.status-doing {
  --task-fill: #e5f0fc;
  --task-hover: #dcebf9;
  --task-border: #c6d9ed;
}
.timeline .task-card.status-blocked {
  --task-fill: #fde6e9;
  --task-hover: #f9dce2;
  --task-border: #efcbd1;
}
.timeline .task-card.status-done {
  --task-fill: #e4f3e9;
  --task-hover: #d9eedf;
  --task-border: #c3dfce;
}
/* Unknown and not-started states stay neutral; no status is inferred. */
.timeline .task-card.status-null,
.timeline .task-card.status-,
.timeline .task-card.status-todo {
  color: #626d7e;
  --task-fill: #f1f3f5;
  --task-hover: #e8edf1;
  --task-border: #d5dbe0;
}
.timeline .task-card .task-title {
  color: #34453b;
}
.timeline .task-card:hover {
  background: var(--task-hover);
  border-color: var(--task-border);
  border-left-color: currentColor;
  box-shadow: 0 3px 8px #253b250b;
}
.timeline .task-avatar {
  background: #f2f5ef;
}
.timeline .goal-card,
.goal-card {
  color: #7b5a1e;
  border-color: #e6d8b6;
}
.timeline .cell-todo,
.timeline .cell-null {
  background: #fafbf8;
}
.timeline tbody .frozen {
  text-align: left;
}

/* State colours remain blue/red/green, with AA text contrast on their tints. */
.status-null,
.status-todo {
  color: #626d7e;
}
.status-doing {
  color: #24649b;
}
.status-blocked {
  color: #ae354a;
}
.status-done {
  color: #267056;
}
.tag.status-doing {
  background: #eaf3fd;
}
.tag.status-blocked {
  background: #fcebef;
}
.tag.status-done {
  background: #e7f6ef;
}
.tag {
  background: #f0f3ee;
}
.timeline .project-toggle {
  color: #365f4b;
  border-color: #d2decf;
  background: #f2f6ed;
}
.timeline .project-toggle:hover {
  color: #284b3c;
  background: #e7f0e3;
  border-color: #adc4aa;
}
.timeline .project-toggle:focus-visible,
.project-people-more:focus-visible {
  outline-color: var(--focus);
}
.timeline-panel .timeline-footer {
  border-top-color: var(--line);
}
.detail-description,
.form label {
  color: #58665d;
}
.list-row,
.detail-section,
.report-content .report-task {
  border-color: var(--line);
}
.notice {
  color: #796233;
  background: #fcf8ec;
  border-color: #e9dfc3;
}
.error {
  color: #a12c43;
  background: #fff0f2;
}
.success {
  color: #24654e;
  background: #eaf7f1;
}
.danger {
  color: #a83348;
}
dialog {
  color: var(--ink);
  border-color: #dfe5d9;
  box-shadow: 0 24px 80px #172c2429;
}
dialog::backdrop {
  background: #19271f52;
  backdrop-filter: blur(3px);
}
.empty b {
  color: #4e6054;
}
.login {
  background: #f2f4ee;
  padding: 32px 18px;
}
.login-card {
  border-color: #dee5d7;
  border-radius: 18px;
  padding: 30px;
  width: min(440px, 100%);
  box-shadow: 0 16px 60px #2139210b;
}
.login-card .brand-inverse {
  background: #263c34;
  color: #fff;
  border-radius: 11px;
  padding: 21px 22px;
  margin-bottom: 30px;
  gap: 20px;
}
.brand-inverse .brand-logo {
  width: 77px;
  height: 40px;
}
.brand-inverse small {
  color: #c1d0c0;
}
.login-card h1 {
  font-size: 24px;
  letter-spacing: -0.4px;
}
.login-card .form {
  margin-top: 25px;
  gap: 17px;
}
.login-card .form input {
  min-height: 44px;
}
.login-card .primary {
  min-height: 44px;
  margin-top: 4px;
}
.login-foot {
  font-size: 11px;
  line-height: 1.8;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 206px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .brand {
    gap: 10px;
    padding-left: 7px;
  }
  .brand-logo {
    width: 50px;
    height: 30px;
  }
  .brand-wordmark {
    font-size: 20px;
  }
  .brand small {
    font-size: 7px;
  }
  .main {
    padding: 26px 22px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 14px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 14px 12px 10px;
  }
  .sidebar .brand {
    gap: 10px;
    padding: 2px 0;
  }
  .brand-logo {
    width: 43px;
    height: 26px;
  }
  .brand-wordmark {
    font-size: 19px;
    letter-spacing: 1px;
  }
  .sidebar .workspace-picker {
    width: min(44vw, 165px);
    padding: 7px;
    font-size: 11px;
  }
  .sidebar nav {
    gap: 4px;
    margin-top: 14px;
    padding-bottom: 3px;
  }
  .nav {
    padding: 8px 10px;
    font-size: 11px;
    gap: 6px;
    margin: 0;
  }
  .nav .ico {
    width: 15px;
    height: 15px;
  }
  .nav.active {
    box-shadow: inset 0 -2px 0 #456f54;
  }
  .main {
    padding: 19px 12px;
  }
  .topbar {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 21px;
  }
  .breadcrumb {
    font-size: 10px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .top-actions {
    margin-left: auto;
  }
  .page-title {
    gap: 10px;
    margin-bottom: 18px;
  }
  .page-title h1 {
    font-size: 22px;
  }
  .page-title .subtitle {
    font-size: 11px;
    max-width: 240px;
  }
  .page-title > button {
    flex-shrink: 0;
  }
  .stats {
    gap: 7px;
    margin-bottom: 18px;
  }
  .stat {
    padding: 11px 9px;
    border-radius: 10px;
    min-width: 0;
  }
  .stat b {
    font-size: 22px;
  }
  .stat small {
    font-size: 10px;
    white-space: nowrap;
  }
  .timeline-panel .toolbar {
    padding: 10px;
    gap: 10px;
  }
  .timeline-panel .weeknav {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 4px;
  }
  .timeline-panel .tabs button {
    padding: 6px 9px;
    font-size: 12px;
  }
  .timeline-panel .weeknav button {
    min-height: 32px;
  }
  .timeline-panel .filters {
    padding: 10px;
    gap: 7px;
  }
  .timeline-panel .legend {
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .member-summary {
    padding: 10px 12px;
    gap: 8px;
  }
  .member-summary .member-projects {
    font-size: 10px;
  }
  .timeline-panel .timeline-footer {
    font-size: 10px;
    line-height: 1.6;
  }
  .login {
    padding: 20px 14px;
  }
  .login-card {
    padding: 24px;
  }
  .login-card .brand-inverse {
    display: flex;
    padding: 18px 20px;
    gap: 18px;
  }
  .login-card .brand small {
    display: block;
    font-size: 8px;
  }
}
@media (max-width: 360px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 12px;
  }
  .page-title {
    flex-wrap: wrap;
  }
  .login-card {
    padding: 20px;
  }
  .timeline-panel .weeknav {
    gap: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  body,
  .login {
    background: white;
  }
  .panel {
    box-shadow: none;
    border: 0;
  }
  .main {
    padding: 0;
  }
}

/* Keep large workspaces compact on phones without hiding their project list. */
.member-summary .member-projects:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .member-summary {
    flex-wrap: nowrap;
  }
  .member-summary > small {
    flex-shrink: 0;
  }
  .member-summary .member-projects {
    flex-wrap: nowrap;
    overflow-x: auto;
    min-width: 0;
    white-space: nowrap;
    padding-bottom: 3px;
    scrollbar-width: thin;
    scrollbar-color: #b9c7b8 transparent;
  }
  .member-summary .member-projects span {
    flex-shrink: 0;
  }
}

/* A compact project workspace: the table gets the remaining viewport. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sidebar[hidden] {
  display: none;
}
.shell.sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.topbar-leading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  padding: 7px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: #52675a;
  background: #fff;
}
.sidebar-toggle svg {
  width: 19px;
  height: 19px;
}
.timeline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
button.timeline-create {
  width: 34px;
  height: 34px;
  padding: 7px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.timeline-create svg {
  width: 20px;
  height: 20px;
}
.main.project-focus {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.project-focus > .topbar {
  flex-shrink: 0;
  margin-bottom: 16px;
}
.project-focus > .stats {
  flex-shrink: 0;
  margin-bottom: 16px;
}
.project-focus .stat {
  padding-top: 12px;
  padding-bottom: 12px;
}
.project-focus > .timeline-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.project-focus .timeline-panel > .toolbar,
.project-focus .timeline-panel > .filters {
  flex-shrink: 0;
}
.project-focus .timeline-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
}
@media (max-width: 700px) {
  .topbar-leading {
    gap: 8px;
    flex: 1;
  }
  .topbar-leading .breadcrumb {
    gap: 6px;
  }
  .topbar .sidebar-toggle {
    width: 32px;
    height: 32px;
    padding: 6px;
  }
  .shell.is-project-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-height: 710px;
  }
  .is-project-view > .sidebar {
    flex-shrink: 0;
  }
  .is-project-view > .project-focus {
    height: auto;
    min-height: 600px;
    flex: 1;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .is-project-view.sidebar-collapsed {
    min-height: 600px;
  }
  .project-focus > .topbar {
    margin-bottom: 12px;
  }
  .project-focus > .stats {
    margin-bottom: 12px;
  }
  .project-focus .stat {
    padding: 10px 9px;
  }
  .timeline-actions {
    gap: 8px;
  }
  button.timeline-create {
    width: 34px;
    height: 34px;
  }
}
@media print {
  .sidebar-toggle {
    display: none;
  }
  .main.project-focus {
    height: auto;
    min-height: 0;
    padding: 0;
  }
}
.breadcrumb-workspace {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.breadcrumb-prefix,
.breadcrumb-divider {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .topbar-leading .breadcrumb {
    flex: 1;
    overflow: hidden;
  }
  .breadcrumb-prefix,
  .breadcrumb-divider,
  .mcp-detail {
    display: none;
  }
  .topbar .mcp-pill {
    white-space: nowrap;
  }
  .project-focus .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  .project-focus .stat {
    padding: 10px 6px;
  }
  .project-focus .stat b {
    font-size: 21px;
  }
}

/* Intentional vertical scrolling gives the project table the whole viewport.
   No animation: row positions remain stable, including reduced-motion users. */
.table-focus-bar {
  display: none;
}
.shell.table-focused {
  grid-template-columns: minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}
.table-focused > .sidebar,
.table-focused .project-focus > .topbar,
.table-focused .project-focus > .stats,
.table-focused .timeline-panel > .toolbar,
.table-focused .timeline-panel > .filters {
  display: none;
}
.shell.table-focused > .main.project-focus {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 0;
}
.table-focused .timeline-panel {
  border-radius: 0;
  margin: 0;
}
.table-focused .table-focus-bar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 36px;
  padding: 3px 8px;
  background: #f4f7f2;
  border-bottom: 1px solid #dfe7dc;
}
.table-focus-bar button {
  padding: 3px 9px;
  font-size: 12px;
}
.table-focus-bar span {
  font-size: 11px;
  color: #687969;
  white-space: nowrap;
}
.table-focus-bar button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
@media (max-width: 360px) {
  .table-focus-bar span {
    display: none;
  }
}
@media print {
  .table-focus-bar {
    display: none !important;
  }
}

/* Task creation and hierarchy: project rows only expose the add action. */
.timeline .project-add-task {
  color: #244f3c;
  border-color: #b5cbb9;
  background: #edf5e9;
}
.task-tree-item {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding-left: calc(var(--task-indent, 0) * 11px);
  min-width: 0;
  flex-wrap: wrap;
}
.task-tree-item > .task-card {
  flex: 1 1 100px;
  min-width: 0;
}
.task-tree-item > small {
  width: 100%;
  padding-left: 5px;
  font-weight: 400;
}
.task-tree-branch {
  color: #849485;
  padding-top: 5px;
}
.task-parent-picker {
  border: 1px solid #dce6d7;
  border-radius: 12px;
  padding: 12px;
  margin: 0;
  min-width: 0;
  background: #fafcf8;
}
.task-parent-picker legend {
  font-size: 13px;
  font-weight: 600;
  color: #31523f;
  padding: 0 5px;
}
.form .task-parent-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 9px 9px calc(9px + var(--task-indent, 0) * 13px);
  cursor: pointer;
  color: #354638;
}
.form .task-parent-option input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  flex: 0 0 16px;
  accent-color: #3d7150;
}
.task-parent-option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.task-parent-option strong,
.task-parent-option small {
  display: block;
}
.task-parent-option strong {
  font-size: 13px;
  font-weight: 550;
}
.task-parent-option:has(input:checked) {
  background: #eaf3e4;
  border-color: #b4cda7;
}
.task-parent-option:has(input:focus-visible) {
  outline: 2px solid #39735d;
  outline-offset: -2px;
}
.form .task-parent-option.is-unavailable {
  cursor: not-allowed;
  background: #f3f4f1;
  color: #717970;
}
.task-parent-option .task-parent-reason {
  color: #876247;
}
.task-parent-option .task-parent-path {
  font-size: 10px;
}
.task-parent-root {
  margin: 8px 0;
}
.task-parent-search {
  margin-bottom: 9px;
}
.task-parent-list {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.task-parent-list [hidden],
.task-parent-picker [hidden] {
  display: none;
}
.task-parent-selection {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #dce6d7;
  font-size: 12px;
  color: #426244;
  overflow-wrap: anywhere;
}
.task-breadcrumb {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .task-parent-picker {
    padding: 8px;
  }
  .task-parent-list {
    max-height: 210px;
  }
  .form .task-parent-option {
    padding-left: calc(6px + var(--task-indent, 0) * 8px);
  }
}

/* Explicit classes keep hierarchy spacing compatible with the strict CSP. */
[data-indent="0"] {
  --task-indent: 0;
}
[data-indent="1"] {
  --task-indent: 1;
}
[data-indent="2"] {
  --task-indent: 2;
}
[data-indent="3"] {
  --task-indent: 3;
}
[data-indent="4"] {
  --task-indent: 4;
}
[data-indent="5"] {
  --task-indent: 5;
}
