:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --line: #dce3ec;
  --text: #08223f;
  --muted: #667386;
  --accent: #e11143;
  --accent-2: #012549;
  --danger: #b91c1c;
  --warning: #b45309;
  --success: #16803f;
  --blocked: #6d28d9;
  --state-not-started: #64748b;
  --state-in-progress: #2563eb;
  --state-review: #b45309;
  --state-done: #16803f;
  --state-blocked: #9333ea;
  --priority-low: #0e7490;
  --priority-normal: #3730a3;
  --priority-high: #c2410c;
  --priority-urgent: #b91c1c;
  --shadow: 0 14px 34px rgba(1, 37, 73, 0.09);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(1, 37, 73, 0.82), rgba(1, 37, 73, 0.58) 54%, rgba(225, 17, 67, 0.28)),
    url("/assets/hetao-hero-bg.jpg");
  background-size: cover;
  background-position: center;
}

.auth-panel {
  width: min(430px, 100%);
  background: rgba(255, 255, 255, 0.97);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(1, 20, 39, 0.32);
}

.brand {
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--accent-2);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  text-align: center;
}

.auth-brand img {
  width: min(260px, 100%);
  max-width: 100%;
  display: block;
}

.auth-brand strong {
  display: block;
  color: var(--accent-2);
  font-size: 22px;
  line-height: 1.25;
}

.auth-brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-lockup img {
  width: 176px;
  max-width: 100%;
  display: block;
}

.brand-lockup strong {
  display: block;
  color: var(--accent-2);
  font-size: 19px;
  line-height: 1.25;
}

.brand-lockup span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.6;
}

.auth-tabs,
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}

.auth-tabs button,
.tabs button {
  flex: 1;
  padding: 10px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.auth-tabs button.active,
.tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.field.has-field-error > span {
  color: var(--danger);
  font-weight: 700;
}

.field.has-field-error input,
.field.has-field-error select,
.field.has-field-error textarea {
  border-color: #fca5a5;
  background: #fff7f7;
}

.field.has-field-error input:focus,
.field.has-field-error select:focus,
.field.has-field-error textarea:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.11);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
}

.primary,
.secondary,
.ghost,
.danger {
  border-radius: 7px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  white-space: nowrap;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: #edf4fb;
  color: var(--accent-2);
  border: 1px solid #cad8e8;
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.danger {
  background: #fee2e2;
  color: #991b1b;
}

.notice {
  padding: 10px 12px;
  border-radius: 7px;
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
  line-height: 1.5;
}

.notice.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.draft-hint {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 999px;
  background: rgba(236, 254, 255, 0.72);
  color: #0e7490;
  font-size: 12px;
  line-height: 1.4;
  padding: 4px 9px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  background: #fff;
  color: var(--text);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--line);
}

.sidebar .brand {
  margin-bottom: 0;
}

.sidebar .brand-lockup {
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: 0;
}

.sidebar .brand-lockup img {
  display: none;
}

.sidebar .brand-lockup strong {
  color: var(--accent-2);
}

.sidebar .brand-lockup span {
  color: var(--muted);
}

.user-chip {
  padding: 12px;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-chip strong {
  display: block;
  margin-bottom: 4px;
}

.user-chip span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav button,
.sidebar-footer button {
  width: 100%;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 11px 12px;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav button.active,
.nav button:hover,
.sidebar-footer button:hover {
  background: #edf4fb;
  color: var(--accent-2);
}

.nav-group {
  display: grid;
  gap: 5px;
  padding: 6px 0 6px 10px;
  border-left: 2px solid var(--line);
  min-width: 0;
}

.project-nav-list {
  gap: 7px;
}

.nav-project {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav button.project-entry {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav button.project-entry:hover,
.nav button.project-entry.active {
  background: #f1f7ff;
  color: var(--accent-2);
}

.nav button.project-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 7px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.nav button.project-toggle.expanded {
  transform: rotate(90deg);
}

.nav button.project-toggle:hover,
.nav button.project-toggle:focus-visible {
  background: #edf4fb;
  color: var(--accent-2);
}

.nav button.sub {
  padding: 8px 10px;
  font-size: 13px;
  margin-left: 8px;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 7px;
}

.main {
  min-width: 0;
  padding: 22px 26px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar h1 {
  font-size: 24px;
  margin: 0;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.realtime-alert-center {
  position: relative;
  flex: 0 0 auto;
}

.realtime-alert-button {
  min-width: 42px;
  padding: 8px 10px;
  gap: 6px;
}

.realtime-alert-button > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
  line-height: 1;
}

.realtime-alert-button.has-unread > span {
  background: #fee2e2;
  color: var(--danger);
}

.realtime-alert-button strong {
  font-size: 13px;
  line-height: 1;
}

.realtime-alert-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  padding: 10px;
}

.realtime-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 9px;
  border-bottom: 1px solid var(--line);
}

.realtime-alert-head strong {
  display: block;
  font-size: 14px;
}

.realtime-alert-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.realtime-alert-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.realtime-alert-head .ghost {
  min-height: 28px;
  padding: 0 9px;
}

.realtime-alert-list {
  display: grid;
  gap: 8px;
  padding-top: 9px;
}

.realtime-alert-item {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: 7px;
  background: #fff;
  padding: 9px 10px;
}

.realtime-alert-item:hover,
.realtime-alert-item:focus-visible {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.11);
}

.realtime-alert-item.is-unread {
  background: #f8fbff;
}

.realtime-alert-item.tone-ok {
  border-left-color: #16a34a;
}

.realtime-alert-item.tone-notice {
  border-left-color: #2563eb;
}

.realtime-alert-item.tone-warning {
  border-left-color: var(--warning);
}

.realtime-alert-item.tone-critical {
  border-left-color: var(--danger);
}

.realtime-alert-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.realtime-alert-item strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.realtime-alert-item small {
  color: var(--muted);
  font-size: 12px;
}

.realtime-alert-empty {
  padding: 18px 10px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.task-closeout-form {
  gap: 13px;
}

.task-closeout-brief,
.task-closeout-source,
.task-closeout-checklist {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 11px 12px;
}

.task-closeout-brief span,
.task-closeout-source span,
.task-closeout-checklist span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-closeout-brief strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.task-closeout-brief small,
.task-closeout-source p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.task-closeout-checklist ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel {
  padding: 16px;
}

.section-flash {
  animation: section-flash 1.2s ease;
}

@keyframes section-flash {
  0% {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .2), var(--shadow);
  }
  100% {
    box-shadow: var(--shadow);
  }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 17px;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stat {
  padding: 16px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.card {
  padding: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf2f0;
  color: #41504d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid #dbe4e1;
}

.badge.status-done,
.badge.status-completed {
  background: #dcfce7;
  color: var(--state-done);
  border-color: #bbf7d0;
}

.badge.status-active,
.badge.status-in_progress {
  background: #dbeafe;
  color: var(--state-in-progress);
  border-color: #bfdbfe;
}

.badge.status-planning {
  background: #eef2ff;
  color: var(--priority-normal);
  border-color: #c7d2fe;
}

.badge.status-pending_review {
  background: #fef3c7;
  color: var(--state-review);
  border-color: #fde68a;
}

.badge.status-not_started {
  background: #f8fafc;
  color: var(--state-not-started);
  border-color: #cbd5e1;
}

.badge.status-blocked,
.badge.status-paused {
  background: #fae8ff;
  color: var(--state-blocked);
  border-color: #f5d0fe;
}

.badge.status-archived,
.badge.status-disabled {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.badge.status-pending,
.badge.status-project-paused {
  background: #fff7ed;
  color: var(--warning);
  border-color: #fed7aa;
}

.badge.status-overdue,
.badge.priority-urgent {
  background: #fee2e2;
  color: var(--priority-urgent);
  border-color: #fecaca;
}

.badge.priority-high {
  background: #ffedd5;
  color: var(--priority-high);
  border-color: #fed7aa;
}

.badge.priority-normal {
  background: #eef2ff;
  color: var(--priority-normal);
  border-color: #c7d2fe;
}

.badge.priority-low {
  background: #ecfeff;
  color: var(--priority-low);
  border-color: #a5f3fc;
}

.badge.badge-assignee {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

.badge.badge-date {
  background: #f8fafc;
  color: #334155;
  border-color: #dbe3ec;
}

.badge.badge-progress {
  background: #f0fdf4;
  color: var(--success);
  border-color: #bbf7d0;
}

.badge.badge-confidence {
  background: #f8fafc;
  color: #334155;
  border-color: #dbe3ec;
}

.badge.badge-confidence-low {
  background: #fff7ed;
  color: var(--warning);
  border-color: #fed7aa;
}

.badge.project-pace-badge {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.16);
}

.badge.project-pace-badge.tone-ok,
.badge.project-pace-badge.tone-ahead {
  background: rgba(22, 128, 63, 0.1);
  color: var(--state-done);
  border-color: rgba(22, 128, 63, 0.18);
}

.badge.project-pace-badge.tone-warning {
  background: rgba(180, 83, 9, 0.1);
  color: var(--warning);
  border-color: rgba(180, 83, 9, 0.2);
}

.badge.project-pace-badge.tone-critical {
  background: rgba(185, 28, 28, 0.1);
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.2);
}

.progress {
  width: 100%;
  height: 8px;
  background: #e6ecea;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.progress.compact {
  height: 6px;
  min-width: 96px;
  margin: 0 0 6px;
}

.project-filter-bar {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(130px, 0.9fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.project-filter-bar .field {
  margin: 0;
}

.project-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.project-filter-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.project-card.has-risk {
  border-color: #fed7aa;
  box-shadow: 0 12px 30px rgba(180, 83, 9, 0.12);
}

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

.project-card-actions button {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
}

.project-card-actions .project-share-button {
  border-style: dashed;
  background: #f8fafc;
}

.project-card-actions span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-actions small {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  line-height: 1.35;
  opacity: .78;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-progress {
  --task-progress: 0%;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  min-width: 0;
}

.field .task-progress {
  margin-top: 0;
}

.task-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.task-progress-head span {
  color: var(--muted);
  font-size: 13px;
}

.task-progress-meta {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}

.task-progress-value {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 4px 8px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fff1f2;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
}

.task-progress-save-status {
  display: inline-flex;
  align-items: center;
  max-width: 170px;
  min-height: 24px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-align: right;
}

.task-progress-save-status.is-editing,
.task-progress-save-status.is-saving {
  color: #92400e;
}

.task-progress-save-status.is-saved {
  color: #15803d;
}

.task-progress-save-status.is-error {
  color: var(--danger);
}

.task-progress-save-status.is-readonly {
  color: #64748b;
}

.task-progress-control {
  position: relative;
  display: block;
  height: 44px;
  min-width: 0;
}

.task-progress-track {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 12px;
  border-radius: 999px;
  transform: translateY(-50%);
  background:
    linear-gradient(90deg, var(--accent) 0 var(--task-progress), transparent var(--task-progress) 100%),
    #e6ecea;
  box-shadow: inset 0 0 0 1px rgba(8, 34, 63, 0.08);
}

.task-progress-track::after {
  content: "";
  position: absolute;
  inset: -2px 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 0% 50%, #fff 0 3px, #9aa5b1 3.2px 4.2px, transparent 4.4px),
    radial-gradient(circle at 20% 50%, #fff 0 3px, #9aa5b1 3.2px 4.2px, transparent 4.4px),
    radial-gradient(circle at 40% 50%, #fff 0 3px, #9aa5b1 3.2px 4.2px, transparent 4.4px),
    radial-gradient(circle at 60% 50%, #fff 0 3px, #9aa5b1 3.2px 4.2px, transparent 4.4px),
    radial-gradient(circle at 80% 50%, #fff 0 3px, #9aa5b1 3.2px 4.2px, transparent 4.4px),
    radial-gradient(circle at 100% 50%, #fff 0 3px, #9aa5b1 3.2px 4.2px, transparent 4.4px);
  pointer-events: none;
}

.task-progress-range {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
  touch-action: pan-y;
  -webkit-appearance: none;
  appearance: none;
}

.field input.task-progress-range {
  padding: 0;
  border: 0;
  background: transparent;
}

.field input.task-progress-range:focus {
  border-color: transparent;
  box-shadow: none;
}

.task-progress-range::-webkit-slider-runnable-track {
  height: 12px;
  border: 0;
  background: transparent;
}

.task-progress-range::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -6px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 12px rgba(1, 37, 73, 0.18);
  -webkit-appearance: none;
  appearance: none;
}

.task-progress-range::-moz-range-track {
  height: 12px;
  border: 0;
  background: transparent;
}

.task-progress-range::-moz-range-progress {
  height: 12px;
  background: transparent;
}

.task-progress-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 12px rgba(1, 37, 73, 0.18);
}

.task-progress-range:focus-visible + .task-progress-track {
  box-shadow:
    inset 0 0 0 1px rgba(8, 34, 63, 0.08),
    0 0 0 3px rgba(225, 17, 67, 0.16);
}

.task-progress-range:disabled {
  cursor: default;
}

.task-progress.is-readonly .task-progress-track {
  background:
    linear-gradient(90deg, #94a3b8 0 var(--task-progress), transparent var(--task-progress) 100%),
    #eef2f7;
}

.task-progress-range:disabled::-webkit-slider-thumb {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: none;
}

.task-progress-range:disabled::-moz-range-thumb {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: none;
}

.task-progress-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  color: #667386;
  font-size: 11px;
  line-height: 1.2;
}

.task-progress-steps span {
  min-width: 0;
  text-align: center;
}

.task-progress-steps span:first-child {
  text-align: left;
}

.task-progress-steps span:last-child {
  text-align: right;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 820px;
  background: #fff;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f8faf9;
  font-size: 13px;
  font-weight: 700;
}

td {
  font-size: 14px;
}

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

.empty-cell {
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.user-management-panel {
  display: grid;
  gap: 12px;
}

.user-quick-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.user-quick-filter {
  min-height: 94px;
}

.user-quick-filter.tone-pending strong {
  background: #fef3c7;
  color: var(--state-review);
}

.user-quick-filter.tone-active strong {
  background: #dbeafe;
  color: var(--state-in-progress);
}

.user-quick-filter.tone-disabled strong {
  background: #f1f5f9;
  color: #475569;
}

.user-quick-filter.tone-admin strong {
  background: #fee2e2;
  color: #b91c1c;
}

.user-quick-filter.tone-manager strong {
  background: #eef2ff;
  color: var(--priority-normal);
}

.user-quick-filter.tone-member strong,
.user-quick-filter.tone-all strong {
  background: #ecfdf5;
  color: #0f766e;
}

.user-filter-bar {
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, .8fr) minmax(120px, .8fr) auto;
  margin-bottom: 0;
}

.project-summary-row {
  cursor: pointer;
}

.project-summary-row:hover td,
.project-summary-row:focus-visible td {
  background: #f8fbff;
}

.project-summary-row:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: -3px;
}

.project-risk-link {
  width: auto;
  cursor: pointer;
  font-family: inherit;
}

.project-risk-link:hover,
.project-risk-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(225, 17, 67, .14);
}

.task-table-row-clickable {
  cursor: pointer;
}

.task-table-row-clickable:hover td,
.task-table-row-clickable:focus-visible td {
  background: #f8fbff;
}

.task-table-row-clickable:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: -3px;
}

.dashboard-focus-panel {
  display: grid;
  gap: 10px;
}

.dashboard-workbench {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border-color: #bfdbfe;
  background: #fbfdff;
}

.dashboard-workbench .panel-header {
  margin-bottom: 0;
}

.admin-risk-console .panel-header {
  margin-bottom: 14px;
}

.dashboard-workbench-grid {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(150px, .75fr));
  gap: 8px;
}

.dashboard-workbench-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-risk-console .dashboard-workbench-card {
  gap: 6px;
  min-height: 126px;
  padding: 12px;
}

.dashboard-priority-card {
  min-height: 92px;
}

.dashboard-action-card {
  align-content: center;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 4px;
}

.dashboard-action-card > span,
.dashboard-action-card strong {
  grid-column: 1;
}

.dashboard-workbench-card[role="button"] {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-workbench-card[role="button"]:hover,
.dashboard-workbench-card[role="button"]:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-workbench-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-workbench-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dashboard-workbench-card small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dashboard-workbench-card button {
  align-self: end;
  width: auto;
  margin-top: 4px;
}

.dashboard-action-card button {
  align-self: center;
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  max-width: 100%;
  margin-top: 0;
  white-space: nowrap;
}

.dashboard-workbench-card.tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.dashboard-workbench-card.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.dashboard-workbench-card.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.dashboard-workbench-card.tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.dashboard-portfolio {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, 1.2fr) minmax(0, 3fr);
  gap: 8px;
  min-width: 0;
}

.dashboard-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.dashboard-portfolio-focus,
.dashboard-portfolio-card {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-portfolio-focus {
  align-content: center;
}

.dashboard-portfolio-focus[role="button"],
.dashboard-portfolio-card[role="button"] {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-portfolio-focus[role="button"]:hover,
.dashboard-portfolio-focus[role="button"]:focus-visible,
.dashboard-portfolio-card[role="button"]:hover,
.dashboard-portfolio-card[role="button"]:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-portfolio-focus > span,
.dashboard-portfolio-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.dashboard-portfolio-focus strong,
.dashboard-portfolio-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dashboard-portfolio-focus small,
.dashboard-portfolio-card small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dashboard-portfolio-focus.tone-ok,
.dashboard-portfolio-card.tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.dashboard-portfolio-focus.tone-notice,
.dashboard-portfolio-card.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.dashboard-portfolio-focus.tone-warning,
.dashboard-portfolio-card.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.dashboard-portfolio-focus.tone-critical,
.dashboard-portfolio-card.tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.admin-risk-console {
  border-color: #c7d2fe;
  background: #fbfcff;
}

.admin-risk-grid {
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, .9fr));
}

.admin-risk-action-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.admin-risk-action-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-risk-action-item > b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
}

.admin-risk-action-item > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-risk-action-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-risk-action-item strong {
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-risk-action-item small,
.admin-risk-action-item em,
.admin-risk-action-empty small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-risk-action-item button {
  white-space: nowrap;
}

.admin-risk-action-item.tone-critical {
  border-color: #fecaca;
  background: #fff8f8;
}

.admin-risk-action-item.tone-critical > b {
  color: #b91c1c;
  background: #fee2e2;
}

.admin-risk-action-item.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.admin-risk-action-item.tone-warning > b {
  color: #b45309;
  background: #ffedd5;
}

.admin-risk-action-item.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.admin-risk-action-item.tone-notice > b {
  color: #1d4ed8;
  background: #dbeafe;
}

.admin-risk-action-item.is-focus {
  box-shadow: inset 3px 0 0 #2563eb;
}

.admin-risk-action-list.is-clear {
  padding: 10px;
  border: 1px dashed #bbf7d0;
  border-radius: 8px;
  background: #f7fef9;
}

.admin-risk-action-empty {
  display: grid;
  gap: 2px;
}

.dashboard-focus-list {
  display: grid;
  gap: 9px;
}

.dashboard-focus-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-focus-item:hover,
.dashboard-focus-item:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-focus-item.severity-warning:hover,
.dashboard-focus-item.severity-warning:focus-visible {
  border-color: #f59e0b;
}

.dashboard-focus-item.severity-critical:hover,
.dashboard-focus-item.severity-critical:focus-visible {
  border-color: #ef4444;
}

.dashboard-focus-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #e0f2fe;
  color: #075985;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-focus-item.severity-warning > span {
  background: #fef3c7;
  color: #92400e;
}

.dashboard-focus-item.severity-critical > span {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-focus-item div {
  min-width: 0;
}

.dashboard-focus-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-focus-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.34fr);
  gap: 14px;
}

.project-layout > .grid:first-child {
  grid-template-columns: 1fr;
}

.project-layout > .grid:first-child > * {
  order: 10;
}

.project-side-rail {
  align-content: start;
  gap: 12px;
}

.project-side-rail .compact-panel {
  padding: 12px;
}

.project-side-rail .panel-header {
  margin-bottom: 8px;
}

.project-side-rail .activity-rule-note {
  display: none;
}

.project-side-rail .overview-ai-card .overview-ai-meta {
  gap: 5px;
}

.project-side-rail .memo-insight {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-side-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.project-side-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.project-side-facts span {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-side-facts .badge {
  justify-content: center;
}

.project-side-facts .is-risk {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.project-side-facts .is-review {
  border-color: #fde68a;
  background: #fffdf5;
  color: #92400e;
}

.project-side-member-list {
  display: grid;
  gap: 7px;
}

.project-side-member {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.project-side-member strong,
.project-side-member span,
.project-side-member small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-side-member strong {
  font-size: 13px;
}

.project-side-member span,
.project-side-member small {
  color: var(--muted);
  font-size: 12px;
}

.full-width {
  width: 100%;
}

.compact-empty {
  padding: 10px;
  font-size: 12px;
}

.project-info-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.project-snapshot-panel {
  display: grid;
  gap: 12px;
}

.member-snapshot-list {
  display: grid;
  gap: 9px;
}

.member-snapshot-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.member-snapshot-card.tone-ok {
  border-color: #bbf7d0;
  background: #f8fefa;
}

.member-snapshot-card.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.member-snapshot-card.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.member-snapshot-card.tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.member-snapshot-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.member-snapshot-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.member-snapshot-title span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-snapshot-title em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.member-snapshot-main small,
.member-snapshot-main p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.member-snapshot-main p {
  color: #334155;
  font-weight: 700;
}

.member-snapshot-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.member-snapshot-signals b {
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.member-snapshot-signals b.is-risk {
  background: #fee2e2;
  color: #991b1b;
}

.member-snapshot-signals b.is-review {
  background: #ffedd5;
  color: #9a3412;
}

.project-workbench {
  display: grid;
  gap: 12px;
  border-color: #bfdbfe;
  background: #fbfdff;
}

.project-workbench.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.project-workbench.tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

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

.project-workbench-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 138px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-workbench-card[role="button"] {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.project-workbench-card[role="button"]:hover,
.project-workbench-card[role="button"]:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.project-workbench-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.project-workbench-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-workbench-card small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.project-workbench-card button {
  align-self: end;
  width: auto;
  margin-top: 4px;
}

.project-workbench-card.tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.project-workbench-card.tone-notice,
.project-workbench-card.tone-ahead {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.project-workbench-card.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.project-workbench-card.tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.project-workbench-card.smart-entry-card {
  border-color: #c7d2fe;
  background: #f8faff;
}

.workbench-ai-decision {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0;
}

.workbench-ai-decision > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
}

.workbench-ai-decision span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.workbench-ai-decision strong {
  display: -webkit-box;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workbench-ai-decision .tone-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.workbench-ai-decision .tone-risk,
.workbench-ai-decision .tone-warning,
.workbench-ai-decision .tone-action {
  border-color: #fed7aa;
  background: #fff7ed;
}

.workbench-ai-decision .tone-critical {
  border-color: #fecaca;
  background: #fff1f2;
}

.workbench-ai-decision .tone-muted {
  background: #f8fafc;
}

.workbench-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.project-workbench-card .workbench-ai-actions button {
  align-self: auto;
  margin-top: 0;
}

.project-overview-shortcuts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  order: 2;
}

.overview-schedule-panel {
  display: grid;
  gap: 8px;
  order: 1;
  grid-column: 1 / -1;
  max-width: 100%;
  overflow: hidden;
  border-color: #bfdbfe;
  background: #fbfdff;
}

.overview-schedule-panel .panel-header {
  margin-bottom: -2px;
}

.overview-schedule-panel .panel-header h2 {
  color: #012549;
}

.overview-schedule-panel .panel-header p {
  font-size: 12px;
  line-height: 1.45;
}

.overview-schedule-panel .gantt-summary.compact {
  grid-template-columns: repeat(7, minmax(74px, 1fr));
  gap: 5px;
  margin-bottom: 6px;
}

.overview-schedule-panel .gantt-summary.compact .gantt-summary-item {
  min-height: 44px;
  padding: 5px 7px;
}

.overview-schedule-panel .gantt-summary.compact .gantt-summary-item strong {
  font-size: 15px;
}

.overview-schedule-panel .gantt-summary.compact .gantt-summary-item span {
  font-size: 11px;
}

.overview-schedule-panel .gantt-summary.compact .gantt-summary-item small {
  display: none;
}

.overview-schedule-panel .gantt-focus-bar {
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 6px;
  padding: 7px 9px;
  gap: 6px;
}

.overview-schedule-panel .gantt-focus-bar p {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.overview-schedule-panel .gantt-focus-main {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 8px;
}

.overview-schedule-panel .gantt-focus-main span {
  grid-row: span 2;
}

.overview-schedule-panel .gantt-focus-main small {
  grid-column: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-schedule-panel .gantt-focus-chips {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow: hidden;
}

.overview-schedule-panel .gantt-focus-chip {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 11px;
}

.overview-schedule-panel .gantt-unscheduled {
  margin-bottom: 8px;
  padding: 8px 10px;
}

.overview-schedule-panel .gantt-legend.compact {
  gap: 5px 8px;
  margin: -2px 0 6px;
  max-height: 22px;
  overflow: hidden;
  font-size: 11px;
}

.project-overview-shortcut {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 7px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.project-overview-shortcut:hover,
.project-overview-shortcut:focus-visible {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.project-overview-shortcut span,
.project-overview-shortcut em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-overview-shortcut span {
  grid-column: 1;
  font-weight: 900;
}

.project-overview-shortcut strong {
  display: flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.project-overview-shortcut strong small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.project-overview-shortcut em {
  grid-column: 1 / -1;
  font-style: normal;
}

.project-overview-shortcut.tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.project-overview-shortcut.tone-ok strong {
  color: #15803d;
}

.project-overview-shortcut.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.project-overview-shortcut.tone-warning strong {
  color: #b45309;
}

.project-overview-shortcut.tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.project-overview-shortcut.tone-critical strong {
  color: #b91c1c;
}

.project-overview-shortcut.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.project-overview-shortcut.tone-notice strong {
  color: #1d4ed8;
}

.project-overview-shortcut.tone-missing {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.project-overview-shortcut.tone-missing strong {
  color: #64748b;
}

.project-action-board {
  display: grid;
  gap: 8px;
  order: 3;
  grid-column: 1 / -1;
  border-color: #bfdbfe;
  background: #fbfdff;
  padding: 12px;
}

.project-action-board.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.project-action-board.tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.project-action-board.tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.project-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-action-head h2 {
  margin: 0;
  font-size: 20px;
}

.project-action-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.project-action-list {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(0, .9fr));
  gap: 7px;
}

.project-action-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-action-item > b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.project-action-item.tone-critical {
  border-color: #fecaca;
  background: #fffafa;
}

.project-action-item.tone-critical > b {
  background: #fee2e2;
  color: #991b1b;
}

.project-action-item.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.project-action-item.tone-warning > b {
  background: #fef3c7;
  color: #92400e;
}

.project-action-item.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.project-action-item > div {
  min-width: 0;
}

.project-action-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.project-action-item strong {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-action-item small {
  display: -webkit-box;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.project-action-item button {
  width: auto;
  min-height: 30px;
  padding: 5px 8px;
  white-space: nowrap;
}

.project-summary-actions {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.project-summary-action {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  padding: 7px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.project-summary-action:hover,
.project-summary-action:focus-visible {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.project-summary-action span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-summary-action small,
.project-summary-actions em {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.project-summary-action.tone-critical {
  border-color: #fecaca;
  background: #fffafa;
}

.project-summary-action.tone-critical span {
  color: var(--priority-urgent);
}

.project-summary-action.tone-warning {
  border-color: #fde68a;
  background: #fffdf5;
}

.project-summary-action.tone-warning span {
  color: var(--state-review);
}

.project-summary-action.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.project-summary-actions.is-clear {
  min-width: 150px;
}

.kickoff-guide {
  display: grid;
  gap: 10px;
}

.kickoff-guide .panel-header {
  margin-bottom: 0;
}

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

.kickoff-guide-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kickoff-guide-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.kickoff-guide-item.tone-critical {
  border-color: #fecaca;
  background: #fffafa;
}

.kickoff-guide-item.tone-critical > span {
  background: #fee2e2;
  color: #991b1b;
}

.kickoff-guide-item.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.kickoff-guide-item.tone-warning > span {
  background: #fef3c7;
  color: #92400e;
}

.kickoff-guide-item.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.kickoff-guide-item > div {
  min-width: 0;
}

.kickoff-guide-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kickoff-guide-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.kickoff-guide-item button {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

.project-pace {
  display: grid;
  gap: 12px;
}

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

.project-pace-head h2 {
  margin: 0;
}

.project-pace-head p,
.project-pace-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.project-pace-head > strong {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--accent-2);
  font-size: 12px;
}

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

.project-pace-grid div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.project-pace-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.project-pace-grid strong {
  display: block;
  margin-top: 2px;
  color: var(--accent-2);
  font-size: 18px;
  line-height: 1.1;
}

.project-pace-bars {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.project-pace-bars .expected,
.project-pace-bars .actual {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.project-pace-bars .expected {
  width: var(--expected);
  background: repeating-linear-gradient(45deg, rgba(100, 116, 139, 0.42) 0 6px, rgba(100, 116, 139, 0.28) 6px 12px);
}

.project-pace-bars .actual {
  width: var(--actual);
  background: var(--state-in-progress);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.project-pace.tone-ok .project-pace-head > strong,
.project-pace.tone-ahead .project-pace-head > strong {
  background: #dcfce7;
  color: var(--state-done);
}

.project-pace.tone-ahead .project-pace-bars .actual {
  background: var(--state-done);
}

.project-pace.tone-warning .project-pace-head > strong {
  background: #fef3c7;
  color: var(--warning);
}

.project-pace.tone-warning .project-pace-bars .actual {
  background: var(--warning);
}

.project-pace.tone-critical .project-pace-head > strong {
  background: #fee2e2;
  color: var(--danger);
}

.project-pace.tone-critical .project-pace-bars .actual {
  background: var(--danger);
}

.project-pace.tone-muted .project-pace-head > strong {
  color: #64748b;
}

.focus-alerts {
  display: grid;
  gap: 10px;
  border-color: #bfdbfe;
}

.focus-alerts.has-warning {
  border-color: #fed7aa;
}

.focus-alerts.has-critical {
  border-color: #fecaca;
}

.focus-alert-list {
  display: grid;
  gap: 8px;
}

.focus-rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.focus-rule strong {
  color: #1d4ed8;
  font-size: 12px;
  line-height: 1.35;
}

.focus-rule span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.focus-ai-advice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.focus-ai-advice.has-warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.focus-ai-advice.has-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.focus-ai-advice.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.focus-ai-advice > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.focus-ai-advice.has-warning > span {
  background: #fef3c7;
  color: #92400e;
}

.focus-ai-advice.has-critical > span {
  background: #fee2e2;
  color: #991b1b;
}

.focus-ai-advice.is-ready > span {
  background: #dcfce7;
  color: #166534;
}

.focus-ai-advice > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.focus-ai-advice strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-ai-advice small {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.focus-ai-advice .meta-row {
  gap: 6px;
}

.focus-ai-advice .meta-row em {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.focus-ai-advice button {
  width: auto;
  white-space: nowrap;
}

.focus-alert-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.focus-alert-item:hover,
.focus-alert-item:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.focus-alert-item.severity-warning:hover,
.focus-alert-item.severity-warning:focus-visible {
  border-color: #f59e0b;
}

.focus-alert-item.severity-critical:hover,
.focus-alert-item.severity-critical:focus-visible {
  border-color: #ef4444;
}

.focus-alert-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #075985;
  font-size: 13px;
  font-weight: 800;
}

.focus-alert-item.severity-warning > span {
  background: #fef3c7;
  color: #92400e;
}

.focus-alert-item.severity-critical > span {
  background: #fee2e2;
  color: #991b1b;
}

.focus-alert-item div {
  min-width: 0;
}

.focus-alert-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-alert-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.compact-panel .panel-header {
  margin-bottom: 10px;
}

.compact-form {
  gap: 8px;
}

.compact-form textarea {
  min-height: 76px;
}

.memo-quick-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.memo-summary-list {
  margin-top: 12px;
}

.memo-summary-list .message {
  padding: 10px;
}

.memo-insight {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.memo-insight.empty {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.memo-insight.empty strong {
  color: var(--text);
}

.memo-insight-item {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.memo-insight-item strong {
  color: var(--accent-2);
  font-size: 20px;
  line-height: 1.1;
}

.memo-insight-item span {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.memo-insight-item small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.memo-insight-item.tone-ok {
  border-color: #bbf7d0;
  background: #f7fdf9;
}

.memo-insight-item.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.memo-insight-item.tone-warning strong {
  color: #b45309;
}

.memo-insight-item.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.memo-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.memo-signal {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
  white-space: nowrap;
}

.memo-signal.tone-ok {
  background: #dcfce7;
  color: #15803d;
}

.memo-signal.tone-warning {
  background: #ffedd5;
  color: #b45309;
}

.memo-signal.tone-notice {
  background: #dbeafe;
  color: #1d4ed8;
}

.overview-ai-card {
  display: grid;
  gap: 10px;
}

.project-side-rail .overview-ai-card {
  gap: 8px;
}

.project-side-rail .overview-ai-card .overview-ai-decision {
  padding: 9px;
}

.project-side-rail .overview-ai-card .overview-ai-decision p {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.project-side-rail .overview-ai-card .overview-ai-compact-facts {
  grid-template-columns: 1fr;
  gap: 6px;
}

.project-side-rail .overview-ai-card .overview-ai-compact-facts p {
  min-height: auto;
  padding: 7px 8px;
}

.project-side-rail .overview-ai-card .toolbar {
  gap: 6px;
}

.project-side-rail .overview-ai-card .toolbar > * {
  flex: 1 1 0;
  width: auto;
}

.overview-ai-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.overview-ai-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.overview-ai-meta .tone-warning {
  border-color: #fed7aa;
  color: #92400e;
  background: #fffaf3;
}

.overview-ai-decision {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}

.overview-ai-decision span,
.overview-ai-action-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.overview-ai-decision strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.overview-ai-decision p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.overview-ai-compact-facts {
  display: grid;
  gap: 6px;
}

.overview-ai-compact-facts p {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.overview-ai-compact-facts strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.overview-ai-compact-facts span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-ai-decision.is-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.overview-ai-decision.is-risk,
.overview-ai-decision.is-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.overview-ai-decision.is-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-execution-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #f8fbff;
}

.ai-execution-focus.compact {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.ai-execution-focus > div {
  min-width: 0;
}

.ai-execution-focus span:first-child {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-execution-focus strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ai-execution-focus p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-execution-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ai-execution-meta span {
  display: block;
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ai-execution-focus button {
  white-space: nowrap;
}

.overview-ai-action-grid {
  display: grid;
  gap: 8px;
}

.overview-ai-action-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.overview-ai-action-grid strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.overview-ai-action-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.overview-ai-action-grid .tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.overview-ai-action-grid .tone-risk,
.overview-ai-action-grid .tone-action,
.overview-ai-action-grid .tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.overview-ai-action-grid .tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.overview-ai-action-grid .tone-muted {
  background: #f8fafc;
}

.overview-ai-next-actions,
.overview-ai-evidence-actions {
  display: grid;
  gap: 6px;
}

.overview-ai-action-button {
  display: grid;
  gap: 2px;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  text-align: left;
  white-space: normal;
}

.overview-ai-action-button strong,
.overview-ai-action-button small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.overview-ai-action-button strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.overview-ai-action-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.ai-method.compact {
  grid-template-columns: 1fr;
  gap: 7px;
  margin-bottom: 10px;
}

.ai-method-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.ai-method-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.ai-method-step strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.ai-method-step p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-decision-process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-decision-process.compact {
  grid-template-columns: 1fr;
  gap: 8px;
}

.ai-decision-process article {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-decision-process.compact article {
  min-height: 0;
  padding: 10px;
}

.ai-decision-process span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-decision-process strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ai-decision-process small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-decision-process .tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-decision-process .tone-warning,
.ai-decision-process .tone-risk {
  border-color: #fed7aa;
  background: #fffaf3;
}

.ai-decision-process .tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-decision-process .tone-muted {
  background: #f8fafc;
}

.ai-highlights {
  padding: 12px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #f8fbff;
}

.ai-highlights.compact {
  padding: 10px;
}

.ai-highlights strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.ai-highlights ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.ai-highlights li {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.overview-ai-status {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
}

.overview-ai-status > span,
.overview-ai-points span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-ai-status strong {
  font-size: 18px;
  line-height: 1.25;
}

.overview-ai-status strong.is-ok {
  color: #0f766e;
}

.overview-ai-status strong.is-risk,
.overview-ai-status strong.is-warning {
  color: #b45309;
}

.overview-ai-status strong.is-critical {
  color: #b91c1c;
}

.overview-ai-points {
  display: grid;
  gap: 8px;
}

.overview-ai-points > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.overview-ai-points p {
  margin: 4px 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.member-workload-card {
  display: grid;
  gap: 10px;
}

.task-member-workload-section {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.member-workload-list {
  display: grid;
  gap: 8px;
}

.member-workload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.member-workload-item:hover,
.member-workload-item:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.member-workload-item.has-risk {
  border-color: #fecaca;
  background: #fffafa;
}

.member-workload-item.has-review {
  border-color: #fde68a;
  background: #fffdf3;
}

.member-workload-item.is-clear {
  background: #f8fafc;
}

.member-workload-main {
  min-width: 0;
}

.member-workload-main strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-workload-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.member-workload-main em {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-workload-metrics {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.member-workload-item .progress {
  grid-column: 1 / -1;
}

.member-priority {
  background: #dbeafe;
  color: #1d4ed8;
}

.member-workload-unassigned {
  padding: 10px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf3;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.member-workload-unassigned:hover,
.member-workload-unassigned:focus-visible {
  border-color: #fb923c;
  box-shadow: 0 8px 20px rgba(154, 52, 18, .09);
  outline: none;
  transform: translateY(-1px);
}

.member-workload-unassigned strong {
  display: block;
  color: var(--warning);
  font-size: 13px;
}

.member-workload-unassigned p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.file-summary-card {
  display: grid;
  gap: 8px;
}

.file-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.file-summary-list {
  display: grid;
  gap: 8px;
}

.file-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-summary-item div {
  min-width: 0;
}

.file-summary-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-summary-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-evidence-records {
  display: grid;
  gap: 12px;
}

.project-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.project-evidence-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.project-record-section {
  border-color: #e2e8f0;
  background: #fff;
}

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

.project-evidence-head div {
  min-width: 0;
}

.project-evidence-head strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.project-evidence-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.evidence-gap-row span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
}

.evidence-gap-row.is-ok span {
  background: #dcfce7;
  color: #15803d;
}

.project-evidence-latest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-evidence-latest div {
  min-width: 0;
}

.project-evidence-latest strong,
.project-evidence-latest small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-evidence-latest strong {
  font-size: 13px;
}

.project-evidence-latest small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.project-evidence-memo-list {
  max-height: 420px;
  overflow: auto;
}

.project-evidence-memo-list .message {
  padding: 10px;
}

.project-evidence-memo-list .message p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.file-board {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.file-board-empty {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.file-board-empty strong,
.file-board-empty span {
  display: block;
}

.file-board-empty strong {
  color: #1e3a8a;
  font-size: 15px;
}

.file-board-empty span {
  margin-top: 4px;
  color: #475569;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.file-board-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.file-board-metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-board-metric.wide {
  grid-column: span 2;
}

.file-board-metric span,
.file-board-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.file-board-metric strong {
  display: block;
  min-width: 0;
  margin: 5px 0 4px;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-board-sections {
  display: grid;
  grid-template-columns: 1.2fr .9fr 1.1fr;
  gap: 10px;
}

.file-board-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-board-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.file-board-title strong {
  color: var(--text);
  font-size: 14px;
}

.file-board-title span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.file-action-plan {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.file-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.file-action-head div {
  min-width: 0;
}

.file-action-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.file-action-head strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.file-action-head button {
  flex: 0 0 auto;
}

.file-action-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.file-action-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  min-height: 128px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-action-item b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
}

.file-action-item div {
  min-width: 0;
}

.file-action-item strong,
.file-action-item p,
.file-action-item span {
  display: block;
  min-width: 0;
}

.file-action-item strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.file-action-item p {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.file-action-item span {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
}

.file-action-item.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.file-action-item.tone-warning b,
.file-action-item.tone-warning span {
  background: #ffedd5;
  color: #b45309;
}

.file-action-item.tone-ok {
  border-color: #bbf7d0;
  background: #f7fdf9;
}

.file-action-item.tone-ok b,
.file-action-item.tone-ok span {
  background: #dcfce7;
  color: #15803d;
}

.file-category-bars {
  display: grid;
  gap: 8px;
}

.file-category-bar {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(64px, 1.4fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.file-category-bar span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-category-bar i {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.file-category-bar i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  border-radius: inherit;
  background: #2563eb;
}

.file-category-bar em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.file-kind-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge.file-kind {
  background: #f1f5f9;
  color: #334155;
}

.file-check-list {
  display: grid;
  gap: 7px;
}

.file-check-list span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.file-check-list span.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.file-check-list span.is-missing {
  border-color: #fed7aa;
  background: #fff7ed;
}

.file-check-list b {
  color: var(--muted);
  font-size: 12px;
}

.file-check-list .is-done b {
  color: #15803d;
}

.file-check-list .is-missing b {
  color: #b45309;
}

.file-check-list small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-summary-panel {
  display: grid;
  gap: 14px;
}

.ai-summary-panel .panel-header {
  margin-bottom: 0;
}

.ai-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  min-width: 0;
}

.ai-summary-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ai-summary-head strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ai-summary-head strong.is-ok {
  color: #0f766e;
}

.ai-summary-head strong.is-risk,
.ai-summary-head strong.is-warning {
  color: #b45309;
}

.ai-summary-head strong.is-critical {
  color: #b91c1c;
}

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

.ai-briefing article {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 122px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-briefing span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-briefing strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.ai-briefing small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-briefing .is-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-briefing .is-risk,
.ai-briefing .is-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.ai-briefing .is-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-briefing .is-muted {
  background: #f8fafc;
}

.ai-management-brief {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ai-management-primary {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}

.ai-management-primary > div {
  min-width: 0;
}

.ai-management-primary span,
.ai-management-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-management-primary strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ai-management-primary p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ai-management-primary.is-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-management-primary.is-risk,
.ai-management-primary.is-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.ai-management-primary.is-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-management-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-management-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ai-management-grid small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-management-grid .tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-management-grid .tone-risk,
.ai-management-grid .tone-warning,
.ai-management-grid .tone-action {
  border-color: #fed7aa;
  background: #fffaf3;
}

.ai-management-grid .tone-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-management-grid .tone-muted {
  background: #f8fafc;
}

.ai-management-brief.compact .ai-management-primary {
  padding: 12px;
}

.ai-management-brief.compact .ai-management-primary strong {
  font-size: 18px;
}

.ai-management-brief.compact .ai-management-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.ai-management-brief.compact .ai-management-grid article {
  min-height: 0;
  padding: 10px;
}

.ai-evidence-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.ai-evidence-compact div {
  min-width: 0;
}

.ai-evidence-compact span,
.ai-evidence-readiness-head span,
.ai-evidence-readiness-grid article > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ai-evidence-compact strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.ai-evidence-compact small {
  flex: 1 1 140px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ai-evidence-actions {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-evidence-actions button {
  min-height: 30px;
  padding: 0 9px;
  flex: 1 1 72px;
  min-width: 0;
}

.ai-evidence-compact.tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-evidence-compact.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.ai-evidence-compact.tone-missing {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-evidence-readiness {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.ai-evidence-readiness-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: center;
}

.ai-evidence-readiness-head strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.ai-evidence-readiness-head small,
.ai-evidence-readiness-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-evidence-readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.ai-evidence-readiness-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 132px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-evidence-readiness-grid article strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.ai-evidence-readiness-grid article small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-evidence-readiness-grid article button {
  align-self: end;
  min-height: 34px;
  padding: 7px 10px;
}

.ai-evidence-readiness-grid .tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-evidence-readiness-grid .tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.ai-evidence-readiness-grid .tone-missing {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-summary-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ai-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 5px 9px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-flow-step span {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #075985;
  font-size: 13px;
  font-weight: 800;
}

.ai-flow-step strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-flow-step small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ai-flow-step.is-ok span,
.ai-flow-step.done span {
  background: #dcfce7;
  color: #166534;
}

.ai-flow-step.is-risk span,
.ai-flow-step.is-warning span {
  background: #fef3c7;
  color: #92400e;
}

.ai-flow-step.is-critical span {
  background: #fee2e2;
  color: #991b1b;
}

.ai-summary-grid,
.ai-summary-foot,
.ai-summary-priority-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-summary-priority-grid .ai-action-panel,
.ai-summary-priority-grid .ai-risk-panel {
  min-height: 0;
}

.ai-summary-memo-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.ai-summary-memo-bridge > div {
  min-width: 0;
}

.ai-summary-memo-bridge strong {
  display: block;
  color: #1e3a8a;
  font-size: 14px;
  line-height: 1.35;
}

.ai-summary-memo-bridge small {
  display: block;
  margin-top: 3px;
  color: #475569;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-summary-memo-bridge button {
  width: auto;
  flex: 0 0 auto;
  border-color: #93c5fd;
  background: #fff;
  color: #1d4ed8;
}

.ai-summary-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-summary-card.is-risk {
  border-color: #fecaca;
  background: #fffafa;
}

.ai-summary-card.is-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.ai-risk-panel,
.ai-action-panel,
.ai-evidence-panel {
  display: grid;
  gap: 10px;
}

.ai-summary-card h3 {
  margin: 0 0 9px;
  font-size: 15px;
}

.ai-summary-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ai-summary-muted {
  color: var(--muted) !important;
}

.ai-summary-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.ai-summary-list li {
  overflow-wrap: anywhere;
}

.ai-summary-kv {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ai-summary-kv div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
}

.ai-summary-kv dt {
  color: var(--muted);
  font-weight: 700;
}

.ai-summary-kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-risk-list,
.ai-action-list {
  display: grid;
  gap: 9px;
}

.ai-risk-item,
.ai-action-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-risk-item {
  border-left: 4px solid #f59e0b;
}

.ai-risk-item.severity-high,
.ai-risk-item.severity-critical {
  border-left-color: #dc2626;
}

.ai-risk-item.severity-low {
  border-left-color: #0e7490;
}

.ai-risk-item strong,
.ai-action-item strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-risk-item p {
  margin-top: 5px;
  color: var(--muted);
}

.ai-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.ai-item-target {
  min-height: 30px;
  width: auto;
  padding: 6px 10px;
}

.badge.ai-severity-critical,
.badge.ai-severity-high {
  background: #fee2e2;
  color: #991b1b;
}

.badge.ai-severity-medium {
  background: #fef3c7;
  color: #92400e;
}

.badge.ai-severity-low {
  background: #ccfbf1;
  color: #0f766e;
}

.ai-action-item {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
}

.ai-action-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #edf4fb;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.ai-action-item.priority-urgent .ai-action-index,
.ai-action-item.priority-high .ai-action-index {
  background: #fee2e2;
  color: #991b1b;
}

.ai-evidence-grid {
  display: grid;
  gap: 10px;
}

.ai-evidence-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #f8fafc;
}

.ai-evidence-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 13px;
}

.ai-summary-error,
.ai-summary-loading,
.ai-summary-empty {
  margin: 0;
}

.ai-summary-cache-note {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: #1e3a8a;
}

.ai-summary-cache-note.compact {
  padding: 9px 10px;
}

.ai-summary-cache-note.is-stale {
  border-color: #fed7aa;
  background: #fffaf3;
  color: #92400e;
}

.ai-summary-cache-note strong {
  font-size: 13px;
  line-height: 1.35;
}

.ai-summary-cache-note span,
.ai-summary-cache-note small {
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.86;
}

.tabs {
  max-width: 100%;
  overflow: auto;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.tabs button {
  flex: 0 0 auto;
}

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

.list {
  display: grid;
  gap: 10px;
}

.member-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 11px;
  row-gap: 2px;
  min-height: 62px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.member-info {
  min-width: 0;
}

.member-card > strong,
.message.member-card > strong,
.member-card .member-avatar,
.member-card .member-initials,
.member-card .member-card__avatar {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.member-card .member-name,
.member-card .member-card__name {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.member-card > small,
.message.member-card > small,
.member-card .member-role,
.member-card .member-card__role {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.task-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.task-card h3 {
  margin: 0;
  font-size: 15px;
}

.task-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.task-attention {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  margin-top: 9px;
  padding: 6px 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: #1f3f68;
  font-size: 12px;
  line-height: 1.35;
}

.task-attention span {
  flex: 0 0 auto;
  font-weight: 900;
}

.task-attention strong {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.task-attention.severity-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.task-attention.severity-critical {
  border-color: #fecaca;
  background: #fff5f5;
  color: #991b1b;
}

.task-next-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: #1e3a5f;
  font-size: 12px;
  line-height: 1.35;
}

.task-next-action span,
.task-next-inline {
  font-weight: 900;
}

.task-next-action strong {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.task-next-action.tone-critical,
.task-next-inline.tone-critical {
  border-color: #fecaca;
  background: #fff5f5;
  color: #991b1b;
}

.task-next-action.tone-warning,
.task-next-inline.tone-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.task-next-action.tone-notice,
.task-next-inline.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
  color: #1d4ed8;
}

.task-next-action.tone-ok,
.task-next-inline.tone-ok {
  border-color: #bbf7d0;
  background: #f7fef9;
  color: #15803d;
}

.task-followup-summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.task-followup-summary span {
  font-weight: 900;
}

.task-followup-summary small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.task-followup-drawer,
.task-followup-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.task-followup-status,
.task-followup-readonly,
.task-followup-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 11px 12px;
}

.task-followup-status {
  display: grid;
  gap: 5px;
}

.task-followup-status span,
.task-followup-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-followup-status strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.task-followup-status small,
.task-followup-readonly,
.task-followup-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.task-followup-form {
  gap: 10px;
}

.task-followup-item {
  background: #fff;
}

.task-followup-item header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.task-followup-item strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.task-followup-item p {
  margin: 7px 0 0;
  color: var(--text);
}

.task-triage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fbfdff;
}

.task-triage.empty-state {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.task-triage.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.task-triage.empty-state span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.task-triage-primary {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 94px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.task-triage-primary[role="button"] {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.task-triage-primary[role="button"]:hover,
.task-triage-primary[role="button"]:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.task-triage-primary.severity-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.task-triage-primary.severity-critical {
  border-color: #fecaca;
  background: #fff7f7;
}

.task-triage-primary > span,
.task-triage-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.task-triage-primary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-triage-primary small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.task-triage-side {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.task-priority-queue {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.task-priority-queue.is-empty {
  align-content: center;
  min-height: 92px;
  color: var(--muted);
}

.task-priority-queue-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.task-priority-queue-head strong,
.task-priority-queue.is-empty strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.task-priority-queue-head span,
.task-priority-queue.is-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-priority-queue-list {
  display: grid;
  gap: 6px;
}

.task-priority-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.task-priority-item:hover,
.task-priority-item:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.task-priority-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.task-priority-item.severity-warning > span {
  background: #fef3c7;
  color: #92400e;
}

.task-priority-item.severity-critical > span {
  background: #fee2e2;
  color: #991b1b;
}

.task-priority-item div {
  min-width: 0;
}

.task-priority-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-priority-item small {
  display: block;
  margin-top: 2px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-priority-item .task-next-inline {
  display: block;
  min-width: 0;
  margin-top: 3px;
  padding: 3px 6px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-priority-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.task-triage-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.task-triage-metric {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.task-triage-metric.has-items {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.task-triage-metric.has-items:hover,
.task-triage-metric.has-items:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.task-triage-metric strong {
  color: var(--accent-2);
  font-size: 22px;
  line-height: 1.05;
}

.task-triage-metric small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-triage-metric.tone-pending_review.has-items {
  border-color: #fde68a;
  background: #fffdf3;
}

.task-triage-metric.tone-pending_review.has-items strong {
  color: var(--warning);
}

.task-triage-metric.tone-due_soon.has-items {
  border-color: #fed7aa;
  background: #fffaf3;
}

.task-triage-metric.tone-due_soon.has-items strong {
  color: #b45309;
}

.task-triage-metric.tone-unassigned.has-items,
.task-triage-metric.tone-unscheduled.has-items {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.task-triage-metric:disabled {
  cursor: default;
  opacity: .68;
}

.task-quick-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.task-quick-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 6px 8px;
  min-width: 0;
  min-height: 102px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.task-quick-label {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-quick-filter strong {
  flex: 0 0 auto;
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}

.task-quick-filter small,
.task-quick-filter em {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-quick-filter em {
  display: block;
  overflow: hidden;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-quick-filter:hover,
.task-quick-filter:focus-visible,
.task-quick-filter.active {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.task-quick-filter.active {
  background: #f8fbff;
}

.task-quick-filter:disabled {
  cursor: default;
  opacity: .56;
  transform: none;
  box-shadow: none;
}

.task-quick-filter.tone-in_progress strong {
  background: #dbeafe;
  color: var(--state-in-progress);
}

.task-quick-filter.tone-pending_review strong {
  background: #fef3c7;
  color: var(--state-review);
}

.task-quick-filter.tone-done strong {
  background: #dcfce7;
  color: var(--state-done);
}

.task-quick-filter.tone-blocked strong {
  background: #fae8ff;
  color: var(--state-blocked);
}

.task-quick-filter.tone-overdue strong {
  background: #fee2e2;
  color: var(--priority-urgent);
}

.task-quick-filter.tone-not_started strong,
.task-quick-filter.tone-unassigned strong {
  background: #f8fafc;
  color: #475569;
}

.task-filter-bar {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.task-filter-bar .field {
  margin: 0;
}

.file-filter-bar {
  grid-template-columns: minmax(160px, 1.25fr) minmax(120px, .8fr) minmax(120px, .8fr) minmax(120px, .8fr) auto;
}

.file-filter-summary {
  border-color: #dbeafe;
}

.file-empty-filtered {
  margin: 6px 0;
  text-align: left;
}

.file-empty-filtered strong,
.file-empty-filtered span {
  display: block;
}

.file-empty-filtered strong {
  color: var(--text);
}

.file-empty-filtered span {
  margin: 4px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.task-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.task-filter-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.task-filter-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.task-grouped-list {
  display: grid;
  gap: 12px;
}

.task-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.task-group h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.task-group p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-group > header > span {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.task-group.tone-critical {
  border-color: #fecaca;
  background: #fffafa;
}

.task-group.tone-critical > header > span {
  background: #fee2e2;
  color: var(--priority-urgent);
}

.task-group.tone-warning {
  border-color: #fde68a;
  background: #fffdf5;
}

.task-group.tone-warning > header > span {
  background: #fef3c7;
  color: var(--state-review);
}

.task-group.tone-notice {
  border-color: #bfdbfe;
  background: #fbfdff;
}

.task-group.tone-notice > header > span {
  background: #dbeafe;
  color: var(--state-in-progress);
}

.task-group.tone-ok {
  border-color: #bbf7d0;
  background: #fbfefc;
}

.task-group.tone-ok > header > span {
  background: #dcfce7;
  color: var(--state-done);
}

.task-group.tone-muted {
  background: #f8fafc;
}

.task-filter-summary.is-sort-only {
  border-color: var(--line);
  background: #fff;
}

.task-filter-summary > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.task-sort-note {
  flex: 1 1 260px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.task-filter-chips {
  display: flex;
  flex: 1 1 220px;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  width: auto;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #1f3f68;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  gap: 4px;
}

.filter-chip strong,
.filter-chip span {
  flex: 0 0 auto;
}

.filter-chip span {
  color: #64748b;
  font-size: 14px;
  line-height: 1;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.filter-clear-all {
  width: auto;
}

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

.history-stat,
.history-insight-card,
.history-task-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-stat {
  padding: 13px;
}

.history-stat span,
.history-stat small,
.history-task-body span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.history-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}

.history-stat small {
  margin-top: 5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.history-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.history-insights.empty {
  margin-bottom: 12px;
}

.history-insight-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 13px;
}

.history-insight-card h3 {
  margin: 0;
  font-size: 15px;
}

.history-signal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.history-signal-list article {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.history-signal-list span,
.history-signal-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.history-signal-list strong {
  display: block;
  margin: 4px 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.history-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr);
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fbfdff;
}

.history-brief-main,
.history-brief-block {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-brief-main > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.history-brief-main strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.history-brief-main ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.history-brief-main li {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.history-brief-block {
  display: grid;
  align-content: start;
  gap: 9px;
}

.history-brief-block h3 {
  margin: 0;
  font-size: 15px;
}

.history-brief-list {
  display: grid;
  gap: 8px;
}

.history-brief-list article {
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: #f8fafc;
}

.history-brief-list strong,
.history-brief-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-brief-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.history-brief-list p,
.history-brief-note {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.history-brief-note.is-ok {
  color: #0f766e;
}

.history-action-plan {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.history-action-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.history-action-plan-head div {
  min-width: 0;
}

.history-action-plan-head span,
.history-action-plan-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.history-action-plan-head strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.history-action-plan-head small {
  flex: 0 1 280px;
  font-weight: 600;
  text-align: right;
}

.history-action-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.history-action-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  min-height: 132px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-action-item b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  line-height: 1;
}

.history-action-item div {
  min-width: 0;
}

.history-action-item strong,
.history-action-item p,
.history-action-item span {
  display: block;
  min-width: 0;
}

.history-action-item strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.history-action-item p {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.history-action-item span {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
}

.history-action-item button {
  margin-top: 8px;
  min-height: 30px;
  padding: 0 9px;
  width: fit-content;
}

.history-action-item.tone-warning {
  border-color: #fed7aa;
  background: #fffaf3;
}

.history-action-item.tone-warning b,
.history-action-item.tone-warning span {
  background: #ffedd5;
  color: #b45309;
}

.history-action-item.tone-ok {
  border-color: #bbf7d0;
  background: #f7fdf9;
}

.history-action-item.tone-ok b,
.history-action-item.tone-ok span {
  background: #dcfce7;
  color: #15803d;
}

.history-action-item.tone-notice {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.history-focus-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.history-focus-bar > div,
.history-focus-bar button {
  min-width: 0;
}

.history-focus-bar > div {
  display: grid;
  align-content: center;
  gap: 3px;
}

.history-focus-bar > div strong {
  color: var(--text);
  font-size: 14px;
}

.history-focus-bar > div span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.history-focus-bar button {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-height: 62px;
  padding: 8px 10px;
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.history-focus-bar button:not(:disabled):hover,
.history-focus-bar button.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.history-focus-bar button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.history-focus-bar button span,
.history-focus-bar button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-focus-bar button strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.history-filter-bar {
  grid-template-columns: minmax(150px, 1.2fr) minmax(110px, 0.8fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 0.9fr) minmax(130px, 0.9fr) auto;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.history-filter-bar .field {
  margin: 0;
}

.history-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.history-filter-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.history-task-list {
  display: grid;
  gap: 10px;
}

.history-task-card {
  padding: 13px;
}

.history-task-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-task-card header > div {
  min-width: 0;
}

.history-task-card h3 {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.history-task-card .meta-row {
  min-width: 0;
}

.history-task-card .badge,
.history-chip-list .badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.history-task-dates {
  display: grid;
  gap: 4px;
  flex: 0 0 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.history-task-open {
  justify-self: end;
  width: fit-content;
  min-height: 30px;
  margin-top: 4px;
  padding: 0 10px;
}

.history-task-body {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.history-task-body > div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.history-task-body strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.history-task-body small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.history-task-body p {
  margin: 5px 0 0;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.gantt-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin: -4px 0 14px;
}

.gantt-summary.compact {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.gantt-summary-item {
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
}

button.gantt-summary-item {
  font: inherit;
}

.gantt-summary-item.is-clickable {
  cursor: pointer;
}

.gantt-summary-item.is-clickable:hover,
.gantt-summary-item.is-clickable:focus-visible {
  outline: none;
  border-color: rgba(1, 37, 73, 0.28);
  box-shadow: 0 0 0 3px rgba(1, 37, 73, 0.08);
}

.gantt-summary-item span,
.gantt-summary-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.gantt-summary-item strong {
  font-size: 20px;
  line-height: 1.1;
  color: var(--accent-2);
}

.gantt-summary-item small {
  color: var(--muted);
  font-size: 11px;
}

.gantt-summary-item.tone-ok {
  border-color: rgba(22, 128, 63, 0.24);
  background: #f0fdf4;
}

.gantt-summary-item.tone-ok strong {
  color: var(--state-done);
}

.gantt-summary-item.tone-notice {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
}

.gantt-summary-item.tone-notice strong {
  color: var(--state-in-progress);
}

.gantt-summary-item.tone-warning {
  border-color: rgba(180, 83, 9, 0.3);
  background: #fffbeb;
}

.gantt-summary-item.tone-warning strong {
  color: var(--warning);
}

.gantt-summary-item.tone-critical {
  border-color: rgba(185, 28, 28, 0.3);
  background: #fef2f2;
}

.gantt-summary-item.tone-critical strong {
  color: var(--danger);
}

.gantt-summary-item.tone-muted {
  color: var(--muted);
}

.gantt-summary-item.tone-muted strong {
  color: #64748b;
}

.gantt-focus-bar {
  margin: -2px 0 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.gantt-focus-bar.tone-ok {
  border-color: rgba(22, 128, 63, 0.24);
  background: #f0fdf4;
}

.gantt-focus-bar.tone-notice {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
}

.gantt-focus-bar.tone-warning {
  border-color: rgba(180, 83, 9, 0.28);
  background: #fffbeb;
}

.gantt-focus-bar.tone-critical {
  border-color: rgba(185, 28, 28, 0.28);
  background: #fef2f2;
}

.gantt-focus-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.gantt-focus-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gantt-focus-main strong {
  min-width: 0;
  color: var(--accent-2);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-focus-main small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.gantt-focus-bar.tone-critical .gantt-focus-main strong {
  color: var(--danger);
}

.gantt-focus-bar.tone-warning .gantt-focus-main strong {
  color: var(--warning);
}

.gantt-focus-bar.tone-ok .gantt-focus-main strong {
  color: var(--state-done);
}

.gantt-focus-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.gantt-focus-chip {
  min-height: 28px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

button.gantt-focus-chip {
  cursor: pointer;
}

button.gantt-focus-chip:hover,
button.gantt-focus-chip:focus-visible {
  outline: none;
  border-color: rgba(1, 37, 73, 0.28);
  box-shadow: 0 0 0 3px rgba(1, 37, 73, 0.08);
}

.gantt-focus-chip b {
  color: var(--accent-2);
  font-size: 13px;
}

.gantt-focus-chip.tone-warning {
  border-color: rgba(180, 83, 9, 0.28);
  color: #92400e;
}

.gantt-focus-chip.tone-warning b {
  color: var(--warning);
}

.gantt-focus-chip.tone-muted {
  opacity: 0.72;
}

.gantt-unscheduled {
  margin: -4px 0 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 8px;
  background: #fffbeb;
}

.gantt-unscheduled div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.gantt-unscheduled strong {
  color: var(--warning);
  font-size: 13px;
}

.gantt-unscheduled span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7280;
  font-size: 12px;
}

.gantt-unscheduled .secondary {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 10px;
}

.gantt-compact-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.gantt-compact-more span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gantt-compact-more button {
  width: auto;
  flex: 0 0 auto;
}

.gantt-legend.compact {
  gap: 6px 10px;
  margin: -4px 0 10px;
}

.gantt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.gantt-dot,
.gantt-today-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: #8da0b8;
}

.gantt-today-dot {
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}

.gantt-project-dot {
  width: 2px;
  height: 16px;
  border-radius: 2px;
  display: inline-block;
  background: repeating-linear-gradient(to bottom, var(--accent-2) 0 4px, transparent 4px 7px);
}

.gantt {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  -webkit-overflow-scrolling: touch;
}

.gantt.compact {
  max-height: 230px;
}

.overview-schedule-panel .gantt.compact .gantt-row {
  --name-col: 210px;
}

.overview-schedule-panel .gantt.compact .gantt-name {
  min-height: 46px;
  padding: 6px 10px;
}

.overview-schedule-panel .gantt.compact .gantt-track {
  min-height: 46px;
}

.overview-schedule-panel .gantt.compact .gantt-header .gantt-name,
.overview-schedule-panel .gantt.compact .gantt-track-header,
.overview-schedule-panel .gantt.compact .gantt-day {
  min-height: 34px;
  height: 34px;
}

.overview-schedule-panel .gantt.compact .gantt-day {
  padding-top: 7px;
}

.overview-schedule-panel .gantt.compact .gantt-bar {
  height: 20px;
}

.overview-schedule-panel .gantt.compact .gantt-task-signals {
  display: none;
}

.overview-schedule-panel .gantt-compact-more {
  margin-top: 6px;
  padding: 6px 8px;
}

.gantt-row {
  --name-col: 270px;
  display: grid;
  grid-template-columns: var(--name-col) max-content;
  width: max-content;
  min-width: 100%;
  align-items: stretch;
  border-top: 1px solid #e6edf5;
}

.gantt-row:first-child {
  border-top: 0;
}

.gantt-header {
  position: sticky;
  top: 0;
  z-index: 4;
  color: var(--muted);
  font-size: 12px;
  background: #f8fafc;
}

.gantt-name {
  position: sticky;
  left: 0;
  z-index: 3;
  width: var(--name-col);
  min-height: 66px;
  padding: 10px 16px;
  display: grid;
  align-content: center;
  gap: 3px;
  font-size: 13px;
  line-height: 1.25;
  background: linear-gradient(90deg, #fff 0%, #fff 92%, rgba(255, 255, 255, 0.86));
  border-right: 1px solid #dfe7f1;
  box-shadow: 8px 0 16px rgba(8, 34, 63, 0.04);
}

.gantt-header .gantt-name {
  min-height: 46px;
  font-weight: 700;
  color: var(--text);
  background: #f8fafc;
}

.gantt-name strong,
.gantt-name span,
.gantt-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-name strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.gantt-name span,
.gantt-name small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.gantt-task-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.gantt-task-signals em {
  max-width: 88px;
  padding: 1px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.gantt-task-signals em.tone-critical {
  background: #fee2e2;
  color: var(--danger);
}

.gantt-task-signals em.tone-warning {
  background: #fef3c7;
  color: var(--warning);
}

.gantt-task-clickable {
  cursor: pointer;
}

.gantt-name.gantt-task-clickable:hover,
.gantt-name.gantt-task-clickable:focus-visible {
  color: var(--accent);
  outline: none;
  box-shadow: inset 3px 0 0 var(--accent), 8px 0 16px rgba(8, 34, 63, 0.06);
}

.gantt-track {
  position: relative;
  width: var(--timeline-width);
  min-width: var(--timeline-width);
  min-height: 66px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 0 var(--elapsed), transparent var(--elapsed) 100%),
    repeating-linear-gradient(90deg, transparent 0 calc(var(--grid-step) - 1px), rgba(148, 163, 184, 0.2) calc(var(--grid-step) - 1px) var(--grid-step));
}

.gantt-track-header {
  min-height: 46px;
  display: flex;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.14) 0 var(--elapsed), transparent var(--elapsed) 100%),
    repeating-linear-gradient(90deg, transparent 0 calc(var(--grid-step) - 1px), rgba(100, 116, 139, 0.24) calc(var(--grid-step) - 1px) var(--grid-step));
}

.gantt-day {
  flex: 0 0 auto;
  height: 46px;
  padding: 12px 4px 0;
  text-align: center;
  white-space: nowrap;
  border-left: 1px solid transparent;
  color: #526174;
  font-size: 12px;
  font-weight: 700;
}

.gantt-day.week,
.gantt-day.month {
  padding-top: 11px;
  text-align: left;
  padding-left: 8px;
  border-left-color: rgba(148, 163, 184, 0.24);
}

.gantt-day.weekend {
  background: rgba(226, 232, 240, 0.38);
}

.gantt-day.today {
  color: var(--accent);
  font-weight: 800;
}

.gantt-row-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: rgba(225, 17, 67, 0.78);
  z-index: 2;
  pointer-events: none;
}

.gantt-project-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(1, 37, 73, 0.62) 0 5px, transparent 5px 9px);
}

.gantt-project-line.end {
  background: repeating-linear-gradient(to bottom, rgba(180, 83, 9, 0.7) 0 5px, transparent 5px 9px);
}

.gantt-project-line span {
  position: absolute;
  bottom: 5px;
  left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(1, 37, 73, 0.18);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(8, 34, 63, 0.1);
}

.gantt-project-line.end span {
  color: var(--warning);
  border-color: rgba(180, 83, 9, 0.24);
}

.gantt-track-header .gantt-today-line span {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #fff;
  background: rgba(225, 17, 67, 0.9);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(225, 17, 67, 0.16);
}

.gantt-bar {
  position: absolute;
  top: 50%;
  z-index: 1;
  height: 26px;
  min-width: 10px;
  transform: translateY(-50%);
  border-radius: 7px;
  overflow: visible;
  border: 1px solid rgba(8, 34, 63, 0.1);
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.14);
  background: #dbe6f4;
}

.gantt-bar.gantt-task-clickable:hover,
.gantt-bar.gantt-task-clickable:focus-visible {
  outline: none;
  box-shadow: 0 8px 18px rgba(8, 34, 63, 0.12), 0 0 0 3px rgba(37, 99, 235, .18);
}

.gantt-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.24);
}

.gantt-bar-label {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 9px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(8, 34, 63, 0.28);
}

.gantt-bar-label b,
.gantt-bar-label small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-bar-label b {
  font-size: 11px;
}

.gantt-bar-label small {
  font-size: 11px;
}

.gantt-bar.is-narrow .gantt-bar-label {
  display: none;
}

.gantt-bar.label-hidden {
  min-width: 8px;
}

.gantt-bar-external-label {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 210px;
  max-width: 210px;
  transform: translate(8px, -50%);
  display: grid;
  gap: 1px;
  pointer-events: none;
  color: #334155;
  font-size: 11px;
  line-height: 1.2;
}

.gantt-bar-external-label.label-before {
  text-align: right;
  transform: translate(calc(-100% - 8px), -50%);
}

.gantt-bar-external-label span,
.gantt-bar-external-label small {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-bar-external-label span {
  font-weight: 800;
}

.gantt-bar-external-label small {
  color: var(--muted);
}

.gantt-not_started,
.gantt-dot.gantt-not_started {
  background: #7890a8;
}

.gantt-in_progress,
.gantt-dot.gantt-in_progress {
  background: #2f7dd3;
}

.gantt-pending_review,
.gantt-dot.gantt-pending_review {
  background: #d0872d;
}

.gantt-done,
.gantt-dot.gantt-done {
  background: #2f9a62;
}

.gantt-blocked,
.gantt-dot.gantt-blocked {
  background: #8b5cc7;
}

.gantt-in_progress .gantt-progress {
  background: rgba(9, 71, 139, 0.36);
}

.gantt-pending_review .gantt-progress {
  background: rgba(146, 64, 14, 0.3);
}

.gantt-done .gantt-progress {
  background: rgba(18, 97, 52, 0.34);
}

.gantt-blocked .gantt-progress {
  background: rgba(88, 28, 135, 0.3);
}

.gantt-not_started .gantt-progress {
  background: rgba(51, 65, 85, 0.28);
}

.gantt-bar.continues-left {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

.gantt-bar.continues-right {
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

.gantt-bar.continues-left::before,
.gantt-bar.continues-right::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  z-index: 2;
}

.gantt-bar.continues-left::before {
  left: 4px;
  border-right: 7px solid rgba(255, 255, 255, 0.82);
}

.gantt-bar.continues-right::after {
  right: 4px;
  border-left: 7px solid rgba(255, 255, 255, 0.82);
}

.gantt-bar.invalid {
  outline: 2px solid var(--danger);
}

.message {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message.pinned {
  border-color: #fbbf24;
  background: #fffbeb;
}

.message strong {
  display: inline-block;
  margin-right: 8px;
}

.message small {
  color: var(--muted);
}

.message p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.retro-draft-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}

.retro-draft-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.retro-draft-head h3 {
  margin: 0;
  font-size: 16px;
}

.retro-draft-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.retro-draft-grid article {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.retro-draft-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.retro-draft-grid p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.retro-draft-warnings {
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf3;
}

.retro-draft-warnings strong {
  display: block;
  margin-bottom: 6px;
}

.retro-draft-warnings ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.retro-evidence {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.retro-evidence-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.retro-evidence-metrics article,
.retro-evidence-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.retro-evidence-metrics span,
.retro-evidence-metrics small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.retro-evidence-metrics strong {
  display: block;
  margin: 5px 0 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.retro-evidence-grid {
  display: grid;
  grid-template-columns: 1.2fr .95fr 1.05fr;
  gap: 10px;
}

.retro-evidence-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.retro-evidence-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.retro-evidence-title strong {
  color: var(--text);
  font-size: 14px;
}

.retro-evidence-title span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.retro-task-evidence-list,
.retro-source-list,
.retro-gap-list {
  display: grid;
  gap: 8px;
}

.retro-task-evidence-list button,
.retro-source-list article,
.retro-gap-list article {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #f8fafc;
}

.retro-task-evidence-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.retro-task-evidence-list button:hover,
.retro-task-evidence-list button:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  outline: none;
  transform: translateY(-1px);
}

.retro-task-evidence-list strong,
.retro-source-list strong,
.retro-gap-list strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.retro-task-evidence-list small,
.retro-source-list span,
.retro-source-list small,
.retro-gap-list small {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.retro-task-evidence-list span {
  display: -webkit-box;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.retro-source-list article {
  display: grid;
  gap: 4px;
}

.retro-source-actions {
  width: auto;
}

.retro-gap-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  border-color: #fed7aa;
  background: #fffaf3;
}

.retro-gap-list small {
  grid-column: 1;
}

.retro-gap-list button {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: auto;
}

.empty {
  border: 1px dashed #cfd8d5;
  color: var(--muted);
  border-radius: 8px;
  padding: 28px 16px;
  text-align: center;
  background: #fafcfc;
}

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 16, 0.45);
  display: flex;
  justify-content: flex-end;
  z-index: 20;
  min-width: 0;
}

.drawer-panel {
  width: min(560px, 100%);
  min-height: 100%;
  max-height: 100vh;
  background: #fff;
  padding: 22px;
  overflow: auto;
  box-shadow: -18px 0 46px rgba(8, 34, 63, 0.18);
  -webkit-overflow-scrolling: touch;
}

.drawer-panel-wide {
  width: min(1040px, 100%);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  min-width: 0;
}

.drawer-header h2 {
  margin: 0;
  font-size: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.smart-entry {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.smart-flow-guide {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.smart-flow-guide.tone-good {
  border-color: #bbf7d0;
  background: #f8fff9;
}

.smart-flow-guide.tone-partial {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.smart-flow-guide.tone-weak {
  border-color: #fed7aa;
  background: #fffaf3;
}

.smart-flow-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.smart-flow-head strong {
  color: var(--text);
  font-size: 14px;
}

.smart-flow-head small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

.smart-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.smart-flow-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
}

.smart-flow-step b {
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.smart-flow-step span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-flow-step small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-flow-step.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.smart-flow-step.is-done b {
  background: #16a34a;
  color: #fff;
}

.smart-flow-step.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.smart-flow-step.is-active b {
  background: #2563eb;
  color: #fff;
}

.smart-entry-form {
  margin-top: 0;
}

.smart-entry-form textarea {
  min-height: 132px;
}

.smart-entry-form .field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.smart-entry-form .toolbar {
  align-items: center;
}

.project-agent-workspace {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
}

.project-agent-head,
.project-agent-subhead,
.project-agent-result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.project-agent-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-agent-head strong,
.project-agent-subhead strong,
.project-agent-result strong {
  color: var(--text);
  font-size: 14px;
}

.project-agent-head small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.project-agent-head > span {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.project-agent-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.project-agent-step {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
}

.project-agent-step b {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
}

.project-agent-step em {
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-agent-step.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.project-agent-step.is-done b {
  background: #16a34a;
  color: #fff;
}

.project-agent-step.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.project-agent-step.is-active b {
  background: #2563eb;
  color: #fff;
}

.project-agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 10px;
  min-width: 0;
}

.project-agent-chat,
.project-agent-materials,
.project-agent-result {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.project-agent-chat {
  align-content: start;
  max-height: 300px;
  overflow: auto;
}

.project-agent-message {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.project-agent-message span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.project-agent-message p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.project-agent-message.is-user {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.project-agent-message.is-assistant {
  border-color: #d1fae5;
  background: #f0fdf4;
}

.project-agent-message.is-loading {
  border-style: dashed;
}

.project-agent-empty {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
}

.project-agent-empty strong {
  color: var(--accent-2);
  font-size: 13px;
}

.project-agent-empty p,
.project-agent-material-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.project-agent-file-button {
  position: relative;
  width: auto;
  min-height: 32px;
  padding: 7px 10px;
  cursor: pointer;
}

.project-agent-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.project-agent-material-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-agent-material {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.project-agent-material.is-text {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.project-agent-material > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-agent-material strong,
.project-agent-material small,
.project-agent-material span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-agent-material strong {
  color: var(--text);
  font-size: 13px;
}

.project-agent-material small {
  color: var(--muted);
  font-size: 12px;
}

.project-agent-material span {
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.project-agent-material .ghost {
  width: auto;
  min-height: 30px;
  padding: 6px 8px;
}

.project-agent-compose {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-agent-compose .field {
  margin: 0;
}

.project-agent-compose textarea {
  min-height: 86px;
}

.project-agent-compose .toolbar {
  align-items: center;
}

.project-agent-result pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.project-agent-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.project-agent-section > header,
.project-agent-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.project-agent-section h4,
.project-agent-section strong,
.project-agent-result-card h4 {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-agent-section small,
.project-agent-section p,
.project-agent-result-card p {
  margin: 0;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.project-agent-section-tag,
.project-agent-result-tag {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-agent-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.project-agent-result-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.project-agent-result-card.is-important {
  border-color: #fde68a;
  background: #fffbeb;
}

.project-agent-result-card.is-ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.project-agent-result-list {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-agent-result-list li {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.project-agent-result-list li::marker {
  color: #64748b;
}

.project-agent-result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.project-agent-result-actions button {
  flex: 0 0 auto;
  min-height: 32px;
}

.smart-input-tools {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: -4px;
}

.smart-input-tool-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.smart-input-tools .ghost {
  width: auto;
  min-height: 32px;
  padding: 7px 10px;
}

.smart-input-tools .smart-template-button {
  border-color: #c7d2fe;
  background: #f8faff;
}

.smart-input-tools small {
  min-width: 180px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.smart-input-readiness {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  min-width: 0;
}

.smart-input-readiness > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.smart-input-readiness strong {
  color: var(--text);
  font-size: 13px;
}

.smart-input-readiness > div:first-child span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.smart-input-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.smart-input-checks span {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 8px;
  color: #475569;
  background: #fff;
  font-size: 12px;
  line-height: 1.2;
}

.smart-input-checks .is-ok {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.smart-input-checks .is-missing {
  border-color: #fed7aa;
  color: #9a3412;
  background: #fff7ed;
}

.smart-input-preview {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-top: 2px;
}

.smart-input-preview > strong {
  color: #334155;
  font-size: 12px;
}

.smart-input-preview > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.smart-input-preview span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.smart-input-preview small {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.smart-input-readiness small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.smart-input-readiness.tone-good {
  border-color: #bbf7d0;
  background: #f8fff9;
}

.smart-input-readiness.tone-partial {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.smart-input-readiness.tone-weak {
  border-color: #fed7aa;
  background: #fffaf3;
}

.smart-entry-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-width: 180px;
  flex: 1 1 260px;
}

.voice-input {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  min-width: 0;
}

.voice-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.voice-button {
  width: auto;
  flex: 0 0 auto;
}

.voice-file-button {
  width: auto;
  flex: 0 0 auto;
}

.voice-file-button.is-recommended {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 700;
}

.voice-file-input {
  display: none;
}

.voice-button.is-recording {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.voice-environment {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 100%;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.voice-env-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.voice-env-chip small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.voice-env-chip strong {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.voice-env-chip.tone-good {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.voice-env-chip.tone-warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.voice-status {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.voice-status span {
  display: block;
}

.voice-status span + span {
  margin-top: 2px;
}

.voice-status-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.voice-status-line strong {
  color: inherit;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.voice-status-line em {
  min-width: 0;
  color: inherit;
  font-style: normal;
  overflow-wrap: anywhere;
}

.voice-status-line.tone-good {
  color: #166534;
}

.voice-status-line.tone-neutral {
  color: #475569;
}

.voice-status:empty {
  display: none;
}

.voice-status.voice-info {
  color: var(--accent-2);
}

.voice-status.voice-error {
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 7px;
  padding: 8px 10px;
  max-width: min(760px, 100%);
}

.drawer-panel .smart-entry,
.drawer-panel .smart-entry-form,
.drawer-panel .project-agent-workspace,
.drawer-panel .project-agent-compose,
.drawer-panel .voice-input,
.drawer-panel .toolbar {
  max-width: 100%;
}

.drawer-panel .voice-input {
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
}

.drawer-panel .voice-actions {
  align-items: stretch;
  flex-direction: column;
  width: 100%;
}

.drawer-panel .voice-button,
.drawer-panel .voice-file-button {
  width: 100%;
}

.drawer-panel .voice-status {
  flex-basis: auto;
}

.drawer-panel .voice-status-line {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}

.drawer-panel .project-agent-compose .toolbar {
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
}

.drawer-panel .project-agent-compose .toolbar button,
.drawer-panel .project-agent-compose .toolbar .smart-entry-hint,
.drawer-panel .smart-entry-form .toolbar .smart-entry-hint {
  width: 100%;
  min-width: 0;
}

.upload-form {
  gap: 12px;
}

.upload-selected,
.upload-progress {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  min-width: 0;
}

.upload-selected strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.upload-selected small,
.upload-progress span {
  font-size: 12px;
  line-height: 1.45;
}

.upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.upload-progress-track span {
  display: block;
  width: var(--upload-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.18s ease;
}

.upload-progress.is-active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.upload-progress.is-error,
.upload-selected.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.upload-progress.is-error .upload-progress-track span {
  background: #dc2626;
}

.inline-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fef2f2;
  color: #991b1b;
  line-height: 1.5;
}

.inline-success {
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  background: #f0fdf4;
  color: #166534;
  line-height: 1.5;
}

.smart-warning-panel {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
  color: #92400e;
  line-height: 1.5;
}

.smart-warning-panel > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.smart-warning-panel strong {
  color: #7c2d12;
  font-size: 13px;
}

.smart-warning-panel small {
  color: #9a3412;
}

.smart-warning-panel ul,
.smart-draft-warnings ul {
  margin: 0;
  padding-left: 18px;
}

.smart-quality {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #14532d;
  min-width: 0;
}

.smart-quality.has-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
}

.smart-quality.has-error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.smart-quality-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.smart-quality-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.smart-quality-head strong {
  font-size: 14px;
  color: inherit;
}

.smart-quality-head p {
  margin: 0;
  color: currentColor;
  font-size: 13px;
  line-height: 1.45;
  opacity: .82;
}

.smart-quality-head > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(15, 23, 42, .08);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

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

.smart-quality-grid > div {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(15, 23, 42, .06);
}

.smart-quality-grid small {
  color: currentColor;
  font-size: 12px;
  opacity: .75;
}

.smart-quality-grid strong {
  color: inherit;
  font-size: 16px;
}

.smart-quality-focus {
  display: grid;
  gap: 6px;
  padding-top: 2px;
  font-size: 13px;
  line-height: 1.45;
}

.smart-quality-focus > strong {
  color: inherit;
}

.smart-quality-focus ul {
  margin: 0;
  padding-left: 18px;
}

.smart-drafts {
  display: grid;
  gap: 12px;
}

.smart-draft-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.smart-draft-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.smart-draft-card.has-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.smart-draft-card.has-warning:not(.has-error) {
  border-color: #fed7aa;
  background: #fffdfa;
}

.smart-draft-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.smart-draft-titleline {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.smart-draft-card header strong {
  min-width: 0;
  color: var(--accent-2);
  font-size: 14px;
}

.smart-draft-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.smart-draft-card header .danger {
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
}

.smart-draft-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(220px, 2fr);
  gap: 12px;
  min-width: 0;
}

.smart-draft-grid .field {
  margin: 0;
  min-width: 0;
}

.smart-draft-title,
.smart-draft-description {
  grid-column: span 1;
}

.smart-draft-description textarea {
  min-height: 82px;
}

.smart-draft-progress .task-progress {
  margin-top: 0;
}

.smart-draft-source {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border-left: 3px solid #60a5fa;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.smart-draft-source strong {
  color: #1d4ed8;
}

.smart-draft-source p {
  margin: 0;
}

.smart-draft-warnings {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.smart-draft-warnings strong {
  color: #78350f;
}

.row-error {
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.smart-draft-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.smart-action-hint {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
}

.smart-action-hint.is-warning {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 6px 8px;
}

.smart-empty {
  margin-top: 0;
}

.smart-guidance-empty,
.smart-project-empty {
  display: grid;
  gap: 10px;
  border-style: solid;
  text-align: left;
}

.smart-guidance-empty strong,
.smart-project-empty strong {
  display: block;
  color: var(--accent-2);
  font-size: 15px;
}

.smart-guidance-empty p,
.smart-project-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.smart-guidance-empty div,
.smart-project-empty div {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #f8fbff;
}

.smart-guidance-empty span,
.smart-project-empty span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.smart-guidance-empty small,
.smart-project-empty small {
  color: var(--muted);
  line-height: 1.5;
}

.smart-project-entry {
  align-content: start;
}

.smart-project-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.smart-project-card.has-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.smart-project-card.has-warning:not(.has-error) {
  border-color: #fed7aa;
  background: #fffdfa;
}

.smart-project-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.smart-project-card header strong {
  min-width: 0;
  color: var(--accent-2);
  font-size: 14px;
}

.smart-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  min-width: 0;
}

.smart-project-grid .field {
  margin: 0;
  min-width: 0;
}

.smart-project-description,
.smart-project-members {
  grid-column: 1 / -1;
}

.smart-project-description textarea {
  min-height: 96px;
}

.readonly-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 12px;
}

.readonly-panel div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

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

.readonly-panel strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.checkbox-list {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.checkbox-list label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 6px;
}

.checkbox-list label:hover {
  background: #f4f7f6;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.activity {
  display: grid;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.activity-rule {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.activity-rule.compact {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.activity-rule.compact summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 2px 0;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.activity-rule.compact summary::-webkit-details-marker {
  display: none;
}

.activity-rule.compact summary::after {
  content: "展开";
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.activity-rule.compact summary span {
  min-width: 0;
  max-width: 18em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-rule.compact[open] summary::after {
  content: "收起";
}

.activity-rule.compact .activity-rule-body {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.activity-rule strong {
  font-size: 12px;
  line-height: 1.25;
}

.activity-rule span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.activity-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  max-width: 100%;
  min-width: 0;
}

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

.activity-item strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.activity-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.activity-title-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-title-row em {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.activity-item.severity-risk,
.activity-item.severity-critical {
  border-left: 3px solid var(--danger);
  padding-left: 11px;
  background: #fffafa;
}

.activity-item.severity-warning {
  border-left: 3px solid var(--warning);
  padding-left: 11px;
  background: #fffaf3;
}

.activity-item .severity-risk,
.activity-item .severity-critical,
strong.severity-risk,
strong.severity-critical {
  color: var(--danger);
}

.activity-item .severity-warning,
strong.severity-warning {
  color: var(--warning);
}

.activity-item span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.activity-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 4px;
}

.activity-source-action {
  flex: 0 0 auto;
  width: fit-content;
  min-height: 28px;
  padding: 0 9px;
}

.project-side-rail .activity.compact {
  gap: 6px;
}

.project-side-rail .activity.compact .activity-item {
  padding: 8px 0;
}

.project-side-rail .activity.compact .activity-title-row {
  align-items: center;
}

.project-side-rail .activity.compact .activity-title-row strong {
  font-size: 13px;
}

.project-side-rail .activity.compact .activity-insight,
.project-side-rail .activity.compact .activity-item > p:not(.activity-insight) {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  margin: 4px 0 0;
  overflow: hidden;
}

.project-side-rail .activity.compact .activity-meta-row {
  margin-top: 5px;
}

.project-side-rail .activity.compact .activity-source-action {
  padding: 0 7px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  min-width: 0;
}

.pager .ghost {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
}

.pager span {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.message-head,
.memo-reply {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.memo-replies {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.memo-reply {
  padding: 8px 0;
}

.memo-reply p {
  margin: 4px 0 0;
}

.memo-edit-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}

.memo-edit-form .field {
  margin: 0;
}

.memo-edit-form textarea {
  min-height: 96px;
  resize: vertical;
}

.memo-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.memo-reply.is-editing {
  align-items: stretch;
  border-color: #bfdbfe;
  background: #f8fbff;
}

.project-evidence-records .memo-quick-form {
  margin-top: 0;
}

.reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.reply-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
}

.mobile-bar {
  display: none;
}

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

  .auth-visual {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: block;
    padding: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar .brand-lockup,
  .user-chip {
    display: none;
  }

  .nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-footer {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow: auto;
    width: 100%;
    max-width: 100%;
  }

  .sidebar-footer {
    margin-top: 8px;
  }

  .nav button {
    width: auto;
    text-align: center;
  }

  .nav-group {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    width: auto;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 6px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }

  .nav-project {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    flex: 0 0 auto;
    min-width: 168px;
    max-width: min(92vw, 360px);
    padding: 5px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #fff;
  }

  .project-entry-row {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  .project-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    padding-top: 4px;
    border-top: 1px solid #e2e8f0;
  }

  .nav button.project-entry {
    max-width: 100%;
    align-self: center;
    width: 100%;
  }

  .nav button.project-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
  }

  .nav button.sub {
    width: auto;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .project-subnav .sub {
    max-width: 100%;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .history-stat-grid,
  .history-insight-grid,
  .history-brief,
  .history-signal-list,
  .history-task-body,
  .retro-draft-grid,
  .retro-evidence-metrics,
  .retro-evidence-grid,
  .project-layout,
  .history-focus-bar,
  .dashboard-portfolio,
  .dashboard-workbench-grid,
  .dashboard-portfolio-grid,
  .admin-risk-grid,
  .project-overview-shortcuts,
  .project-workbench-grid,
  .project-action-list,
  .project-evidence-grid,
  .project-side-facts,
  .kickoff-guide-list,
  .ai-summary-grid,
  .ai-summary-foot,
  .ai-summary-flow,
  .ai-briefing,
  .ai-management-grid,
  .ai-execution-focus,
  .ai-evidence-readiness-head,
  .ai-evidence-readiness-grid,
  .ai-method,
  .split,
  .filters {
    grid-template-columns: 1fr;
  }

  .project-action-item {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .project-action-item button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .project-evidence-memo-list {
    max-height: none;
  }

  .ai-evidence-compact {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-evidence-compact small {
    flex: 0 1 auto;
  }

  .ai-summary-head {
    align-items: stretch;
    flex-direction: column;
  }

  .kickoff-guide-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .kickoff-guide-item button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .project-action-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .project-action-item button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .project-filter-bar,
  .task-filter-bar,
  .history-filter-bar,
  .user-filter-bar {
    grid-template-columns: 1fr;
  }

  .task-quick-filters,
  .history-action-list,
  .memo-insight,
  .user-quick-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-triage,
  .task-triage.empty-state {
    grid-template-columns: 1fr;
  }

  .task-priority-queue-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .task-priority-item {
    grid-template-columns: 28px minmax(0, 1fr) 42px;
  }

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

  .gantt-focus-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .gantt-focus-chips {
    justify-content: flex-start;
  }

  .project-filter-actions,
  .task-filter-actions,
  .history-filter-actions,
  .user-filter-actions {
    justify-content: stretch;
  }

  .history-action-plan-head {
    align-items: stretch;
    flex-direction: column;
  }

  .history-action-plan-head small {
    flex-basis: auto;
    text-align: left;
  }

  .project-filter-actions > *,
  .task-filter-actions > *,
  .history-filter-actions > *,
  .user-filter-actions > * {
    flex: 1 1 0;
  }

  .task-filter-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .task-filter-chips {
    flex-basis: auto;
  }

  .filter-clear-all {
    width: 100%;
  }

  .history-task-card header {
    flex-direction: column;
  }

  .history-task-dates {
    flex-basis: auto;
    width: 100%;
    text-align: left;
  }

  .history-task-open {
    justify-self: start;
  }

  .retro-draft-head {
    align-items: stretch;
    flex-direction: column;
  }

  .member-workload-item {
    grid-template-columns: 1fr;
  }

  .member-workload-metrics {
    justify-content: flex-start;
  }

  .file-board-metrics,
  .file-action-list,
  .file-board-sections {
    grid-template-columns: 1fr;
  }

  .file-action-head {
    align-items: stretch;
    flex-direction: column;
  }

  .file-action-head button {
    width: 100%;
  }

  .file-board-metric.wide {
    grid-column: auto;
  }

  .file-board-empty {
    grid-template-columns: 1fr;
  }

  .dashboard-focus-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-focus-item > span,
  .dashboard-focus-item .secondary {
    width: 100%;
  }

  .drawer-panel-wide {
    width: 100%;
  }

  .drawer-panel {
    padding: 18px;
  }

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

  .smart-draft-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    align-items: flex-start;
    min-height: 100dvh;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-panel {
    padding: 24px 18px;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar > * {
    flex: 1 1 auto;
  }

  .toolbar > .realtime-alert-center {
    flex: 0 0 auto;
  }

  .primary,
  .secondary,
  .ghost,
  .danger {
    width: 100%;
  }

  .realtime-alert-button {
    width: auto;
  }

  .realtime-alert-panel {
    position: fixed;
    top: auto;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .pager {
    justify-content: center;
  }

  .pager .ghost {
    width: auto;
    flex: 1 1 112px;
  }

  .pager span {
    order: -1;
    flex: 1 0 100%;
    text-align: center;
  }

  .message .toolbar,
  .memo-reply .toolbar {
    width: auto;
  }

  .message .toolbar > *,
  .memo-reply .toolbar > * {
    flex: 0 0 auto;
    width: auto;
  }

  .message-head,
  .memo-reply {
    flex-direction: column;
  }

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

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .drawer {
    align-items: stretch;
  }

  .drawer-panel {
    width: 100%;
    padding: 16px;
  }

  .drawer-header {
    align-items: stretch;
    flex-direction: column;
  }

  .drawer-header .ghost {
    width: 100%;
  }

  .smart-entry-form .toolbar {
    align-items: stretch;
  }

  .smart-flow-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .smart-flow-head small {
    text-align: left;
  }

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

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

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

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

  .project-agent-head,
  .project-agent-subhead,
  .project-agent-result-actions,
  .project-agent-section > header,
  .project-agent-section-head,
  .project-agent-compose .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .project-agent-head > span,
  .project-agent-section-tag,
  .project-agent-result-tag,
  .project-agent-file-button,
  .project-agent-compose .toolbar button,
  .project-agent-result button,
  .project-agent-result-actions button {
    width: 100%;
  }

  .project-agent-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .smart-input-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .smart-input-tools .ghost,
  .smart-input-tools small {
    width: 100%;
    min-width: 0;
  }

  .voice-input {
    align-items: stretch;
    flex-direction: column;
  }

  .voice-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .voice-button,
  .voice-file-button {
    width: 100%;
  }

  .voice-status {
    flex-basis: auto;
  }

  .voice-status-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .smart-entry-hint {
    min-width: 0;
    flex-basis: 100%;
  }

  .smart-draft-card header {
    align-items: stretch;
    flex-direction: column;
  }

  .smart-draft-card header .danger,
  .smart-draft-actions .primary {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .task-quick-filters,
  .history-action-list,
  .memo-insight,
  .user-quick-filters,
  .task-triage-metrics,
  .retro-evidence-metrics,
  .smart-flow-steps,
  .project-agent-flow {
    grid-template-columns: 1fr;
  }
}
