:root {
  --ink: #111;
  --muted: rgba(17, 17, 17, .52);
  --soft: rgba(17, 17, 17, .08);
  --line: rgba(17, 17, 17, .08);
  --paper: #fff;
  --wash: #f5f5f5;
  --wash-2: #fafafa;
  --blue: #007aff;
  --red: #d92d20;
  --yellow: #b7791f;
  --green: #157347;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.55;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 20px 14px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  grid-column: 2;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 650;
}

p { margin: 0; }

#updatedAt {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.top-actions {
  grid-column: 3;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

button {
  font: inherit;
}

.icon-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  cursor: pointer;
  min-width: 54px;
}

.icon-btn.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.action-btn {
  border: 1px solid rgba(0, 122, 255, .32);
  background: rgba(0, 122, 255, .08);
  border-radius: 999px;
  padding: 7px 12px;
  color: #075db3;
  cursor: pointer;
  min-width: 76px;
}

main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 16px 70px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.metric {
  background: var(--wash);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 72px;
}

.metric b {
  display: block;
  font-size: 22px;
  line-height: 28px;
  margin-bottom: 2px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric.mini {
  margin-top: 8px;
  min-height: 58px;
}

.metric.mini b {
  font-size: 18px;
  line-height: 24px;
}

.overview-heading {
  text-align: center;
  margin: 8px auto 18px;
}

.overview-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
}

.overview-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.overview-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
}

.overview-strip div:nth-child(1) { border-top: 3px solid #111; }
.overview-strip div:nth-child(2) { border-top: 3px solid var(--red); }
.overview-strip div:nth-child(3) { border-top: 3px solid var(--blue); }
.overview-strip div:nth-child(4) { border-top: 3px solid var(--yellow); }
.overview-strip div:nth-child(5) { border-top: 3px solid #555; }

.overview-strip b {
  display: block;
  font-size: 24px;
  line-height: 30px;
}

.overview-strip span {
  color: var(--muted);
  font-size: 12px;
}

.view { display: none; }
.view.active { display: block; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 10px;
}

.section-title h2 {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

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

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin: 24px 0 12px;
}

.detail-top h2 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 28px;
}

.detail-top p {
  color: var(--muted);
  font-size: 13px;
}

.detail-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.detail-top-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: #475467;
  font-size: 12px;
}

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

.detail-summary.person-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.detail-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfbfb;
  min-height: 76px;
}

.detail-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-summary b {
  display: block;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.person-summary b {
  font-size: 22px;
  line-height: 28px;
}

.standard-section {
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 14px;
}

.asset-grid.padded {
  padding: 12px;
}

.project {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper);
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.project h3 {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

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

.project-score div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--wash);
}

.project-score b {
  display: block;
  font-size: 18px;
  line-height: 22px;
}

.project-score span,
.quick-facts span,
.focus-box span,
.blocker-preview span,
.record-grid span {
  color: var(--muted);
  font-size: 12px;
}

.focus-box {
  border-left: 3px solid var(--ink);
  padding: 2px 0 2px 10px;
  margin-bottom: 12px;
}

.focus-box p {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.6;
}

.quick-facts {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) 1.3fr;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-facts div {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.quick-facts b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
}

.blocker-preview {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.blocker-preview div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.blocker-preview b {
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.blocker-preview span {
  display: block;
  margin-top: 2px;
}

.sub {
  color: var(--muted);
  font-size: 12px;
}

.health {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
  background: var(--wash);
}

.health::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.health.red { color: var(--red); }
.health.yellow { color: var(--yellow); }
.health.green { color: var(--green); }

.kv {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px 10px;
  margin: 10px 0;
}

.kv dt {
  color: var(--muted);
  font-size: 12px;
}

.kv dd {
  margin: 0;
  min-width: 0;
}

.kv.compact {
  grid-template-columns: 64px 1fr;
  margin: 8px 0 0;
  gap: 4px 8px;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  background: var(--wash);
  padding: 3px 8px;
  font-size: 12px;
  color: var(--muted);
}

.list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scroll.light {
  border: 0;
  border-radius: 0;
}

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

.command-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
  min-height: 190px;
}

.command-panel.span-2 {
  grid-column: span 2;
}

.command-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 20px;
}

.compact-table {
  min-width: 640px;
}

.compact-table th,
.compact-table td {
  padding: 8px 9px;
}

.list.tight li {
  padding: 7px 0;
}

.project-matrix {
  display: grid;
  gap: 18px;
}

.project-library-strip div:nth-child(1) { border-top-color: #111; }
.project-library-strip div:nth-child(2) { border-top-color: var(--blue); }
.project-library-strip div:nth-child(3) { border-top-color: var(--red); }
.project-library-strip div:nth-child(4) { border-top-color: var(--yellow); }
.project-library-strip div:nth-child(5) { border-top-color: var(--green); }

.today-strip div:nth-child(1) { border-top-color: #111; }
.today-strip div:nth-child(2) { border-top-color: var(--green); }
.today-strip div:nth-child(3) { border-top-color: var(--red); }
.today-strip div:nth-child(4) { border-top-color: var(--yellow); }
.today-strip div:nth-child(5) { border-top-color: #555; }

.risk-strip div:nth-child(1) { border-top-color: #111; }
.risk-strip div:nth-child(2) { border-top-color: var(--red); }
.risk-strip div:nth-child(3) { border-top-color: #c2410c; }
.risk-strip div:nth-child(4) { border-top-color: var(--yellow); }
.risk-strip div:nth-child(5) { border-top-color: #555; }

.file-strip div:nth-child(1) { border-top-color: #111; }
.file-strip div:nth-child(2) { border-top-color: var(--blue); }
.file-strip div:nth-child(3) { border-top-color: var(--green); }
.file-strip div:nth-child(4) { border-top-color: var(--red); }
.file-strip div:nth-child(5) { border-top-color: #555; }

.overview-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 18px;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.filter-block {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: start;
}

.filter-block strong {
  padding-top: 5px;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: #fafafa;
  color: #344054;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.filter-options label:has(input:checked) {
  border-color: rgba(0, 122, 255, .36);
  background: rgba(0, 122, 255, .08);
  color: #075db3;
}

.filter-options input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--blue);
}

.filter-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.filter-summary button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  white-space: nowrap;
}

.project-library {
  display: grid;
  gap: 18px;
}

.library-section {
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.library-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfb;
}

.library-section-title h3 {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

.library-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.library-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  align-items: stretch;
}

.project-record {
  display: block;
  grid-template-columns: none;
  gap: 0;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  min-height: 420px;
}

.project-record:last-child {
  border-bottom: 1px solid rgba(17, 17, 17, .12);
}

.project-record.project-status-risk {
  box-shadow: inset 4px 0 0 var(--red);
}

.project-record.project-status-active {
  box-shadow: inset 4px 0 0 var(--blue);
}

.project-record.project-status-pending {
  box-shadow: inset 4px 0 0 var(--yellow);
}

.project-record.project-status-done {
  box-shadow: inset 4px 0 0 var(--green);
}

.project-record.project-status-paused {
  box-shadow: inset 4px 0 0 #667085;
}

.record-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.record-main h3 {
  margin: 0 0 3px;
  font-size: 16px;
  line-height: 24px;
}

.record-badges {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

.library-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  background: var(--wash);
  color: #344054;
}

.library-status.library-status-risk { color: var(--red); background: rgba(217,45,32,.08); }
.library-status.library-status-active { color: var(--blue); background: rgba(0,122,255,.08); }
.library-status.library-status-pending { color: var(--yellow); background: rgba(183,121,31,.10); }
.library-status.library-status-done { color: var(--green); background: rgba(21,115,71,.10); }
.library-status.library-status-paused { color: #475467; background: #f2f4f7; }

.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.record-grid div {
  min-height: 118px;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fcfcfc;
}

.record-grid div:nth-child(2n) {
  border-right: 0;
}

.record-grid div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.record-grid b {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 550;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.record-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: #475467;
  font-size: 12px;
  background: #fff;
}

.record-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.record-bottom p {
  color: #475467;
  font-size: 12px;
  min-height: 38px;
}

.empty-state {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(17, 17, 17, .22);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state b {
  color: var(--ink);
}

.window-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: -4px 0 16px;
}

.window-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  background: #fff;
  color: #475467;
  cursor: pointer;
}

.window-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.today-board {
  display: grid;
  gap: 18px;
}

.today-group {
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

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

.today-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  min-height: 250px;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: inset 4px 0 0 #d0d5dd;
}

.today-card.done { box-shadow: inset 4px 0 0 var(--green); }
.today-card.doing { box-shadow: inset 4px 0 0 var(--blue); }
.today-card.review { box-shadow: inset 4px 0 0 var(--yellow); }
.today-card.blocked,
.today-card.rejected { box-shadow: inset 4px 0 0 var(--red); }
.today-card.missing-evidence:not(.done) { background: #fffdfb; }

.today-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.today-card-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 22px;
}

.today-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.today-primary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: #475467;
  font-size: 12px;
  background: #fff;
}

.today-brief {
  display: grid;
  gap: 8px;
  border-left: 3px solid rgba(17, 17, 17, .18);
  padding-left: 10px;
}

.today-brief div {
  display: grid;
  gap: 3px;
}

.today-brief span {
  color: var(--muted);
  font-size: 12px;
}

.today-brief b {
  color: #1f2937;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.today-kv {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 7px 10px;
  margin: 0;
}

.today-kv dt {
  color: var(--muted);
  font-size: 12px;
}

.today-kv dd {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
}

.evidence-missing {
  color: var(--red);
  font-weight: 600;
}

.evidence-ready {
  color: var(--green) !important;
  font-weight: 600;
}

.today-card-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fcfcfc;
}

.today-card-detail summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  color: #475467;
  font-size: 12px;
}

.today-card-detail summary::-webkit-details-marker {
  display: none;
}

.today-card-detail summary::after {
  content: "+";
  float: right;
}

.today-card-detail[open] summary::after {
  content: "-";
}

.today-card-detail .today-kv {
  border-top: 1px solid var(--line);
  padding: 10px;
}

.matrix-group {
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(17, 17, 17, .035);
  transition: opacity .15s ease, border-color .15s ease, box-shadow .15s ease;
  scroll-margin-top: 92px;
}

.matrix-group.is-dim {
  opacity: .36;
  box-shadow: none;
}

.matrix-group.is-highlight {
  border-color: rgba(0, 122, 255, .42);
  box-shadow: 0 8px 24px rgba(0, 122, 255, .10);
}

.project-fold {
  display: block;
}

.project-fold > summary {
  list-style: none;
  cursor: pointer;
}

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

.matrix-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.matrix-group .matrix-title { border-left: 5px solid #d0d5dd; }
.matrix-group:has(.health.red) .matrix-title { border-left-color: var(--red); }
.matrix-group:has(.health.yellow) .matrix-title { border-left-color: var(--yellow); }
.matrix-group:has(.health.green) .matrix-title { border-left-color: var(--green); }

.matrix-title h3 {
  margin: 0 0 3px;
  font-size: 16px;
  line-height: 24px;
}

.matrix-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.matrix-title-actions::after {
  content: "收起";
  color: var(--muted);
  font-size: 12px;
}

.project-fold:not([open]) .matrix-title-actions::after {
  content: "展开";
}

.feature-table-wrap {
  overflow-x: auto;
  max-height: 72vh;
}

.feature-table {
  width: 100%;
  min-width: 1360px;
  border-collapse: collapse;
  table-layout: fixed;
}

.feature-table th,
.feature-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  vertical-align: middle;
  text-align: center;
}

.feature-table tr {
  scroll-margin-top: 92px;
}

.feature-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfbfb;
  color: #333;
  font-weight: 650;
}

.feature-table th:nth-child(1),
.feature-table td:nth-child(1) { width: 56px; }
.feature-table th:nth-child(2),
.feature-table td:nth-child(2) {
  width: 210px;
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
  box-shadow: 1px 0 0 var(--line);
}
.feature-table th:nth-child(2) {
  z-index: 3;
  background: #fbfbfb;
}
.feature-table th:nth-child(n+3):nth-child(-n+10),
.feature-table td:nth-child(n+3):nth-child(-n+10) { width: 118px; }
.feature-table th:nth-child(11),
.feature-table td:nth-child(11) { width: 88px; }
.feature-table th:nth-child(12),
.feature-table td:nth-child(12) { width: 82px; }
.feature-table th:nth-child(13),
.feature-table td:nth-child(13) { width: 104px; }

.feature-table tr:nth-child(even) td {
  background: #fcfcfc;
}

.feature-table tr.is-dim-row td {
  opacity: .34;
}

.feature-table tr.is-highlight-row td {
  background: #f7fbff;
}

.feature-table tr.is-highlight-row .feature-name {
  box-shadow: inset 3px 0 0 var(--blue), 1px 0 0 var(--line);
}

.editable-task-row {
  cursor: default;
}

.editable-task-row:hover td {
  background: #f7fbff;
}

.feature-table tr.jump-focus td,
.matrix-group.jump-focus .matrix-title {
  animation: jumpFlash 1.4s ease-out;
}

.serial {
  color: #333;
  font-weight: 650;
}

.feature-name b {
  display: block;
  font-size: 13px;
  line-height: 19px;
  margin-bottom: 4px;
}

.feature-name p {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.risk-mini {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
}

.stage-task b {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.stage-task small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.stage-task em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  line-height: 15px;
}

.stage-evidence {
  display: inline-block;
  margin-top: 5px;
  border: 1px solid rgba(0, 122, 255, .22);
  border-radius: 999px;
  padding: 1px 6px;
  background: rgba(0, 122, 255, .06);
  color: #075db3;
  font-size: 11px;
  line-height: 16px;
}

.stage-note {
  display: block;
  margin-top: 4px;
  color: #475467;
  font-size: 11px;
  line-height: 15px;
  max-height: 30px;
  overflow: hidden;
}

.stage-task {
  cursor: cell;
}

.stage-task:hover {
  outline: 2px solid rgba(0, 122, 255, .22);
  outline-offset: -2px;
}

.stage-task.stage-empty {
  background: #fff;
  min-height: 72px;
}

.stage-task.stage-empty:hover {
  background: #f7fbff;
}

.stage-editor-panel {
  width: min(620px, 100%);
}

.stage-editor-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stage-task.done {
  background: #f8fcf9;
}

.stage-task.doing {
  background: #f8fbff;
}

.stage-task.blocked {
  background: #fff8f7;
}

.stage-task.review {
  background: #fffaf0;
}

.stage-task.rejected {
  background: #fff7ed;
}

.stage-task.is-person-hit {
  outline: 2px solid rgba(0, 122, 255, .32);
  outline-offset: -2px;
  background: #eef6ff;
}

.stage-task.is-person-focus {
  outline: 2px solid rgba(0, 122, 255, .52);
  outline-offset: -2px;
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, .16);
}

.stage-task.is-person-focus b,
.stage-task.is-person-focus em {
  color: var(--blue);
}

.person-standard-table tr.person-focus-row .feature-name {
  box-shadow: inset 3px 0 0 var(--blue), 1px 0 0 var(--line);
}

.stage-task.is-risk-focus {
  outline: 2px solid rgba(217, 45, 32, .42);
  outline-offset: -2px;
  background: #fff3f1;
  box-shadow: inset 0 0 0 1px rgba(217, 45, 32, .12);
}

.stage-task.is-risk-focus b,
.stage-task.is-risk-focus em {
  color: var(--red);
}

.risk-standard-table tr.risk-focus-row .feature-name {
  box-shadow: inset 3px 0 0 var(--red), 1px 0 0 var(--line);
}

.stage-task.done b { color: var(--green); }
.stage-task.doing b { color: var(--blue); }
.stage-task.blocked b { color: var(--red); }
.stage-task.review b { color: var(--yellow); }
.stage-task.rejected b { color: #c2410c; }

.check {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(17, 17, 17, .28);
  border-radius: 3px;
  background: #fff;
  vertical-align: -2px;
}

.check.checked {
  border-color: var(--blue);
  background: var(--blue);
  position: relative;
}

.check.checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.stage-mark {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(17, 17, 17, .24);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.stage-task.done .stage-mark,
.stage-mark.done {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.stage-task.doing .stage-mark {
  border-color: var(--blue);
  color: var(--blue);
}

.stage-task.blocked .stage-mark {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.stage-task.review .stage-mark {
  border-color: var(--yellow);
  color: var(--yellow);
}

.stage-task.rejected .stage-mark {
  border-color: #c2410c;
  color: #c2410c;
}

.feature-actions {
  text-align: center;
}

.feature-actions a {
  display: inline-block;
  margin: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  color: #344054;
  background: #fff;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
  white-space: nowrap;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tr:last-child td { border-bottom: 0; }

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  white-space: nowrap;
  background: var(--wash);
  color: var(--muted);
}

.status.doing { background: rgba(0,122,255,.10); color: var(--blue); }
.status.queued, .status.todo { background: var(--wash); color: var(--muted); }
.status.review { background: rgba(183,121,31,.12); color: var(--yellow); }
.status.done { background: rgba(21,115,71,.12); color: var(--green); }
.status.rejected { background: rgba(217,45,32,.10); color: var(--red); }
.status.blocked { background: rgba(217,45,32,.10); color: var(--red); }

.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.responsibility-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.person {
  background: var(--wash);
  border-radius: 8px;
  padding: 14px;
}

.responsibility-card {
  border: 1px solid rgba(17, 17, 17, .12);
  background: #fff;
}

.person-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.mini-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: #475467;
  font-size: 12px;
  white-space: nowrap;
}

.responsibility-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.responsibility-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfbfb;
}

.responsibility-stats b {
  display: block;
  font-size: 18px;
  line-height: 22px;
}

.responsibility-stats span {
  color: var(--muted);
  font-size: 11px;
}

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

.responsibility-sections section {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.responsibility-sections h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: #475467;
}

.responsibility-task {
  border-top: 1px solid var(--line);
}

.person h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.people-matrix {
  display: grid;
  gap: 12px;
}

.people-quick-nav {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0 0 14px;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.people-quick-nav strong {
  padding-top: 5px;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
}

.people-quick-nav div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.people-quick-nav button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: #fafafa;
  color: #344054;
  font-size: 12px;
  cursor: pointer;
}

.people-quick-nav button:hover {
  border-color: rgba(0, 122, 255, .36);
  background: rgba(0, 122, 255, .08);
  color: #075db3;
}

.person-matrix-group .matrix-title {
  border-left-color: #111;
}

.person-project-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fbfbfb;
}

.person-project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.person-project-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.person-project-head h4 {
  margin: 0 0 3px;
  font-size: 14px;
  line-height: 20px;
}

.person-task-table-wrap {
  overflow-x: auto;
}

.person-task-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.person-task-table th,
.person-task-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  vertical-align: middle;
  text-align: center;
}

.person-task-table th {
  background: #fbfbfb;
  color: #333;
  font-size: 12px;
  font-weight: 650;
}

.person-task-table th:first-child,
.person-task-table td:first-child {
  width: 240px;
  text-align: left;
}

.person-task-table th:nth-child(2),
.person-task-table td:nth-child(2) { width: 130px; }
.person-task-table th:nth-child(3),
.person-task-table td:nth-child(3),
.person-task-table th:nth-child(4),
.person-task-table td:nth-child(4) { width: 110px; }
.person-task-table th:nth-child(5),
.person-task-table td:nth-child(5) { width: 86px; }
.person-task-table th:nth-child(6),
.person-task-table td:nth-child(6),
.person-task-table th:nth-child(7),
.person-task-table td:nth-child(7) { width: 82px; }

.person-task-table b {
  display: block;
  font-size: 13px;
  line-height: 18px;
  margin-bottom: 3px;
}

.person-task-table p {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.evidence-ok,
.evidence-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.evidence-ok {
  color: var(--green);
  background: rgba(21, 115, 71, .10);
}

.evidence-missing {
  color: var(--red);
  background: rgba(217, 45, 32, .08);
}

@keyframes jumpFlash {
  0% { background-color: rgba(0, 122, 255, .16); }
  100% { background-color: transparent; }
}

.risk-list, .evidence-list {
  display: grid;
  gap: 10px;
}

.risk-matrix,
.file-cabinet {
  display: grid;
  gap: 14px;
}

.simple-table-wrap {
  overflow-x: auto;
}

.simple-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.simple-table th,
.simple-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  vertical-align: middle;
  text-align: left;
}

.simple-table th {
  background: #fbfbfb;
  font-size: 12px;
  font-weight: 650;
}

.simple-table b {
  font-size: 13px;
}

.roster-table th:nth-child(1),
.roster-table td:nth-child(1) { width: 120px; }
.roster-table th:nth-child(2),
.roster-table td:nth-child(2) { width: 340px; }

.file-table th:nth-child(1),
.file-table td:nth-child(1) { width: 230px; }
.file-table th:nth-child(2),
.file-table td:nth-child(2) { width: 90px; }
.file-table th:nth-child(8),
.file-table td:nth-child(8) { width: 92px; }

.risk-matrix-group .matrix-title {
  border-left-color: var(--red);
}

.file-project-group .matrix-title {
  border-left-color: var(--blue);
}

.file-asset-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: #fbfbfb;
}

.file-asset {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
}

.file-asset.is-ready {
  box-shadow: inset 3px 0 0 var(--green);
}

.file-asset.is-missing {
  box-shadow: inset 3px 0 0 rgba(217, 45, 32, .72);
}

.file-asset a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}

.risk, .evidence, .detail {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.detail {
  grid-template-columns: 220px 1fr;
  margin-bottom: 12px;
}

.detail-page {
  grid-template-columns: 260px 1fr;
}

.detail h3, .risk h3, .evidence h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.detail-block {
  margin-bottom: 12px;
}

.detail-block h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.question {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  margin: 0 6px 6px 0;
  color: var(--muted);
  font-size: 12px;
}

.fold {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--paper);
}

.fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.fold > summary::-webkit-details-marker {
  display: none;
}

.fold > summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 500;
}

.fold[open] > summary::after {
  content: "-";
}

.fold-body {
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.asset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 70px;
}

.asset b {
  display: block;
  margin-bottom: 4px;
}

.task-card {
  border-top: 1px solid var(--line);
}

.task-card:first-child {
  border-top: 0;
}

.task-card summary {
  padding: 9px 0;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.task-card summary::-webkit-details-marker {
  display: none;
}

.task-card .task-body {
  padding: 0 0 10px;
}

.task-card.flat {
  padding: 10px 0;
}

.task-card.flat:first-child {
  padding-top: 0;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
}

.workflow-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--muted);
  font-size: 12px;
}

.workflow-step.done .workflow-index { background: rgba(21,115,71,.12); color: var(--green); }
.workflow-step.doing .workflow-index { background: rgba(0,122,255,.10); color: var(--blue); }
.workflow-step.blocked .workflow-index { background: rgba(217,45,32,.10); color: var(--red); }

.mini-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.mini-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--muted);
}

a {
  color: var(--blue);
  text-decoration: none;
}

footer {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 16px 30px;
  color: var(--muted);
  font-size: 12px;
}

.editor-modal[hidden] {
  display: none;
}

.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: start center;
  padding: 72px 16px 24px;
  background: rgba(17, 17, 17, .28);
}

.editor-panel {
  width: min(860px, 100%);
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 17, 17, .18);
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfb;
}

.editor-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 26px;
}

.editor-head p {
  color: var(--muted);
  font-size: 13px;
}

.editor-close {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #344054;
  cursor: pointer;
}

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

.editor-form label {
  display: grid;
  gap: 6px;
}

.editor-form label span {
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.editor-form input,
.editor-form select,
.editor-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.editor-form input:disabled,
.editor-form select:disabled {
  background: #f5f5f5;
  color: var(--muted);
}

.editor-form textarea {
  resize: vertical;
}

.editor-wide {
  grid-column: 1 / -1;
}

.editor-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.editor-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: #344054;
  cursor: pointer;
}

.editor-actions button[type="submit"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
    display: flex;
  }

  .brand {
    text-align: left;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .icon-btn {
    flex: 1;
    min-width: 58px;
  }

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

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

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

  .filter-block,
  .record-main,
  .record-bottom,
  .detail-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .detail-summary,
  .detail-summary.person-summary {
    grid-template-columns: 1fr;
  }

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

  .record-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .record-grid div:last-child {
    border-bottom: 0;
  }

  .library-list,
  .today-card-grid {
    grid-template-columns: 1fr;
  }

  .command-panel.span-2 {
    grid-column: auto;
  }

  .risk, .evidence, .detail {
    grid-template-columns: 1fr;
  }

  .feature-table {
    min-width: 1220px;
  }

  .editor-form {
    grid-template-columns: 1fr;
  }

  .editor-actions {
    display: grid;
  }
}
